From 55da92a78fb0bf296acf20a2b09ae8290c53426d Mon Sep 17 00:00:00 2001 From: Alexander Puck Neuwirth Date: Tue, 23 Apr 2024 16:50:25 +0200 Subject: sci-physics/cernlib: Fix test failures Closes: https://github.com/gentoo/sci/pull/1268 Signed-off-by: Alexander Puck Neuwirth --- sci-physics/cernlib/cernlib-2023.10.31.0-r1.ebuild | 72 -------------------- sci-physics/cernlib/cernlib-2023.10.31.0-r2.ebuild | 79 ++++++++++++++++++++++ 2 files changed, 79 insertions(+), 72 deletions(-) delete mode 100644 sci-physics/cernlib/cernlib-2023.10.31.0-r1.ebuild create mode 100644 sci-physics/cernlib/cernlib-2023.10.31.0-r2.ebuild (limited to 'sci-physics/cernlib') diff --git a/sci-physics/cernlib/cernlib-2023.10.31.0-r1.ebuild b/sci-physics/cernlib/cernlib-2023.10.31.0-r1.ebuild deleted file mode 100644 index c5c919678..000000000 --- a/sci-physics/cernlib/cernlib-2023.10.31.0-r1.ebuild +++ /dev/null @@ -1,72 +0,0 @@ -EAPI=8 - -CMAKE_MAKEFILE_GENERATOR="emake" -inherit cmake fortran-2 - -DESCRIPTION="CERN program library for High Energy Physics" -HOMEPAGE="https://cernlib.web.cern.ch/cernlib/" -SRC_URI=" - free? ( https://cernlib.web.cern.ch/download/2023_source/tar/${P}-free.tar.gz ) - !free? ( https://cernlib.web.cern.ch/download/2023_source/tar/${P}.tar.gz ) -" - -LICENSE=" - free? ( BSD LGPL-2+ GPL-1+ ) - !free? ( all-rights-reserved ) -" -SLOT="0" -KEYWORDS="~amd64" -IUSE="+free" -RESTRICT="mirror" - -RDEPEND=" - x11-libs/motif:0 - x11-libs/libXaw - x11-libs/libXau - virtual/lapack - dev-lang/cfortran - x11-libs/xbae - net-libs/libnsl - virtual/libcrypt:= -" -DEPEND="${RDEPEND}" -BDEPEND=" - virtual/pkgconfig -" - -PATCHES=( - "${FILESDIR}"/${P}-cfortran.patch - "${FILESDIR}"/${P}-ctest.patch - "${FILESDIR}"/${P}-man.patch -) - -src_unpack() { - default - if use free; then - mv ${P}-free ${P} || die - fi -} - -src_prepare() { - cmake_src_prepare - # cfortran.patch - # Remove cfortran.h since it is already installed from dev-lang/cfortran - # thereby we avoid collisions if e.g. sci-physics/root[fortran] is installed. - rm cfortran/cfortran.h || die -} - -src_configure() { - # docs follow rpm like spliting into packages cernlib, cernlib-devel, etc. - # we move them into a folder that agrees with gentoo doc structure. - sed -i "s#/doc/#/doc/${PF}/#g" CMakeLists.txt || die - cmake_src_configure -} - -src_install() { - cmake_src_install - # man.patch - # The CMakeLists.txt already compresses the manual before install - # therefore we install it manually and avoid QA problems. - doman contrib/man/man1/*.1 - doman contrib/man/man8/*.8 -} diff --git a/sci-physics/cernlib/cernlib-2023.10.31.0-r2.ebuild b/sci-physics/cernlib/cernlib-2023.10.31.0-r2.ebuild new file mode 100644 index 000000000..93220dffb --- /dev/null +++ b/sci-physics/cernlib/cernlib-2023.10.31.0-r2.ebuild @@ -0,0 +1,79 @@ +EAPI=8 + +CMAKE_MAKEFILE_GENERATOR="emake" +inherit cmake fortran-2 flag-o-matic + +DESCRIPTION="CERN program library for High Energy Physics" +HOMEPAGE="https://cernlib.web.cern.ch/cernlib/" +SRC_URI=" + free? ( https://cernlib.web.cern.ch/download/2023_source/tar/${P}-free.tar.gz ) + !free? ( https://cernlib.web.cern.ch/download/2023_source/tar/${P}.tar.gz ) +" + +LICENSE=" + free? ( BSD LGPL-2+ GPL-1+ ) + !free? ( all-rights-reserved ) +" +SLOT="0" +KEYWORDS="~amd64" +# static-libs as default since otherwise test fail... +IUSE="+free +static-libs" +RESTRICT="mirror" + +RDEPEND=" + x11-libs/motif:0 + x11-libs/libXaw + x11-libs/libXau + virtual/lapack + dev-lang/cfortran + x11-libs/xbae + net-libs/libnsl + virtual/libcrypt:= +" +DEPEND="${RDEPEND}" +BDEPEND=" + virtual/pkgconfig +" + +PATCHES=( + "${FILESDIR}"/${P}-cfortran.patch + "${FILESDIR}"/${P}-ctest.patch + "${FILESDIR}"/${P}-man.patch +) + +src_unpack() { + default + if use free; then + mv ${P}-free ${P} || die + fi +} + +src_prepare() { + cmake_src_prepare + # cfortran.patch + # Remove cfortran.h since it is already installed from dev-lang/cfortran + # thereby we avoid collisions if e.g. sci-physics/root[fortran] is installed. + rm cfortran/cfortran.h || die +} + +src_configure() { + # docs follow rpm like spliting into packages cernlib, cernlib-devel, etc. + # we move them into a folder that agrees with gentoo doc structure. + sed -i "s#/doc/#/doc/${PF}/#g" CMakeLists.txt || die + # with -O2 some tests fail + # let upstream decide on optimization (-O0) since code is fragile + filter-flags -O1 -O2 -O3 -Os -Oz -Og -Ofast + local mycmakeargs=( + -DBUILD_SHARED_LIBS=$(usex static-libs OFF ON) + ) + cmake_src_configure +} + +src_install() { + cmake_src_install + # man.patch + # The CMakeLists.txt already compresses the manual before install + # therefore we install it manually and avoid QA problems. + doman contrib/man/man1/*.1 + doman contrib/man/man8/*.8 +} -- cgit v1.2.3-65-gdbad