commit: fb71d4474c4e59deecb5452eaa56b5c2b0a887bf Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Sat Jun 28 08:23:10 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sat Jun 28 18:46:08 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fb71d447
sci-libs/cgnslib: add 4.5.0 Closes: https://bugs.gentoo.org/741388 Closes: https://bugs.gentoo.org/813471 Closes: https://bugs.gentoo.org/905680 Closes: https://bugs.gentoo.org/933087 Signed-off-by: Sam James <sam <AT> gentoo.org> sci-libs/cgnslib/Manifest | 1 + sci-libs/cgnslib/cgnslib-4.5.0.ebuild | 102 +++++++++++++++++++++++ sci-libs/cgnslib/files/cgnslib-4.5.0-rpath.patch | 23 +++++ 3 files changed, 126 insertions(+) diff --git a/sci-libs/cgnslib/Manifest b/sci-libs/cgnslib/Manifest index aff5aec578e2..1f5ac61948eb 100644 --- a/sci-libs/cgnslib/Manifest +++ b/sci-libs/cgnslib/Manifest @@ -1,2 +1,3 @@ DIST cgnslib-4.3.0.tar.gz 1472044 BLAKE2B 8fa59eb2c13b163553c03991af1886d2162295367094937c3b7bbbc687f098e736a927fb6835fabb43ecfbe59edcf0e58e8977e89eeb1ef12b26568fbdc78e2c SHA512 5db97b8df8cb5b108a65513e20774881c1dfa790dd96bec46119883d934db18e3f88450d287690cb785e0875af87a3ec32b6c4665c54edb623161122ee85aa93 DIST cgnslib-4.4.0.tar.gz 1979828 BLAKE2B 1bf7a5eb8a69a488707da6e945228e053486cdfc64508ae6362ca84777bb5c22a7238676f24ca453cc8b5e2825482d473a2b84c1648849bb6f853fc0aa0a9100 SHA512 86c16d40b524519362645c553c91bade9bb7e4bffde7bf4de96a7f471ae3779a15781efa91efa059b2af0b127f08a560d2e903df6b45e1c79eaec6061db226e9 +DIST cgnslib-4.5.0.tar.gz 2085289 BLAKE2B 952368787bda49cb0eb82d3b99b173750e7418894055f733ea2cbb68a8564c15794679e7e4e8ffe6c67fa772f94f5964953bbba2d1ab5a479a2f1da7fd19b75e SHA512 0286ff2faf9102e5fb6d9bed764fd553756d62ae9be9dbb8b37ba6e2d3a7fec9337715320ec38a001960e39d397e846f2adbd4b54930c20e0304edacdd48fc92 diff --git a/sci-libs/cgnslib/cgnslib-4.5.0.ebuild b/sci-libs/cgnslib/cgnslib-4.5.0.ebuild new file mode 100644 index 000000000000..117a26a45517 --- /dev/null +++ b/sci-libs/cgnslib/cgnslib-4.5.0.ebuild @@ -0,0 +1,102 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +FORTRAN_NEEDED="fortran" +FORTRAN_STANDARD="90 2003" + +inherit cmake flag-o-matic fortran-2 + +DESCRIPTION="CFD General Notation System standard library" +HOMEPAGE=" + https://cgns.github.io/ + https://github.com/CGNS/CGNS +" +SRC_URI="https://github.com/CGNS/CGNS/archive/v${PV}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/CGNS-${PV}" + +LICENSE="ZLIB" +SLOT="0/$(ver_cut 1-2)" +KEYWORDS="~amd64 ~arm ~arm64 ~x86 ~amd64-linux ~x86-linux" +IUSE="base-scope debug examples fortran hdf5 legacy mpi scoping szip test tools" + +RDEPEND=" + hdf5? ( sci-libs/hdf5:=[mpi=,szip=] ) + tools? ( + dev-lang/tcl:= + dev-lang/tk:= + x11-libs/libXmu:= + virtual/glu + virtual/opengl + ) +" +DEPEND="${RDEPEND}" + +RESTRICT=" + fortran? ( test ) + !test? ( test ) +" +REQUIRED_USE=" + mpi? ( hdf5 ) + szip? ( hdf5 ) +" + +PATCHES=( + "${FILESDIR}"/${PN}-4.5.0-rpath.patch +) + +pkg_setup() { + use fortran && fortran-2_pkg_setup +} + +src_prepare() { + sed \ + -e 's|/lib|/'$(get_libdir)'|' \ + -e '/DESTINATION/s|lib|'$(get_libdir)'|g' \ + -i src/CMakeLists.txt || die + + cmake_src_prepare +} + +src_configure() { + # -Werror=lto-type-mismatch + # https://bugs.gentoo.org/862684 + # https://github.com/CGNS/CGNS/issues/758 + filter-lto + + local mycmakeargs=( + -DCGNS_BUILD_SHARED=ON + -DCGNS_USE_SHARED=ON + + -DCGNS_BUILD_CGNSTOOLS="$(usex tools)" + -DCGNS_ENABLE_BASE_SCOPE="$(usex base-scope)" + -DCGNS_ENABLE_FORTRAN="$(usex fortran)" + -DCGNS_ENABLE_HDF5="$(usex hdf5)" + -DCGNS_ENABLE_LEGACY="$(usex legacy)" + -DCGNS_ENABLE_SCOPING="$(usex scoping)" + -DCGNS_ENABLE_MEM_DEBUG="$(usex debug)" + -DCGNS_ENABLE_TESTS="$(usex test)" + ) + + if use mpi; then + mycmakeargs+=( + -DHDF5_NEED_MPI="$(usex mpi)" + -DHDF5_NEED_SZIP="$(usex szip)" + -DHDF5_NEED_ZLIB="$(usex szip)" + ) + fi + + cmake_src_configure +} + +src_install() { + cmake_src_install + + rm "${ED}/usr/$(get_libdir)/libcgns.a" || die + + dodoc README.md release_docs/{HISTORY.txt,RELEASE.md} + dodoc release_docs/*.pdf + docompress -x /usr/share/doc/${PF}/examples + use examples && dodoc -r src/examples +} diff --git a/sci-libs/cgnslib/files/cgnslib-4.5.0-rpath.patch b/sci-libs/cgnslib/files/cgnslib-4.5.0-rpath.patch new file mode 100644 index 000000000000..3dafe5a50b5a --- /dev/null +++ b/sci-libs/cgnslib/files/cgnslib-4.5.0-rpath.patch @@ -0,0 +1,23 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -438,20 +438,6 @@ endif () + #################### + + if (CGNS_BUILD_SHARED) +- # use, i.e. don't skip the full RPATH for the build tree +- set(CMAKE_SKIP_BUILD_RPATH FALSE) +- +- # when building, don't use the install RPATH already +- # (but later on when installing) +- set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) +- +- # the RPATH to be used when installing +- set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}; ${CMAKE_INSTALL_PREFIX}/lib") +- +- # add the automatically determined parts of the RPATH +- # which point to directories outside the build tree to the install RPATH +- set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) +- + if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + set(CMAKE_MACOSX_RPATH TRUE) + endif()
