blob: 6411677d98001013e1bbad9f1ad0215a2e615ffd [file] [log] [blame]
Brad Bishope42b3e32020-01-15 22:08:42 -05001SUMMARY = "libsystemd static library"
2DESCRIPTION = "libsystemd static library built specifically as an integral component of sdbus-c++"
3
4SECTION = "libs"
5
6LICENSE = "LGPLv2.1+"
7LIC_FILES_CHKSUM = "file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c"
8
9inherit meson pkgconfig
10
11DEPENDS += "gperf-native gettext-native util-linux libcap"
12
13SRCREV = "efb536d0cbe2e58f80e501d19999928c75e08f6a"
14SRCBRANCH = "v243-stable"
William A. Kennington IIIb95905d2021-06-02 12:40:56 -070015SRC_URI = "git://github.com/systemd/systemd-stable.git;protocol=git;branch=${SRCBRANCH} \
16 file://static-libsystemd-pkgconfig.patch \
17 file://7c5fd25119a495009ea62f79e5daec34cc464628.patch \
18 "
Brad Bishope42b3e32020-01-15 22:08:42 -050019
20# patches needed by musl
Patrick Williams213cb262021-08-07 19:21:33 -050021SRC_URI:append:libc-musl = " ${SRC_URI_MUSL}"
Brad Bishope42b3e32020-01-15 22:08:42 -050022SRC_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://0006-Include-netinet-if_ether.h.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://0010-fix-missing-of-__register_atfork-for-non-glibc-build.patch \
31 file://0011-Use-uintmax_t-for-handling-rlim_t.patch \
32 file://0014-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch \
33 file://0015-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch \
34 file://0016-Define-glibc-compatible-basename-for-non-glibc-syste.patch \
35 file://0017-Do-not-disable-buffering-when-writing-to-oom_score_a.patch \
36 file://0018-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch \
37 file://0019-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch \
38 file://0020-missing_type.h-add-__compar_d_fn_t-definition.patch \
39 file://0021-avoid-redefinition-of-prctl_mm_map-structure.patch \
40 file://0024-test-json.c-define-M_PIl.patch \
41 file://0001-do-not-disable-buffer-in-writing-files.patch \
42 file://0002-src-login-brightness.c-include-sys-wait.h.patch \
43 file://0003-src-basic-copy.c-include-signal.h.patch \
44 file://0004-src-shared-cpu-set-util.h-add-__cpu_mask-definition.patch \
Andrew Geissler72956ed2021-01-08 16:11:14 -060045 file://0001-meson-Fix-reallocarray-check.patch \
Brad Bishope42b3e32020-01-15 22:08:42 -050046 "
47
48PACKAGECONFIG ??= "gshadow idn"
Patrick Williams213cb262021-08-07 19:21:33 -050049PACKAGECONFIG:remove:libc-musl = " gshadow idn"
Brad Bishope42b3e32020-01-15 22:08:42 -050050PACKAGECONFIG[gshadow] = "-Dgshadow=true,-Dgshadow=false"
51PACKAGECONFIG[idn] = "-Didn=true,-Didn=false"
52
53EXTRA_OEMESON += "-Dstatic-libsystemd=pic"
54
55S = "${WORKDIR}/git"
56
57do_compile() {
58 ninja -v ${PARALLEL_MAKE} version.h
59 ninja -v ${PARALLEL_MAKE} libsystemd.a
60}
61
62do_install () {
63 install -d ${D}${libdir}
64 install ${B}/libsystemd.a ${D}${libdir}
65
66 install -d ${D}${includedir}/systemd
67 install ${S}/src/systemd/*.h ${D}${includedir}/systemd
68
69 install -d ${D}${libdir}/pkgconfig
70 install ${B}/src/libsystemd/libsystemd.pc ${D}${libdir}/pkgconfig
71}