summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Ulyanov <disinbox@gmail.com>2015-07-04 18:33:24 +0300
committerIgor Ulyanov <disinbox@gmail.com>2015-07-04 18:33:24 +0300
commit3df0d8064085afede4a98e281fd52c897ae3bb1b (patch)
tree97a691f0ab023f155bdd38987e7f568ccd799b14 /sci-libs
parentamdgpu mesa (diff)
parentosgEarth-9999 added (diff)
downloaddisplacer-3df0d8064085afede4a98e281fd52c897ae3bb1b.tar.gz
displacer-3df0d8064085afede4a98e281fd52c897ae3bb1b.tar.bz2
displacer-3df0d8064085afede4a98e281fd52c897ae3bb1b.zip
Merge branch 'master' of git+ssh://anongit.gentoo.org/user/displacer
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/gsl/Manifest10
-rw-r--r--sci-libs/gsl/files/cblas.pc.in12
-rw-r--r--sci-libs/gsl/files/eselect.cblas.gsl5
-rw-r--r--sci-libs/gsl/files/gsl-1.13-cblas-vars.patch11
-rw-r--r--sci-libs/gsl/files/gsl-1.13-cblas.patch260
-rw-r--r--sci-libs/gsl/files/gsl-1.14-cblas.patch285
-rw-r--r--sci-libs/gsl/files/gsl-1.15-cblas.patch286
-rw-r--r--sci-libs/gsl/files/gsl-1.16-cblas.patch294
-rw-r--r--sci-libs/gsl/gsl-1.16-r1.ebuild104
9 files changed, 1267 insertions, 0 deletions
diff --git a/sci-libs/gsl/Manifest b/sci-libs/gsl/Manifest
new file mode 100644
index 0000000..e2ac3a6
--- /dev/null
+++ b/sci-libs/gsl/Manifest
@@ -0,0 +1,10 @@
+AUX cblas.pc.in 290 SHA256 f47133de2f49a5ff53c8e295d03fbe8923c79cd0978cedb903cfdf7e57a873a1 SHA512 2a1dc22097e2a50fd4a797c446b32202b74e9d754c8b61c51a3789c3eb42372adcc7fb25901c468d604cc4e7961d7f11e0e5883179894047948e46879fc04719 WHIRLPOOL f8e93aa2c61d3ac08664c3162f0e754c1d6cefca0a4d4ab8ee8f763e6ec46049ff5537c7f9266200856b58ffab88fb9af115eb4be32deb99ed6d2005abcb13ec
+AUX eselect.cblas.gsl 216 SHA256 2be1ba93a0bafa73df52913f54d1c7fd299aa1cd0a98c5fbe4eac894073ebac7 SHA512 e5cd92f4e9829538642a0fed54fdf75bc579c8c20769997ec5a3ce0287993476e68fbeefec8e46162d05ea908d2e79187c15ebdd00f6558ecbd25de21ece64dc WHIRLPOOL 1a0591e670a1ca51fa6cc4b2883931a49f3da59c2c673d786f6acdb72b50b7fee22ee30f2d3c6ac864c149381c23ca5c41ba586f159830cdeff97b86cf6a03f3
+AUX gsl-1.13-cblas-vars.patch 403 SHA256 207b8fe48affca2564fcfffb9a01cca257f6bd1516355fd20cd3389fbb0ced40 SHA512 c323a2f08683f70dbb2c2e1b0d7d1706a74f71d41aad892008d381525cf4a34e0f5d120763f2cf2ad57b0ddf5ee36eeabf401299be821fec66710d12e1c0e8ca WHIRLPOOL 7a0752597eebb47dd4da359a0368c9c1a755ee607b53651d040dd3bb4f58746e234cdafd77d3e259f0f028572161719472a881441caebbf2860c1dd40d4a795e
+AUX gsl-1.13-cblas.patch 15524 SHA256 77e8a1df3d27723621efd41dc817699eef21f6b77717ad96f4d929f871524890 SHA512 ed96a576a4c218d002e091088f04e2654c651d0050e8487ef69686fd7715bf59cd56c40751bcf558314dff59ece8acb47bfa28d3a405b2ecf3fc56e30d46bdaa WHIRLPOOL c9e7146512e16a65f35687a7f832c9e0e958c6b7d7471a61527eeac3fcb616c5a16cc26ab483b8cefa194cb232a662439a06625da38cb8b86bdf0f5444ad25d5
+AUX gsl-1.14-cblas.patch 17218 SHA256 82b88b7a8cbe6f1020a7474726e92b7ce1ec152ad7388f80f719a47d8d64699d SHA512 8d009f7b7e4c6cb90864b90cc86a8c5b6b3d80d899225758683639d0e1a114355bd4f8adfb41bc9ead57990a3274cff65743c59b86fc1bc699c46a61fb31fd42 WHIRLPOOL f3b52170a5818a5d8d2812272fbbdd688626cbeb8679fb0eb16fb34a7e85a88da3302b3a4f79264e9ae39c79143f3bf5db90d678c04a2d34bcf186962e990b70
+AUX gsl-1.15-cblas.patch 17217 SHA256 1d69dd2d1b37abd541b86fed2b28e9f63e947f92f1b85af1c2f83074b12a8491 SHA512 fd099610b612b44a8b8ab8efd6350894fe7df46c94cf20e9d4377360c4cc31b11a8d9e18f6db6db9d8f4b7098b1d1569167ddb29e30396c656e381d25c1ec852 WHIRLPOOL 4794cfb018f50e59e11eb60bf11d348a7131360d757868aa9f08e75f432ee786d82143cdb3743ce3a526649cc2877b45dbe14eb49464cea9f23add0db87638b5
+AUX gsl-1.16-cblas.patch 17458 SHA256 568f6bf06b9441f741c028eaf7b12edb0e96093a16ea7a2d975e0cbde261c083 SHA512 70cae5682bfc7788e6f67ec355b52e291f32c2500b9baf9dd336d7cbb42b5eac4d89ecafeb23c4b478836d3c137d40d47dd17d375708df3c2dd41781a78f56bf WHIRLPOOL a7a5e6b52dc0466ad180853f5824d071d715743ef850ec808c7615fcc3b4f98d940c6f896faf44647c8e0915a6e5b6b7575ff9b66a59e337e04cd18d94cc7807
+DIST gsl-1.16.tar.gz 3534080 SHA256 73bc2f51b90d2a780e6d266d43e487b3dbd78945dd0b04b14ca5980fe28d2f53 SHA512 94e998953f30d701e1cd0a5e05d572c5cca7b6f40f0533aa85394ba4218946826408093ffe3049a0ab13d6ba87034fcec1a7d52a67d0b8860dc02b5fd4feb8eb WHIRLPOOL 46bf814c882ca36600d258097642a734b6a6483302cc64c14cab55c0c056ae6116c204495b3b81c57fec1871e145fbc5aa3900006e52e494e9e2fcd34ec06301
+EBUILD gsl-1.16-r1.ebuild 3209 SHA256 676ee9090e035789aa05611d066c5da966d66ac3b19f4e654c00641e8ff03ca6 SHA512 eb6cbee8e525f04397497659b2b79db8d7d0346e73b92a9f1f28fc52833348d614698e609ad98493e28417ce6cf4b795e2ca38686e6953e0a31fc4292f0457d7 WHIRLPOOL efced46f5fa5747db08a1fe16133c3970a6cf749a50ea1a6e5b8be9e87e41daeb13053e7d199158f8b6a4091354c99b075b91ed419343913c5665bed11f4f004
+MISC 0001-multilib-gsl.patch 1258 SHA256 d5f38018d0cd4b3258369a8acadf9ff5e8ce36a8e2713d85e069f3ebb03c9916 SHA512 e2b5740d119d951bfdf7e4977b41eab20f44bc6eb6e96b7f5e9d2858f6c1534a82924bb13516876a84ecdbef712cb53559da6d48f1dfff2c22e2b8cf9571b040 WHIRLPOOL 730b41964316ae6a69a0aff9bc9e6220aff6851ca3e8eea8f0a900ad929c93c87d70a32feee161d7bdfa22cde8a414dc7cdd965025cad7421b93f93a79e0abe0
diff --git a/sci-libs/gsl/files/cblas.pc.in b/sci-libs/gsl/files/cblas.pc.in
new file mode 100644
index 0000000..a2580f8
--- /dev/null
+++ b/sci-libs/gsl/files/cblas.pc.in
@@ -0,0 +1,12 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=/usr/@LIBDIR@
+includedir=${prefix}/include
+
+Name: cblas
+Description: GSL C Implementation of the Basic Linear Algebra Subprograms
+Version: @PV@
+URL: http://www.gnu.org/software/gsl
+Libs: -L${libdir} -lcblas
+Libs.private: -lm
+Cflags: -I${includedir}
diff --git a/sci-libs/gsl/files/eselect.cblas.gsl b/sci-libs/gsl/files/eselect.cblas.gsl
new file mode 100644
index 0000000..af6fee5
--- /dev/null
+++ b/sci-libs/gsl/files/eselect.cblas.gsl
@@ -0,0 +1,5 @@
+libgslcblas.so /usr/@LIBDIR@/libcblas.so
+libgslcblas.so.0 /usr/@LIBDIR@/libcblas.so.0
+libgslcblas.a /usr/@LIBDIR@/libcblas.a
+../blas/gsl/cblas.pc /usr/@LIBDIR@/pkgconfig/cblas.pc
+gsl/gsl_cblas.h /usr/include/cblas.h
diff --git a/sci-libs/gsl/files/gsl-1.13-cblas-vars.patch b/sci-libs/gsl/files/gsl-1.13-cblas-vars.patch
new file mode 100644
index 0000000..47f06ca
--- /dev/null
+++ b/sci-libs/gsl/files/gsl-1.13-cblas-vars.patch
@@ -0,0 +1,11 @@
+--- Makefile.am.orig 2009-09-20 22:41:14.000000000 +0400
++++ Makefile.am 2009-09-20 22:39:10.000000000 +0400
+@@ -55,6 +55,8 @@
+ -e 's|@includedir[@]|$(includedir)|g' \
+ -e 's|@GSL_CFLAGS[@]|$(GSL_CFLAGS)|g' \
+ -e 's|@GSL_LIBS[@]|$(GSL_LIBS)|g' \
++ -e 's|@CBLAS_CFLAGS[@]|$(CBLAS_CFLAGS)|g' \
++ -e 's|@CBLAS_LIBS[@]|$(CBLAS_LIBS)|g' \
+ -e 's|@LIBS[@]|$(LIBS)|g' \
+ -e 's|@VERSION[@]|$(VERSION)|g'
+
diff --git a/sci-libs/gsl/files/gsl-1.13-cblas.patch b/sci-libs/gsl/files/gsl-1.13-cblas.patch
new file mode 100644
index 0000000..be86c3a
--- /dev/null
+++ b/sci-libs/gsl/files/gsl-1.13-cblas.patch
@@ -0,0 +1,260 @@
+--- acx_cblas.m4.orig 1970-01-01 01:00:00.000000000 +0100
++++ acx_cblas.m4 2009-01-19 15:45:43.319918648 +0000
+@@ -0,0 +1,60 @@
++AC_DEFUN([ACX_CBLAS],[
++ use_cblas=no
++ use_cblas_libs="-lcblas -lblas"
++ use_cblas_cflags=""
++
++ AC_ARG_WITH(cblas,
++ [AS_HELP_STRING([--with-cblas], [use external CBLAS library (default is no)])])
++
++ case $with_cblas in
++ yes) use_cblas=yes ;;
++ no | "" ) use_cblas=no ;;
++ -* | */* | *.a | *.so | *.so.* | *.o) use_cblas_libs="$with_cblas" ;;
++ *) use_cblas_libs="-l$with_cblas" ;;
++ esac
++
++ AC_ARG_WITH(cblas-libs,
++ [AS_HELP_STRING([--with-cblas-libs=<libs>],
++ [external cblas libraries to link with (default is "$use_cblas_libs")])],
++ [use_cblas_libs=$withval], [])
++
++ AC_ARG_WITH(cblas-cflags,
++ [AS_HELP_STRING([--with-cblas-cflags=<flags>],
++ [extra cflags to compile with external cblas ("-I<dir>")])],
++ [use_cblas_cflags=$withval], [])
++
++ if test x$use_cblas != xno; then
++ if test "x$CBLAS_LIBS" = x; then
++ CBLAS_LIBS="$use_cblas_libs"
++ fi
++ if test "x$CBLAS_FLAGS" = x; then
++ CBLAS_CFLAGS="$use_cblas_cflags"
++ fi
++
++ CFLAGS_sav="$CFLAGS"
++ CFLAGS="$CFLAGS $CBLAS_CFLAGS"
++ AC_CHECK_HEADER(cblas.h, ,
++ [AC_MSG_ERROR([
++ *** Header file cblas.h not found.
++ *** If you installed cblas header in a non standard place,
++ *** specify its install prefix using the following option
++ *** --with-cblas-cflags="-I<include_dir>"])
++ ])
++ CFLAGS="$CFLAGS_sav"
++
++ LIBS_sav="$LIBS"
++ LIBS="$LIBS $CBLAS_LIBS -lm"
++ AC_MSG_CHECKING([for cblas_sgemm in $CBLAS_LIBS])
++ AC_TRY_LINK_FUNC(cblas_sgemm, [use_cblas=yes],
++ [AC_MSG_ERROR([
++ *** Linking with cblas with $LIBS failed.
++ *** If you installed cblas library in a non standard place,
++ *** specify its install prefix using the following option
++ *** --with-cblas-libs="-L<lib_dir> -l<lib>"])
++ ])
++ AC_MSG_RESULT($use_cblas)
++ LIBS="$LIBS_sav"
++ AC_SUBST(CBLAS_CFLAGS)
++ AC_SUBST(CBLAS_LIBS)
++ fi
++])
+--- bspline/Makefile.am.orig 2009-06-29 13:30:17.000000000 +0100
++++ bspline/Makefile.am 2009-09-17 22:31:53.000000000 +0100
+@@ -12,6 +12,6 @@
+
+ TESTS = $(check_PROGRAMS)
+
+-test_LDADD = libgslbspline.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../cblas/libgslcblas.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la ../statistics/libgslstatistics.la
++test_LDADD = libgslbspline.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la @CBLAS_LINK_LIBS@ ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la ../statistics/libgslstatistics.la
+
+ test_SOURCES = test.c
+--- configure.ac.orig 2008-12-15 14:52:45.000000000 +0000
++++ configure.ac 2009-01-19 15:45:36.267801871 +0000
+@@ -169,6 +169,16 @@
+ AC_CHECK_LIB(m, cos)
+ fi
+
++sinclude(acx_cblas.m4)
++ACX_CBLAS
++if test "x$CBLAS_LIBS" != "x"; then
++ CBLAS_LINK_LIBS="$CBLAS_LIBS"
++else
++ CBLAS_LINK_LIBS="\$(top_builddir)/cblas/libgslcblas.la"
++ CBLAS_LIBS="-lgslcblas"
++fi
++AC_SUBST(CBLAS_LINK_LIBS)
++
+ dnl Remember to put a definition in acconfig.h for each of these
+ AC_CHECK_DECLS(feenableexcept,,,[#define _GNU_SOURCE 1
+ #include <fenv.h>])
+--- eigen/Makefile.am.orig 2008-11-27 20:03:28.000000000 +0000
++++ eigen/Makefile.am 2009-01-19 15:46:59.999090878 +0000
+@@ -11,7 +11,7 @@
+
+ TESTS = $(check_PROGRAMS)
+
+-test_LDADD = libgsleigen.la ../test/libgsltest.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../sys/libgslsys.la ../err/libgslerr.la ../utils/libutils.la ../rng/libgslrng.la ../sort/libgslsort.la
++test_LDADD = libgsleigen.la ../test/libgsltest.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la @CBLAS_LINK_LIBS@ ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../sys/libgslsys.la ../err/libgslerr.la ../utils/libutils.la ../rng/libgslrng.la ../sort/libgslsort.la
+
+ test_SOURCES = test.c
+
+--- gsl-config.in.orig 2008-02-05 13:22:10.000000000 +0000
++++ gsl-config.in 2009-01-19 15:45:06.176046040 +0000
+@@ -58,11 +58,11 @@
+ ;;
+
+ --cflags)
+- echo @GSL_CFLAGS@
++ echo @GSL_CFLAGS@ @CBLAS_CFLAGS@
+ ;;
+
+ --libs)
+- : ${GSL_CBLAS_LIB=-lgslcblas}
++ : ${GSL_CBLAS_LIB=@CBLAS_LIBS@}
+ echo @GSL_LIBS@ $GSL_CBLAS_LIB -lm
+ ;;
+
+--- gsl.pc.in.orig 2008-11-19 09:13:46.000000000 +0000
++++ gsl.pc.in 2009-01-19 15:45:15.227937645 +0000
+@@ -6,5 +6,5 @@
+ Name: GSL
+ Description: GNU Scientific Library
+ Version: @VERSION@
+-Libs: @GSL_LIBS@ -lgslcblas @LIBS@
+-Cflags: @GSL_CFLAGS@
++Libs: @GSL_LIBS@ @CBLAS_LIBS@ @LIBS@
++Cflags: @GSL_CFLAGS@ @CBLAS_CFLAGS@
+--- interpolation/Makefile.am.orig 2008-11-27 20:03:28.000000000 +0000
++++ interpolation/Makefile.am 2009-01-19 15:47:00.019091996 +0000
+@@ -10,7 +10,7 @@
+
+ TESTS = $(check_PROGRAMS)
+
+-test_LDADD = libgslinterpolation.la ../poly/libgslpoly.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../cblas/libgslcblas.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
++test_LDADD = libgslinterpolation.la ../poly/libgslpoly.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la @CBLAS_LINK_LIBS@ ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
+
+ test_SOURCES = test.c
+
+--- linalg/Makefile.am.orig 2008-11-27 20:03:28.000000000 +0000
++++ linalg/Makefile.am 2009-01-19 15:47:00.023091716 +0000
+@@ -12,7 +12,7 @@
+
+ check_PROGRAMS = test
+
+-test_LDADD = libgsllinalg.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../permutation/libgslpermutation.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
++test_LDADD = libgsllinalg.la ../blas/libgslblas.la @CBLAS_LINK_LIBS@ ../permutation/libgslpermutation.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
+
+ test_SOURCES = test.c
+
+--- Makefile.am.orig 2008-11-27 20:03:28.000000000 +0000
++++ Makefile.am 2009-01-19 15:45:50.463861656 +0000
+@@ -17,13 +17,12 @@
+
+ lib_LTLIBRARIES = libgsl.la
+ libgsl_la_SOURCES = version.c
+-libgsl_la_LIBADD = $(SUBLIBS)
++libgsl_la_LIBADD = $(SUBLIBS) @CBLAS_LINK_LIBS@
+ libgsl_la_LDFLAGS = -version-info $(GSL_LT_VERSION)
+ noinst_HEADERS = templates_on.h templates_off.h build.h
+
+ MINGW32_HOST = @MINGW32_HOST@
+ if MINGW32_HOST
+-libgsl_la_LIBADD += cblas/libgslcblas.la
+ libgsl_la_LDFLAGS += -no-undefined
+ endif
+
+@@ -33,10 +32,10 @@
+ bin_PROGRAMS = gsl-randist gsl-histogram
+
+ gsl_randist_SOURCES = gsl-randist.c
+-gsl_randist_LDADD = libgsl.la cblas/libgslcblas.la
++gsl_randist_LDADD = libgsl.la
+
+ gsl_histogram_SOURCES = gsl-histogram.c
+-gsl_histogram_LDADD = libgsl.la cblas/libgslcblas.la
++gsl_histogram_LDADD = libgsl.la
+
+ check_SCRIPTS = test_gsl_histogram.sh
+ TESTS = test_gsl_histogram.sh
+--- multifit/Makefile.am.orig 2008-11-27 20:03:28.000000000 +0000
++++ multifit/Makefile.am 2009-01-19 15:47:00.031091716 +0000
+@@ -13,8 +13,8 @@
+ TESTS = $(check_PROGRAMS)
+
+ test_SOURCES = test.c
+-test_LDADD = libgslmultifit.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../utils/libutils.la ../sys/libgslsys.la
++test_LDADD = libgslmultifit.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la @CBLAS_LINK_LIBS@ ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../utils/libutils.la ../sys/libgslsys.la
+
+ #demo_SOURCES = demo.c
+-#demo_LDADD = libgslmultifit.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../randist/libgslrandist.la ../rng/libgslrng.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../utils/libutils.la ../sys/libgslsys.la
++#demo_LDADD = libgslmultifit.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la @CBLAS_LINK_LIBS@ ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../randist/libgslrandist.la ../rng/libgslrng.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../utils/libutils.la ../sys/libgslsys.la
+
+--- multimin/Makefile.am.orig 2008-11-29 17:51:18.000000000 +0000
++++ multimin/Makefile.am 2009-01-19 15:47:00.035091996 +0000
+@@ -13,8 +13,8 @@
+ TESTS = $(check_PROGRAMS)
+
+ test_SOURCES = test.c test_funcs.c test_funcs.h
+-test_LDADD = libgslmultimin.la ../min/libgslmin.la ../poly/libgslpoly.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
++test_LDADD = libgslmultimin.la ../min/libgslmin.la ../poly/libgslpoly.la ../blas/libgslblas.la @CBLAS_LINK_LIBS@ ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
+
+ #demo_SOURCES = demo.c
+-#demo_LDADD = libgslmultimin.la ../min/libgslmin.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../linalg/libgsllinalg.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
++#demo_LDADD = libgslmultimin.la ../min/libgslmin.la ../blas/libgslblas.la @CBLAS_LINK_LIBS@ ../linalg/libgsllinalg.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
+
+--- multiroots/Makefile.am.orig 2008-11-27 20:03:28.000000000 +0000
++++ multiroots/Makefile.am 2009-01-19 15:47:00.035091996 +0000
+@@ -15,5 +15,5 @@
+ TESTS = $(check_PROGRAMS)
+
+ test_SOURCES = test.c test_funcs.c test_funcs.h
+-test_LDADD = libgslmultiroots.la ../linalg/libgsllinalg.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../permutation/libgslpermutation.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
++test_LDADD = libgslmultiroots.la ../linalg/libgsllinalg.la ../blas/libgslblas.la @CBLAS_LINK_LIBS@ ../permutation/libgslpermutation.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
+
+--- ode-initval/Makefile.am.orig 2008-11-27 20:03:28.000000000 +0000
++++ ode-initval/Makefile.am 2009-01-19 15:47:00.039090878 +0000
+@@ -12,7 +12,7 @@
+
+ TESTS = $(check_PROGRAMS)
+
+-test_LDADD = libgslodeiv.la ../linalg/libgsllinalg.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../matrix/libgslmatrix.la ../permutation/libgslpermutation.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
++test_LDADD = libgslodeiv.la ../linalg/libgsllinalg.la ../blas/libgslblas.la @CBLAS_LINK_LIBS@ ../matrix/libgslmatrix.la ../permutation/libgslpermutation.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
+
+ test_SOURCES = test.c
+
+--- poly/Makefile.am.orig 2008-11-27 20:03:28.000000000 +0000
++++ poly/Makefile.am 2009-01-19 15:47:00.047090599 +0000
+@@ -10,7 +10,7 @@
+
+ TESTS = $(check_PROGRAMS)
+
+-check_PROGRAMS = test
++#check_PROGRAMS = test
+
+ test_SOURCES = test.c
+ test_LDADD = libgslpoly.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
+--- specfunc/Makefile.am.orig 2008-11-27 20:03:28.000000000 +0000
++++ specfunc/Makefile.am 2009-01-19 15:47:00.063090599 +0000
+@@ -12,7 +12,7 @@
+
+ check_PROGRAMS = test
+
+-test_LDADD = libgslspecfunc.la ../eigen/libgsleigen.la ../linalg/libgsllinalg.la ../sort/libgslsort.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
++test_LDADD = libgslspecfunc.la ../eigen/libgsleigen.la ../linalg/libgsllinalg.la ../sort/libgslsort.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../blas/libgslblas.la @CBLAS_LINK_LIBS@ ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
+
+ test_SOURCES = test_sf.c test_sf.h test_airy.c test_bessel.c test_coulomb.c test_dilog.c test_gamma.c test_hyperg.c test_legendre.c test_mathieu.c
+
+--- wavelet/Makefile.am.orig 2008-11-27 20:03:29.000000000 +0000
++++ wavelet/Makefile.am 2009-01-19 15:47:00.163091437 +0000
+@@ -10,7 +10,7 @@
+
+ TESTS = $(check_PROGRAMS)
+
+-test_LDADD = libgslwavelet.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
++test_LDADD = libgslwavelet.la ../blas/libgslblas.la @CBLAS_LINK_LIBS@ ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
+
+ test_SOURCES = test.c
+
diff --git a/sci-libs/gsl/files/gsl-1.14-cblas.patch b/sci-libs/gsl/files/gsl-1.14-cblas.patch
new file mode 100644
index 0000000..b8d9fb7
--- /dev/null
+++ b/sci-libs/gsl/files/gsl-1.14-cblas.patch
@@ -0,0 +1,285 @@
+diff -Nur gsl-1.14.orig/acx_cblas.m4 gsl-1.14/acx_cblas.m4
+--- gsl-1.14.orig/acx_cblas.m4 1970-01-01 01:00:00.000000000 +0100
++++ gsl-1.14/acx_cblas.m4 2010-04-09 02:19:59.000000000 +0100
+@@ -0,0 +1,60 @@
++AC_DEFUN([ACX_CBLAS],[
++ use_cblas=no
++ use_cblas_libs="-lcblas -lblas"
++ use_cblas_cflags=""
++
++ AC_ARG_WITH(cblas,
++ [AS_HELP_STRING([--with-cblas], [use external CBLAS library (default is no)])])
++
++ case $with_cblas in
++ yes) use_cblas=yes ;;
++ no | "" ) use_cblas=no ;;
++ -* | */* | *.a | *.so | *.so.* | *.o) use_cblas_libs="$with_cblas" ;;
++ *) use_cblas_libs="-l$with_cblas" ;;
++ esac
++
++ AC_ARG_WITH(cblas-libs,
++ [AS_HELP_STRING([--with-cblas-libs=<libs>],
++ [external cblas libraries to link with (default is "$use_cblas_libs")])],
++ [use_cblas_libs=$withval], [])
++
++ AC_ARG_WITH(cblas-cflags,
++ [AS_HELP_STRING([--with-cblas-cflags=<flags>],
++ [extra cflags to compile with external cblas ("-I<dir>")])],
++ [use_cblas_cflags=$withval], [])
++
++ if test x$use_cblas != xno; then
++ if test "x$CBLAS_LIBS" = x; then
++ CBLAS_LIBS="$use_cblas_libs"
++ fi
++ if test "x$CBLAS_FLAGS" = x; then
++ CBLAS_CFLAGS="$use_cblas_cflags"
++ fi
++
++ CFLAGS_sav="$CFLAGS"
++ CFLAGS="$CFLAGS $CBLAS_CFLAGS"
++ AC_CHECK_HEADER(cblas.h, ,
++ [AC_MSG_ERROR([
++ *** Header file cblas.h not found.
++ *** If you installed cblas header in a non standard place,
++ *** specify its install prefix using the following option
++ *** --with-cblas-cflags="-I<include_dir>"])
++ ])
++ CFLAGS="$CFLAGS_sav"
++
++ LIBS_sav="$LIBS"
++ LIBS="$LIBS $CBLAS_LIBS -lm"
++ AC_MSG_CHECKING([for cblas_sgemm in $CBLAS_LIBS])
++ AC_TRY_LINK_FUNC(cblas_sgemm, [use_cblas=yes],
++ [AC_MSG_ERROR([
++ *** Linking with cblas with $LIBS failed.
++ *** If you installed cblas library in a non standard place,
++ *** specify its install prefix using the following option
++ *** --with-cblas-libs="-L<lib_dir> -l<lib>"])
++ ])
++ AC_MSG_RESULT($use_cblas)
++ LIBS="$LIBS_sav"
++ AC_SUBST(CBLAS_CFLAGS)
++ AC_SUBST(CBLAS_LIBS)
++ fi
++])
+diff -Nur gsl-1.14.orig/bspline/Makefile.am gsl-1.14/bspline/Makefile.am
+--- gsl-1.14.orig/bspline/Makefile.am 2010-04-09 02:04:47.000000000 +0100
++++ gsl-1.14/bspline/Makefile.am 2010-04-09 02:19:59.000000000 +0100
+@@ -12,6 +12,6 @@
+
+ TESTS = $(check_PROGRAMS)
+
+-test_LDADD = libgslbspline.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../cblas/libgslcblas.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la ../statistics/libgslstatistics.la
++test_LDADD = libgslbspline.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la @CBLAS_LINK_LIBS@ ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la ../statistics/libgslstatistics.la
+
+ test_SOURCES = test.c
+diff -Nur gsl-1.14.orig/configure.ac gsl-1.14/configure.ac
+--- gsl-1.14.orig/configure.ac 2010-04-09 02:04:47.000000000 +0100
++++ gsl-1.14/configure.ac 2010-04-09 02:19:59.000000000 +0100
+@@ -185,6 +185,16 @@
+ AC_CHECK_LIB(m, cos)
+ fi
+
++sinclude(acx_cblas.m4)
++ACX_CBLAS
++if test "x$CBLAS_LIBS" != "x"; then
++ CBLAS_LINK_LIBS="$CBLAS_LIBS"
++else
++ CBLAS_LINK_LIBS="\$(top_builddir)/cblas/libgslcblas.la"
++ CBLAS_LIBS="-lgslcblas"
++fi
++AC_SUBST(CBLAS_LINK_LIBS)
++
+ dnl Remember to put a definition in acconfig.h for each of these
+ AC_CHECK_DECLS(feenableexcept,,,[#define _GNU_SOURCE 1
+ #include <fenv.h>])
+diff -Nur gsl-1.14.orig/eigen/Makefile.am gsl-1.14/eigen/Makefile.am
+--- gsl-1.14.orig/eigen/Makefile.am 2010-04-09 02:04:46.000000000 +0100
++++ gsl-1.14/eigen/Makefile.am 2010-04-09 02:19:59.000000000 +0100
+@@ -11,7 +11,7 @@
+
+ TESTS = $(check_PROGRAMS)
+
+-test_LDADD = libgsleigen.la ../test/libgsltest.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../sys/libgslsys.la ../err/libgslerr.la ../utils/libutils.la ../rng/libgslrng.la ../sort/libgslsort.la
++test_LDADD = libgsleigen.la ../test/libgsltest.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la @CBLAS_LINK_LIBS@ ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../sys/libgslsys.la ../err/libgslerr.la ../utils/libutils.la ../rng/libgslrng.la ../sort/libgslsort.la
+
+ test_SOURCES = test.c
+
+diff -Nur gsl-1.14.orig/gsl-config.in gsl-1.14/gsl-config.in
+--- gsl-1.14.orig/gsl-config.in 2010-04-09 02:04:47.000000000 +0100
++++ gsl-1.14/gsl-config.in 2010-04-09 02:19:59.000000000 +0100
+@@ -58,11 +58,11 @@
+ ;;
+
+ --cflags)
+- echo @GSL_CFLAGS@
++ echo @GSL_CFLAGS@ @CBLAS_CFLAGS@
+ ;;
+
+ --libs)
+- : ${GSL_CBLAS_LIB=-lgslcblas}
++ : ${GSL_CBLAS_LIB=@CBLAS_LIBS@}
+ echo @GSL_LIBS@ $GSL_CBLAS_LIB -lm
+ ;;
+
+diff -Nur gsl-1.14.orig/gsl.pc.in gsl-1.14/gsl.pc.in
+--- gsl-1.14.orig/gsl.pc.in 2010-04-09 02:04:46.000000000 +0100
++++ gsl-1.14/gsl.pc.in 2010-04-09 02:19:59.000000000 +0100
+@@ -6,5 +6,5 @@
+ Name: GSL
+ Description: GNU Scientific Library
+ Version: @VERSION@
+-Libs: @GSL_LIBS@ -lgslcblas @LIBS@
+-Cflags: @GSL_CFLAGS@
++Libs: @GSL_LIBS@ @CBLAS_LIBS@ @LIBS@
++Cflags: @GSL_CFLAGS@ @CBLAS_CFLAGS@
+diff -Nur gsl-1.14.orig/interpolation/Makefile.am gsl-1.14/interpolation/Makefile.am
+--- gsl-1.14.orig/interpolation/Makefile.am 2010-04-09 02:04:47.000000000 +0100
++++ gsl-1.14/interpolation/Makefile.am 2010-04-09 02:19:59.000000000 +0100
+@@ -10,7 +10,7 @@
+
+ TESTS = $(check_PROGRAMS)
+
+-test_LDADD = libgslinterpolation.la ../poly/libgslpoly.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../cblas/libgslcblas.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
++test_LDADD = libgslinterpolation.la ../poly/libgslpoly.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la @CBLAS_LINK_LIBS@ ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
+
+ test_SOURCES = test.c
+
+diff -Nur gsl-1.14.orig/linalg/Makefile.am gsl-1.14/linalg/Makefile.am
+--- gsl-1.14.orig/linalg/Makefile.am 2010-04-09 02:04:46.000000000 +0100
++++ gsl-1.14/linalg/Makefile.am 2010-04-09 02:19:59.000000000 +0100
+@@ -12,7 +12,7 @@
+
+ check_PROGRAMS = test
+
+-test_LDADD = libgsllinalg.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../permutation/libgslpermutation.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
++test_LDADD = libgsllinalg.la ../blas/libgslblas.la @CBLAS_LINK_LIBS@ ../permutation/libgslpermutation.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
+
+ test_SOURCES = test.c
+
+diff -Nur gsl-1.14.orig/Makefile.am gsl-1.14/Makefile.am
+--- gsl-1.14.orig/Makefile.am 2010-04-09 02:04:46.000000000 +0100
++++ gsl-1.14/Makefile.am 2010-04-09 02:20:13.000000000 +0100
+@@ -19,13 +19,12 @@
+
+ lib_LTLIBRARIES = libgsl.la
+ libgsl_la_SOURCES = version.c
+-libgsl_la_LIBADD = $(SUBLIBS)
++libgsl_la_LIBADD = $(SUBLIBS) @CBLAS_LINK_LIBS@
+ libgsl_la_LDFLAGS = -version-info $(GSL_LT_VERSION)
+ noinst_HEADERS = templates_on.h templates_off.h build.h
+
+ MINGW32_HOST = @MINGW32_HOST@
+ if MINGW32_HOST
+-libgsl_la_LIBADD += cblas/libgslcblas.la
+ libgsl_la_LDFLAGS += -no-undefined
+ endif
+
+@@ -35,10 +34,10 @@
+ bin_PROGRAMS = gsl-randist gsl-histogram
+
+ gsl_randist_SOURCES = gsl-randist.c
+-gsl_randist_LDADD = libgsl.la cblas/libgslcblas.la
++gsl_randist_LDADD = libgsl.la
+
+ gsl_histogram_SOURCES = gsl-histogram.c
+-gsl_histogram_LDADD = libgsl.la cblas/libgslcblas.la
++gsl_histogram_LDADD = libgsl.la
+
+ check_SCRIPTS = test_gsl_histogram.sh
+ TESTS = test_gsl_histogram.sh
+@@ -56,6 +55,8 @@
+ -e 's|@includedir[@]|$(includedir)|g' \
+ -e 's|@GSL_CFLAGS[@]|$(GSL_CFLAGS)|g' \
+ -e 's|@GSL_LIBS[@]|$(GSL_LIBS)|g' \
++ -e 's|@CBLAS_CFLAGS[@]|$(CBLAS_CFLAGS)|g' \
++ -e 's|@CBLAS_LIBS[@]|$(CBLAS_LIBS)|g' \
+ -e 's|@LIBS[@]|$(LIBS)|g' \
+ -e 's|@VERSION[@]|$(VERSION)|g'
+
+diff -Nur gsl-1.14.orig/multifit/Makefile.am gsl-1.14/multifit/Makefile.am
+--- gsl-1.14.orig/multifit/Makefile.am 2010-04-09 02:04:47.000000000 +0100
++++ gsl-1.14/multifit/Makefile.am 2010-04-09 02:19:59.000000000 +0100
+@@ -13,8 +13,8 @@
+ TESTS = $(check_PROGRAMS)
+
+ test_SOURCES = test.c
+-test_LDADD = libgslmultifit.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../utils/libutils.la ../sys/libgslsys.la
++test_LDADD = libgslmultifit.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la @CBLAS_LINK_LIBS@ ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../utils/libutils.la ../sys/libgslsys.la
+
+ #demo_SOURCES = demo.c
+-#demo_LDADD = libgslmultifit.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../randist/libgslrandist.la ../rng/libgslrng.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../utils/libutils.la ../sys/libgslsys.la
++#demo_LDADD = libgslmultifit.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la @CBLAS_LINK_LIBS@ ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../randist/libgslrandist.la ../rng/libgslrng.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../utils/libutils.la ../sys/libgslsys.la
+
+diff -Nur gsl-1.14.orig/multimin/Makefile.am gsl-1.14/multimin/Makefile.am
+--- gsl-1.14.orig/multimin/Makefile.am 2010-04-09 02:04:47.000000000 +0100
++++ gsl-1.14/multimin/Makefile.am 2010-04-09 02:19:59.000000000 +0100
+@@ -13,8 +13,8 @@
+ TESTS = $(check_PROGRAMS)
+
+ test_SOURCES = test.c test_funcs.c test_funcs.h
+-test_LDADD = libgslmultimin.la ../min/libgslmin.la ../poly/libgslpoly.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
++test_LDADD = libgslmultimin.la ../min/libgslmin.la ../poly/libgslpoly.la ../blas/libgslblas.la @CBLAS_LINK_LIBS@ ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
+
+ #demo_SOURCES = demo.c
+-#demo_LDADD = libgslmultimin.la ../min/libgslmin.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../linalg/libgsllinalg.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
++#demo_LDADD = libgslmultimin.la ../min/libgslmin.la ../blas/libgslblas.la @CBLAS_LINK_LIBS@ ../linalg/libgsllinalg.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
+
+diff -Nur gsl-1.14.orig/multiroots/Makefile.am gsl-1.14/multiroots/Makefile.am
+--- gsl-1.14.orig/multiroots/Makefile.am 2010-04-09 02:04:46.000000000 +0100
++++ gsl-1.14/multiroots/Makefile.am 2010-04-09 02:19:59.000000000 +0100
+@@ -15,5 +15,5 @@
+ TESTS = $(check_PROGRAMS)
+
+ test_SOURCES = test.c test_funcs.c test_funcs.h
+-test_LDADD = libgslmultiroots.la ../linalg/libgsllinalg.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../permutation/libgslpermutation.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
++test_LDADD = libgslmultiroots.la ../linalg/libgsllinalg.la ../blas/libgslblas.la @CBLAS_LINK_LIBS@ ../permutation/libgslpermutation.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
+
+diff -Nur gsl-1.14.orig/ode-initval/Makefile.am gsl-1.14/ode-initval/Makefile.am
+--- gsl-1.14.orig/ode-initval/Makefile.am 2010-04-09 02:04:47.000000000 +0100
++++ gsl-1.14/ode-initval/Makefile.am 2010-04-09 02:19:59.000000000 +0100
+@@ -12,7 +12,7 @@
+
+ TESTS = $(check_PROGRAMS)
+
+-test_LDADD = libgslodeiv.la ../linalg/libgsllinalg.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../matrix/libgslmatrix.la ../permutation/libgslpermutation.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
++test_LDADD = libgslodeiv.la ../linalg/libgsllinalg.la ../blas/libgslblas.la @CBLAS_LINK_LIBS@ ../matrix/libgslmatrix.la ../permutation/libgslpermutation.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
+
+ test_SOURCES = test.c
+
+diff -Nur gsl-1.14.orig/poly/Makefile.am gsl-1.14/poly/Makefile.am
+--- gsl-1.14.orig/poly/Makefile.am 2010-04-09 02:04:47.000000000 +0100
++++ gsl-1.14/poly/Makefile.am 2010-04-09 02:19:59.000000000 +0100
+@@ -10,7 +10,7 @@
+
+ TESTS = $(check_PROGRAMS)
+
+-check_PROGRAMS = test
++#check_PROGRAMS = test
+
+ test_SOURCES = test.c
+ test_LDADD = libgslpoly.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
+diff -Nur gsl-1.14.orig/specfunc/Makefile.am gsl-1.14/specfunc/Makefile.am
+--- gsl-1.14.orig/specfunc/Makefile.am 2010-04-09 02:04:47.000000000 +0100
++++ gsl-1.14/specfunc/Makefile.am 2010-04-09 02:19:59.000000000 +0100
+@@ -12,7 +12,7 @@
+
+ check_PROGRAMS = test
+
+-test_LDADD = libgslspecfunc.la ../eigen/libgsleigen.la ../linalg/libgsllinalg.la ../sort/libgslsort.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
++test_LDADD = libgslspecfunc.la ../eigen/libgsleigen.la ../linalg/libgsllinalg.la ../sort/libgslsort.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../blas/libgslblas.la @CBLAS_LINK_LIBS@ ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
+
+ test_SOURCES = test_sf.c test_sf.h test_airy.c test_bessel.c test_coulomb.c test_dilog.c test_gamma.c test_hyperg.c test_legendre.c test_mathieu.c
+
+diff -Nur gsl-1.14.orig/wavelet/Makefile.am gsl-1.14/wavelet/Makefile.am
+--- gsl-1.14.orig/wavelet/Makefile.am 2010-04-09 02:04:47.000000000 +0100
++++ gsl-1.14/wavelet/Makefile.am 2010-04-09 02:19:59.000000000 +0100
+@@ -10,7 +10,7 @@
+
+ TESTS = $(check_PROGRAMS)
+
+-test_LDADD = libgslwavelet.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
++test_LDADD = libgslwavelet.la ../blas/libgslblas.la @CBLAS_LINK_LIBS@ ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
+
+ test_SOURCES = test.c
+
diff --git a/sci-libs/gsl/files/gsl-1.15-cblas.patch b/sci-libs/gsl/files/gsl-1.15-cblas.patch
new file mode 100644
index 0000000..dd402f3
--- /dev/null
+++ b/sci-libs/gsl/files/gsl-1.15-cblas.patch
@@ -0,0 +1,286 @@
+diff -Nur gsl-1.15.orig/acx_cblas.m4 gsl-1.15/acx_cblas.m4
+--- gsl-1.15.orig/acx_cblas.m4 1970-01-01 01:00:00.000000000 +0100
++++ gsl-1.15/acx_cblas.m4 2011-07-28 22:16:03.000000000 +0100
+@@ -0,0 +1,60 @@
++AC_DEFUN([ACX_CBLAS],[
++ use_cblas=no
++ use_cblas_libs="-lcblas -lblas"
++ use_cblas_cflags=""
++
++ AC_ARG_WITH(cblas,
++ [AS_HELP_STRING([--with-cblas], [use external CBLAS library (default is no)])])
++
++ case $with_cblas in
++ yes) use_cblas=yes ;;
++ no | "" ) use_cblas=no ;;
++ -* | */* | *.a | *.so | *.so.* | *.o) use_cblas_libs="$with_cblas" ;;
++ *) use_cblas_libs="-l$with_cblas" ;;
++ esac
++
++ AC_ARG_WITH(cblas-libs,
++ [AS_HELP_STRING([--with-cblas-libs=<libs>],
++ [external cblas libraries to link with (default is "$use_cblas_libs")])],
++ [use_cblas_libs=$withval], [])
++
++ AC_ARG_WITH(cblas-cflags,
++ [AS_HELP_STRING([--with-cblas-cflags=<flags>],
++ [extra cflags to compile with external cblas ("-I<dir>")])],
++ [use_cblas_cflags=$withval], [])
++
++ if test x$use_cblas != xno; then
++ if test "x$CBLAS_LIBS" = x; then
++ CBLAS_LIBS="$use_cblas_libs"
++ fi
++ if test "x$CBLAS_FLAGS" = x; then
++ CBLAS_CFLAGS="$use_cblas_cflags"
++ fi
++
++ CFLAGS_sav="$CFLAGS"
++ CFLAGS="$CFLAGS $CBLAS_CFLAGS"
++ AC_CHECK_HEADER(cblas.h, ,
++ [AC_MSG_ERROR([
++ *** Header file cblas.h not found.
++ *** If you installed cblas header in a non standard place,
++ *** specify its install prefix using the following option
++ *** --with-cblas-cflags="-I<include_dir>"])
++ ])
++ CFLAGS="$CFLAGS_sav"
++
++ LIBS_sav="$LIBS"
++ LIBS="$LIBS $CBLAS_LIBS -lm"
++ AC_MSG_CHECKING([for cblas_sgemm in $CBLAS_LIBS])
++ AC_TRY_LINK_FUNC(cblas_sgemm, [use_cblas=yes],
++ [AC_MSG_ERROR([
++ *** Linking with cblas with $LIBS failed.
++ *** If you installed cblas library in a non standard place,
++ *** specify its install prefix using the following option
++ *** --with-cblas-libs="-L<lib_dir> -l<lib>"])
++ ])
++ AC_MSG_RESULT($use_cblas)
++ LIBS="$LIBS_sav"
++ AC_SUBST(CBLAS_CFLAGS)
++ AC_SUBST(CBLAS_LIBS)
++ fi
++])
+diff -Nur gsl-1.15.orig/bspline/Makefile.am gsl-1.15/bspline/Makefile.am
+--- gsl-1.15.orig/bspline/Makefile.am 2011-07-28 22:15:49.000000000 +0100
++++ gsl-1.15/bspline/Makefile.am 2011-07-28 22:16:03.000000000 +0100
+@@ -12,6 +12,6 @@
+
+ TESTS = $(check_PROGRAMS)
+
+-test_LDADD = libgslbspline.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../cblas/libgslcblas.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la ../statistics/libgslstatistics.la
++test_LDADD = libgslbspline.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la @CBLAS_LINK_LIBS@ ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la ../statistics/libgslstatistics.la
+
+ test_SOURCES = test.c
+diff -Nur gsl-1.15.orig/configure.ac gsl-1.15/configure.ac
+--- gsl-1.15.orig/configure.ac 2011-07-28 22:15:49.000000000 +0100
++++ gsl-1.15/configure.ac 2011-07-28 22:16:03.000000000 +0100
+@@ -190,6 +190,16 @@
+ AC_CHECK_LIB(m, cos)
+ fi
+
++sinclude(acx_cblas.m4)
++ACX_CBLAS
++if test "x$CBLAS_LIBS" != "x"; then
++ CBLAS_LINK_LIBS="$CBLAS_LIBS"
++else
++ CBLAS_LINK_LIBS="\$(top_builddir)/cblas/libgslcblas.la"
++ CBLAS_LIBS="-lgslcblas"
++fi
++AC_SUBST(CBLAS_LINK_LIBS)
++
+ dnl Remember to put a definition in acconfig.h for each of these
+ AC_CHECK_DECLS(feenableexcept,,,[#define _GNU_SOURCE 1
+ #include <fenv.h>])
+diff -Nur gsl-1.15.orig/eigen/Makefile.am gsl-1.15/eigen/Makefile.am
+--- gsl-1.15.orig/eigen/Makefile.am 2011-07-28 22:15:49.000000000 +0100
++++ gsl-1.15/eigen/Makefile.am 2011-07-28 22:16:03.000000000 +0100
+@@ -11,7 +11,7 @@
+
+ TESTS = $(check_PROGRAMS)
+
+-test_LDADD = libgsleigen.la ../test/libgsltest.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../sys/libgslsys.la ../err/libgslerr.la ../utils/libutils.la ../rng/libgslrng.la ../sort/libgslsort.la
++test_LDADD = libgsleigen.la ../test/libgsltest.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la @CBLAS_LINK_LIBS@ ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../sys/libgslsys.la ../err/libgslerr.la ../utils/libutils.la ../rng/libgslrng.la ../sort/libgslsort.la
+
+ test_SOURCES = test.c
+
+diff -Nur gsl-1.15.orig/gsl-config.in gsl-1.15/gsl-config.in
+--- gsl-1.15.orig/gsl-config.in 2011-07-28 22:15:49.000000000 +0100
++++ gsl-1.15/gsl-config.in 2011-07-28 22:16:03.000000000 +0100
+@@ -58,11 +58,11 @@
+ ;;
+
+ --cflags)
+- echo @GSL_CFLAGS@
++ echo @GSL_CFLAGS@ @CBLAS_CFLAGS@
+ ;;
+
+ --libs)
+- : ${GSL_CBLAS_LIB=-lgslcblas}
++ : ${GSL_CBLAS_LIB=@CBLAS_LIBS@}
+ echo @GSL_LIBS@ $GSL_CBLAS_LIB @GSL_LIBM@
+ ;;
+
+diff -Nur gsl-1.15.orig/gsl.pc.in gsl-1.15/gsl.pc.in
+--- gsl-1.15.orig/gsl.pc.in 2011-07-28 22:15:49.000000000 +0100
++++ gsl-1.15/gsl.pc.in 2011-07-28 22:20:14.000000000 +0100
+@@ -2,7 +2,7 @@
+ exec_prefix=@exec_prefix@
+ libdir=@libdir@
+ includedir=@includedir@
+-GSL_CBLAS_LIB=-lgslcblas
++GSL_CBLAS_LIB=@CBLAS_LIBS@
+
+ Name: GSL
+ Description: GNU Scientific Library
+diff -Nur gsl-1.15.orig/interpolation/Makefile.am gsl-1.15/interpolation/Makefile.am
+--- gsl-1.15.orig/interpolation/Makefile.am 2011-07-28 22:15:49.000000000 +0100
++++ gsl-1.15/interpolation/Makefile.am 2011-07-28 22:16:03.000000000 +0100
+@@ -10,7 +10,7 @@
+
+ TESTS = $(check_PROGRAMS)
+
+-test_LDADD = libgslinterpolation.la ../poly/libgslpoly.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../cblas/libgslcblas.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
++test_LDADD = libgslinterpolation.la ../poly/libgslpoly.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la @CBLAS_LINK_LIBS@ ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
+
+ test_SOURCES = test.c
+
+diff -Nur gsl-1.15.orig/linalg/Makefile.am gsl-1.15/linalg/Makefile.am
+--- gsl-1.15.orig/linalg/Makefile.am 2011-07-28 22:15:49.000000000 +0100
++++ gsl-1.15/linalg/Makefile.am 2011-07-28 22:16:03.000000000 +0100
+@@ -12,7 +12,7 @@
+
+ check_PROGRAMS = test
+
+-test_LDADD = libgsllinalg.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../permutation/libgslpermutation.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
++test_LDADD = libgsllinalg.la ../blas/libgslblas.la @CBLAS_LINK_LIBS@ ../permutation/libgslpermutation.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
+
+ test_SOURCES = test.c
+
+diff -Nur gsl-1.15.orig/Makefile.am gsl-1.15/Makefile.am
+--- gsl-1.15.orig/Makefile.am 2011-07-28 22:15:49.000000000 +0100
++++ gsl-1.15/Makefile.am 2011-07-28 22:16:03.000000000 +0100
+@@ -19,13 +19,12 @@
+
+ lib_LTLIBRARIES = libgsl.la
+ libgsl_la_SOURCES = version.c
+-libgsl_la_LIBADD = $(SUBLIBS)
++libgsl_la_LIBADD = $(SUBLIBS) @CBLAS_LINK_LIBS@
+ libgsl_la_LDFLAGS = -version-info $(GSL_LT_VERSION)
+ noinst_HEADERS = templates_on.h templates_off.h build.h
+
+ MINGW32_HOST = @MINGW32_HOST@
+ if MINGW32_HOST
+-libgsl_la_LIBADD += cblas/libgslcblas.la
+ libgsl_la_LDFLAGS += -no-undefined
+ endif
+
+@@ -35,10 +34,10 @@
+ bin_PROGRAMS = gsl-randist gsl-histogram
+
+ gsl_randist_SOURCES = gsl-randist.c
+-gsl_randist_LDADD = libgsl.la cblas/libgslcblas.la
++gsl_randist_LDADD = libgsl.la
+
+ gsl_histogram_SOURCES = gsl-histogram.c
+-gsl_histogram_LDADD = libgsl.la cblas/libgslcblas.la
++gsl_histogram_LDADD = libgsl.la
+
+ check_SCRIPTS = test_gsl_histogram.sh pkgconfig.test
+ TESTS = test_gsl_histogram.sh pkgconfig.test
+@@ -57,6 +56,8 @@
+ -e 's|@GSL_CFLAGS[@]|$(GSL_CFLAGS)|g' \
+ -e 's|@GSL_LIBM[@]|$(GSL_LIBM)|g' \
+ -e 's|@GSL_LIBS[@]|$(GSL_LIBS)|g' \
++ -e 's|@CBLAS_CFLAGS[@]|$(CBLAS_CFLAGS)|g' \
++ -e 's|@CBLAS_LIBS[@]|$(CBLAS_LIBS)|g' \
+ -e 's|@LIBS[@]|$(LIBS)|g' \
+ -e 's|@VERSION[@]|$(VERSION)|g'
+
+diff -Nur gsl-1.15.orig/multifit/Makefile.am gsl-1.15/multifit/Makefile.am
+--- gsl-1.15.orig/multifit/Makefile.am 2011-07-28 22:15:49.000000000 +0100
++++ gsl-1.15/multifit/Makefile.am 2011-07-28 22:16:03.000000000 +0100
+@@ -13,8 +13,8 @@
+ TESTS = $(check_PROGRAMS)
+
+ test_SOURCES = test.c
+-test_LDADD = libgslmultifit.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../utils/libutils.la ../sys/libgslsys.la
++test_LDADD = libgslmultifit.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la @CBLAS_LINK_LIBS@ ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../utils/libutils.la ../sys/libgslsys.la
+
+ #demo_SOURCES = demo.c
+-#demo_LDADD = libgslmultifit.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../randist/libgslrandist.la ../rng/libgslrng.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../utils/libutils.la ../sys/libgslsys.la
++#demo_LDADD = libgslmultifit.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la @CBLAS_LINK_LIBS@ ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../randist/libgslrandist.la ../rng/libgslrng.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../utils/libutils.la ../sys/libgslsys.la
+
+diff -Nur gsl-1.15.orig/multimin/Makefile.am gsl-1.15/multimin/Makefile.am
+--- gsl-1.15.orig/multimin/Makefile.am 2011-07-28 22:15:49.000000000 +0100
++++ gsl-1.15/multimin/Makefile.am 2011-07-28 22:16:03.000000000 +0100
+@@ -13,8 +13,8 @@
+ TESTS = $(check_PROGRAMS)
+
+ test_SOURCES = test.c test_funcs.c test_funcs.h
+-test_LDADD = libgslmultimin.la ../min/libgslmin.la ../poly/libgslpoly.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
++test_LDADD = libgslmultimin.la ../min/libgslmin.la ../poly/libgslpoly.la ../blas/libgslblas.la @CBLAS_LINK_LIBS@ ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
+
+ #demo_SOURCES = demo.c
+-#demo_LDADD = libgslmultimin.la ../min/libgslmin.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../linalg/libgsllinalg.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
++#demo_LDADD = libgslmultimin.la ../min/libgslmin.la ../blas/libgslblas.la @CBLAS_LINK_LIBS@ ../linalg/libgsllinalg.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
+
+diff -Nur gsl-1.15.orig/multiroots/Makefile.am gsl-1.15/multiroots/Makefile.am
+--- gsl-1.15.orig/multiroots/Makefile.am 2011-07-28 22:15:49.000000000 +0100
++++ gsl-1.15/multiroots/Makefile.am 2011-07-28 22:16:03.000000000 +0100
+@@ -15,5 +15,5 @@
+ TESTS = $(check_PROGRAMS)
+
+ test_SOURCES = test.c test_funcs.c test_funcs.h
+-test_LDADD = libgslmultiroots.la ../linalg/libgsllinalg.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../permutation/libgslpermutation.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
++test_LDADD = libgslmultiroots.la ../linalg/libgsllinalg.la ../blas/libgslblas.la @CBLAS_LINK_LIBS@ ../permutation/libgslpermutation.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
+
+diff -Nur gsl-1.15.orig/ode-initval/Makefile.am gsl-1.15/ode-initval/Makefile.am
+--- gsl-1.15.orig/ode-initval/Makefile.am 2011-07-28 22:15:49.000000000 +0100
++++ gsl-1.15/ode-initval/Makefile.am 2011-07-28 22:16:03.000000000 +0100
+@@ -12,7 +12,7 @@
+
+ TESTS = $(check_PROGRAMS)
+
+-test_LDADD = libgslodeiv.la ../linalg/libgsllinalg.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../matrix/libgslmatrix.la ../permutation/libgslpermutation.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
++test_LDADD = libgslodeiv.la ../linalg/libgsllinalg.la ../blas/libgslblas.la @CBLAS_LINK_LIBS@ ../matrix/libgslmatrix.la ../permutation/libgslpermutation.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
+
+ test_SOURCES = test.c
+
+diff -Nur gsl-1.15.orig/poly/Makefile.am gsl-1.15/poly/Makefile.am
+--- gsl-1.15.orig/poly/Makefile.am 2011-07-28 22:15:49.000000000 +0100
++++ gsl-1.15/poly/Makefile.am 2011-07-28 22:16:03.000000000 +0100
+@@ -10,7 +10,7 @@
+
+ TESTS = $(check_PROGRAMS)
+
+-check_PROGRAMS = test
++#check_PROGRAMS = test
+
+ test_SOURCES = test.c
+ test_LDADD = libgslpoly.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
+diff -Nur gsl-1.15.orig/specfunc/Makefile.am gsl-1.15/specfunc/Makefile.am
+--- gsl-1.15.orig/specfunc/Makefile.am 2011-07-28 22:15:49.000000000 +0100
++++ gsl-1.15/specfunc/Makefile.am 2011-07-28 22:16:03.000000000 +0100
+@@ -12,7 +12,7 @@
+
+ check_PROGRAMS = test
+
+-test_LDADD = libgslspecfunc.la ../eigen/libgsleigen.la ../linalg/libgsllinalg.la ../sort/libgslsort.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
++test_LDADD = libgslspecfunc.la ../eigen/libgsleigen.la ../linalg/libgsllinalg.la ../sort/libgslsort.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../blas/libgslblas.la @CBLAS_LINK_LIBS@ ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
+
+ test_SOURCES = test_sf.c test_sf.h test_airy.c test_bessel.c test_coulomb.c test_dilog.c test_gamma.c test_hyperg.c test_legendre.c test_mathieu.c
+
+diff -Nur gsl-1.15.orig/wavelet/Makefile.am gsl-1.15/wavelet/Makefile.am
+--- gsl-1.15.orig/wavelet/Makefile.am 2011-07-28 22:15:49.000000000 +0100
++++ gsl-1.15/wavelet/Makefile.am 2011-07-28 22:16:03.000000000 +0100
+@@ -10,7 +10,7 @@
+
+ TESTS = $(check_PROGRAMS)
+
+-test_LDADD = libgslwavelet.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
++test_LDADD = libgslwavelet.la ../blas/libgslblas.la @CBLAS_LINK_LIBS@ ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
+
+ test_SOURCES = test.c
+
diff --git a/sci-libs/gsl/files/gsl-1.16-cblas.patch b/sci-libs/gsl/files/gsl-1.16-cblas.patch
new file mode 100644
index 0000000..c29ef52
--- /dev/null
+++ b/sci-libs/gsl/files/gsl-1.16-cblas.patch
@@ -0,0 +1,294 @@
+diff -Nur gsl-1.16.orig/ax_cblas.m4 gsl-1.16/ax_cblas.m4
+--- gsl-1.16.orig/ax_cblas.m4 1969-12-31 16:00:00.000000000 -0800
++++ gsl-1.16/ax_cblas.m4 2013-08-19 15:48:54.376300825 -0700
+@@ -0,0 +1,69 @@
++AC_DEFUN([AX_CBLAS],[
++
++ ext_cblas=no
++ ext_cblas_libs="-lcblas"
++ ext_cblas_cflags=""
++
++ AC_ARG_WITH(cblas-external,
++ [AS_HELP_STRING([--with-cblas-external],
++ [Use external CBLAS library (default is no)])],
++ [with_ext_cblas=$withval],
++ [with_ext_cblas=no])
++
++ case $with_ext_cblas in
++ no) ext_cblas=no ;;
++ yes) ext_cblas=yes ;;
++ -* | */* | *.a | *.so | *.so.* | *.o)
++ ext_cblas=yes
++ ext_cblas_libs="$with_cblas" ;;
++ *) ext_cblas=yes
++ ext_cblas_libs="-l$with_cblas" ;;
++ esac
++
++ AC_ARG_WITH(cblas-external-libs,
++ [AS_HELP_STRING([--with-cblas-external-libs=<libs>],
++ [External cblas libraries to link with (default is "$ext_cblas_libs")])],
++ [ext_cblas_libs=$withval],
++ [])
++
++ AC_ARG_WITH(cblas-external-cflags,
++ [AS_HELP_STRING([--with-cblas-external-cflags=<flags>],
++ [Pre-processing flags to compile with external cblas ("-I<dir>")])],
++ [ext_cblas_cflags=$withval],
++ [])
++
++ if test x$ext_cblas != xno; then
++ if test "x$CBLAS_LIBS" = x; then
++ CBLAS_LIBS="$ext_cblas_libs"
++ fi
++ if test "x$CBLAS_CFLAGS" = x; then
++ CBLAS_CFLAGS="$ext_cblas_cflags"
++ fi
++
++ CFLAGS_sav="$CFLAGS"
++ CFLAGS="$CFLAGS $CBLAS_CFLAGS"
++ AC_CHECK_HEADER(cblas.h, ,
++ [AC_MSG_ERROR([
++ *** Header file cblas.h not found.
++ *** If you installed cblas header in a non standard place,
++ *** specify its install prefix using the following option
++ *** --with-cblas-external-cflags="-I<include_dir>"])
++ ])
++ CFLAGS="$CFLAGS_sav"
++
++ LIBS_sav="$LIBS"
++ LIBS="$LIBS $CBLAS_LIBS -lm"
++ AC_MSG_CHECKING([for cblas_sgemm in $CBLAS_LIBS])
++ AC_TRY_LINK_FUNC(cblas_sgemm, [ext_cblas=yes],
++ [AC_MSG_ERROR([
++ *** Linking with cblas with $LIBS failed.
++ *** If you installed cblas library in a non standard place,
++ *** specify its install prefix using the following option
++ *** --with-cblas-external-libs="-L<lib_dir> -l<lib>"])
++ ])
++ AC_MSG_RESULT($ext_cblas)
++ LIBS="$LIBS_sav"
++ AC_SUBST([CBLAS_CFLAGS])
++ AC_SUBST([CBLAS_LIBS])
++ fi
++])
+diff -Nur gsl-1.16.orig/bspline/Makefile.am gsl-1.16/bspline/Makefile.am
+--- gsl-1.16.orig/bspline/Makefile.am 2013-07-17 13:04:26.000000000 -0700
++++ gsl-1.16/bspline/Makefile.am 2013-08-19 15:25:27.728497742 -0700
+@@ -12,6 +12,6 @@
+
+ TESTS = $(check_PROGRAMS)
+
+-test_LDADD = libgslbspline.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../cblas/libgslcblas.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la ../statistics/libgslstatistics.la
++test_LDADD = libgslbspline.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la @CBLAS_LINK_LIBS@ ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la ../statistics/libgslstatistics.la
+
+ test_SOURCES = test.c
+diff -Nur gsl-1.16.orig/configure.ac gsl-1.16/configure.ac
+--- gsl-1.16.orig/configure.ac 2013-07-19 08:14:45.000000000 -0700
++++ gsl-1.16/configure.ac 2013-08-19 15:28:24.172640793 -0700
+@@ -191,6 +191,16 @@
+ AC_CHECK_LIB(m, cos)
+ fi
+
++sinclude(ax_cblas.m4)
++AX_CBLAS
++if test "x$CBLAS_LIBS" != "x"; then
++ CBLAS_LINK_LIBS="$CBLAS_LIBS"
++else
++ CBLAS_LINK_LIBS="\$(top_builddir)/cblas/libgslcblas.la"
++ CBLAS_LIBS="-lgslcblas"
++fi
++AC_SUBST(CBLAS_LINK_LIBS)
++
+ dnl Remember to put a definition in acconfig.h for each of these
+ AC_CHECK_DECLS(feenableexcept,,,[#define _GNU_SOURCE 1
+ #include <fenv.h>])
+diff -Nur gsl-1.16.orig/eigen/Makefile.am gsl-1.16/eigen/Makefile.am
+--- gsl-1.16.orig/eigen/Makefile.am 2013-07-17 13:04:26.000000000 -0700
++++ gsl-1.16/eigen/Makefile.am 2013-08-19 15:25:27.728497742 -0700
+@@ -11,7 +11,7 @@
+
+ TESTS = $(check_PROGRAMS)
+
+-test_LDADD = libgsleigen.la ../test/libgsltest.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../sys/libgslsys.la ../err/libgslerr.la ../utils/libutils.la ../rng/libgslrng.la ../sort/libgslsort.la
++test_LDADD = libgsleigen.la ../test/libgsltest.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la @CBLAS_LINK_LIBS@ ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../sys/libgslsys.la ../err/libgslerr.la ../utils/libutils.la ../rng/libgslrng.la ../sort/libgslsort.la
+
+ test_SOURCES = test.c
+
+diff -Nur gsl-1.16.orig/gsl-config.in gsl-1.16/gsl-config.in
+--- gsl-1.16.orig/gsl-config.in 2013-07-17 13:04:26.000000000 -0700
++++ gsl-1.16/gsl-config.in 2013-08-19 15:25:27.728497742 -0700
+@@ -58,11 +58,11 @@
+ ;;
+
+ --cflags)
+- echo @GSL_CFLAGS@
++ echo @GSL_CFLAGS@ @CBLAS_CFLAGS@
+ ;;
+
+ --libs)
+- : ${GSL_CBLAS_LIB=-lgslcblas}
++ : ${GSL_CBLAS_LIB=@CBLAS_LIBS@}
+ echo @GSL_LIBS@ $GSL_CBLAS_LIB @GSL_LIBM@
+ ;;
+
+diff -Nur gsl-1.16.orig/gsl.pc.in gsl-1.16/gsl.pc.in
+--- gsl-1.16.orig/gsl.pc.in 2013-07-17 13:04:26.000000000 -0700
++++ gsl-1.16/gsl.pc.in 2013-08-19 15:25:27.728497742 -0700
+@@ -2,7 +2,7 @@
+ exec_prefix=@exec_prefix@
+ libdir=@libdir@
+ includedir=@includedir@
+-GSL_CBLAS_LIB=-lgslcblas
++GSL_CBLAS_LIB=@CBLAS_LIBS@
+
+ Name: GSL
+ Description: GNU Scientific Library
+diff -Nur gsl-1.16.orig/interpolation/Makefile.am gsl-1.16/interpolation/Makefile.am
+--- gsl-1.16.orig/interpolation/Makefile.am 2013-07-17 13:04:26.000000000 -0700
++++ gsl-1.16/interpolation/Makefile.am 2013-08-19 15:25:27.729497736 -0700
+@@ -10,7 +10,7 @@
+
+ TESTS = $(check_PROGRAMS)
+
+-test_LDADD = libgslinterpolation.la ../poly/libgslpoly.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../cblas/libgslcblas.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
++test_LDADD = libgslinterpolation.la ../poly/libgslpoly.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la @CBLAS_LINK_LIBS@ ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
+
+ test_SOURCES = test.c
+
+diff -Nur gsl-1.16.orig/linalg/Makefile.am gsl-1.16/linalg/Makefile.am
+--- gsl-1.16.orig/linalg/Makefile.am 2013-07-17 13:04:26.000000000 -0700
++++ gsl-1.16/linalg/Makefile.am 2013-08-19 15:25:27.729497736 -0700
+@@ -12,7 +12,7 @@
+
+ check_PROGRAMS = test
+
+-test_LDADD = libgsllinalg.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../permutation/libgslpermutation.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
++test_LDADD = libgsllinalg.la ../blas/libgslblas.la @CBLAS_LINK_LIBS@ ../permutation/libgslpermutation.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
+
+ test_SOURCES = test.c
+
+diff -Nur gsl-1.16.orig/Makefile.am gsl-1.16/Makefile.am
+--- gsl-1.16.orig/Makefile.am 2013-07-17 13:04:26.000000000 -0700
++++ gsl-1.16/Makefile.am 2013-08-19 15:25:27.729497736 -0700
+@@ -19,13 +19,12 @@
+
+ lib_LTLIBRARIES = libgsl.la
+ libgsl_la_SOURCES = version.c
+-libgsl_la_LIBADD = $(SUBLIBS)
++libgsl_la_LIBADD = $(SUBLIBS) @CBLAS_LINK_LIBS@
+ libgsl_la_LDFLAGS = -version-info $(GSL_LT_VERSION)
+ noinst_HEADERS = templates_on.h templates_off.h build.h
+
+ MINGW32_HOST = @MINGW32_HOST@
+ if MINGW32_HOST
+-libgsl_la_LIBADD += cblas/libgslcblas.la
+ libgsl_la_LDFLAGS += -no-undefined
+ endif
+
+@@ -35,10 +34,10 @@
+ bin_PROGRAMS = gsl-randist gsl-histogram
+
+ gsl_randist_SOURCES = gsl-randist.c
+-gsl_randist_LDADD = libgsl.la cblas/libgslcblas.la
++gsl_randist_LDADD = libgsl.la
+
+ gsl_histogram_SOURCES = gsl-histogram.c
+-gsl_histogram_LDADD = libgsl.la cblas/libgslcblas.la
++gsl_histogram_LDADD = libgsl.la
+
+ check_SCRIPTS = test_gsl_histogram.sh pkgconfig.test
+ TESTS = test_gsl_histogram.sh pkgconfig.test
+@@ -57,6 +56,8 @@
+ -e 's|@GSL_CFLAGS[@]|$(GSL_CFLAGS)|g' \
+ -e 's|@GSL_LIBM[@]|$(GSL_LIBM)|g' \
+ -e 's|@GSL_LIBS[@]|$(GSL_LIBS)|g' \
++ -e 's|@CBLAS_CFLAGS[@]|$(CBLAS_CFLAGS)|g' \
++ -e 's|@CBLAS_LIBS[@]|$(CBLAS_LIBS)|g' \
+ -e 's|@LIBS[@]|$(LIBS)|g' \
+ -e 's|@VERSION[@]|$(VERSION)|g'
+
+--- gsl-1.16.orig/multifit/Makefile.am 2013-07-18 06:04:26.000000000 +1000
++++ gsl-1.16/multifit/Makefile.am 2013-11-22 16:57:26.170330257 +1100
+@@ -13,8 +13,8 @@
+ TESTS = $(check_PROGRAMS)
+
+ test_SOURCES = test.c
+-test_LDADD = libgslmultifit.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../matrix/libgslmatrix.la ../sort/libgslsort.la ../statistics/libgslstatistics.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../utils/libutils.la ../sys/libgslsys.la
++test_LDADD = libgslmultifit.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la @CBLAS_LINK_LIBS@ ../matrix/libgslmatrix.la ../sort/libgslsort.la ../statistics/libgslstatistics.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../utils/libutils.la ../sys/libgslsys.la
+
+ #demo_SOURCES = demo.c
+-#demo_LDADD = libgslmultifit.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../randist/libgslrandist.la ../rng/libgslrng.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../utils/libutils.la ../sys/libgslsys.la
++#demo_LDADD = libgslmultifit.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../blas/libgslblas.la @CBLAS_LINK_LIBS@ ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../randist/libgslrandist.la ../rng/libgslrng.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../utils/libutils.la ../sys/libgslsys.la
+
+diff -Nur gsl-1.16.orig/multimin/Makefile.am gsl-1.16/multimin/Makefile.am
+--- gsl-1.16.orig/multimin/Makefile.am 2013-07-17 13:04:26.000000000 -0700
++++ gsl-1.16/multimin/Makefile.am 2013-08-19 15:25:27.729497736 -0700
+@@ -13,8 +13,8 @@
+ TESTS = $(check_PROGRAMS)
+
+ test_SOURCES = test.c test_funcs.c test_funcs.h
+-test_LDADD = libgslmultimin.la ../min/libgslmin.la ../poly/libgslpoly.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
++test_LDADD = libgslmultimin.la ../min/libgslmin.la ../poly/libgslpoly.la ../blas/libgslblas.la @CBLAS_LINK_LIBS@ ../linalg/libgsllinalg.la ../permutation/libgslpermutation.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
+
+ #demo_SOURCES = demo.c
+-#demo_LDADD = libgslmultimin.la ../min/libgslmin.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../linalg/libgsllinalg.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
++#demo_LDADD = libgslmultimin.la ../min/libgslmin.la ../blas/libgslblas.la @CBLAS_LINK_LIBS@ ../linalg/libgsllinalg.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
+
+diff -Nur gsl-1.16.orig/multiroots/Makefile.am gsl-1.16/multiroots/Makefile.am
+--- gsl-1.16.orig/multiroots/Makefile.am 2013-07-17 13:04:26.000000000 -0700
++++ gsl-1.16/multiroots/Makefile.am 2013-08-19 15:25:27.729497736 -0700
+@@ -15,5 +15,5 @@
+ TESTS = $(check_PROGRAMS)
+
+ test_SOURCES = test.c test_funcs.c test_funcs.h
+-test_LDADD = libgslmultiroots.la ../linalg/libgsllinalg.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../permutation/libgslpermutation.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
++test_LDADD = libgslmultiroots.la ../linalg/libgsllinalg.la ../blas/libgslblas.la @CBLAS_LINK_LIBS@ ../permutation/libgslpermutation.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
+
+diff -Nur gsl-1.16.orig/ode-initval/Makefile.am gsl-1.16/ode-initval/Makefile.am
+--- gsl-1.16.orig/ode-initval/Makefile.am 2013-07-17 13:04:26.000000000 -0700
++++ gsl-1.16/ode-initval/Makefile.am 2013-08-19 15:25:27.729497736 -0700
+@@ -12,7 +12,7 @@
+
+ TESTS = $(check_PROGRAMS)
+
+-test_LDADD = libgslodeiv.la ../linalg/libgsllinalg.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../matrix/libgslmatrix.la ../permutation/libgslpermutation.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
++test_LDADD = libgslodeiv.la ../linalg/libgsllinalg.la ../blas/libgslblas.la @CBLAS_LINK_LIBS@ ../matrix/libgslmatrix.la ../permutation/libgslpermutation.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
+
+ test_SOURCES = test.c
+
+diff -Nur gsl-1.16.orig/poly/Makefile.am gsl-1.16/poly/Makefile.am
+--- gsl-1.16.orig/poly/Makefile.am 2013-07-17 13:04:26.000000000 -0700
++++ gsl-1.16/poly/Makefile.am 2013-08-19 15:25:27.729497736 -0700
+@@ -10,7 +10,7 @@
+
+ TESTS = $(check_PROGRAMS)
+
+-check_PROGRAMS = test
++#check_PROGRAMS = test
+
+ test_SOURCES = test.c
+ test_LDADD = libgslpoly.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la ../sort/libgslsort.la
+diff -Nur gsl-1.16.orig/specfunc/Makefile.am gsl-1.16/specfunc/Makefile.am
+--- gsl-1.16.orig/specfunc/Makefile.am 2013-07-17 13:04:26.000000000 -0700
++++ gsl-1.16/specfunc/Makefile.am 2013-08-19 15:25:27.729497736 -0700
+@@ -12,7 +12,7 @@
+
+ check_PROGRAMS = test
+
+-test_LDADD = libgslspecfunc.la ../eigen/libgsleigen.la ../linalg/libgsllinalg.la ../sort/libgslsort.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
++test_LDADD = libgslspecfunc.la ../eigen/libgsleigen.la ../linalg/libgsllinalg.la ../sort/libgslsort.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../blas/libgslblas.la @CBLAS_LINK_LIBS@ ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
+
+ test_SOURCES = test_sf.c test_sf.h test_airy.c test_bessel.c test_coulomb.c test_dilog.c test_gamma.c test_hyperg.c test_legendre.c test_mathieu.c
+
+diff -Nur gsl-1.16.orig/wavelet/Makefile.am gsl-1.16/wavelet/Makefile.am
+--- gsl-1.16.orig/wavelet/Makefile.am 2013-07-17 13:04:26.000000000 -0700
++++ gsl-1.16/wavelet/Makefile.am 2013-08-19 15:25:27.729497736 -0700
+@@ -10,7 +10,7 @@
+
+ TESTS = $(check_PROGRAMS)
+
+-test_LDADD = libgslwavelet.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
++test_LDADD = libgslwavelet.la ../blas/libgslblas.la @CBLAS_LINK_LIBS@ ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la
+
+ test_SOURCES = test.c
+
diff --git a/sci-libs/gsl/gsl-1.16-r1.ebuild b/sci-libs/gsl/gsl-1.16-r1.ebuild
new file mode 100644
index 0000000..d7cd4e1
--- /dev/null
+++ b/sci-libs/gsl/gsl-1.16-r1.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/gsl/gsl-1.16.ebuild,v 1.1 2014/04/16 13:34:45 hasufell Exp $
+
+EAPI=5
+
+inherit multilib multilib-minimal eutils flag-o-matic autotools toolchain-funcs
+
+DESCRIPTION="The GNU Scientific Library"
+HOMEPAGE="http://www.gnu.org/software/gsl/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~x86-interix ~amd64-linux ~x86-linux ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE="cblas-external static-libs"
+
+RDEPEND="cblas-external? ( virtual/cblas )"
+DEPEND="${RDEPEND}
+ app-admin/eselect-cblas
+ virtual/pkgconfig"
+
+DOCS=( AUTHORS BUGS ChangeLog NEWS README THANKS TODO )
+
+pkg_pretend() {
+ # prevent to use external cblas from a previously installed gsl
+ local current_lib
+ if use cblas-external; then
+ current_lib=$(eselect cblas show | cut -d' ' -f2)
+ if [[ ${current_lib} == gsl ]]; then
+ ewarn "USE flag cblas-external is set: linking gsl with an external cblas."
+ ewarn "However the current selected external cblas is gsl."
+ ewarn "Please install and/or eselect another cblas"
+ die "Circular gsl dependency"
+ fi
+ fi
+}
+
+src_prepare() {
+ ESELECT_PROF="gsl"
+
+ # bug 349005
+ [[ $(tc-getCC)$ == *gcc* ]] && \
+ [[ $(tc-getCC)$ != *apple* ]] && \
+ [[ $(gcc-major-version)$(gcc-minor-version) -eq 44 ]] \
+ && filter-mfpmath sse
+ filter-flags -ffast-math
+
+ epatch "${FILESDIR}"/${P}-cblas.patch
+ eautoreconf
+
+ cp "${FILESDIR}"/eselect.cblas.gsl "${T}"/
+ sed -i -e "s:/usr:${EPREFIX}/usr:" "${T}"/eselect.cblas.gsl || die
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ sed -i -e 's/\.so\([\.0-9]\+\)\?/\1.dylib/g' \
+ "${T}"/eselect.cblas.gsl || die
+ fi
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ if use cblas-external; then
+ export CBLAS_LIBS="$($(tc-getPKG_CONFIG) --libs cblas)"
+ export CBLAS_CFLAGS="$($(tc-getPKG_CONFIG) --cflags cblas)"
+ fi
+ econf \
+ --enable-shared \
+ $(use_with cblas-external) \
+ $(use_enable static-libs static)
+}
+
+multilib_src_install() {
+ default
+
+ find "${ED}" -name '*.la' -exec rm -f {} +
+
+ # take care of pkgconfig file for cblas implementation.
+ sed -e "s/@LIBDIR@/$(get_libdir)/" \
+ -e "s/@PV@/${PV}/" \
+ -e "/^prefix=/s:=:=${EPREFIX}:" \
+ -e "/^libdir=/s:=:=${EPREFIX}:" \
+ "${FILESDIR}"/cblas.pc.in > cblas.pc \
+ || die "sed cblas.pc failed"
+ insinto /usr/$(get_libdir)/blas/gsl
+ doins cblas.pc || die "installing cblas.pc failed"
+ eselect cblas add $(get_libdir) "${T}"/eselect.cblas.gsl \
+ ${ESELECT_PROF}
+}
+
+pkg_postinst() {
+ local p=cblas
+ local current_lib=$(eselect ${p} show | cut -d' ' -f2)
+ if [[ ${current_lib} == ${ESELECT_PROF} || -z ${current_lib} ]]; then
+ # work around eselect bug #189942
+ local configfile="${EROOT}"/etc/env.d/${p}/$(get_libdir)/config
+ [[ -e ${configfile} ]] && rm -f ${configfile}
+ eselect ${p} set ${ESELECT_PROF}
+ elog "${p} has been eselected to ${ESELECT_PROF}"
+ else
+ elog "Current eselected ${p} is ${current_lib}"
+ elog "To use ${p} ${ESELECT_PROF} implementation, you have to issue (as root):"
+ elog "\t eselect ${p} set ${ESELECT_PROF}"
+ fi
+}