blob: 239464727c93d09a5091a9fd9c1011c1f4c94754 (
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
|
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI=5
inherit eutils toolchain-funcs flag-o-matic
MY_P=ccx_${PV}
DESCRIPTION="A Free Software Three-Dimensional Structural Finite Element Program"
HOMEPAGE="http://www.calculix.de/"
SRC_URI="
http://www.dhondt.de/${MY_P}.src.tar.bz2
doc? ( http://www.dhondt.de/${MY_P}.ps.tar.bz2 )
examples? ( http://www.dhondt.de/${MY_P}.test.tar.bz2 )"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="arpack doc examples lapack"
RDEPEND="
arpack? ( sci-libs/arpack )
lapack? ( virtual/lapack )
>=sci-libs/spooles-2.2
virtual/blas"
DEPEND="${RDEPEND}
virtual/pkgconfig
doc? ( app-text/ghostscript-gpl )"
S=${WORKDIR}/CalculiX/${MY_P}/src
src_prepare() {
#epatch "${FILESDIR}"/01_${MY_P}_Makefile_spooles_arpack.patch
epatch "${FILESDIR}"/01_${MY_P}_Makefile_custom_cc_flags_spooles_arpack.patch
use lapack && epatch "${FILESDIR}"/01_${MY_P}_lapack.patch
}
src_configure() {
use lapack && export LAPACK=$($(tc-getPKG_CONFIG) --libs lapack)
export BLAS=$($(tc-getPKG_CONFIG) --libs blas)
#export SPOOLESINC="-I/usr/include/spooles -DSPOOLES"
append-cflags "-I/usr/include/spooles -DSPOOLES"
#export SPOOLESLIB="-lspooles -lpthread"
export USE_MT="-DUSE_MT"
if use arpack; then
export ARPACK="-DARPACK"
export ARPACKLIB=$($(tc-getPKG_CONFIG) --libs arpack)
append-cflags "${ARPACK}"
fi
export CC="$(tc-getCC)"
export FC="$(tc-getFC)"
}
src_install () {
dobin ${MY_P}
dosym ${MY_P} /usr/bin/ccx
if use doc; then
cd "${S}/../doc"
ps2pdf ${MY_P}.ps ${MY_P}.pdf
dodoc ${MY_P}.pdf
fi
if use examples; then
insinto /usr/share/doc/${PF}/examples
doins -r "${S}"/../test/*
fi
}
|