summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt Kanzenbach <kurt@kmk-computers.de>2020-03-08 12:33:31 +0100
committerJoonas Niilola <juippis@gentoo.org>2020-03-15 19:51:49 +0200
commitac3473874f431d2047da57f71c253146ae8f243c (patch)
treeb3ec56283c7a67a76997b46ca49319fc0ee011d0 /sci-libs
parentsci-libs/libgeodecomp: Add current version (diff)
downloadgentoo-ac3473874f431d2047da57f71c253146ae8f243c.tar.gz
gentoo-ac3473874f431d2047da57f71c253146ae8f243c.tar.bz2
gentoo-ac3473874f431d2047da57f71c253146ae8f243c.zip
sci-libs/libgeodecomp: Fix boost detection
When hpx is installed libgeodecomp tries to use the boost libraries detected by hpx. That doesn't work, because the wrong variables are referenced and hpx uses fewer boost libraries than libgeodecomp. So remove that and use the system boost libraries in all cases. Closes: https://bugs.gentoo.org/686294 Package-Manager: Portage-2.3.89, Repoman-2.3.20 Signed-off-by: Kurt Kanzenbach <kurt@kmk-computers.de> Closes: https://github.com/gentoo/gentoo/pull/14855 Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/libgeodecomp/files/libgeodecomp-0.4.0-boost.patch92
-rw-r--r--sci-libs/libgeodecomp/libgeodecomp-0.4.0-r1.ebuild1
2 files changed, 93 insertions, 0 deletions
diff --git a/sci-libs/libgeodecomp/files/libgeodecomp-0.4.0-boost.patch b/sci-libs/libgeodecomp/files/libgeodecomp-0.4.0-boost.patch
new file mode 100644
index 000000000000..d706950af59b
--- /dev/null
+++ b/sci-libs/libgeodecomp/files/libgeodecomp-0.4.0-boost.patch
@@ -0,0 +1,92 @@
+From f964fc68b745cc200a1df9e442a2dd8e908f0248 Mon Sep 17 00:00:00 2001
+From: Kurt Kanzenbach <kurt@kmk-computers.de>
+Date: Sun, 8 Mar 2020 10:53:53 +0100
+Subject: [PATCH] cmake: Disable use of HPX boost libraries
+
+First of all the wrong variables are referenced. Second HPX doesn't include
+date_time which is needed by the tracing writer. So that does not work.
+
+Use the system boost libraries.
+
+Signed-off-by: Kurt Kanzenbach <kurt@kmk-computers.de>
+---
+ src/CMakeLists.txt | 60 +++++++++++++++++-----------------------------
+ 1 file changed, 22 insertions(+), 38 deletions(-)
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 2870446108d0..f1a15abb0161 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -2,47 +2,31 @@
+
+ find_package(HPX)
+
+-if(NOT HPX_FOUND)
+- if(NOT DEFINED BOOST_ROOT)
+- # deduce Boost location from environment (e.g. on woody.rrze.uni-erlangen.de)
+- set(BOOST_ENV_LIBDIR "$ENV{BOOST_LIBDIR}")
+- if(BOOST_ENV_LIBDIR)
+- set(Boost_NO_SYSTEM_PATHS true)
+- set(BOOST_ROOT "$ENV{BOOST_LIBDIR}/../")
+- set(Boost_LIBRARY_DIRS "$ENV{BOOST_LIBDIR}")
+- set(Boost_INCLUDE_DIR "$ENV{BOOST_INCDIR}")
+- endif()
++if(NOT DEFINED BOOST_ROOT)
++ # deduce Boost location from environment (e.g. on woody.rrze.uni-erlangen.de)
++ set(BOOST_ENV_LIBDIR "$ENV{BOOST_LIBDIR}")
++ if(BOOST_ENV_LIBDIR)
++ set(Boost_NO_SYSTEM_PATHS true)
++ set(BOOST_ROOT "$ENV{BOOST_LIBDIR}/../")
++ set(Boost_LIBRARY_DIRS "$ENV{BOOST_LIBDIR}")
++ set(Boost_INCLUDE_DIR "$ENV{BOOST_INCDIR}")
+ endif()
+-
+- # mandatory Boost libs go into the first line, optional ones into
+- # their own call. This avoids leaving out any available lib during
+- # link time. The reason for this ugly multi-stage discovery is the
+- # following: since CMAKE 2.8.11 each call to find_package(Boost...)
+- # will reset Boost_LIBRARIES.
+- find_package(Boost REQUIRED COMPONENTS date_time filesystem system)
+- set(ALL_BOOST_LIBS "${Boost_LIBRARIES}")
+- find_package(Boost COMPONENTS serialization)
+- set(ALL_BOOST_LIBS "${ALL_BOOST_LIBS};${Boost_LIBRARIES}")
+- find_package(Boost COMPONENTS thread)
+- set(ALL_BOOST_LIBS "${ALL_BOOST_LIBS};${Boost_LIBRARIES}")
+- find_package(Boost COMPONENTS move)
+- set(ALL_BOOST_LIBS "${ALL_BOOST_LIBS};${Boost_LIBRARIES}")
+-else()
+- # If HPX was found, we use the Boost libraries found by HPX
+- set(ALL_BOOST_LIBS
+- ${HPX_BOOST_DATE_TIME_LIBRARY}
+- ${HPX_BOOST_FILESYSTEM_LIBRARY}
+- ${HPX_BOOST_SYSTEM_LIBRARY}
+- ${HPX_BOOST_SERIALIZATION_LIBRARY}
+- ${HPX_BOOST_THREAD_LIBRARY}
+- )
+- set(Boost_DATE_TIME_FOUND true)
+- set(Boost_FILESYSTEM_FOUND true)
+- set(Boost_SYSTEM_FOUND true)
+- set(Boost_SERIALIZATION_FOUND true)
+- set(Boost_THREAD_FOUND true)
+ endif()
+
++# mandatory Boost libs go into the first line, optional ones into
++# their own call. This avoids leaving out any available lib during
++# link time. The reason for this ugly multi-stage discovery is the
++# following: since CMAKE 2.8.11 each call to find_package(Boost...)
++# will reset Boost_LIBRARIES.
++find_package(Boost REQUIRED COMPONENTS date_time filesystem system)
++set(ALL_BOOST_LIBS "${Boost_LIBRARIES}")
++find_package(Boost COMPONENTS serialization)
++set(ALL_BOOST_LIBS "${ALL_BOOST_LIBS};${Boost_LIBRARIES}")
++find_package(Boost COMPONENTS thread)
++set(ALL_BOOST_LIBS "${ALL_BOOST_LIBS};${Boost_LIBRARIES}")
++find_package(Boost COMPONENTS move)
++set(ALL_BOOST_LIBS "${ALL_BOOST_LIBS};${Boost_LIBRARIES}")
++
+ find_package(Boost COMPONENTS mpi)
+ set(Boost_MPI_LIBRARIES "${Boost_LIBRARIES}")
+
+--
+2.24.1
+
diff --git a/sci-libs/libgeodecomp/libgeodecomp-0.4.0-r1.ebuild b/sci-libs/libgeodecomp/libgeodecomp-0.4.0-r1.ebuild
index d2867f448c3a..d1c5b3229341 100644
--- a/sci-libs/libgeodecomp/libgeodecomp-0.4.0-r1.ebuild
+++ b/sci-libs/libgeodecomp/libgeodecomp-0.4.0-r1.ebuild
@@ -37,6 +37,7 @@ PATCHES=(
"${FILESDIR}/${P}-scotch.patch"
"${FILESDIR}/${P}-libdir.patch"
"${FILESDIR}/${P}-lfa.patch"
+ "${FILESDIR}/${P}-boost.patch"
)
src_prepare() {