* [gentoo-commits] proj/sci:master commit in: sci-physics/cernlib/, sci-physics/cernlib/files/
@ 2024-03-22 16:37 Alexander Puck Neuwirth
0 siblings, 0 replies; only message in thread
From: Alexander Puck Neuwirth @ 2024-03-22 16:37 UTC (permalink / raw
To: gentoo-commits
commit: 2ba82f4414b79a0fd2473c45f0b6701e632e40bd
Author: Alexander Puck Neuwirth <alexander <AT> neuwirth-informatik <DOT> de>
AuthorDate: Tue Feb 27 13:34:57 2024 +0000
Commit: Alexander Puck Neuwirth <alexander <AT> neuwirth-informatik <DOT> de>
CommitDate: Fri Mar 22 16:37:26 2024 +0000
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=2ba82f44
sci-physics/cernlib: new package, add 2023.10.31.0
Closes: https://github.com/gentoo/sci/pull/1243
Signed-off-by: Alexander Puck Neuwirth <alexander <AT> neuwirth-informatik.de>
sci-physics/cernlib/cernlib-2023.10.31.0.ebuild | 57 ++++++++++++++++++++++
.../files/cernlib-2023.10.31.0-cfortran.patch | 21 ++++++++
.../cernlib/files/cernlib-2023.10.31.0-ctest.patch | 31 ++++++++++++
.../cernlib/files/cernlib-2023.10.31.0-man.patch | 22 +++++++++
sci-physics/cernlib/metadata.xml | 21 ++++++++
5 files changed, 152 insertions(+)
diff --git a/sci-physics/cernlib/cernlib-2023.10.31.0.ebuild b/sci-physics/cernlib/cernlib-2023.10.31.0.ebuild
new file mode 100644
index 000000000..697a25ef0
--- /dev/null
+++ b/sci-physics/cernlib/cernlib-2023.10.31.0.ebuild
@@ -0,0 +1,57 @@
+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="https://cernlib.web.cern.ch/download/2023_source/tar/${P}-free.tar.gz"
+S="${WORKDIR}/${P}-free"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+
+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_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/files/cernlib-2023.10.31.0-cfortran.patch b/sci-physics/cernlib/files/cernlib-2023.10.31.0-cfortran.patch
new file mode 100644
index 000000000..b4426b3eb
--- /dev/null
+++ b/sci-physics/cernlib/files/cernlib-2023.10.31.0-cfortran.patch
@@ -0,0 +1,21 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 0b56fc85..ead47c54 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -735,7 +735,6 @@ add_subdirectory(code_motif)
+ ########################################################################
+ set(CERNLIB_MMAP 1)
+ install(FILES
+-${CMAKE_CURRENT_SOURCE_DIR}/cfortran/cfortran.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/cfortran/comis.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/cfortran/cspack.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/cfortran/geant315.h
+@@ -757,7 +756,7 @@ ${CMAKE_CURRENT_SOURCE_DIR}/cfortran/paw.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/cfortran/zebra.h
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ COMPONENT libs )
+
+-set(head cfortran.h comis.h cspack.h geant315.h geant321.h gen.h graflib.h hbook.h hbook_94b.h higz.h hplot.h jetset74.h kernlib.h kuip.h lapack.h lepto62.h minuit.h packlib.h paw.h zebra.h )
++set(head comis.h cspack.h geant315.h geant321.h gen.h graflib.h hbook.h hbook_94b.h higz.h hplot.h jetset74.h kernlib.h kuip.h lapack.h lepto62.h minuit.h packlib.h paw.h zebra.h )
+
+ install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_INSTALL_INCLUDEDIR}/cfortran/)")
+ foreach ( m ${head} )
diff --git a/sci-physics/cernlib/files/cernlib-2023.10.31.0-ctest.patch b/sci-physics/cernlib/files/cernlib-2023.10.31.0-ctest.patch
new file mode 100644
index 000000000..b329bb900
--- /dev/null
+++ b/sci-physics/cernlib/files/cernlib-2023.10.31.0-ctest.patch
@@ -0,0 +1,31 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 0b56fc85..78a28e11 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -162,9 +162,10 @@ macro(CLATestTarget ast)
+ list(FIND a "<" NEEDSHELL)
+ list(JOIN a " " MYCMD)
+ if (NEEDSHELL STREQUAL "-1")
+- add_test(NAME test${exec} COMMAND ${CMAKE_CURRENT_BINARY_DIR}/${exec} {MYCMD} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
++ add_test(NAME test${exec} COMMAND ${CMAKE_CURRENT_BINARY_DIR}/${exec} ${MYCMD} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
+ if (CERNLIB_ENABLE_MEMORYTEST)
+- add_test(NAME memory_test${exec} COMMAND ${VG} ${VGOPTIONS} ${CMAKE_CURRENT_BINARY_DIR}/${exec} {MYCMD} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
++ add_test(NAME memory_test${exec} COMMAND ${VG} ${VGOPTIONS}
++ ${CMAKE_CURRENT_BINARY_DIR}/${exec} ${MYCMD} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
+ endif()
+ else()
+ add_test(NAME test${exec} COMMAND sh -c "${CMAKE_CURRENT_BINARY_DIR}/${exec} ${MYCMD}" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
+@@ -182,9 +183,11 @@ macro(CLBTestTarget ast)
+ list(JOIN a " " MYCMD)
+ if (NEEDSHELL STREQUAL "-1")
+ if (CERNLIB_ENABLE_MEMORYTEST)
+- add_test(NAME memory_test${exec} COMMAND ${VG} ${VGOPTIONS} ${CMAKE_CURRENT_BINARY_DIR}/${exec}/${exec} {MYCMD} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${exec})
++ add_test(NAME memory_test${exec} COMMAND ${VG} ${VGOPTIONS}
++ ${CMAKE_CURRENT_BINARY_DIR}/${exec}/${exec} ${MYCMD} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${exec})
+ endif()
+- add_test(NAME test${exec} COMMAND ${CMAKE_CURRENT_BINARY_DIR}/${exec}/${exec} {MYCMD} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${exec})
++ add_test(NAME test${exec} COMMAND
++ ${CMAKE_CURRENT_BINARY_DIR}/${exec}/${exec} ${MYCMD} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${exec})
+ else()
+ if (CERNLIB_ENABLE_MEMORYTEST)
+ add_test(NAME memory_test${exec} COMMAND sh -c "${VG} ${VGOPTIONS} ${CMAKE_CURRENT_BINARY_DIR}/${exec}/${exec} ${MYCMD}" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${exec})
diff --git a/sci-physics/cernlib/files/cernlib-2023.10.31.0-man.patch b/sci-physics/cernlib/files/cernlib-2023.10.31.0-man.patch
new file mode 100644
index 000000000..636943899
--- /dev/null
+++ b/sci-physics/cernlib/files/cernlib-2023.10.31.0-man.patch
@@ -0,0 +1,22 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 0b56fc85..0db67942 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -410,7 +413,7 @@ else()
+ COMMENT "GZipping to ${CMAKE_CURRENT_BINARY_DIR}/${m}.gz."
+ )
+ endif()
+- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${m}.gz DESTINATION ${CMAKE_INSTALL_DATADIR}/man/man1)
++#install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${m}.gz DESTINATION ${CMAKE_INSTALL_DATADIR}/man/man1)
+ endforeach ( m ${man1} )
+
+ foreach ( m ${man8} )
+@@ -425,7 +428,7 @@ else()
+ COMMENT "GZipping to ${CMAKE_CURRENT_BINARY_DIR}/${m}.gz."
+ )
+ endif()
+- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${m}.gz DESTINATION ${CMAKE_INSTALL_DATADIR}/man/man8)
++#install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${m}.gz DESTINATION ${CMAKE_INSTALL_DATADIR}/man/man8)
+ endforeach ( m ${man8} )
+
+ #install(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/patchy5/yexpand.script DESTINATION ${CMAKE_INSTALL_BINDIR}/ RENAME yexpand.script${COMPSUFFIXBIN} )
diff --git a/sci-physics/cernlib/metadata.xml b/sci-physics/cernlib/metadata.xml
new file mode 100644
index 000000000..887c950bc
--- /dev/null
+++ b/sci-physics/cernlib/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>alexander@neuwirth-informatik.de</email>
+ <name>Alexander Puck Neuwirth</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>sci-physics@gentoo.org</email>
+ <name>Gentoo Physics Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ The CERN Program Library is a large collection of general purpose
+ libraries and modules maintained and offered in both source and
+ object code form on the CERN central computers. Most of these
+ programs were developed at CERN and are therefore oriented towards
+ the needs of a physics research laboratory that is general
+ mathematics, data analysis, detectors simulation, data-handling
+ etc... applicable to a wide range of problems.
+ </longdescription>
+</pkgmetadata>
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2024-03-22 16:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-22 16:37 [gentoo-commits] proj/sci:master commit in: sci-physics/cernlib/, sci-physics/cernlib/files/ Alexander Puck Neuwirth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox