From 6ea6333828a4a0ed408969995512776fe075ec6f Mon Sep 17 00:00:00 2001 From: Toyam Cox Date: Tue, 20 Dec 2016 00:05:52 -0500 Subject: [PATCH] extra-cmake-modules: fix muslc compat --- .../extra-cmake-modules/patches/musl.patch | 31 +++++++++++++++++++ srcpkgs/extra-cmake-modules/template | 2 +- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/extra-cmake-modules/patches/musl.patch diff --git a/srcpkgs/extra-cmake-modules/patches/musl.patch b/srcpkgs/extra-cmake-modules/patches/musl.patch new file mode 100644 index 00000000000..3056a6ccbdc --- /dev/null +++ b/srcpkgs/extra-cmake-modules/patches/musl.patch @@ -0,0 +1,31 @@ +From 82387db20e8a22475a242705795d451219167ceb Mon Sep 17 00:00:00 2001 +From: "A. Wilcox" +Date: Fri, 2 Dec 2016 01:27:14 -0600 +Subject: [PATCH] KDECompilerSettings: Ensure POSIX correctness + +This change ensures that _XOPEN_SOURCE is defined. Since we use -std= +iso9899:1990, GCC and Clang won't enable this definition by default. +On non-glibc systems (where _GNU_SOURCE isn't defined), this causes most +POSIX interfaces to be missing, which cause various build failures. + +Signed-off-by: A. Wilcox +--- + kde-modules/KDECompilerSettings.cmake | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/kde-modules/KDECompilerSettings.cmake b/kde-modules/KDECompilerSettings.cmake +index dfa29f7..f50911c 100644 +--- kde-modules/KDECompilerSettings.cmake ++++ kde-modules/KDECompilerSettings.cmake +@@ -140,6 +140,9 @@ if (UNIX) + # implementation recognize it? + _kde_add_platform_definitions(-D_LARGEFILE64_SOURCE) + ++ # Non-glibc platforms need this since we specify -std=iso9899:1990 ++ _kde_add_platform_definitions(-D_XOPEN_SOURCE=600) ++ + include(CheckCXXSourceCompiles) + + # By default (in glibc, at least), on 32bit platforms off_t is 32 bits, +-- +2.10.0 diff --git a/srcpkgs/extra-cmake-modules/template b/srcpkgs/extra-cmake-modules/template index 144f4a038a1..6bd3290ea45 100644 --- a/srcpkgs/extra-cmake-modules/template +++ b/srcpkgs/extra-cmake-modules/template @@ -1,7 +1,7 @@ # Template file for 'extra-cmake-modules' pkgname=extra-cmake-modules version=5.29.0 -revision=1 +revision=2 noarch=yes build_style=cmake configure_args="-DBUILD_HTML_DOCS=OFF -DBUILD_TESTING=OFF"