summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Fabbro <bicatali@gentoo.org>2016-12-14 05:12:01 +0000
committerSébastien Fabbro <bicatali@gentoo.org>2016-12-19 23:50:52 +0000
commit9c608169bb07b4b7749a7a039b31a6a3c1991147 (patch)
tree0f9f9b0d66fbd3fe1a6230d2c6b8fa10b3d007f2 /sci-libs/superlu
parentwww-servers/apache: Removed old. (diff)
downloadgentoo-9c608169bb07b4b7749a7a039b31a6a3c1991147.tar.gz
gentoo-9c608169bb07b4b7749a7a039b31a6a3c1991147.tar.bz2
gentoo-9c608169bb07b4b7749a7a039b31a6a3c1991147.zip
sci-libs/superlu: version bump with patches
- upstream move to cmake - added patch to remove implicit declarations - added patch to install a pkg-config file Package-Manager: portage-2.3.3
Diffstat (limited to 'sci-libs/superlu')
-rw-r--r--sci-libs/superlu/Manifest1
-rw-r--r--sci-libs/superlu/files/superlu-5.2.1-no-implicits.patch153
-rw-r--r--sci-libs/superlu/files/superlu-5.2.1-pkgconfig.patch29
-rw-r--r--sci-libs/superlu/superlu-5.2.1.ebuild68
4 files changed, 251 insertions, 0 deletions
diff --git a/sci-libs/superlu/Manifest b/sci-libs/superlu/Manifest
index 377b0a7e7d15..e55c78bce2f7 100644
--- a/sci-libs/superlu/Manifest
+++ b/sci-libs/superlu/Manifest
@@ -1 +1,2 @@
DIST superlu_4.3.tar.gz 2876631 SHA256 7aa08e75fba6b242aef20f10a31d7e052ad74ad29384e68d41a61d1d642f18da SHA512 5c13da47b79160be14719f62ccdf5d59142a172e25a988fa340eaeb001a64d7f45ba39e675cb7aa3571bec52cb3a7cda0bb7a708c9608184ba6251edb7990e8c WHIRLPOOL 034d924a736d101497df13f4f69d96b9e375c78a207df1615a7d22b639e24d755e9cb16e952c57ee8eece8d4ea7aa9f9d0576aaaee19ae0b0898698973864c15
+DIST superlu_5.2.1.tar.gz 2560875 SHA256 28fb66d6107ee66248d5cf508c79de03d0621852a0ddeba7301801d3d859f463 SHA512 30538b4c2809294b8f34646bce6445944f21a1dffaf3ec0a0f29a55d5261caa56e4279d7722bb95cc9d89450d36ded969617edc82ecce7d0f1dfb24040d80d07 WHIRLPOOL 25d08498b874ac2ee806759cb381b7cfc563a213da9793630031957bb9fe63983d8671f502b699b72615ffba9dd6a23ab33010bda67aba9663cba302414eeb8b
diff --git a/sci-libs/superlu/files/superlu-5.2.1-no-implicits.patch b/sci-libs/superlu/files/superlu-5.2.1-no-implicits.patch
new file mode 100644
index 000000000000..587380ce2e35
--- /dev/null
+++ b/sci-libs/superlu/files/superlu-5.2.1-no-implicits.patch
@@ -0,0 +1,153 @@
+diff --git a/SRC/clacon2.c b/SRC/clacon2.c
+index 107bb64..39deb83 100644
+--- a/SRC/clacon2.c
++++ b/SRC/clacon2.c
+@@ -106,6 +106,11 @@ clacon2_(int *n, complex *v, complex *x, float *est, int *kase, int isave[3])
+ extern float smach(char *);
+ extern int icmax1_slu(int *, complex *, int *);
+ extern double scsum1_slu(int *, complex *, int *);
++#ifdef _CRAY
++ extern int CCOPY(int *, complex *, int *, complex [], int *);
++#else
++ extern int ccopy_(int *, complex *, int *, complex [], int *);
++#endif
+
+ safmin = smach("Safe minimum"); /* lamch_("Safe minimum"); */
+ if ( *kase == 0 ) {
+diff --git a/SRC/dmach.c b/SRC/dmach.c
+index 73beacb..cafdf1c 100644
+--- a/SRC/dmach.c
++++ b/SRC/dmach.c
+@@ -11,6 +11,7 @@ at the top-level directory.
+ #include <float.h>
+ #include <math.h>
+ #include <stdio.h>
++#include <string.h>
+
+ double dmach(char *cmach)
+ {
+diff --git a/SRC/ilu_cdrop_row.c b/SRC/ilu_cdrop_row.c
+index 4987548..09b8a93 100644
+--- a/SRC/ilu_cdrop_row.c
++++ b/SRC/ilu_cdrop_row.c
+@@ -28,6 +28,7 @@ extern void caxpy_(int *, complex *, complex [], int *, complex [], int *);
+ extern void ccopy_(int *, complex [], int *, complex [], int *);
+ extern float scasum_(int *, complex *, int *);
+ extern float scnrm2_(int *, complex *, int *);
++extern void scopy_(int *, float [], int *, float [], int *);
+ extern double dnrm2_(int *, double [], int *);
+ extern int icamax_(int *, complex [], int *);
+
+diff --git a/SRC/ilu_zdrop_row.c b/SRC/ilu_zdrop_row.c
+index f434dd9..2de1226 100644
+--- a/SRC/ilu_zdrop_row.c
++++ b/SRC/ilu_zdrop_row.c
+@@ -29,6 +29,7 @@ extern void zcopy_(int *, doublecomplex [], int *, doublecomplex [], int *);
+ extern double dzasum_(int *, doublecomplex *, int *);
+ extern double dznrm2_(int *, doublecomplex *, int *);
+ extern double dnrm2_(int *, double [], int *);
++extern void dcopy_(int *, double [], int *, double [], int *);
+ extern int izamax_(int *, doublecomplex [], int *);
+
+ static double *A; /* used in _compare_ only */
+diff --git a/SRC/slacon2.c b/SRC/slacon2.c
+index 7c93341..50efe78 100644
+--- a/SRC/slacon2.c
++++ b/SRC/slacon2.c
+@@ -157,7 +157,7 @@ L40:
+ #ifdef _CRAY
+ isave[1] = ISAMAX(n, &x[0], &c__1); /* j */
+ #else
+- isave[1] = idamax_(n, &x[0], &c__1); /* j */
++ isave[1] = isamax_(n, &x[0], &c__1); /* j */
+ #endif
+ --isave[1]; /* --j; */
+ isave[2] = 2; /* iter = 2; */
+diff --git a/SRC/smach.c b/SRC/smach.c
+index fff6c5f..0b69991 100644
+--- a/SRC/smach.c
++++ b/SRC/smach.c
+@@ -11,6 +11,7 @@ at the top-level directory.
+ #include <float.h>
+ #include <math.h>
+ #include <stdio.h>
++#include <string.h>
+
+ float smach(char *cmach)
+ {
+diff --git a/SRC/sp_ienv.c b/SRC/sp_ienv.c
+index 855d901..ce2865e 100644
+--- a/SRC/sp_ienv.c
++++ b/SRC/sp_ienv.c
+@@ -24,6 +24,7 @@ at the top-level directory.
+ * History: Modified from lapack routine ILAENV
+ */
+ #include "slu_Cnames.h"
++extern int input_error(char *, int *);
+
+ /*! \brief
+
+diff --git a/SRC/zlacon2.c b/SRC/zlacon2.c
+index b43c619..ed5f2b7 100644
+--- a/SRC/zlacon2.c
++++ b/SRC/zlacon2.c
+@@ -106,6 +106,11 @@ zlacon2_(int *n, doublecomplex *v, doublecomplex *x, double *est, int *kase, int
+ extern double dmach(char *);
+ extern int izmax1_slu(int *, doublecomplex *, int *);
+ extern double dzsum1_slu(int *, doublecomplex *, int *);
++#ifdef _CRAY
++ extern int CCOPY(int *, doublecomplex *, int *, doublecomplex *, int *);
++#else
++ extern int zcopy_(int *, doublecomplex *, int *, doublecomplex *, int *);
++#endif
+
+ safmin = dmach("Safe minimum"); /* lamch_("Safe minimum"); */
+ if ( *kase == 0 ) {
+diff --git a/TESTING/zdrive.c b/TESTING/zdrive.c
+index 23e96fc..1e7d0aa 100644
+--- a/TESTING/zdrive.c
++++ b/TESTING/zdrive.c
+@@ -21,6 +21,7 @@ at the top-level directory.
+ * Purpose: MAIN test program
+ */
+ #include <string.h>
++#include <unistd.h>
+ #include "slu_zdefs.h"
+
+ #define NTESTS 5 /* Number of test types */
+diff --git a/TESTING/cdrive.c b/TESTING/cdrive.c
+index 8bc8d10..00fe0d8 100644
+--- a/TESTING/cdrive.c
++++ b/TESTING/cdrive.c
+@@ -21,6 +21,7 @@ at the top-level directory.
+ * Purpose: MAIN test program
+ */
+ #include <string.h>
++#include <unistd.h>
+ #include "slu_cdefs.h"
+
+ #define NTESTS 5 /* Number of test types */
+diff --git a/TESTING/sdrive.c b/TESTING/sdrive.c
+index 5b98038..cba0c83 100644
+--- a/TESTING/sdrive.c
++++ b/TESTING/sdrive.c
+@@ -21,6 +21,7 @@ at the top-level directory.
+ * Purpose: MAIN test program
+ */
+ #include <string.h>
++#include <unistd.h>
+ #include "slu_sdefs.h"
+
+ #define NTESTS 5 /* Number of test types */
+diff --git a/TESTING/ddrive.c b/TESTING/ddrive.c
+index 2c3f6fe..35685c5 100644
+--- a/TESTING/ddrive.c
++++ b/TESTING/ddrive.c
+@@ -21,6 +21,7 @@ at the top-level directory.
+ * Purpose: MAIN test program
+ */
+ #include <string.h>
++#include <unistd.h>
+ #include "slu_ddefs.h"
+
+ #define NTESTS 5 /* Number of test types */
diff --git a/sci-libs/superlu/files/superlu-5.2.1-pkgconfig.patch b/sci-libs/superlu/files/superlu-5.2.1-pkgconfig.patch
new file mode 100644
index 000000000000..63252dffdb57
--- /dev/null
+++ b/sci-libs/superlu/files/superlu-5.2.1-pkgconfig.patch
@@ -0,0 +1,29 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index d8abc1b..5883b34 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -143,3 +143,6 @@ endif()
+ # ${CMAKE_C_COMPILER} )
+ configure_file(${CMAKE_SOURCE_DIR}/make.inc.in ${CMAKE_SOURCE_DIR}/make.inc)
+
++configure_file(${CMAKE_CURRENT_SOURCE_DIR}/superlu.pc.in ${CMAKE_CURRENT_BINARY_DIR}/superlu.pc @ONLY)
++install(FILES ${CMAKE_CURRENT_BINARY_DIR}/superlu.pc
++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
+diff --git a/superlu.pc.in b/superlu.pc.in
+new file mode 100644
+index 0000000..09b1fff
+--- /dev/null
++++ b/superlu.pc.in
+@@ -0,0 +1,12 @@
++prefix=@CMAKE_INSTALL_PREFIX@
++libdir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@
++includedir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_INCLUDEDIR@
++
++Name: @CMAKE_PROJECT_NAME@
++Description: Direct solution of large, sparse systems of linear equations
++Version: @PROJECT_VERSION@
++URL: http://crd-legacy.lbl.gov/~xiaoye/SuperLU/
++
++Libs: -L${libdir} -lsuperlu
++Libs.private: @BLAS_LIB@ -lm
++Cflags: -I${includedir}
diff --git a/sci-libs/superlu/superlu-5.2.1.ebuild b/sci-libs/superlu/superlu-5.2.1.ebuild
new file mode 100644
index 000000000000..a5710e3b0e61
--- /dev/null
+++ b/sci-libs/superlu/superlu-5.2.1.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+FORTRAN_STANDARD=77
+
+inherit cmake-utils fortran-2
+
+MY_PN=SuperLU
+
+if [[ ${PV} != *9999* ]]; then
+ inherit versionator
+ SRC_URI="http://crd.lbl.gov/~xiaoye/SuperLU//${PN}_${PV}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+ SLOT="0/$(get_major_version)"
+ S="${WORKDIR}/SuperLU_${PV}"
+else
+ inherit git-r3
+ GIT_ECLASS="git-r3"
+ EGIT_REPO_URI=( "git://github.com/xiaoyeli/superlu" )
+ SLOT="0/9999"
+ KEYWORDS=""
+fi
+
+DESCRIPTION="Sparse LU factorization library"
+HOMEPAGE="http://crd.lbl.gov/~xiaoye/SuperLU/"
+LICENSE="BSD"
+
+IUSE="doc examples test"
+
+RDEPEND="virtual/blas"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ test? ( app-shells/tcsh )"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-no-implicits.patch
+ "${FILESDIR}"/${P}-pkgconfig.patch
+)
+
+S="${WORKDIR}/${MY_PN}_${PV}"
+
+src_prepare() {
+ default
+ # respect user's CFLAGS
+ sed -i -e 's/O3//' CMakeLists.txt || die
+}
+
+src_configure() {
+ local mycmakeargs+=(
+ -DBUILD_SHARED_LIBS=ON
+ -Denable_blaslib=OFF
+ -Denable_tests=$(usex test)
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ use doc && dodoc -r DOC/html
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins -r EXAMPLE FORTRAN
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+}