commit: 004bb293481c2301d634f514378ff59703fa7419 Author: Mike Gilbert <floppym <AT> gentoo <DOT> org> AuthorDate: Sat Jan 15 15:40:40 2022 +0000 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> CommitDate: Sat Jan 15 15:41:33 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=004bb293
sys-apps/systemd-tmpfiles: backport cross compile fix Closes: https://bugs.gentoo.org/831221 Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org> .../files/249.9-cross-compile.patch | 23 ++++++++++++++++++++++ .../systemd-tmpfiles/systemd-tmpfiles-249.9.ebuild | 7 +++++-- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/sys-apps/systemd-tmpfiles/files/249.9-cross-compile.patch b/sys-apps/systemd-tmpfiles/files/249.9-cross-compile.patch new file mode 100644 index 000000000000..e063d303c7d8 --- /dev/null +++ b/sys-apps/systemd-tmpfiles/files/249.9-cross-compile.patch @@ -0,0 +1,23 @@ +From 3d7fd38ea938ab194366f40ed7aa413ad33f2fad Mon Sep 17 00:00:00 2001 +From: Yu Watanabe <[email protected]> +Date: Tue, 21 Dec 2021 20:10:09 +0900 +Subject: [PATCH] meson: fix cross compiling + +(cherry picked from commit 3112d756a36993900b70fbff98e69a2a43b970a8) +--- + meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index 02495d16c9..c76cab535d 100644 +--- a/meson.build ++++ b/meson.build +@@ -442,7 +442,7 @@ conf.set('SIZEOF_DEV_T', cc.sizeof('dev_t', prefix : '#include <sys/types.h>')) + conf.set('SIZEOF_INO_T', cc.sizeof('ino_t', prefix : '#include <sys/types.h>')) + conf.set('SIZEOF_TIME_T', cc.sizeof('time_t', prefix : '#include <sys/time.h>')) + conf.set('SIZEOF_RLIM_T', cc.sizeof('rlim_t', prefix : '#include <sys/resource.h>')) +-conf.set('SIZEOF_TIMEX_MEMBER', cc.sizeof('((struct timex *)0)->freq', prefix : '#include <sys/timex.h>')) ++conf.set('SIZEOF_TIMEX_MEMBER', cc.sizeof('typeof(((struct timex *)0)->freq)', prefix : '#include <sys/timex.h>')) + + decl_headers = ''' + #include <uchar.h> diff --git a/sys-apps/systemd-tmpfiles/systemd-tmpfiles-249.9.ebuild b/sys-apps/systemd-tmpfiles/systemd-tmpfiles-249.9.ebuild index 2d33b1162988..a09aed92da4c 100644 --- a/sys-apps/systemd-tmpfiles/systemd-tmpfiles-249.9.ebuild +++ b/sys-apps/systemd-tmpfiles/systemd-tmpfiles-249.9.ebuild @@ -74,13 +74,16 @@ pkg_setup() { } src_prepare() { + local PATCHES=( + "${FILESDIR}/249.9-cross-compile.patch" + ) + # musl patchset from: # http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-core/systemd/systemd # check SRC_URI_MUSL in systemd_${PV}.bb file for exact list of musl patches # we share patch tarball with sys-fs/udev if use elibc_musl; then - einfo "applying musl patches and workarounds" - eapply "${WORKDIR}/musl-patches" + PATCHES+=( "${WORKDIR}/musl-patches" ) # avoids re-definition of struct ethhdr, also 0006-Include-netinet-if_ether.h.patch append-cppflags '-D__UAPI_DEF_ETHHDR=0'
