diff options
author | Matthias Maier <tamiko@gentoo.org> | 2023-07-14 20:23:20 -0500 |
---|---|---|
committer | Matthias Maier <tamiko@gentoo.org> | 2023-07-14 21:15:14 -0500 |
commit | 9b151ef2013fc9c821883e2e33eab35310ec0495 (patch) | |
tree | b4496d606c908307e957f8dee06f649b0e28dd4e /sci-libs/p4est | |
parent | sci-libs/libsc: drop 2.8.3 (diff) | |
download | gentoo-9b151ef2013fc9c821883e2e33eab35310ec0495.tar.gz gentoo-9b151ef2013fc9c821883e2e33eab35310ec0495.tar.bz2 gentoo-9b151ef2013fc9c821883e2e33eab35310ec0495.zip |
sci-libs/p4est: add 2.3.6
This partially reverts commit 406d3fc821c6be208814445bc2ad98bed3c2e9b4
and bumps 2.3.3 to 2.3.6.
In turns out that libsc/p4est-2.8.5 has a massive performance regression
which necessitates to use the "stable" version 2.3.6. Thus, bring it
back into the tree.
Signed-off-by: Matthias Maier <tamiko@gentoo.org>
Diffstat (limited to 'sci-libs/p4est')
-rw-r--r-- | sci-libs/p4est/Manifest | 2 | ||||
-rw-r--r-- | sci-libs/p4est/files/p4est-2.3-fix_aclocal.patch | 12 | ||||
-rw-r--r-- | sci-libs/p4est/files/p4est-2.3.6-override_soname.patch | 13 | ||||
-rw-r--r-- | sci-libs/p4est/metadata.xml | 1 | ||||
-rw-r--r-- | sci-libs/p4est/p4est-2.3.6.ebuild | 122 |
5 files changed, 150 insertions, 0 deletions
diff --git a/sci-libs/p4est/Manifest b/sci-libs/p4est/Manifest index 0af4a2590156..9bd9ae0dc0a1 100644 --- a/sci-libs/p4est/Manifest +++ b/sci-libs/p4est/Manifest @@ -1,2 +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.tar.gz 2655761 BLAKE2B 0637045bca3525d5d737010865c06d1273c6ecf848ab5ca55d1f19156550b7d7676c4f8d7c7a71b1fc70381dc7912cdca1e5405bb0af948180f75da1a3b1f343 SHA512 599faad177ce21f917e4ddfd969d6ef8c1f08b1e701cbdb9d4a1aa6dfd927176468afe757d018b9b7ded6a9ce165cd6fe78e0688b22cf6b9975cbd85d6f45d3c diff --git a/sci-libs/p4est/files/p4est-2.3-fix_aclocal.patch b/sci-libs/p4est/files/p4est-2.3-fix_aclocal.patch new file mode 100644 index 000000000000..a3209d5064fb --- /dev/null +++ b/sci-libs/p4est/files/p4est-2.3-fix_aclocal.patch @@ -0,0 +1,12 @@ +diff --git a/Makefile.am b/Makefile.am +index e8b7e67..1817e37 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -2,7 +2,6 @@ + # This file is part of p4est. + # Makefile.am in toplevel directory + +-ACLOCAL_AMFLAGS = -I config @P4EST_SC_AMFLAGS@ + if P4EST_SC_MK_USE + @P4EST_SC_MK_INCLUDE@ + endif diff --git a/sci-libs/p4est/files/p4est-2.3.6-override_soname.patch b/sci-libs/p4est/files/p4est-2.3.6-override_soname.patch new file mode 100644 index 000000000000..40f032c109b7 --- /dev/null +++ b/sci-libs/p4est/files/p4est-2.3.6-override_soname.patch @@ -0,0 +1,13 @@ +diff --git a/src/Makefile.am b/src/Makefile.am +index b30f0e3..2c636f9 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -82,7 +82,7 @@ src_libp4est_la_SOURCES = \ + src_libp4est_la_CPPFLAGS = $(AM_CPPFLAGS) $(P4EST_CPPFLAGS) + ## This is the official API versioning scheme of libtool. Please see: + ## Read https://www.gnu.org/software/libtool/manual/libtool.html#Versioning +-src_libp4est_la_LDFLAGS = -version-info 1:0:0 ++src_libp4est_la_LDFLAGS = -release $(VERSION) + src_libp4est_la_LIBADD = @P4EST_SC_LDADD@ + LDADD += src/libp4est.la @P4EST_SC_LDADD@ + EXTRA_src_libp4est_la_DEPENDENCIES = @P4EST_SC_LDADD@ diff --git a/sci-libs/p4est/metadata.xml b/sci-libs/p4est/metadata.xml index f29f22e517cb..c58dd131de04 100644 --- a/sci-libs/p4est/metadata.xml +++ b/sci-libs/p4est/metadata.xml @@ -17,6 +17,7 @@ processor cores. </longdescription> <use> <flag name="vtk-binary">Enable binary vtk output. If disabled vtk files will be written in ASCII text format.</flag> + <flag name="romio">Build with support for the ROMIO MPI-IO component</flag> </use> <upstream> <remote-id type="github">cburstedde/libsc</remote-id> diff --git a/sci-libs/p4est/p4est-2.3.6.ebuild b/sci-libs/p4est/p4est-2.3.6.ebuild new file mode 100644 index 000000000000..27b596c41c15 --- /dev/null +++ b/sci-libs/p4est/p4est-2.3.6.ebuild @@ -0,0 +1,122 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LUA_COMPAT=( lua5-{1..3} ) + +inherit autotools flag-o-matic lua-single toolchain-funcs + +DESCRIPTION="Scalable Algorithms for Parallel Adaptive Mesh Refinement on Forests of Octrees" +HOMEPAGE="http://www.p4est.org/" + +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 + https://github.com/cburstedde/libsc/archive/v${PV}.tar.gz -> libsc-${PV}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +LICENSE="GPL-2+" +SLOT="0" + +# TODO petsc +IUSE="debug doc examples mpi openmp romio threads +vtk-binary" +REQUIRED_USE="${LUA_REQUIRED_USE} + romio? ( mpi )" + +RDEPEND="${LUA_DEPS} + ~sci-libs/libsc-${PV}[${LUA_SINGLE_USEDEP},mpi=,openmp=,romio=,threads=] + sys-apps/util-linux + virtual/blas + virtual/lapack + mpi? ( virtual/mpi[romio=] )" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +PATCHES=( + "${FILESDIR}"/${PN}-2.3-fix_aclocal.patch + "${FILESDIR}"/${PN}-2.3.6-override_soname.patch +) + +pkg_pretend() { + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp +} + +pkg_setup() { + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp + lua-single_pkg_setup +} + +src_prepare() { + default + + # Inject libsc to get all parts of the build system... + if ! [[ ${PV} = *9999* ]]; then + rmdir "${S}/sc" || die "rmdir failed" + mv "${WORKDIR}/libsc-${PV}" "${S}/sc" || die "mv failed" + fi + + # Inject a version number into the build system + echo "${PV}" > "${S}"/.tarball-version + + AT_M4DIR="${WORKDIR}/${P}/config ${WORKDIR}/${P}/sc/config" + eautoreconf + + sed -i \ + "s/P4EST_SC_DIR\/etc/P4EST_SC_DIR\/share\/libsc/" \ + "${S}"/configure || die "sed failed" + + sed -i \ + "s#lib/libsc\.la#$(get_libdir)/libsc\.so#" \ + "${S}"/configure || die "sed failed" +} + +src_configure() { + # avoid underlinkage + append-libs -lsc + + local myeconfargs=( + --disable-static + $(use_enable debug) + $(use_enable mpi) + $(use_enable openmp) + $(use_enable romio mpiio) + $(use_enable threads pthread) + $(use_enable vtk-binary) + --with-blas="$($(tc-getPKG_CONFIG) --libs blas)" + --with-lapack="$($(tc-getPKG_CONFIG) --libs lapack)" + --with-sc="${ESYSROOT}/usr" + ) + econf "${myeconfargs[@]}" +} + +src_install() { + default + + use doc && dodoc -r doc/* + + if use examples + then + docinto examples + dodoc -r example/* + docompress -x /usr/share/doc/${PF}/examples + else + # Remove compiled example binaries in case of -examples: + rm -r "${ED}"/usr/bin || die "rm failed" + fi + + # Fix wrong installation paths: + dodir /usr/share/p4est + mv "${ED}"/usr/share/data "${ED}"/usr/share/p4est/data || die "mv failed" + mv "${ED}"/etc/* "${ED}"/usr/share/p4est || die "mv failed" + rmdir "${ED}"/etc/ || die "rmdir failed" + + # no static archives + find "${ED}" -name '*.la' -delete || die +} |