diff options
author | Matthias Maier <tamiko@gentoo.org> | 2024-07-04 12:59:29 -0500 |
---|---|---|
committer | Matthias Maier <tamiko@gentoo.org> | 2024-07-04 13:09:55 -0500 |
commit | 4ad40a0872001be48d93ca92202945086965380c (patch) | |
tree | 57ac0eff844273d98dcfbe752708043de2ff5482 /sci-libs | |
parent | sci-libs/libsc: add 2.8.6 (diff) | |
download | gentoo-4ad40a0872001be48d93ca92202945086965380c.tar.gz gentoo-4ad40a0872001be48d93ca92202945086965380c.tar.bz2 gentoo-4ad40a0872001be48d93ca92202945086965380c.zip |
sci-libs/p4est: add 2.8.6
Signed-off-by: Matthias Maier <tamiko@gentoo.org>
Diffstat (limited to 'sci-libs')
-rw-r--r-- | sci-libs/p4est/Manifest | 1 | ||||
-rw-r--r-- | sci-libs/p4est/files/p4est-2.8.6-fix_build_system.patch | 25 | ||||
-rw-r--r-- | sci-libs/p4est/files/p4est-2.8.6-fix_cmake_path.patch | 54 | ||||
-rw-r--r-- | sci-libs/p4est/files/p4est-2.8.6-set_version.patch | 48 | ||||
-rw-r--r-- | sci-libs/p4est/files/p4est-2.8.6-use_external_sc.patch | 15 | ||||
-rw-r--r-- | sci-libs/p4est/p4est-2.8.6.ebuild | 72 |
6 files changed, 215 insertions, 0 deletions
diff --git a/sci-libs/p4est/Manifest b/sci-libs/p4est/Manifest index ec900fcf2092..dad0e7d950fa 100644 --- a/sci-libs/p4est/Manifest +++ b/sci-libs/p4est/Manifest @@ -1,3 +1,4 @@ DIST libsc-2.3.6.tar.gz 346618 BLAKE2B 6da88f1eec572a5d30ebef5e17554874e3d88d124fbbb7582092bd43a85a547f130a5406ffd40f86d564c95a3e600b2eb854ee0378b8e0c2d755a7d45d55ff1e SHA512 9037ebeebcf84d1dc3026172ee3fd3182729fbdbdadb478e8c05670b17bd3e2f3b192bac9a509bd99312c5f944a10fb7eb0636e8c7bd133b30677eb5ead6d117 DIST p4est-2.3.6.tar.gz 2645384 BLAKE2B f6763e6a5b8b371eeead8a9d6481ea63e01ec5f13ea0dd9748aeaaec5551d39ac5d73f75f92275bfe61370e578ba1b1d0940c569e48fbd83997eaad4ab65b088 SHA512 99df91ee9d351cc889a532764096428e3f575c5f71199fca9f217c3dac5030a263308aa9c698476e7a12774d0751409f27e70ac2e9cd27847b2345b3f909b195 DIST p4est-2.8.5.tar.gz 2721258 BLAKE2B 07fd70f5b7ce0d2dcdc0d913cd9ae7920272a0e459c7db7f9d180b592570a5232c7d2bd03547eec3333dcdc6fdc83adcce30c71eb9c44ab6e6b9b9a314707471 SHA512 22b5a9bbfb51e972f4b93a90f5fa0f9557770ccbe357044b5bb97b31d02783affef188cde38c86bb4ece31ba23ce47e4eb95a6e7c5f02d11549cf986e85f68a0 +DIST p4est-2.8.6.tar.gz 4589078 BLAKE2B 7f868cf38aa4e0abc50b4c1071ca39ada2fa9cc973f31bb0365eb1bf447f9a23fa570ada525b1482cb8120a534582cf978ccae83048d27c439ea07572171e928 SHA512 e5892cf153cb4204c2ae3c1389c6a872113b037abda1d0f95df062ad2651a2231b1e3cabdc8e86f3f61ad021274a069acf7ec801281164740a8018ac46b07c96 diff --git a/sci-libs/p4est/files/p4est-2.8.6-fix_build_system.patch b/sci-libs/p4est/files/p4est-2.8.6-fix_build_system.patch new file mode 100644 index 000000000000..02119d362415 --- /dev/null +++ b/sci-libs/p4est/files/p4est-2.8.6-fix_build_system.patch @@ -0,0 +1,25 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 95013ba..6d10c7c 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) ++ + enable_testing() + + # --- user options +@@ -47,7 +49,10 @@ install(DIRECTORY ${PROJECT_SOURCE_DIR}/src/ ${PROJECT_BINARY_DIR}/include/ + TYPE INCLUDE + FILES_MATCHING PATTERN "*.h") + +-install(TARGETS p4est EXPORT ${PROJECT_NAME}-targets) ++install(TARGETS p4est EXPORT ${PROJECT_NAME}-targets ++ ARCHIVE DESTINATION ${library_reldir} ++ LIBRARY DESTINATION ${library_reldir} ++ ) + + #--- p8est + diff --git a/sci-libs/p4est/files/p4est-2.8.6-fix_cmake_path.patch b/sci-libs/p4est/files/p4est-2.8.6-fix_cmake_path.patch new file mode 100644 index 000000000000..55bd118d9a51 --- /dev/null +++ b/sci-libs/p4est/files/p4est-2.8.6-fix_cmake_path.patch @@ -0,0 +1,54 @@ +diff --git a/cmake/install.cmake b/cmake/install.cmake +index f4f92c4..0f31976 100644 +--- a/cmake/install.cmake ++++ b/cmake/install.cmake +@@ -4,7 +4,7 @@ include(CMakePackageConfigHelpers) + + configure_package_config_file(${CMAKE_CURRENT_LIST_DIR}/config.cmake.in + ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${PROJECT_NAME}Config.cmake +-INSTALL_DESTINATION cmake ++INSTALL_DESTINATION ${library_reldir}/cmake/P4est + ) + + write_basic_package_version_file( +@@ -14,13 +14,13 @@ COMPATIBILITY SameMajorVersion + + install(EXPORT ${PROJECT_NAME}-targets + NAMESPACE ${PROJECT_NAME}:: +-DESTINATION cmake ++DESTINATION ${library_reldir}/cmake/P4est + ) + + install(FILES + ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${PROJECT_NAME}Config.cmake + ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${PROJECT_NAME}ConfigVersion.cmake +-DESTINATION cmake ++DESTINATION ${library_reldir}/cmake/P4est + ) + + # --- CPack +diff --git a/cmake/pkgconf.cmake b/cmake/pkgconf.cmake +index 590d7be..0c46f9d 100644 +--- a/cmake/pkgconf.cmake ++++ b/cmake/pkgconf.cmake +@@ -4,18 +4,8 @@ set(pc_req_private "ompi ompi-c orte zlib") + + set(pc_req_public "p4est sc") + +-set(pc_filename p4est-${git_version}.pc) ++set(pc_filename p4est.pc) + configure_file(${CMAKE_CURRENT_LIST_DIR}/pkgconf.pc.in ${pc_filename} @ONLY) + + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${pc_filename} +- DESTINATION lib/pkgconfig) +- +-set(pc_target ${pc_filename}) +-set(pc_link ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig/p4est.pc) +- +-install(CODE "execute_process( \ +- COMMAND ${CMAKE_COMMAND} -E create_symlink \ +- ${pc_target} \ +- ${pc_link} \ +- )" +- ) ++ DESTINATION ${library_reldir}/pkgconfig) diff --git a/sci-libs/p4est/files/p4est-2.8.6-set_version.patch b/sci-libs/p4est/files/p4est-2.8.6-set_version.patch new file mode 100644 index 000000000000..c37943e21c15 --- /dev/null +++ b/sci-libs/p4est/files/p4est-2.8.6-set_version.patch @@ -0,0 +1,48 @@ +diff --git a/cmake/git.cmake b/cmake/git.cmake +index 4718b8e..c2c594d 100644 +--- a/cmake/git.cmake ++++ b/cmake/git.cmake +@@ -1,39 +1,6 @@ + # --- 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 ${PROJECT_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(PROJECT_MAJOR 2) ++set(PROJECT_MINOR 8) ++set(PROJECT_PATCH 6) ++set(PROJECT_VERSION 2.8.6) diff --git a/sci-libs/p4est/files/p4est-2.8.6-use_external_sc.patch b/sci-libs/p4est/files/p4est-2.8.6-use_external_sc.patch new file mode 100644 index 000000000000..b46f5882e6b8 --- /dev/null +++ b/sci-libs/p4est/files/p4est-2.8.6-use_external_sc.patch @@ -0,0 +1,15 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index da1b21a..77fee88 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -20,9 +20,7 @@ message(STATUS "p4est ${PROJECT_VERSION} " + + # --- external libs + +-include(cmake/GitSubmodule.cmake) +-git_submodule("${PROJECT_SOURCE_DIR}/sc") +-add_subdirectory(sc) ++find_package(SC REQUIRED) + + # --- configure p4est + diff --git a/sci-libs/p4est/p4est-2.8.6.ebuild b/sci-libs/p4est/p4est-2.8.6.ebuild new file mode 100644 index 000000000000..ac7398a0b90a --- /dev/null +++ b/sci-libs/p4est/p4est-2.8.6.ebuild @@ -0,0 +1,72 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake toolchain-funcs + +DESCRIPTION="Scalable Algorithms for Parallel Adaptive Mesh Refinement on Forests of Octrees" +HOMEPAGE="http://www.p4est.org/" + +LIBSC_VERSION="${PV}" + +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 + "${FILESDIR}"/${P}-fix_cmake_path.patch + "${FILESDIR}"/${P}-use_external_sc.patch +) + +pkg_pretend() { + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp +} + +pkg_setup() { + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp +} + +src_configure() { + # avoid using debug codepaths that are manually enabled with the + # RelWithDebInfo build type + local CMAKE_BUILD_TYPE="Release" + + local mycmakeargs=( + -DP4EST_ENABLE_MPI="$(usex mpi)" + -Dlibrary_reldir="$(get_libdir)" + ) + + cmake_src_configure +} + +src_install() { + cmake_src_install + + mkdir -p "${ED}"/usr/share/doc/${PF} + mv "${ED}"/usr/share/docs/P4EST/* "${ED}"/usr/share/doc/${PF}/ || die "mv failed" + rm -r "${ED}"/usr/share/docs || die "rm failed" +} |