diff options
author | Justin Lecher <jlec@gentoo.org> | 2010-12-17 18:22:05 +0000 |
---|---|---|
committer | Justin Lecher <jlec@gentoo.org> | 2010-12-17 18:22:05 +0000 |
commit | 882cca9b7cd651e1c192883ae51ade9fa68c3907 (patch) | |
tree | ccaf634252997a8f6514dc2deae625d439a7e498 /sci-chemistry/cns | |
parent | version bump (bug #348941) (diff) | |
download | gentoo-2-882cca9b7cd651e1c192883ae51ade9fa68c3907.tar.gz gentoo-2-882cca9b7cd651e1c192883ae51ade9fa68c3907.tar.bz2 gentoo-2-882cca9b7cd651e1c192883ae51ade9fa68c3907.zip |
Correct handling of OpenMp support
(Portage version: 2.2.0_alpha9/cvs/Linux x86_64)
Diffstat (limited to 'sci-chemistry/cns')
-rw-r--r-- | sci-chemistry/cns/ChangeLog | 7 | ||||
-rw-r--r-- | sci-chemistry/cns/cns-1.2.1-r5.ebuild | 12 | ||||
-rw-r--r-- | sci-chemistry/cns/cns-1.2.1.ebuild | 10 | ||||
-rw-r--r-- | sci-chemistry/cns/cns-1.3_p3.ebuild | 13 | ||||
-rw-r--r-- | sci-chemistry/cns/files/1.2.1-gentoo.patch | 11 | ||||
-rw-r--r-- | sci-chemistry/cns/files/1.3_p3-gentoo.patch | 11 |
6 files changed, 28 insertions, 36 deletions
diff --git a/sci-chemistry/cns/ChangeLog b/sci-chemistry/cns/ChangeLog index 7fc61c077cf5..1d9245703d89 100644 --- a/sci-chemistry/cns/ChangeLog +++ b/sci-chemistry/cns/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for sci-chemistry/cns # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/cns/ChangeLog,v 1.32 2010/12/17 07:54:48 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/cns/ChangeLog,v 1.33 2010/12/17 18:22:05 jlec Exp $ + + 17 Dec 2010; Justin Lecher <jlec@gentoo.org> files/1.2.1-gentoo.patch, + cns-1.2.1.ebuild, cns-1.2.1-r5.ebuild, cns-1.3_p3.ebuild, + files/1.3_p3-gentoo.patch: + Correct handling of OpenMp support 17 Dec 2010; Justin Lecher <jlec@gentoo.org> cns-1.1.ebuild, cns-1.2.1.ebuild, cns-1.2.1-r5.ebuild, cns-1.3_p3.ebuild: diff --git a/sci-chemistry/cns/cns-1.2.1-r5.ebuild b/sci-chemistry/cns/cns-1.2.1-r5.ebuild index 82fcfe7583d0..96f4ba6771f0 100644 --- a/sci-chemistry/cns/cns-1.2.1-r5.ebuild +++ b/sci-chemistry/cns/cns-1.2.1-r5.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/cns/cns-1.2.1-r5.ebuild,v 1.5 2010/12/17 07:54:48 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/cns/cns-1.2.1-r5.ebuild,v 1.6 2010/12/17 18:22:05 jlec Exp $ EAPI="3" @@ -46,7 +46,9 @@ get_fcomp() { } pkg_setup() { - tc-has-openmp || die "Please ensure your compiler has openmp support" + if [[ $(tc-getFC) =~ gfortran ]]; then + tc-has-openmp || die "Please ensure your compiler has openmp support" + fi get_fcomp } @@ -68,13 +70,13 @@ src_prepare() { if [[ $(tc-getFC) =~ gfortran ]]; then epatch "${FILESDIR}"/${PV}-allow-gcc-openmp.patch use openmp && \ - OMPLIB="-lgomp" && append-flags -fopenmp + append-flags -fopenmp && append-ldflags -fopenmp COMP="gfortran" use amd64 && \ append-fflags -fdefault-integer-8 - else + elif [[ $(tc-getFC) == if* ]]; then epatch "${FILESDIR}"/${PV}-ifort.patch - use openmp && OMPLIB="-liomp5" && \ + use openmp && \ append-flags -openmp && append-ldflags -openmp COMP="ifort" use amd64 && append-fflags -i8 diff --git a/sci-chemistry/cns/cns-1.2.1.ebuild b/sci-chemistry/cns/cns-1.2.1.ebuild index 1c87f343ba5f..a38935655ad7 100644 --- a/sci-chemistry/cns/cns-1.2.1.ebuild +++ b/sci-chemistry/cns/cns-1.2.1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/cns/cns-1.2.1.ebuild,v 1.9 2010/12/17 07:54:48 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/cns/cns-1.2.1.ebuild,v 1.10 2010/12/17 18:22:05 jlec Exp $ inherit eutils toolchain-funcs versionator flag-o-matic @@ -40,7 +40,9 @@ get_fcomp() { } pkg_setup() { - tc-has-openmp || die "Please ensure your compiler has openmp support" + if [[ $(tc-getFC) =~ gfortran ]]; then + tc-has-openmp || die "Please ensure your compiler has openmp support" + fi get_fcomp } @@ -48,8 +50,8 @@ src_unpack() { unpack ${A} cd "${S}" - use openmp && append-fflags -fopenmp - use openmp && append-ldflags -lgomp + use openmp && append-fflags -fopenmp && \ + append-ldflags -fopenmp # Someone already did the same in the openmp version, apparently use openmp || epatch "${FILESDIR}"/1.2-allow-unknown-architectures.patch diff --git a/sci-chemistry/cns/cns-1.3_p3.ebuild b/sci-chemistry/cns/cns-1.3_p3.ebuild index 37a0c8962abb..2fa4be0ab553 100644 --- a/sci-chemistry/cns/cns-1.3_p3.ebuild +++ b/sci-chemistry/cns/cns-1.3_p3.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/cns/cns-1.3_p3.ebuild,v 1.3 2010/12/17 07:54:48 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/cns/cns-1.3_p3.ebuild,v 1.4 2010/12/17 18:22:05 jlec Exp $ EAPI="3" @@ -46,7 +46,9 @@ get_fcomp() { } pkg_setup() { - tc-has-openmp || die "Please ensure your compiler has openmp support" + if [[ $(tc-getFC) =~ gfortran ]]; then + tc-has-openmp || die "Please ensure your compiler has openmp support" + fi get_fcomp } @@ -68,12 +70,12 @@ src_prepare() { # the code uses Intel-compiler-specific directives if [[ $(tc-getFC) =~ gfortran ]]; then use openmp && \ - OMPLIB="-lgomp" && append-flags -fopenmp + append-flags -fopenmp && append-ldflags -fopenmp COMP="gfortran" use amd64 && \ append-fflags -fdefault-integer-8 - else - use openmp && OMPLIB="-liomp5" && \ + elif [[ $(tc-getFC) == if* ]]; then + use openmp && \ append-flags -openmp && append-ldflags -openmp COMP="ifort" use amd64 && append-fflags -i8 @@ -134,7 +136,6 @@ src_compile() { compiler="${COMP}" \ install \ || die "emake failed" - } src_test() { diff --git a/sci-chemistry/cns/files/1.2.1-gentoo.patch b/sci-chemistry/cns/files/1.2.1-gentoo.patch index 45f5c318155f..2b47bfcc7d86 100644 --- a/sci-chemistry/cns/files/1.2.1-gentoo.patch +++ b/sci-chemistry/cns/files/1.2.1-gentoo.patch @@ -37,19 +37,10 @@ - $(LDFLAGS) \ - $(CNS_FFTDIR) $(CNS_FFTLIB); \ + $(LD) $(LDFLAGS) -o cns_solve-$$cns_string.exe $(OBJS) dmemory.o machine_c.o \ -+ $(CNS_FFTDIR) $(CNS_FFTLIB) $(OMPLIB); \ ++ $(CNS_FFTDIR) $(CNS_FFTLIB); \ if [ -x cns_solve-$$cns_string.exe ]; \ then echo "created executable file cns_solve-$$cns_string.exe"; \ echo ""; cd ../bin; $(RM) -f cns_solve; $(RM) -f cns; \ -@@ -59,7 +55,7 @@ - @ echo; echo "flags:"; \ - echo " fortran -> [$(F77)] $(F77FLAGS)"; \ - echo " c -> [$(CC)] $(CCFLAGS)"; \ -- echo " link -> [$(LD)] $(LDFLAGS) $(CNS_FFTDIR) $(CNS_FFTLIB)"; \ -+ echo " link -> [$(LD)] $(LDFLAGS) $(CNS_FFTDIR) $(CNS_FFTLIB) $(OMP_LIB)"; \ - echo - - # regenerate makefiles --- cns_solve_1.21/instlib/utils/Makefile 2004-08-30 00:40:35.000000000 +0200 +++ cns_solve_1.21/instlib/utils/Makefile.new 2009-07-14 09:50:27.000000000 +0200 @@ -22,14 +22,14 @@ diff --git a/sci-chemistry/cns/files/1.3_p3-gentoo.patch b/sci-chemistry/cns/files/1.3_p3-gentoo.patch index d33d21d21804..7942c55abfb9 100644 --- a/sci-chemistry/cns/files/1.3_p3-gentoo.patch +++ b/sci-chemistry/cns/files/1.3_p3-gentoo.patch @@ -48,19 +48,10 @@ index 0d0dd3e..dd4b680 100644 - $(LDFLAGS) \ - $(CNS_FFTDIR) $(CNS_FFTLIB); \ + $(LD) $(LDFLAGS) -o cns_solve-$$cns_string.exe $(OBJS) dmemory.o machine_c.o \ -+ $(CNS_FFTDIR) $(CNS_FFTLIB) $(OMPLIB); \ ++ $(CNS_FFTDIR) $(CNS_FFTLIB); \ if [ -x cns_solve-$$cns_string.exe ]; \ then echo "created executable file cns_solve-$$cns_string.exe"; \ echo ""; cd ../bin; $(RM) -f cns_solve; $(RM) -f cns; \ -@@ -59,7 +55,7 @@ printflags: - @ echo; echo "flags:"; \ - echo " fortran -> [$(F77)] $(F77FLAGS)"; \ - echo " c -> [$(CC)] $(CCFLAGS)"; \ -- echo " link -> [$(LD)] $(LDFLAGS) $(CNS_FFTDIR) $(CNS_FFTLIB)"; \ -+ echo " link -> [$(LD)] $(LDFLAGS) $(CNS_FFTDIR) $(CNS_FFTLIB) $(OMP_LIB)"; \ - echo - - # regenerate makefiles diff --git a/instlib/utils/Makefile b/instlib/utils/Makefile index 98de84f..4f32b34 100644 --- a/instlib/utils/Makefile |