summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Fabbro <bicatali@gentoo.org>2007-09-03 15:48:46 +0000
committerSebastien Fabbro <bicatali@gentoo.org>2007-09-03 15:48:46 +0000
commitdd39ff15650ab2e2ec3212574ca2e3c2de0b7a51 (patch)
treed25f931f99650166e902d683c61add49961471ab /sci-physics
parentClean up old versions (diff)
downloadgentoo-2-dd39ff15650ab2e2ec3212574ca2e3c2de0b7a51.tar.gz
gentoo-2-dd39ff15650ab2e2ec3212574ca2e3c2de0b7a51.tar.bz2
gentoo-2-dd39ff15650ab2e2ec3212574ca2e3c2de0b7a51.zip
now allow user' FFLAGS and added a src_test, should close bug #190534
(Portage version: 2.1.2.12)
Diffstat (limited to 'sci-physics')
-rw-r--r--sci-physics/cernlib/ChangeLog7
-rw-r--r--sci-physics/cernlib/cernlib-2006.ebuild31
-rw-r--r--sci-physics/cernlib/files/cernlib-2006-maketest.patch17
-rw-r--r--sci-physics/cernlib/files/cernlib-2006-test64.patch23
-rw-r--r--sci-physics/cernlib/files/cernlib-2006-testlink.patch21
5 files changed, 94 insertions, 5 deletions
diff --git a/sci-physics/cernlib/ChangeLog b/sci-physics/cernlib/ChangeLog
index 6c3510d353da..963c85249b9e 100644
--- a/sci-physics/cernlib/ChangeLog
+++ b/sci-physics/cernlib/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for sci-physics/cernlib
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-physics/cernlib/ChangeLog,v 1.2 2007/08/28 14:33:45 fmccor Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-physics/cernlib/ChangeLog,v 1.3 2007/09/03 15:48:46 bicatali Exp $
+
+ 03 Sep 2007; Sébastien Fabbro <bicatali@gentoo.org>
+ +files/cernlib-2006-maketest.patch, +files/cernlib-2006-test64.patch,
+ +files/cernlib-2006-testlink.patch, cernlib-2006.ebuild:
+ now allow user' FFLAGS and added a src_test. should close bug #190534.
28 Aug 2007; Ferris McCormick <fmccor@gentoo.org> cernlib-2006.ebuild:
Add ~sparc for testing (Bug #190163 comment 3) --- but please see Bug #190534
diff --git a/sci-physics/cernlib/cernlib-2006.ebuild b/sci-physics/cernlib/cernlib-2006.ebuild
index 9532b8ff1db7..5b4975b4ec2b 100644
--- a/sci-physics/cernlib/cernlib-2006.ebuild
+++ b/sci-physics/cernlib/cernlib-2006.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-physics/cernlib/cernlib-2006.ebuild,v 1.3 2007/08/28 14:33:45 fmccor Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-physics/cernlib/cernlib-2006.ebuild,v 1.4 2007/09/03 15:48:46 bicatali Exp $
inherit eutils multilib fortran
@@ -41,16 +41,17 @@ src_unpack() {
epatch "${DEB_P}-${DEB_PR}".diff
cd "${S}"
- # temporary fix for threading support (might be supported by eselect)
+ # temporary fix for lapack libs (will need to change with new blas/lapack)
if eselect blas show | grep -q threaded-atlas; then
einfo "Fixing threads linking for blas"
sed -i \
-e 's/$DEPS -lm/$DEPS -lm -lpthread/' \
-e 's/$DEPS -l$1 -lm/$DEPS -l$1 -lm -lpthread/' \
+ -e 's:-llapack-3:-llapack:g' \
debian/add-ons/bin/cernlib.in || die "sed failed"
fi
- # fix X11 library path
+ # fix X11 library paths
sed -i \
-e "s:L/usr/X11R6/lib:L/usr/$(get_libdir)/X11:g" \
-e "s:XDIR=/usr/X11R6/lib:XDIR=/usr/$(get_libdir)/X11:g" \
@@ -85,7 +86,21 @@ src_unpack() {
# fix an ifort problem
sed -i \
-e 's/= $(CLIBS) -nofor_main/+= -nofor_main/' \
- src/packlib/kuip/programs/kxterm/Imakefile || die "sed failed"
+ src/packlib/kuip/programs/kxterm/Imakefile || die "sed ifc failed"
+
+ # respect users flags
+ sed -i \
+ -e "s/-O3/-O2/g" \
+ -e "s/-O2/${CFLAGS}/g" \
+ src/config/linux.cf || die "sed linux.cf failed"
+
+ # fix tests
+ # this first one adds a test target on the common cernlib.mk for all cernlib packages
+ epatch "${FILESDIR}"/${P}-maketest.patch
+ # remove buggy tests on 64 bits arches
+ epatch "${FILESDIR}"/${P}-test64.patch
+ # fix linking of a few tests
+ epatch "${FILESDIR}"/${P}-testlink.patch
}
src_compile() {
@@ -94,6 +109,14 @@ src_compile() {
|| die "emake failed"
}
+src_test() {
+ cd "${S}"
+ LD_LIBRARY_PATH="${S}"/shlib make \
+ TEST_PACKAGES="kernlib packlib mathlib graflib" \
+ DEB_BUILD_OPTIONS="${FORTRANC} nostrip" \
+ test || die "make test failed"
+}
+
src_install() {
emake \
DEB_BUILD_OPTIONS="${FORTRANC} nostrip" \
diff --git a/sci-physics/cernlib/files/cernlib-2006-maketest.patch b/sci-physics/cernlib/files/cernlib-2006-maketest.patch
new file mode 100644
index 000000000000..268e2c605ca0
--- /dev/null
+++ b/sci-physics/cernlib/files/cernlib-2006-maketest.patch
@@ -0,0 +1,17 @@
+--- debian/add-ons/cernlib.mk.orig 2007-08-29 09:49:42.000000000 +0100
++++ debian/add-ons/cernlib.mk 2007-08-29 09:51:55.000000000 +0100
+@@ -185,6 +185,14 @@
+ fi ; \
+ done
+
++test: all
++ set -e ; \
++ for package in $(TEST_PACKAGES) ; do \
++ if [ -d $(CVSCOSRC)/$$package ] ; then \
++ cd $(CERN_BUILDDIR)/$$package && $(MAKE) test; \
++ fi ; \
++ done ; \
++
+ clean:
+ rm -rf stampdir src doc bin lib shlib build 200?
+ rm -f $(PATCHDIR)/9[0-9][0-9]*.dpatch
diff --git a/sci-physics/cernlib/files/cernlib-2006-test64.patch b/sci-physics/cernlib/files/cernlib-2006-test64.patch
new file mode 100644
index 000000000000..736997ad2ee9
--- /dev/null
+++ b/sci-physics/cernlib/files/cernlib-2006-test64.patch
@@ -0,0 +1,23 @@
+--- src/packlib/Imakefile.orig 2007-08-29 09:27:40.000000000 +0100
++++ src/packlib/Imakefile 2007-08-29 11:32:46.000000000 +0100
+@@ -16,7 +16,8 @@
+ InstallLibraryAlias(packlib,packlib-shift,$(CERN_LIBDIR))
+ InstallSharedLibrary(packlib,$(LIB_SONAME).$(CERN_LEVEL),$(CERN_SHLIBDIR))
+
+-TestSubdirs($(LIBDIRS))
++/* removed buggy tests on 64 bits */
++TestSubdirs(cspack epio fatmen hepdb kapack minuit)
+
+ #ifdef CERNLIB_VAXVMS
+
+--- src/kernlib/Imakefile.orig 2007-08-29 09:27:40.000000000 +0100
++++ src/kernlib/Imakefile 2007-08-29 11:33:37.000000000 +0100
+@@ -18,6 +18,7 @@
+
+ test:: LibraryTargetName(kernlib)
+
+-TestSubdirs($(SUBDIRS))
++/* removed buggy files on 64 bits */
++TestSubdirs(kernbit kerngen umon)
+
+ InstallIncludeSubdirs($(LIBDIRS))
diff --git a/sci-physics/cernlib/files/cernlib-2006-testlink.patch b/sci-physics/cernlib/files/cernlib-2006-testlink.patch
new file mode 100644
index 000000000000..38318fa55f13
--- /dev/null
+++ b/sci-physics/cernlib/files/cernlib-2006-testlink.patch
@@ -0,0 +1,21 @@
+--- src/packlib/minuit/examples/Imakefile.orig 1997-10-23 18:04:15.000000000 +0100
++++ src/packlib/minuit/examples/Imakefile 2007-08-30 18:01:46.000000000 +0100
+@@ -9,6 +9,6 @@
+ FDEBUGFLAGS=NoOpFortranDebugFlags
+ #endif
+
+-CernlibFortranProgramTarget(minuit,$(OBJS),$(PACKAGE_LIB),$(PACKAGE_LIB),NullParameter)
++CernlibFortranProgramTarget(minuit,$(OBJS),$(PACKAGE_LIB),$(PACKAGE_LIB),packlib)
+
+ TestTarget(minuit,NullParameter,NullParameter)
+--- src/mathlib/gen/tests/Imakefile.orig 2005-03-24 16:40:10.000000000 +0000
++++ src/mathlib/gen/tests/Imakefile 2007-08-30 18:09:04.000000000 +0100
+@@ -63,7 +63,7 @@
+
+ DefinePackageLibrary(gentest)
+
+-CernlibFortranProgramTarget(gent,main.o,$(PACKAGE_LIB),$(PACKAGE_LIB),kernlib)
++CernlibFortranProgramTarget(gent,main.o,$(PACKAGE_LIB),$(PACKAGE_LIB),kernlib packlib mathlib)
+
+
+ TestTarget(gent,NullParameter,NullParameter)