commit:     094d2d3522050ca69fdef6f6fd1b39248d187c67
Author:     Alexander Golubev <fatzer2 <AT> gmail <DOT> com>
AuthorDate: Thu May 21 08:32:44 2015 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Thu May 21 08:32:44 2015 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=094d2d35

sci-libs/calculix-ccx-2.8_p2 version bump

 sci-libs/calculix-ccx/calculix-ccx-2.8_p2.ebuild   | 70 ++++++++++++++++++++++
 ...2_Makefile_custom_cc_flags_spooles_arpack.patch | 31 ++++++++++
 2 files changed, 101 insertions(+)

diff --git a/sci-libs/calculix-ccx/calculix-ccx-2.8_p2.ebuild 
b/sci-libs/calculix-ccx/calculix-ccx-2.8_p2.ebuild
new file mode 100644
index 0000000..a4900d4
--- /dev/null
+++ b/sci-libs/calculix-ccx/calculix-ccx-2.8_p2.ebuild
@@ -0,0 +1,70 @@
+# 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 threads"
+
+RDEPEND="
+       arpack? ( >=sci-libs/arpack-3.1.3 )
+       >=sci-libs/spooles-2.2[threads=]
+       virtual/lapack
+       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_custom_cc_flags_spooles_arpack.patch"
+}
+
+src_configure() {
+       # Technically we currently only need this when arpack is not used.
+       # Keeping things this way in case we change pkgconfig for arpack
+       export LAPACK=$($(tc-getPKG_CONFIG) --libs lapack)
+
+       append-cflags "-I/usr/include/spooles -DSPOOLES"
+       if use threads; then
+               append-cflags "-DUSE_MT"
+       fi
+
+       if use arpack; then
+               export ARPACKLIB=$($(tc-getPKG_CONFIG) --libs arpack)
+               append-cflags "-DARPACK"
+       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
+}

diff --git 
a/sci-libs/calculix-ccx/files/01_ccx_2.8p2_Makefile_custom_cc_flags_spooles_arpack.patch
 
b/sci-libs/calculix-ccx/files/01_ccx_2.8p2_Makefile_custom_cc_flags_spooles_arpack.patch
new file mode 100644
index 0000000..c9edd9c
--- /dev/null
+++ 
b/sci-libs/calculix-ccx/files/01_ccx_2.8p2_Makefile_custom_cc_flags_spooles_arpack.patch
@@ -0,0 +1,31 @@
+diff -ru CalculiX.orig/ccx_2.8p2/src/Makefile CalculiX/ccx_2.8p2/src/Makefile
+--- CalculiX.orig/ccx_2.8p2/src/Makefile       2015-05-21 11:04:58.125111330 
+0300
++++ CalculiX/ccx_2.8p2/src/Makefile    2015-05-21 11:08:26.848130631 +0300
+@@ -1,9 +1,9 @@
+ 
+-CFLAGS = -Wall -O3  -I ../../../SPOOLES.2.2 -DARCH="Linux" -DSPOOLES -DARPACK 
-DMATRIXSTORAGE
+-FFLAGS = -Wall -O3 -fopenmp
++CFLAGS := -Wall -O3 -DARCH="Linux" -DMATRIXSTORAGE $(CFLAGS)
++FFLAGS := -Wall -O3 $(FFLAGS)
+ 
+-CC=cc
+-FC=gfortran
++#CC=cc
++#FC=gfortran
+ 
+ .c.o :
+       $(CC) $(CFLAGS) -c $<
+@@ -18,12 +18,7 @@
+ OCCXC = $(SCCXC:.c=.o)
+ OCCXMAIN = $(SCCXMAIN:.c=.o)
+ 
+-DIR=../../../SPOOLES.2.2
+-
+-LIBS = \
+-       $(DIR)/spooles.a \
+-      ../../../ARPACK/libarpack_INTEL.a \
+-       -lpthread -lm -lc
++LIBS = $(ARPACKLIB) $(LAPACK) -lm -lc -lspooles -lpthread
+ 
+ ccx_2.8p2: $(OCCXMAIN) ccx_2.8p2.a  $(LIBS)
+       ./date.pl; $(CC) $(CFLAGS) -c ccx_2.8p2.c; $(FC) -fopenmp -Wall -O3 -o 
$@ $(OCCXMAIN) ccx_2.8p2.a $(LIBS)

Reply via email to