blob: 326fadde3b23b42bfffb3ba0efed6fbebf07100f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
EAPI=8
CMAKE_MAKEFILE_GENERATOR="emake"
inherit cmake fortran-2
MY_P="${P}"
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
}
|