diff options
author | Matthias Maier <tamiko@gentoo.org> | 2024-07-04 12:32:35 -0500 |
---|---|---|
committer | Matthias Maier <tamiko@gentoo.org> | 2024-07-04 13:09:55 -0500 |
commit | b482fa0fa81414be5041c0aab4b4135d45f60431 (patch) | |
tree | c47de1888ef83402d66d83de031b06221cdb9234 /sci-libs | |
parent | media-libs/raptor: add 2.0.16 (diff) | |
download | gentoo-b482fa0fa81414be5041c0aab4b4135d45f60431.tar.gz gentoo-b482fa0fa81414be5041c0aab4b4135d45f60431.tar.bz2 gentoo-b482fa0fa81414be5041c0aab4b4135d45f60431.zip |
sci-libs/libsc: add 2.8.6
- switch to compiling against default zlib instead of zlib-ng
Closes: https://bugs.gentoo.org/928049
Signed-off-by: Matthias Maier <tamiko@gentoo.org>
Diffstat (limited to 'sci-libs')
-rw-r--r-- | sci-libs/libsc/Manifest | 1 | ||||
-rw-r--r-- | sci-libs/libsc/files/libsc-2.8.6-fix_build_system.patch | 25 | ||||
-rw-r--r-- | sci-libs/libsc/files/libsc-2.8.6-fix_cmake_path.patch | 40 | ||||
-rw-r--r-- | sci-libs/libsc/files/libsc-2.8.6-set_version.patch | 48 | ||||
-rw-r--r-- | sci-libs/libsc/libsc-2.8.6.ebuild | 70 |
5 files changed, 184 insertions, 0 deletions
diff --git a/sci-libs/libsc/Manifest b/sci-libs/libsc/Manifest index fdfb64071d01..424976397546 100644 --- a/sci-libs/libsc/Manifest +++ b/sci-libs/libsc/Manifest @@ -1,2 +1,3 @@ DIST libsc-2.3.6.tar.gz 346618 BLAKE2B 6da88f1eec572a5d30ebef5e17554874e3d88d124fbbb7582092bd43a85a547f130a5406ffd40f86d564c95a3e600b2eb854ee0378b8e0c2d755a7d45d55ff1e SHA512 9037ebeebcf84d1dc3026172ee3fd3182729fbdbdadb478e8c05670b17bd3e2f3b192bac9a509bd99312c5f944a10fb7eb0636e8c7bd133b30677eb5ead6d117 DIST libsc-2.8.5.tar.gz 401520 BLAKE2B 28f74c03dc9a6238c254683585e3a6e372718bbf147f1a1bfe051d9a9079491650eca645bb695ce4c36920dda459904be6f9d41fb53163952d9076302072e181 SHA512 d7854a77cb574531d410c978af5768782d6201c730a3248371a822172cb99fe0b2efc8c2e4f495160924fb867ed77ab1b9ac17a1db349d8a6495228698cf970b +DIST libsc-2.8.6.tar.gz 436045 BLAKE2B e0c9911ece10703d70686c5fa67700ed28f2ad2cfa6fc5e8f31c18fadb3e85c82a062520765589f71fbb8b69f2ebc9d07803488e8b0eae50d3146cefddb6c1ad SHA512 9e8d9256fafce3a583a9dc850308020ae614434e94146dc81bd1b8a3130e6ff55eb094d97fe48bf2b9205ea16906503313f1ebf4f3386db92d6cf0bac50c2d74 diff --git a/sci-libs/libsc/files/libsc-2.8.6-fix_build_system.patch b/sci-libs/libsc/files/libsc-2.8.6-fix_build_system.patch new file mode 100644 index 000000000000..ed0f30a1a7c8 --- /dev/null +++ b/sci-libs/libsc/files/libsc-2.8.6-fix_build_system.patch @@ -0,0 +1,25 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9ebf6ef..0a14b19 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -10,6 +10,8 @@ HOMEPAGE_URL https://www.p4est.org/ + DESCRIPTION "The SC library supports parallel scientific applications." + VERSION ${PROJECT_VERSION}) + ++set(CMAKE_POSITION_INDEPENDENT_CODE ON) ++ + enable_testing() + + include(GNUInstallDirs) +@@ -63,7 +65,10 @@ TYPE INCLUDE + FILES_MATCHING PATTERN "*.h" + ) + +-install(TARGETS sc EXPORT ${PROJECT_NAME}-targets) ++install(TARGETS sc EXPORT ${PROJECT_NAME}-targets ++ARCHIVE DESTINATION ${library_reldir} ++LIBRARY DESTINATION ${library_reldir} ++) + + add_subdirectory(src) + diff --git a/sci-libs/libsc/files/libsc-2.8.6-fix_cmake_path.patch b/sci-libs/libsc/files/libsc-2.8.6-fix_cmake_path.patch new file mode 100644 index 000000000000..6c8b65f32215 --- /dev/null +++ b/sci-libs/libsc/files/libsc-2.8.6-fix_cmake_path.patch @@ -0,0 +1,40 @@ +diff --git a/cmake/install.cmake b/cmake/install.cmake +index edd8012..93f9301 100644 +--- a/cmake/install.cmake ++++ b/cmake/install.cmake +@@ -14,13 +14,13 @@ COMPATIBILITY SameMajorVersion + + install(EXPORT ${PROJECT_NAME}-targets + NAMESPACE ${PROJECT_NAME}:: +-DESTINATION cmake ++DESTINATION ${library_reldir}/cmake/SC + ) + + install(FILES + ${CMAKE_CURRENT_BINARY_DIR}/cmake/${PROJECT_NAME}Config.cmake + ${CMAKE_CURRENT_BINARY_DIR}/cmake/${PROJECT_NAME}ConfigVersion.cmake +-DESTINATION cmake ++DESTINATION ${library_reldir}/cmake/SC + ) + + export(EXPORT ${PROJECT_NAME}-targets +diff --git a/cmake/pkgconf.cmake b/cmake/pkgconf.cmake +index 1a1b865..f5bab08 100644 +--- a/cmake/pkgconf.cmake ++++ b/cmake/pkgconf.cmake +@@ -17,14 +17,4 @@ set(pc_filename libsc-${git_version}.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/libsc.pc) +- +-install(CODE "execute_process( \ +- COMMAND ${CMAKE_COMMAND} -E create_symlink \ +- ${pc_target} \ +- ${pc_link} \ +- )" +- ) ++ DESTINATION ${library_reldir}/pkgconfig) diff --git a/sci-libs/libsc/files/libsc-2.8.6-set_version.patch b/sci-libs/libsc/files/libsc-2.8.6-set_version.patch new file mode 100644 index 000000000000..c37943e21c15 --- /dev/null +++ b/sci-libs/libsc/files/libsc-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/libsc/libsc-2.8.6.ebuild b/sci-libs/libsc/libsc-2.8.6.ebuild new file mode 100644 index 000000000000..19acc8bc484f --- /dev/null +++ b/sci-libs/libsc/libsc-2.8.6.ebuild @@ -0,0 +1,70 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake toolchain-funcs + +DESCRIPTION="Support for parallel scientific applications" +HOMEPAGE="http://www.p4est.org/" + +if [[ ${PV} == *9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/cburstedde/${PN}.git" + EGIT_BRANCH="develop" +else + SRC_URI="https://github.com/cburstedde/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +LICENSE="LGPL-2.1+" +SLOT="0" +IUSE="debug examples mpi openmp threads" + +RDEPEND=" + sys-apps/util-linux + sys-libs/zlib + virtual/blas + virtual/lapack + mpi? ( virtual/mpi[romio] )" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +PATCHES=( + "${FILESDIR}"/${P}-set_version.patch + "${FILESDIR}"/${P}-fix_build_system.patch + "${FILESDIR}"/${P}-fix_cmake_path.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=( + -Dmpi="$(usex mpi)" + -Dopenmp="$(usex openmp)" + -Dlibrary_reldir="$(get_libdir)" + ) + + cmake_src_configure +} + +src_install() { + cmake_src_install + +# rm -r "${ED}"/usr/include/getopt.h \ +# "${ED}"/usr/include/getopt_int.h \ +# "${ED}"/usr/include/sc_builtin || die "rm failed" + + mv "${ED}"/usr/share/docs/SC/* "${ED}"/usr/share/doc/${PF}/ || die "mv failed" + rm -r "${ED}"/usr/share/docs || die "rm failed" +} |