summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfred Persson Forsberg <cat@catcream.org>2022-06-28 16:11:03 +0000
committerSam James <sam@gentoo.org>2022-07-15 08:12:19 +0100
commit4443c8095edbfbb98ec5cf1c3e6b5c109ae8bed4 (patch)
treebdd354ef43afb60b9839c0684d556c4ce49b2d10 /kde-apps/libkgapi
parentdev-db/mysql-connector-c: Use res_n* functions only on GLIBC (diff)
downloadgentoo-4443c8095edbfbb98ec5cf1c3e6b5c109ae8bed4.tar.gz
gentoo-4443c8095edbfbb98ec5cf1c3e6b5c109ae8bed4.tar.bz2
gentoo-4443c8095edbfbb98ec5cf1c3e6b5c109ae8bed4.zip
kde-apps/libkgapi: fix build for musl
The issue here is that NI_MAXHOST is used inside saslplugin/plugin_common.c. That is a GNU extension only defined when _GNU_SOURCE is defined. Declarning that this is POSIX source code (_POSIX_SOURCE) is therefore misleading and breaks the build for musl. See: https://invent.kde.org/pim/libkgapi/-/merge_requests/29/diffs?commit_id=1e6a54a9f2d818aa4046e5291702e236a53ba987, https://invent.kde.org/pim/libkgapi/-/merge_requests/29/ Signed-off-by: Alfred Persson Forsberg <cat@catcream.org> Closes: https://github.com/gentoo/gentoo/pull/26116 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'kde-apps/libkgapi')
-rw-r--r--kde-apps/libkgapi/files/libkgapi-22.04.2-gnu_source.patch23
-rw-r--r--kde-apps/libkgapi/libkgapi-22.04.3.ebuild2
2 files changed, 25 insertions, 0 deletions
diff --git a/kde-apps/libkgapi/files/libkgapi-22.04.2-gnu_source.patch b/kde-apps/libkgapi/files/libkgapi-22.04.2-gnu_source.patch
new file mode 100644
index 000000000000..88e3e2a3ed34
--- /dev/null
+++ b/kde-apps/libkgapi/files/libkgapi-22.04.2-gnu_source.patch
@@ -0,0 +1,23 @@
+https://invent.kde.org/pim/libkgapi/-/merge_requests/29
+https://invent.kde.org/pim/libkgapi/-/merge_requests/29/diffs?commit_id=1e6a54a9f2d818aa4046e5291702e236a53ba987
+
+---
+ src/saslplugin/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/saslplugin/CMakeLists.txt b/src/saslplugin/CMakeLists.txt
+index 61edd04..e8823fb 100644
+--- a/src/saslplugin/CMakeLists.txt
++++ b/src/saslplugin/CMakeLists.txt
+@@ -2,7 +2,7 @@ include(CheckIncludeFile)
+ include(CheckStructHasMember)
+
+ if (NOT CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
+- add_definitions(-D_POSIX_SOURCE)
++ add_definitions(-D_GNU_SOURCE)
+ endif()
+
+ if (WIN32)
+--
+2.35.1
+
diff --git a/kde-apps/libkgapi/libkgapi-22.04.3.ebuild b/kde-apps/libkgapi/libkgapi-22.04.3.ebuild
index 6b4d892a0c6a..2e26e8525db4 100644
--- a/kde-apps/libkgapi/libkgapi-22.04.3.ebuild
+++ b/kde-apps/libkgapi/libkgapi-22.04.3.ebuild
@@ -32,6 +32,8 @@ DEPEND="
"
RDEPEND="${DEPEND}"
+PATCHES=( "${FILESDIR}"/${PN}-22.04.2-gnu_source.patch )
+
src_test() {
local myctestargs=(
# Both fail for multiple distros, see bug #832709 for more discussion