commit:     dbbb91e76fa7c58458dd7e3e20827e2337f6bd26
Author:     François Bissey <francois.bissey <AT> canterbury <DOT> ac <DOT> nz>
AuthorDate: Mon Sep  8 10:06:52 2014 +0000
Commit:     Francois Bissey <f.r.bissey <AT> massey <DOT> ac <DOT> nz>
CommitDate: Mon Sep  8 10:06:52 2014 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=dbbb91e7

Fixing issue #264 and giving it a serious look over and clean. Enabled 
threading. More could be done.

Package-Manager: portage-2.2.10

---
 sci-libs/calculix-ccx/ChangeLog                    |  6 +++++
 sci-libs/calculix-ccx/calculix-ccx-2.7-r1.ebuild   | 26 ++++++++++------------
 ...7_Makefile_custom_cc_flags_spooles_arpack.patch |  2 +-
 3 files changed, 19 insertions(+), 15 deletions(-)

diff --git a/sci-libs/calculix-ccx/ChangeLog b/sci-libs/calculix-ccx/ChangeLog
index 7eccdea..9e1b1f5 100644
--- a/sci-libs/calculix-ccx/ChangeLog
+++ b/sci-libs/calculix-ccx/ChangeLog
@@ -2,6 +2,12 @@
 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
 # $Header: $
 
+  08 Sep 2014; François Bissey <[email protected]>
+  calculix-ccx-2.7-r1.ebuild,
+  files/01_ccx_2.7_Makefile_custom_cc_flags_spooles_arpack.patch:
+  Fixing issue #264 and giving it a serious look over and clean. Enabled
+  threading. More could be done.
+
 *calculix-ccx-2.7-r1 (07 Sep 2014)
 
   07 Sep 2014; Rongcui Dong <[email protected]> +calculix-ccx-2.7-r1.ebuild,

diff --git a/sci-libs/calculix-ccx/calculix-ccx-2.7-r1.ebuild 
b/sci-libs/calculix-ccx/calculix-ccx-2.7-r1.ebuild
index 2394647..a511dc9 100644
--- a/sci-libs/calculix-ccx/calculix-ccx-2.7-r1.ebuild
+++ b/sci-libs/calculix-ccx/calculix-ccx-2.7-r1.ebuild
@@ -18,12 +18,12 @@ SRC_URI="
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
-IUSE="arpack doc examples lapack"
+IUSE="arpack doc examples threads"
 
 RDEPEND="
-       arpack? ( sci-libs/arpack )
-       lapack? ( virtual/lapack )
-       >=sci-libs/spooles-2.2
+       arpack? ( >=sci-libs/arpack-3.1.3 )
+       >=sci-libs/spooles-2.2[threads=]
+       virtual/lapack
        virtual/blas"
 DEPEND="${RDEPEND}
        virtual/pkgconfig
@@ -32,25 +32,23 @@ DEPEND="${RDEPEND}
 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
+       epatch "${FILESDIR}"/01_${MY_P}_lapack.patch
 }
 
 src_configure() {
-       use lapack && export LAPACK=$($(tc-getPKG_CONFIG) --libs lapack)
+       # 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)
 
-       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 threads; then
+               append-cflags "-DUSE_MT"
+       fi
 
        if use arpack; then
-               export ARPACK="-DARPACK"
                export ARPACKLIB=$($(tc-getPKG_CONFIG) --libs arpack)
-               append-cflags "${ARPACK}"
+               append-cflags "-DARPACK"
        fi
        export CC="$(tc-getCC)"
        export FC="$(tc-getFC)"

diff --git 
a/sci-libs/calculix-ccx/files/01_ccx_2.7_Makefile_custom_cc_flags_spooles_arpack.patch
 
b/sci-libs/calculix-ccx/files/01_ccx_2.7_Makefile_custom_cc_flags_spooles_arpack.patch
index db3b301..b042634 100644
--- 
a/sci-libs/calculix-ccx/files/01_ccx_2.7_Makefile_custom_cc_flags_spooles_arpack.patch
+++ 
b/sci-libs/calculix-ccx/files/01_ccx_2.7_Makefile_custom_cc_flags_spooles_arpack.patch
@@ -25,7 +25,7 @@ diff -rupN CalculiX/ccx_2.7/src/Makefile 
CalculiX.patched/ccx_2.7/src/Makefile
 -       $(DIR)/spooles.a \
 -      ../../../ARPACK/libarpack_INTEL.a \
 -       -lpthread -lm -lc
-+LIBS = $(SPOOLESLIB) $(ARPACKLIB) $(BLAS) -lm -lc -lpthread -lspooles
++LIBS = $(ARPACKLIB) $(LAPACK) -lm -lc -lspooles -lpthread
  
  ccx_2.7: $(OCCXMAIN) ccx_2.7.a  $(LIBS)
        ./date.pl; $(CC) $(CFLAGS) -c ccx_2.7.c; $(FC) -Wall -O3 -o $@ 
$(OCCXMAIN) ccx_2.7.a $(LIBS)

Reply via email to