blob: 6d72eb64b387c4a097b14043a67a3015bbc9c018 [file] [log] [blame]
Andrew Geissler595f6302022-01-24 19:11:47 +00001SUMMARY = "libsystemd static library"
2DESCRIPTION = "libsystemd static library built specifically as an integral component of sdbus-c++"
3
4SECTION = "libs"
5
Andrew Geissler9aee5002022-03-30 16:27:02 +00006LICENSE = "LGPL-2.1-or-later"
Andrew Geissler595f6302022-01-24 19:11:47 +00007LIC_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 = "1b003bbc806198dbdd57b405d968f30565495e70"
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
62do_compile() {
63 ninja -v ${PARALLEL_MAKE} version.h
64 ninja -v ${PARALLEL_MAKE} libsystemd.a
65 ninja -v ${PARALLEL_MAKE} src/libsystemd/libsystemd.pc
66}
67
68do_install () {
69 install -d ${D}${libdir}
70 install ${B}/libsystemd.a ${D}${libdir}
71
72 install -d ${D}${includedir}/systemd
73 install ${S}/src/systemd/*.h ${D}${includedir}/systemd
74
75 install -d ${D}${libdir}/pkgconfig
76 install ${B}/src/libsystemd/libsystemd.pc ${D}${libdir}/pkgconfig
77}