diff options
author | Michael Orlitzky <mjo@gentoo.org> | 2024-08-31 07:03:45 -0400 |
---|---|---|
committer | Michael Orlitzky <mjo@gentoo.org> | 2024-08-31 09:18:30 -0400 |
commit | 6cd7e5165b7750317d42a65b9bc20ce65eec8302 (patch) | |
tree | bbe2f9e2a6a73d8dba18ae04e0c149b2c34b8d41 /sys-auth/oath-toolkit | |
parent | dev-libs/glib: Add meson.${CHOST}.ini.local file in src_prepare (diff) | |
download | gentoo-6cd7e5165b7750317d42a65b9bc20ce65eec8302.tar.gz gentoo-6cd7e5165b7750317d42a65b9bc20ce65eec8302.tar.bz2 gentoo-6cd7e5165b7750317d42a65b9bc20ce65eec8302.zip |
sys-auth/oath-toolkit: fix the build on musl
Add an upstream patch to fix the build on musl, and then fix a new
problem introduced by the patch: the build system is extremely sensitive
to mtime changes in the source tree, in that patching triggers a
rebuild of some Makefile sources, which ultimately tries to invoke
automake. We have to fudge the mtime on the patched file to avoid this.
Bug: https://bugs.gentoo.org/936309
Closes: https://bugs.gentoo.org/933086
Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
Diffstat (limited to 'sys-auth/oath-toolkit')
-rw-r--r-- | sys-auth/oath-toolkit/files/oath-toolkit-2.6.11-fix-musl-build.patch | 24 | ||||
-rw-r--r-- | sys-auth/oath-toolkit/oath-toolkit-2.6.11.ebuild | 12 |
2 files changed, 36 insertions, 0 deletions
diff --git a/sys-auth/oath-toolkit/files/oath-toolkit-2.6.11-fix-musl-build.patch b/sys-auth/oath-toolkit/files/oath-toolkit-2.6.11-fix-musl-build.patch new file mode 100644 index 000000000000..5affd40c3111 --- /dev/null +++ b/sys-auth/oath-toolkit/files/oath-toolkit-2.6.11-fix-musl-build.patch @@ -0,0 +1,24 @@ +From 65f37d4deb6ac87dd64df1bb281588d300a1bf3e Mon Sep 17 00:00:00 2001 +From: orbea <orbea@riseup.net> +Date: Mon, 12 Feb 2024 18:18:31 -0800 +Subject: [PATCH] libpskc: fix implicit declaration with musl + +--- + libpskc/global.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libpskc/global.c b/libpskc/global.c +index 1a514506..6082e11a 100644 +--- a/libpskc/global.c ++++ b/libpskc/global.c +@@ -24,6 +24,7 @@ + #include <pskc/pskc.h> + + #include "internal.h" ++#include <stdlib.h> /* free */ + #include <string.h> /* strverscmp */ + #include <libxml/parser.h> /* xmlInitParser */ + #include <libxml/catalog.h> /* xmlLoadCatalog */ +-- +GitLab + diff --git a/sys-auth/oath-toolkit/oath-toolkit-2.6.11.ebuild b/sys-auth/oath-toolkit/oath-toolkit-2.6.11.ebuild index 03d2801fa64c..80f393cfd4d0 100644 --- a/sys-auth/oath-toolkit/oath-toolkit-2.6.11.ebuild +++ b/sys-auth/oath-toolkit/oath-toolkit-2.6.11.ebuild @@ -27,6 +27,8 @@ BDEPEND=" test? ( dev-libs/libxml2 ) " +PATCHES=( "${FILESDIR}/${P}-fix-musl-build.patch" ) + QA_CONFIG_IMPL_DECL_SKIP=( MIN # glibc fp unreachable @@ -34,6 +36,16 @@ QA_CONFIG_IMPL_DECL_SKIP=( static_assert ) +src_prepare() { + default + + # After patching, we have to fix the mtime on libpskc/global.c so + # that it doesn't cause Makefile.gdoc to be rebuilt so that it + # doesn't cause Makefile.in to be rebuilt so that it doesn't try to + # run automake-1.16.5 for no reason. Bug 936309. + touch --reference=libpskc/errors.c libpskc/global.c || die +} + src_configure() { local myeconfargs=( --cache-file="${S}"/config.cache |