1SUMMARY = "libsystemd static library" 2DESCRIPTION = "libsystemd static library built specifically as an integral component of sdbus-c++" 3 4SECTION = "libs" 5 6LICENSE = "LGPL-2.1-or-later" 7LIC_FILES_CHKSUM = "file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c" 8 9inherit meson pkgconfig 10 11DEPENDS += "gperf-native gettext-native util-linux libcap util-linux python3-jinja2-native" 12 13SRCREV = "73be9643910c3f7f3ff84765d63060846c110016" 14SRCBRANCH = "v250-stable" 15SRC_URI = "git://github.com/systemd/systemd-stable.git;protocol=https;branch=${SRCBRANCH} \ 16 file://static-libsystemd-pkgconfig.patch \ 17 " 18 19# patches needed by musl 20SRC_URI:append:libc-musl = " ${SRC_URI_MUSL}" 21 22SRC_URI_MUSL = "\ 23 file://0002-don-t-use-glibc-specific-qsort_r.patch \ 24 file://0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch \ 25 file://0004-add-fallback-parse_printf_format-implementation.patch \ 26 file://0005-src-basic-missing.h-check-for-missing-strndupa.patch \ 27 file://0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch \ 28 file://0008-add-missing-FTW_-macros-for-musl.patch \ 29 file://0009-fix-missing-of-__register_atfork-for-non-glibc-build.patch \ 30 file://0010-Use-uintmax_t-for-handling-rlim_t.patch \ 31 file://0011-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch \ 32 file://0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch \ 33 file://0013-Define-glibc-compatible-basename-for-non-glibc-syste.patch \ 34 file://0014-Do-not-disable-buffering-when-writing-to-oom_score_a.patch \ 35 file://0015-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch \ 36 file://0016-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch \ 37 file://0017-missing_type.h-add-__compar_d_fn_t-definition.patch \ 38 file://0018-avoid-redefinition-of-prctl_mm_map-structure.patch \ 39 file://0019-Handle-missing-LOCK_EX.patch \ 40 file://0020-Fix-incompatible-pointer-type-struct-sockaddr_un.patch \ 41 file://0021-test-json.c-define-M_PIl.patch \ 42 file://0022-do-not-disable-buffer-in-writing-files.patch \ 43 file://0025-Handle-__cpu_mask-usage.patch \ 44 file://0026-Handle-missing-gshadow.patch \ 45 file://0028-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch \ 46 file://0001-pass-correct-parameters-to-getdents64.patch \ 47 file://0002-Add-sys-stat.h-for-S_IFDIR.patch \ 48 file://0001-Adjust-for-musl-headers.patch \ 49 " 50 51PACKAGECONFIG ??= "gshadow idn" 52PACKAGECONFIG:remove:libc-musl = " gshadow idn" 53PACKAGECONFIG[gshadow] = "-Dgshadow=true,-Dgshadow=false" 54PACKAGECONFIG[idn] = "-Didn=true,-Didn=false" 55 56CFLAGS:append:libc-musl = " -D__UAPI_DEF_ETHHDR=0 " 57 58EXTRA_OEMESON += "-Dstatic-libsystemd=pic" 59 60S = "${WORKDIR}/git" 61 62RDEPENDS:${PN}-dev = "" 63 64do_compile() { 65 ninja -v ${PARALLEL_MAKE} version.h 66 ninja -v ${PARALLEL_MAKE} libsystemd.a 67 ninja -v ${PARALLEL_MAKE} src/libsystemd/libsystemd.pc 68} 69 70do_install () { 71 install -d ${D}${libdir} 72 install ${B}/libsystemd.a ${D}${libdir} 73 74 install -d ${D}${includedir}/systemd 75 install ${S}/src/systemd/*.h ${D}${includedir}/systemd 76 77 install -d ${D}${libdir}/pkgconfig 78 install ${B}/src/libsystemd/libsystemd.pc ${D}${libdir}/pkgconfig 79} 80