diff options
-rw-r--r-- | user/extra-cmake-modules/APKBUILD | 44 | ||||
-rw-r--r-- | user/extra-cmake-modules/posix.patch | 32 |
2 files changed, 76 insertions, 0 deletions
diff --git a/user/extra-cmake-modules/APKBUILD b/user/extra-cmake-modules/APKBUILD new file mode 100644 index 000000000..408375dc7 --- /dev/null +++ b/user/extra-cmake-modules/APKBUILD @@ -0,0 +1,44 @@ +# Contributor: A. Wilcox <awilfox@adelielinux.org> +# Maintainer: A. Wilcox <awilfox@adelielinux.org> +pkgname=extra-cmake-modules +pkgver=5.38.0 +pkgrel=0 +pkgdesc="CMake modules needed for KDE development" +url="https://www.kde.org/" +arch="all" +license="3-Clause-BSD" +options="!dbg" +depends="" +makedepends="cmake qt5-qtbase-dev qt5-qttools-dev qt5-qtdeclarative-dev qt5-qtquickcontrols" +subpackages="" +source="http://download.kde.org/stable/frameworks/5.38/extra-cmake-modules-$pkgver.tar.xz + posix.patch" +builddir="$srcdir/extra-cmake-modules-$pkgver" + +build() { + cd "$builddir" + if [ "$CBUILD" != "$CHOST" ]; then + CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux" + fi + cmake \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_BUILD_TYPE=RelWithDebugInfo \ + -DCMAKE_CXX_FLAGS="$CXXFLAGS" \ + -DCMAKE_C_FLAGS="$CFLAGS" \ + ${CMAKE_CROSSOPTS} + make +} + +check() { + cd "$builddir" + CTEST_OUTPUT_ON_FAILURE=TRUE \ + ctest -E '(relative_or_absolute_|KDEFetchTranslations|ECMToolchainAndroidTest)' +} + +package() { + cd "$builddir" + make DESTDIR="$pkgdir" install +} + +sha512sums="c1fd65593732e57fb0822fd5bc2b06f9e35713a78f35269f387f6d9e4c87520b46f3cde039a42993139b478da5aebf1764d0111746af75bb0e5a33822684e501 extra-cmake-modules-5.38.0.tar.xz +0af703a9d4696080bc52032d1d341e86fd142bef91f3c1afa9cf180e1cf2ff3bba2ea47fd36b8f52135f056a202c58a08e7c7525f671d6993839865ce6aef0f6 posix.patch" diff --git a/user/extra-cmake-modules/posix.patch b/user/extra-cmake-modules/posix.patch new file mode 100644 index 000000000..4ed301d5e --- /dev/null +++ b/user/extra-cmake-modules/posix.patch @@ -0,0 +1,32 @@ +From 82387db20e8a22475a242705795d451219167ceb Mon Sep 17 00:00:00 2001 +From: "A. Wilcox" <AWilcox@Wilcox-Tech.com> +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 <AWilcox@Wilcox-Tech.com> +--- + 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 +--- a/kde-modules/KDECompilerSettings.cmake ++++ b/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 + |