summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Maier <tamiko@gentoo.org>2022-02-13 18:42:02 -0600
committerMatthias Maier <tamiko@gentoo.org>2022-02-13 18:51:16 -0600
commit76932d2a870e9dc11bea95cff9585de86112ea36 (patch)
tree1fb46553c91703438bd5e4c93ce8fd6b345b6403 /sci-libs/p4est
parentsci-libs/libsc: update live ebuild (diff)
downloadgentoo-76932d2a870e9dc11bea95cff9585de86112ea36.tar.gz
gentoo-76932d2a870e9dc11bea95cff9585de86112ea36.tar.bz2
gentoo-76932d2a870e9dc11bea95cff9585de86112ea36.zip
sci-libs/p4est: version bump to 2.8
With the switch to CMake the new version should now obey all compiler and linker flag overrides. Closes: https://bugs.gentoo.org/794862 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Matthias Maier <tamiko@gentoo.org>
Diffstat (limited to 'sci-libs/p4est')
-rw-r--r--sci-libs/p4est/Manifest1
-rw-r--r--sci-libs/p4est/files/p4est-2.8-fix_build_system.patch24
-rw-r--r--sci-libs/p4est/files/p4est-2.8-set_version.patch44
-rw-r--r--sci-libs/p4est/p4est-2.8.ebuild67
4 files changed, 136 insertions, 0 deletions
diff --git a/sci-libs/p4est/Manifest b/sci-libs/p4est/Manifest
index bdfcb44058da..13b4e1e65938 100644
--- a/sci-libs/p4est/Manifest
+++ b/sci-libs/p4est/Manifest
@@ -2,3 +2,4 @@ DIST libsc-2.3.1.tar.gz 344456 BLAKE2B cee44d07372162aecc8104257d1c5d4935d60030c
DIST libsc-2.3.3.tar.gz 345177 BLAKE2B c9077cfe7af3eb8bfb34cf655fa8e49658f1ce0b866b58398fc7bae305ac276b002c83d930a20df1bdf52a22645ebb1698d51a937ce56db993d36ef68d640e8a SHA512 b51d08a987d7c8a83eaae0be98a078a4a9160b9141b482015110534ddac075337c81f54f3efa4f8a8bce54e31565a6323aad37e35674c1d40686d4ab3747ed6b
DIST p4est-2.3.1.tar.gz 2623681 BLAKE2B 426f15d27dd376b918e197adc46a8ef5555bd4765f53d7c98bc8f9b58e0a27125d38808503fd1c545e428e845635e2499ba27df22a989ed619ce264417d02908 SHA512 c691b39d140c2714a813dc45f721cf21a1e0f5d1a264a3d5733b09ec90cc3f8bcc9e5d799e41e91d2b994490c811287f8177bf6d7890ea4cd1cdfecb95cdbf23
DIST p4est-2.3.3.tar.gz 2644849 BLAKE2B f39546d0583c4671f32814c3c1d297d903a4f7466f27049ef4e38d1138c83f57e991f6a702d0109e438337f98be13e8554a4dfef3e1c129f3d2690e0b4a54bbb SHA512 7f528a942438073c9f43242eae5383cdc1f64f0f26f96eccd01afc053e0454691160e7210dda2ad2bdd621fd3c17551dd205af417dd244642b1358cbe4aaa2fd
+DIST p4est-2.8.tar.gz 2655761 BLAKE2B 0637045bca3525d5d737010865c06d1273c6ecf848ab5ca55d1f19156550b7d7676c4f8d7c7a71b1fc70381dc7912cdca1e5405bb0af948180f75da1a3b1f343 SHA512 599faad177ce21f917e4ddfd969d6ef8c1f08b1e701cbdb9d4a1aa6dfd927176468afe757d018b9b7ded6a9ce165cd6fe78e0688b22cf6b9975cbd85d6f45d3c
diff --git a/sci-libs/p4est/files/p4est-2.8-fix_build_system.patch b/sci-libs/p4est/files/p4est-2.8-fix_build_system.patch
new file mode 100644
index 000000000000..e1f86165d5f9
--- /dev/null
+++ b/sci-libs/p4est/files/p4est-2.8-fix_build_system.patch
@@ -0,0 +1,24 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 3226f2e..8bc5074 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -8,6 +8,8 @@ HOMEPAGE_URL https://www.p4est.org/
+ DESCRIPTION "p4est manages a collection---a forest---of octrees in parallel."
+ VERSION ${PROJECT_VERSION})
+
++set(CMAKE_POSITION_INDEPENDENT_CODE ON)
++
+ include(CTest)
+
+ list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/Modules)
+@@ -76,8 +78,8 @@ install(DIRECTORY ${PROJECT_SOURCE_DIR}/src/ ${PROJECT_BINARY_DIR}/include/
+
+ install(TARGETS p4est
+ EXPORT ${PROJECT_NAME}Targets
+- ARCHIVE DESTINATION lib
+- LIBRARY DESTINATION lib)
++ ARCHIVE DESTINATION ${library_reldir}
++ LIBRARY DESTINATION ${library_reldir})
+
+ #--- p8est
+
diff --git a/sci-libs/p4est/files/p4est-2.8-set_version.patch b/sci-libs/p4est/files/p4est-2.8-set_version.patch
new file mode 100644
index 000000000000..dcd63994cc67
--- /dev/null
+++ b/sci-libs/p4est/files/p4est-2.8-set_version.patch
@@ -0,0 +1,44 @@
+diff --git a/cmake/git.cmake b/cmake/git.cmake
+index dd6009e..7c5c8f3 100644
+--- a/cmake/git.cmake
++++ b/cmake/git.cmake
+@@ -1,36 +1,3 @@
+ # --- extract version from Git
+
+-set(PROJECT_VERSION 0.0.0)
+-find_program(GIT_VERSION_GEN NAMES git-version-gen
+- PATHS ${CMAKE_SOURCE_DIR}/build-aux NO_DEFAULT_PATH)
+-if(GIT_VERSION_GEN)
+- execute_process(COMMAND ${GIT_VERSION_GEN} .tarball_version
+- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+- RESULT_VARIABLE _err
+- OUTPUT_VARIABLE git_version
+- OUTPUT_STRIP_TRAILING_WHITESPACE)
+-endif()
+-if(_err EQUAL 0)
+- if(git_version MATCHES
+- "^(0|[1-9][0-9]*)[.](0|[1-9][0-9]*)[.](0|[1-9][0-9]*)[.].*")
+- set(_major "${CMAKE_MATCH_1}")
+- set(_minor "${CMAKE_MATCH_2}")
+- set(_patch "${CMAKE_MATCH_3}")
+- set(PROJECT_VERSION ${_major}.${_minor}.${_patch}.999)
+- elseif(git_version MATCHES
+- "^(0|[1-9][0-9]*)[.](0|[1-9][0-9]*)[.](0|[1-9][0-9]*)")
+- set(_major "${CMAKE_MATCH_1}")
+- set(_minor "${CMAKE_MATCH_2}")
+- set(_patch "${CMAKE_MATCH_3}")
+- set(PROJECT_VERSION ${_major}.${_minor}.${_patch})
+- elseif(git_version MATCHES
+- "^(0|[1-9][0-9]*)[.](0|[1-9][0-9]*)")
+- set(_major "${CMAKE_MATCH_1}")
+- set(_minor "${CMAKE_MATCH_2}")
+- set(PROJECT_VERSION ${_major}.${_minor})
+- elseif(git_version MATCHES
+- "^(0|[1-9][0-9]*)")
+- set(_major "${CMAKE_MATCH_1}")
+- set(PROJECT_VERSION ${_major})
+- endif()
+-endif()
++set(PROJECT_VERSION 2.8.3)
+
+
diff --git a/sci-libs/p4est/p4est-2.8.ebuild b/sci-libs/p4est/p4est-2.8.ebuild
new file mode 100644
index 000000000000..16a26d9d18e6
--- /dev/null
+++ b/sci-libs/p4est/p4est-2.8.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake flag-o-matic toolchain-funcs
+
+DESCRIPTION="Scalable Algorithms for Parallel Adaptive Mesh Refinement on Forests of Octrees"
+HOMEPAGE="http://www.p4est.org/"
+
+LIBSC_VERSION="2.8.3"
+
+if [[ ${PV} = *9999* ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/cburstedde/${PN}.git"
+ EGIT_BRANCH="develop"
+ SRC_URI=""
+else
+ SRC_URI="https://github.com/cburstedde/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+LICENSE="GPL-2+"
+SLOT="0"
+
+# TODO petsc
+IUSE="debug doc examples mpi openmp threads +vtk-binary"
+
+RDEPEND="
+ ~sci-libs/libsc-${LIBSC_VERSION}[mpi=,openmp=,threads=]
+ sys-apps/util-linux
+ virtual/blas
+ virtual/lapack
+ mpi? ( virtual/mpi[romio] )"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-fix_build_system.patch
+ "${FILESDIR}"/${P}-set_version.patch
+)
+
+pkg_pretend() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+pkg_setup() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -Dmpi="$(usex mpi)"
+ -Dopenmp="$(usex openmp)"
+ -Dlibrary_reldir="$(get_libdir)"
+ )
+
+ cmake_src_configure
+}
+
+src_install() {
+ cmake_src_install
+
+ rm "${ED}"/usr/lib/cmake/Modules/FindSC.cmake || die "rm failed"
+ mv "${ED}"/usr/share/docs/P4EST/* "${ED}"/usr/share/doc/${P}/ || die "mv failed"
+ rm -r "${ED}"/usr/share/docs || die "rm failed"
+}