summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Maier <tamiko@gentoo.org>2023-06-19 12:25:24 -0500
committerMatthias Maier <tamiko@gentoo.org>2023-06-19 13:26:32 -0500
commitbf7994ec88eedaae653bef2b16f670506741ac83 (patch)
tree264d5405f9ab4925f60d736e8a59eec9a3471301 /sci-libs
parentdev-cpp/kokkos: add 4.0.1 (diff)
downloadgentoo-bf7994ec88eedaae653bef2b16f670506741ac83.tar.gz
gentoo-bf7994ec88eedaae653bef2b16f670506741ac83.tar.bz2
gentoo-bf7994ec88eedaae653bef2b16f670506741ac83.zip
sci-libs/p4est: add 2.8.5
Signed-off-by: Matthias Maier <tamiko@gentoo.org>
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/p4est/Manifest1
-rw-r--r--sci-libs/p4est/files/p4est-2.8.5-fix_build_system.patch24
-rw-r--r--sci-libs/p4est/files/p4est-2.8.5-set_version.patch49
-rw-r--r--sci-libs/p4est/p4est-2.8.5.ebuild68
4 files changed, 142 insertions, 0 deletions
diff --git a/sci-libs/p4est/Manifest b/sci-libs/p4est/Manifest
index 2a5552e304f3..0af4a2590156 100644
--- a/sci-libs/p4est/Manifest
+++ b/sci-libs/p4est/Manifest
@@ -1 +1,2 @@
+DIST p4est-2.8.5.tar.gz 2721258 BLAKE2B 07fd70f5b7ce0d2dcdc0d913cd9ae7920272a0e459c7db7f9d180b592570a5232c7d2bd03547eec3333dcdc6fdc83adcce30c71eb9c44ab6e6b9b9a314707471 SHA512 22b5a9bbfb51e972f4b93a90f5fa0f9557770ccbe357044b5bb97b31d02783affef188cde38c86bb4ece31ba23ce47e4eb95a6e7c5f02d11549cf986e85f68a0
DIST p4est-2.8.tar.gz 2655761 BLAKE2B 0637045bca3525d5d737010865c06d1273c6ecf848ab5ca55d1f19156550b7d7676c4f8d7c7a71b1fc70381dc7912cdca1e5405bb0af948180f75da1a3b1f343 SHA512 599faad177ce21f917e4ddfd969d6ef8c1f08b1e701cbdb9d4a1aa6dfd927176468afe757d018b9b7ded6a9ce165cd6fe78e0688b22cf6b9975cbd85d6f45d3c
diff --git a/sci-libs/p4est/files/p4est-2.8.5-fix_build_system.patch b/sci-libs/p4est/files/p4est-2.8.5-fix_build_system.patch
new file mode 100644
index 000000000000..0063acf9c5c1
--- /dev/null
+++ b/sci-libs/p4est/files/p4est-2.8.5-fix_build_system.patch
@@ -0,0 +1,24 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 78c02bf..d1b2094 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)
+@@ -68,8 +70,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}
+ RUNTIME DESTINATION bin
+ )
+
diff --git a/sci-libs/p4est/files/p4est-2.8.5-set_version.patch b/sci-libs/p4est/files/p4est-2.8.5-set_version.patch
new file mode 100644
index 000000000000..061081a0da9e
--- /dev/null
+++ b/sci-libs/p4est/files/p4est-2.8.5-set_version.patch
@@ -0,0 +1,49 @@
+diff --git a/cmake/git.cmake b/cmake/git.cmake
+index f88e984..f04f52b 100644
+--- a/cmake/git.cmake
++++ b/cmake/git.cmake
+@@ -1,39 +1,5 @@
+-# --- extract version from Git
+-
+-set(PROJECT_MAJOR 0)
+-set(PROJECT_MINOR 0)
+-set(PROJECT_PATCH 0)
+-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(PROJECT_MAJOR "${CMAKE_MATCH_1}")
+- set(PROJECT_MINOR "${CMAKE_MATCH_2}")
+- set(PROJECT_PATCH "${CMAKE_MATCH_3}")
+- set(PROJECT_VERSION ${PROJECT_MAJOR}.${PROJECT_MINOR}.${PROJECT_PATCH}.999)
+- elseif(git_version MATCHES
+- "^(0|[1-9][0-9]*)[.](0|[1-9][0-9]*)[.](0|[1-9][0-9]*)")
+- set(PROJECT_MAJOR "${CMAKE_MATCH_1}")
+- set(PROJECT_MINOR "${CMAKE_MATCH_2}")
+- set(PROJECT_PATCH "${CMAKE_MATCH_3}")
+- set(PROJECT_VERSION ${PROJECT_MAJOR}.${PROJECT_MINOR}.${PROJECT_PATCH})
+- elseif(git_version MATCHES
+- "^(0|[1-9][0-9]*)[.](0|[1-9][0-9]*)")
+- set(PROJECT_MAJOR "${CMAKE_MATCH_1}")
+- set(PROJECT_MINOR "${CMAKE_MATCH_2}")
+- set(PROJECT_VERSION ${PROJECT_MAJOR}.${PROJECT_MINOR})
+- elseif(git_version MATCHES
+- "^(0|[1-9][0-9]*)")
+- set(PROJECT_MAJOR "${CMAKE_MATCH_1}")
+- set(PROJECT_VERSION ${PROJECT_MAJOR})
+- endif()
+-endif()
++set(git_version 2.8.5)
++set(PROJECT_MAJOR 2)
++set(PROJECT_MINOR 8)
++set(PROJECT_PATCH 5)
++set(PROJECT_VERSION 2.8.5)
diff --git a/sci-libs/p4est/p4est-2.8.5.ebuild b/sci-libs/p4est/p4est-2.8.5.ebuild
new file mode 100644
index 000000000000..0663c7d292ba
--- /dev/null
+++ b/sci-libs/p4est/p4est-2.8.5.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake 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 -r "${ED}"/usr/cmake || die "rm failed"
+ mkdir -p "${ED}"/usr/share/doc/${P}
+ mv "${ED}"/usr/share/docs/P4EST/* "${ED}"/usr/share/doc/${P}/ || die "mv failed"
+ rm -r "${ED}"/usr/share/docs || die "rm failed"
+}