diff options
Diffstat (limited to 'sci-libs')
-rw-r--r-- | sci-libs/parmetis/Manifest | 1 | ||||
-rw-r--r-- | sci-libs/parmetis/files/parmetis-4.0.3_p20230326-multilib.patch | 31 | ||||
-rw-r--r-- | sci-libs/parmetis/files/parmetis-4.0.3_p20230326-respect-user-flags.patch | 47 | ||||
-rw-r--r-- | sci-libs/parmetis/metadata.xml | 3 | ||||
-rw-r--r-- | sci-libs/parmetis/parmetis-4.0.3_p20230326.ebuild | 82 |
5 files changed, 164 insertions, 0 deletions
diff --git a/sci-libs/parmetis/Manifest b/sci-libs/parmetis/Manifest index f51deaae9a5a..7e9881aae079 100644 --- a/sci-libs/parmetis/Manifest +++ b/sci-libs/parmetis/Manifest @@ -1 +1,2 @@ DIST parmetis-4.0.3.tar.gz 5567670 BLAKE2B 69a44ea8e50d8fd78046a342807b994220d03da3ab1695533d92772b1840302917a7d5d6f9eb020d9ff8ab7e5372bff0386d6354b662f58495b74f8f596c45f9 SHA512 454a91921ca35c981df11c9846a11963ff8fd8407a25179453af33f8fe69493f6dd7f2a0b8feed9a7d3f121e45b715749dd7a94873eaac2bae4cad1e535ca132 +DIST parmetis-4.0.3_p20230326.tar.gz 5312266 BLAKE2B 52f34982cff0aa3dbc26dde1bab72ff1a8f5fa20feba72deedc600fcb0d73c9d05f3a43bf5713f9a7db74695affaedd5ea5f691396f5d02c58ad26dc5a779592 SHA512 a71d212a1c8682eb662ef6bb8bdcb124bc13c353e76ac236b01e544bddb975740c36be54c05305e1114e4daf20fec56642ffa319a6426c87c5538ea2225c156b diff --git a/sci-libs/parmetis/files/parmetis-4.0.3_p20230326-multilib.patch b/sci-libs/parmetis/files/parmetis-4.0.3_p20230326-multilib.patch new file mode 100644 index 000000000000..cccf5a45f36e --- /dev/null +++ b/sci-libs/parmetis/files/parmetis-4.0.3_p20230326-multilib.patch @@ -0,0 +1,31 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 146bc5f..faa1cfd 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -30,9 +30,9 @@ include_directories(${CMAKE_INSTALL_PREFIX}/include) + + # List of paths that the compiler will search for library files. + # i.e., the -L equivalent +-link_directories(${GKLIB_PATH}/lib) +-link_directories(${METIS_PATH}/lib) +-link_directories(${CMAKE_INSTALL_PREFIX}/lib) ++link_directories(${GKLIB_PATH}/lib${LIB_SUFFIX}) ++link_directories(${METIS_PATH}/lib${LIB_SUFFIX}) ++link_directories(${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}) + + # List of directories that cmake will look for CMakeLists.txt + add_subdirectory(include) +diff --git a/libparmetis/CMakeLists.txt b/libparmetis/CMakeLists.txt +index b9d6d84..c0553e7 100644 +--- a/libparmetis/CMakeLists.txt ++++ b/libparmetis/CMakeLists.txt +@@ -12,6 +12,6 @@ if(SHARED) + endif() + + install(TARGETS parmetis +- LIBRARY DESTINATION lib +- RUNTIME DESTINATION lib +- ARCHIVE DESTINATION lib) ++ LIBRARY DESTINATION lib${LIB_SUFFIX} ++ RUNTIME DESTINATION lib${LIB_SUFFIX} ++ ARCHIVE DESTINATION lib${LIB_SUFFIX}) diff --git a/sci-libs/parmetis/files/parmetis-4.0.3_p20230326-respect-user-flags.patch b/sci-libs/parmetis/files/parmetis-4.0.3_p20230326-respect-user-flags.patch new file mode 100644 index 000000000000..4aa19580619e --- /dev/null +++ b/sci-libs/parmetis/files/parmetis-4.0.3_p20230326-respect-user-flags.patch @@ -0,0 +1,47 @@ +diff --git a/conf/gkbuild.cmake b/conf/gkbuild.cmake +index ec91224..5e66546 100644 +--- a/conf/gkbuild.cmake ++++ b/conf/gkbuild.cmake +@@ -28,17 +28,6 @@ endif(CYGWIN) + if(CMAKE_COMPILER_IS_GNUCC) + # GCC opts. + set(GK_COPTIONS "${GK_COPTIONS} -std=c99 -fno-strict-aliasing") +-# -march=native is not a valid flag on PPC: +-if(CMAKE_SYSTEM_PROCESSOR MATCHES "power|ppc|powerpc|ppc64|powerpc64" OR (APPLE AND CMAKE_OSX_ARCHITECTURES MATCHES "ppc|ppc64")) +- set(GK_COPTIONS "${GK_COPTIONS} -mtune=native") +-else() +- set(GK_COPTIONS "${GK_COPTIONS} -march=native") +-endif() +- if(NOT MINGW) +- set(GK_COPTIONS "${GK_COPTIONS} -fPIC") +- endif(NOT MINGW) +-# GCC warnings. +- set(GK_COPTIONS "${GK_COPTIONS} -Werror -Wall -pedantic -Wno-unused-function -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unknown-pragmas -Wno-unused-label") + elseif(${CMAKE_C_COMPILER_ID} MATCHES "Sun") + # Sun insists on -xc99. + set(GK_COPTIONS "${GK_COPTIONS} -xc99") +@@ -65,24 +54,6 @@ if(OPENMP) + endif(OPENMP) + + +-# Add various definitions. +-if(GDB) +- set(GK_COPTS "${GK_COPTS} -g") +- set(GK_COPTIONS "${GK_COPTIONS} -Werror") +-else() +- set(GK_COPTS "-O3") +-endif(GDB) +- +- +-if(DEBUG) +- set(GK_COPTS "-Og") +- set(GK_COPTIONS "${GK_COPTIONS} -DDEBUG") +-endif(DEBUG) +- +-if(GPROF) +- set(GK_COPTS "-pg") +-endif(GPROF) +- + if(NOT ASSERT) + set(GK_COPTIONS "${GK_COPTIONS} -DNDEBUG") + endif(NOT ASSERT) diff --git a/sci-libs/parmetis/metadata.xml b/sci-libs/parmetis/metadata.xml index abc834509acf..bf62d9f372a0 100644 --- a/sci-libs/parmetis/metadata.xml +++ b/sci-libs/parmetis/metadata.xml @@ -13,4 +13,7 @@ especially suited for parallel AMR computations and large scale numerical simulations. </longdescription> + <upstream> + <remote-id type="github">KarypisLab/ParMETIS</remote-id> + </upstream> </pkgmetadata> diff --git a/sci-libs/parmetis/parmetis-4.0.3_p20230326.ebuild b/sci-libs/parmetis/parmetis-4.0.3_p20230326.ebuild new file mode 100644 index 000000000000..32c0dc0c83d8 --- /dev/null +++ b/sci-libs/parmetis/parmetis-4.0.3_p20230326.ebuild @@ -0,0 +1,82 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake toolchain-funcs + +COMMIT="8ee6a372ca703836f593e3c450ca903f04be14df" + +DESCRIPTION="Parallel (MPI) unstructured graph partitioning library" +HOMEPAGE="https://github.com/KarypisLab/ParMETIS" +SRC_URI="https://github.com/KarypisLab/ParMETIS/archive/${COMMIT}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/ParMETIS-${COMMIT}" + +LICENSE="all-rights-reserved" +SLOT="0" +KEYWORDS="~amd64 ~amd64-linux" +IUSE="examples openmp pcre" +RESTRICT="mirror bindist" + +DEPEND=" + sci-libs/gklib + >=sci-libs/metis-5.1.0-r5 + virtual/mpi[fortran] + pcre? ( dev-libs/libpcre:= ) +" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}"/${P}-respect-user-flags.patch + "${FILESDIR}"/${P}-multilib.patch +) + +pkg_pretend() { + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp +} + +pkg_setup() { + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp +} + +src_prepare() { + export CC=mpicc CXX=mpicxx + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DGKRAND=ON + -DMETIS_PATH="${EPREFIX}/usr" + -DOPENMP=$(usex openmp) + -DPCRE=$(usex pcre) + -DSHARED=ON + ) + cmake_src_configure +} + +src_install() { + cmake_src_install + + dodoc Changelog + dodoc manual/manual.pdf + if use examples; then + docinto examples + dodoc -r Graphs programs + fi + + cat > ${PN}.pc <<-EOF + prefix=${EPREFIX}/usr + libdir=\${prefix}/$(get_libdir) + includedir=\${prefix}/include + Name: ${PN} + Description: ${DESCRIPTION} + Version: ${PV} + URL: ${HOMEPAGE} + Libs: -L\${libdir} -l${PN} + Cflags: -I\${includedir}/${PN} + Requires: metis + EOF + insinto /usr/$(get_libdir)/pkgconfig + doins ${PN}.pc +} |