diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-01-01 21:06:00 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-01-01 21:06:00 +0000 |
commit | 129160ec854dca4c3fedb5bcfbcb56930371da0f (patch) | |
tree | 53bf797418ac5e9b99c41ca0382c87b82421e5de /sci-libs/cgnslib/cgnslib-3.4.0.ebuild | |
parent | 441d1370330332b7d78f238d2f5e13f7aed5e4e0 (diff) |
gentoo new year resync : 01.01.2021
Diffstat (limited to 'sci-libs/cgnslib/cgnslib-3.4.0.ebuild')
-rw-r--r-- | sci-libs/cgnslib/cgnslib-3.4.0.ebuild | 51 |
1 files changed, 34 insertions, 17 deletions
diff --git a/sci-libs/cgnslib/cgnslib-3.4.0.ebuild b/sci-libs/cgnslib/cgnslib-3.4.0.ebuild index e5889cb043ad..6eac6426bb89 100644 --- a/sci-libs/cgnslib/cgnslib-3.4.0.ebuild +++ b/sci-libs/cgnslib/cgnslib-3.4.0.ebuild @@ -1,12 +1,15 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=7 FORTRAN_NEEDED="fortran" FORTRAN_STANDARD="90 2003" -inherit cmake-utils fortran-2 +# fails to build with ninja +CMAKE_MAKEFILE_GENERATOR="emake" + +inherit cmake fortran-2 DESCRIPTION="CFD General Notation System standard library" HOMEPAGE="http://www.cgns.org/" @@ -16,7 +19,15 @@ LICENSE="ZLIB" SLOT="0/3" KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" IUSE="doc examples fortran hdf5 legacy mpi static-libs szip test tools" -RESTRICT="!test? ( test )" +RESTRICT=" + fortran? ( test ) + !test? ( test ) +" + +REQUIRED_USE=" + mpi? ( hdf5 ) + szip? ( hdf5 ) +" RDEPEND="hdf5? ( sci-libs/hdf5:=[mpi=,szip=] ) tools? ( @@ -37,41 +48,47 @@ pkg_setup() { src_prepare() { # gentoo libdir sed -e 's|/lib|/'$(get_libdir)'|' \ - -e '/DESTINATION/s|lib|'$(get_libdir)'|g' \ - -i src/CMakeLists.txt || die + -e '/DESTINATION/s|lib|'$(get_libdir)'|g' \ + -i src/CMakeLists.txt || die # dont hard code link sed -e '/link_directories/d' \ -i src/tools/CMakeLists.txt src/cgnstools/*/CMakeLists.txt || die - cmake-utils_src_prepare + cmake_src_prepare } src_configure() { local mycmakeargs=( -DCGNS_BUILD_SHARED=ON - -DCGNS_USED_SHARED=ON + -DCGNS_USE_SHARED=ON -DCGNS_BUILD_CGNSTOOLS="$(usex tools)" -DCGNS_ENABLE_FORTRAN="$(usex fortran)" -DCGNS_ENABLE_HDF5="$(usex hdf5)" -DCGNS_ENABLE_LEGACY="$(usex legacy)" -DCGNS_ENABLE_TESTS="$(usex test)" - -DHDF5_NEED_MPI="$(usex mpi)" - -DHDF5_NEED_SZIP="$(usex szip)" - -DHDF5_NEED_ZLIB="$(usex szip)" ) - cmake-utils_src_configure + + if use hdf5; then + mycmakeargs+=( + -DHDF5_NEED_MPI="$(usex mpi)" + -DHDF5_NEED_SZIP="$(usex szip)" + -DHDF5_NEED_ZLIB="$(usex szip)" + ) + fi + + cmake_src_configure } src_compile() { # hack to allow parallel building by first producing fortran module use fortran && cd "${BUILD_DIR}"/src && emake cgns_f.o - cmake-utils_src_compile + cmake_src_compile } src_install() { - cmake-utils_src_install + cmake_src_install dodoc README.md release_docs/Release.txt use static-libs || rm "${ED}"/usr/$(get_libdir)/libcgns.a - use doc && dodoc *pdf release_docs/*.pdf - insinto /usr/share/doc/${PF} - use examples && doins -r src/examples + use doc && dodoc release_docs/*.pdf + docompress -x /usr/share/doc/${PF}/examples + use examples && dodoc -r src/examples } |