summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys-auth/oath-toolkit/files/oath-toolkit-2.6.11-fix-musl-build.patch24
-rw-r--r--sys-auth/oath-toolkit/oath-toolkit-2.6.11.ebuild12
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