summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-12-26 03:02:27 +0000
committerSam James <sam@gentoo.org>2021-12-26 03:03:39 +0000
commit65f96213bd1cc2f77a9c5c5fb5665c91d8279909 (patch)
treee6f05db4650c3eb5de75b749b4db0acc1c43d367 /sci-libs
parentsys-boot/plymouth: fix pre release of 0.9.6 from patch (diff)
downloadgentoo-65f96213bd1cc2f77a9c5c5fb5665c91d8279909.tar.gz
gentoo-65f96213bd1cc2f77a9c5c5fb5665c91d8279909.tar.bz2
gentoo-65f96213bd1cc2f77a9c5c5fb5665c91d8279909.zip
sci-libs/flann: fix pkgconfig file format (no semicolons)
Not sure why but a semicolon seems to have started appearing more recently, probably with a newer CMake version. Anyway, a problem from the past resurfaced (in a slightly different way, but same outcome). flann's malformed pkgconfig file was causing consumers to be underlinked against lz4 and libflann* (and usually fail to build). Closes: https://bugs.gentoo.org/827263 Closes: https://bugs.gentoo.org/829398 Bug: https://bugs.gentoo.org/681898 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/flann/files/flann-1.9.1-system-lz4-pkgconfig.patch38
-rw-r--r--sci-libs/flann/flann-1.9.1-r4.ebuild (renamed from sci-libs/flann/flann-1.9.1-r3.ebuild)3
2 files changed, 40 insertions, 1 deletions
diff --git a/sci-libs/flann/files/flann-1.9.1-system-lz4-pkgconfig.patch b/sci-libs/flann/files/flann-1.9.1-system-lz4-pkgconfig.patch
new file mode 100644
index 000000000000..35ea0d0e9841
--- /dev/null
+++ b/sci-libs/flann/files/flann-1.9.1-system-lz4-pkgconfig.patch
@@ -0,0 +1,38 @@
+https://github.com/flann-lib/flann/pull/480
+
+https://bugs.gentoo.org/827263
+https://bugs.gentoo.org/829398
+https://bugs.gentoo.org/681898
+
+From 25eb56ec78472bd419a121c6905095a793cf8992 Mon Sep 17 00:00:00 2001
+From: Mike Purvis <mpurvis@clearpath.ai>
+Date: Fri, 9 Jul 2021 15:53:06 +0000
+Subject: [PATCH] Use string(JOIN) to avoid semicolons in pc file.
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-cmake_minimum_required(VERSION 2.6)
++cmake_minimum_required(VERSION 3.12)
+
+ if(COMMAND cmake_policy)
+ cmake_policy(SET CMP0003 NEW)
+@@ -148,6 +148,7 @@ endif(BUILD_CUDA_LIB)
+
+ find_package(PkgConfig REQUIRED)
+ pkg_check_modules(LZ4 REQUIRED liblz4)
++string(JOIN " " LZ4_STATIC_LDFLAGS_STR ${LZ4_STATIC_LDFLAGS})
+
+ #set the C/C++ include path to the "include" directory
+ include_directories(BEFORE ${PROJECT_SOURCE_DIR}/src/cpp)
+--- a/cmake/flann.pc.in
++++ b/cmake/flann.pc.in
+@@ -8,6 +8,6 @@ Name: @PROJECT_NAME@
+ Description: @PKG_DESC@
+ Version: @FLANN_VERSION@
+ Requires: @PKG_EXTERNAL_DEPS@
+-Libs: -L${libdir} @LZ4_STATIC_LDFLAGS@ -lflann -lflann_cpp
++Libs: -L${libdir} @LZ4_STATIC_LDFLAGS_STR@ -lflann -lflann_cpp
+ Cflags: -I${includedir}
+
+
diff --git a/sci-libs/flann/flann-1.9.1-r3.ebuild b/sci-libs/flann/flann-1.9.1-r4.ebuild
index e53d428ee73c..49a8a1c514e2 100644
--- a/sci-libs/flann/flann-1.9.1-r3.ebuild
+++ b/sci-libs/flann/flann-1.9.1-r4.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -37,6 +37,7 @@ PATCHES=(
"${FILESDIR}"/${P}-cmake-3.11{,-1}.patch # bug 678030
"${FILESDIR}"/${P}-cuda-9.patch
"${FILESDIR}"/${P}-system-lz4.patch # bug 681898
+ "${FILESDIR}"/flann-1.9.1-system-lz4-pkgconfig.patch
)
pkg_pretend() {