aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuca Weiss <luca@z3ntu.xyz>2019-07-28 13:53:39 +0200
committerLeo <thinkabit.ukim@gmail.com>2019-07-29 08:17:57 -0300
commit5bace0b2b0e600a6f644bd0ea51f2027a19b0a91 (patch)
treed8998cb27483af5767f5eae06d351ffb9f6cc536
parent14fcaeea68674910e7493d0a3786393dd9bc0bcd (diff)
testing/fmt: new aport
-rw-r--r--testing/fmt/0001-install-pkg-config-file-into-libdir.patch36
-rw-r--r--testing/fmt/APKBUILD40
2 files changed, 76 insertions, 0 deletions
diff --git a/testing/fmt/0001-install-pkg-config-file-into-libdir.patch b/testing/fmt/0001-install-pkg-config-file-into-libdir.patch
new file mode 100644
index 00000000000..46aa8cd439a
--- /dev/null
+++ b/testing/fmt/0001-install-pkg-config-file-into-libdir.patch
@@ -0,0 +1,36 @@
+From 693b64cd580e78b4c47b30720df11edec0fa8ff8 Mon Sep 17 00:00:00 2001
+From: Olaf Hering <olaf@aepfle.de>
+Date: Mon, 25 Mar 2019 17:16:18 +0100
+Subject: [PATCH] install pkg-config file into libdir
+
+Most pkgconfig files contain a Libs: variable, which is either /usr/lib
+or /usr/lib64. If a 32bit and a 64bit variant of fmt libraries is
+installed, the last one wins. As a result compiling for the other
+bitsize will fail.
+
+Instead of sharedir use libdir as install target.
+
+Fixes commit 9d0c9c4bb145a286f725cd38c90331eee7addc7f
+Fixes commit 287342dab10a5a96479b3e21cd11ce671ed8125c
+
+Signed-off-by: Olaf Hering <olaf@aepfle.de>
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ce9dbf95..6903a11c 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -205,7 +205,7 @@ if (FMT_INSTALL)
+ set(FMT_INC_DIR ${CMAKE_INSTALL_INCLUDEDIR}/fmt CACHE STRING
+ "Installation directory for include files, relative to ${CMAKE_INSTALL_PREFIX}.")
+
+- set(FMT_PKGCONFIG_DIR "${CMAKE_INSTALL_PREFIX}/share/pkgconfig" CACHE PATH
++ set(FMT_PKGCONFIG_DIR ${CMAKE_INSTALL_LIBDIR}/pkgconfig CACHE PATH
+ "Installation directory for pkgconfig (.pc) files, relative to ${CMAKE_INSTALL_PREFIX}.")
+
+ # Generate the version, config and target files into the build directory.
+--
+2.22.0
+
diff --git a/testing/fmt/APKBUILD b/testing/fmt/APKBUILD
new file mode 100644
index 00000000000..fb402aa0268
--- /dev/null
+++ b/testing/fmt/APKBUILD
@@ -0,0 +1,40 @@
+# Contributor: Luca Weiss <luca@z3ntu.xyz>
+# Maintainer: Luca Weiss <luca@z3ntu.xyz>
+pkgname="fmt"
+pkgver="5.3.0"
+pkgrel=0
+pkgdesc="Open-source formatting library for C++"
+url="https://fmt.dev/latest/index.html"
+arch="all"
+license="BSD-2-Clause"
+makedepends="cmake doxygen"
+subpackages="$pkgname-dev $pkgname-doc"
+source="https://github.com/fmtlib/fmt/releases/download/$pkgver/fmt-$pkgver.zip
+ 0001-install-pkg-config-file-into-libdir.patch"
+options="!check" # 93% tests passed, 1 tests failed out of 14
+
+build() {
+ if [ "$CBUILD" != "$CHOST" ]; then
+ CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
+ fi
+ cmake \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=lib \
+ -DBUILD_SHARED_LIBS=True \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_CXX_FLAGS="$CXXFLAGS" \
+ -DCMAKE_C_FLAGS="$CFLAGS" \
+ ${CMAKE_CROSSOPTS} .
+ make
+}
+
+check() {
+ cmake --build . --target test
+}
+
+package() {
+ make DESTDIR="$pkgdir" install
+}
+
+sha512sums="3075553cb8200cf268e77339ccc7faf834f7af4dabaf5a7ddbb2de9969eb94e6d51e7ba943692e6be54e016907b72eb5e0d9b16a3873e52ff41596660b4f1186 fmt-5.3.0.zip
+75f5fdf0b3a47e5a31a608c14274e0c9d6f0600e0847f8607f4e62966c944ddbbed5ea3287b3f714e2ca56d242ca68bb68b5a1c77ca516a6e19033195d30c6b0 0001-install-pkg-config-file-into-libdir.patch"