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