aboutsummaryrefslogtreecommitdiffstats
path: root/math
diff options
context:
space:
mode:
Diffstat (limited to 'math')
-rw-r--r--math/sdpa/Makefile43
-rw-r--r--math/sdpa/distinfo6
-rw-r--r--math/sdpa/files/Makefile2
-rw-r--r--math/sdpa/files/patch-Makefile2
-rw-r--r--math/sdpa/files/patch-rsdpa_include.h11
5 files changed, 49 insertions, 15 deletions
diff --git a/math/sdpa/Makefile b/math/sdpa/Makefile
index 0cd243730f57..16f8f3daa8ef 100644
--- a/math/sdpa/Makefile
+++ b/math/sdpa/Makefile
@@ -7,6 +7,7 @@
PORTNAME= sdpa
PORTVERSION= 6.2.1
+PORTREVISION= 1
CATEGORIES= math
MASTER_SITES= http://grid.r.dendai.ac.jp/sdpa/files/
DISTFILES= ${PORTNAME}.${PORTVERSION}.src.tar.gz
@@ -24,18 +25,34 @@ COMMENT= SDPA(SemiDefinite Programming Algorithm) Very efficent SDP Solver
.if defined(WITH_ICC)
BUILD_DEPENDS= ${LOCALBASE}/intel_cc_80/bin/icc:${PORTSDIR}/lang/icc
.endif
-LIB_DEPENDS= atlas:${PORTSDIR}/math/atlas
+WANT_FORTRAN=yes #dummy but future use
+BUILD_DEPENDS+= gfortran42:${PORTSDIR}/lang/gcc42
+FC= gfortran42
+F77= gfortran42
OLDVERSION= 6.2.0
USE_GMAKE= yes
WRKSRC= ${WRKDIR}/${PORTNAME}
-.if defined(WITH_SMP)
-LAPACK= -lalapack_r
-CBLAS= -lptcblas -lptf77blas -latlas_r -lg2c ${PTHREAD_LIBS}
-.else
+
+#Atlas is always required as lapack.h and blas.h is required.
+#no blaswarp.h at the moment.
+LIB_DEPENDS+= atlas.2:${PORTSDIR}/math/atlas
+
+WITH_ATLAS= yes
+.if defined(WITH_ATLAS)
+BLAS= -lcblas -lf77blas -latlas
LAPACK= -lalapack
-CBLAS= -lcblas -lf77blas -latlas -lg2c
+CXXFLAGS+= -DNON_ATLAS_SDPA=0
+.else
+LIB_DEPENDS+= blas.2:${PORTSDIR}/math/blas
+LIB_DEPENDS+= lapack.4:${PORTSDIR}/math/lapack
+BLAS= -lblas
+LAPACK= -llapack
+CXXFLAGS+= -DNON_ATLAS_SDPA=1
.endif
+FORTRANLIBS= -lgfortranbegin -lgfortran
+GCCLIBDIR= -L`${CAT} ${WRKSRC}/LIBDIR` -L`${CAT} ${WRKSRC}/LIBDIR`/../../..
+
PLIST_SUB+= PORTVERSION="${PORTVERSION}"
#WITH_SMP= yes
#WITH_ICC= yes
@@ -63,17 +80,23 @@ CXXFLAGS= -O3 -tpp7 -axN -Vaxlib
.endif
pre-build:
- ${CP} ${FILESDIR}/Makefile ${WRKDIR}
+ @${CP} ${FILESDIR}/Makefile ${WRKDIR}
+ @${DIRNAME} `${FC} -print-libgcc-file-name` > ${WRKSRC}/LIBDIR
@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g ; \
- s|%%LAPACK%%|${LAPACK}|g ; \
s|%%LOCALBASE%%|${LOCALBASE}|g ; \
- s|%%CBLAS%%|${CBLAS}|g' ${WRKDIR}/Makefile
+ s|%%LAPACK%%|${LAPACK}|g ; \
+ s|%%BLAS%%|${BLAS}|g ; \
+ s|%%FORTRANLIBS%%|${FORTRANLIBS}|g ; \
+ s|%%GCCLIBDIR%%|${GCCLIBDIR}|g' ${WRKDIR}/Makefile
@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g ; \
s|%%LOCALBASE%%|${LOCALBASE}|g ; \
s|%%CXX%%|${CXX}| g ; \
s|%%CXXFLAGS%%|${CXXFLAGS}|g ; \
s|%%LAPACK%%|${LAPACK}|g ; \
- s|%%CBLAS%%|${CBLAS}|g' ${WRKSRC}/Makefile
+ s|%%BLAS%%|${BLAS}|g ; \
+ s|%%FORTRANLIBS%%|${FORTRANLIBS}|g ; \
+ s|%%GCCLIBDIR%%|${GCCLIBDIR}|g' ${WRKSRC}/Makefile
+
.if !defined(WITH_OPTIMIZED_FLAGS)
@${ECHO} "You can optimize by setting WITH_OPTIMIZED_FLAGS=yes."
.endif
diff --git a/math/sdpa/distinfo b/math/sdpa/distinfo
index 7bd7ddf758b8..db4a915e911b 100644
--- a/math/sdpa/distinfo
+++ b/math/sdpa/distinfo
@@ -1,6 +1,6 @@
-MD5 (sdpa/sdpa.6.2.1.src.tar.gz) = 217764fd5e9f22620602d94009c25c25
-SHA256 (sdpa/sdpa.6.2.1.src.tar.gz) = c972ab500509191b9aba99cad89e81898cfdd9d3a13574baee1a3987603a502e
-SIZE (sdpa/sdpa.6.2.1.src.tar.gz) = 64283
+MD5 (sdpa/sdpa.6.2.1.src.tar.gz) = c76d146e4906fbd8a568fa58f50fc4a7
+SHA256 (sdpa/sdpa.6.2.1.src.tar.gz) = d15ecf68f5234ab6bbc92e56b03491e56fea3e41d00952d9a940bebe729df34b
+SIZE (sdpa/sdpa.6.2.1.src.tar.gz) = 75081
MD5 (sdpa/sdpa.6.2.0.manual.ps.gz) = ce4efa43821b3aa02af2210635e53ecb
SHA256 (sdpa/sdpa.6.2.0.manual.ps.gz) = 4fadf7362fce9c2489433664d087dc8d599bb17ee5906fe52e193de5d2943697
SIZE (sdpa/sdpa.6.2.0.manual.ps.gz) = 187820
diff --git a/math/sdpa/files/Makefile b/math/sdpa/files/Makefile
index 3dc028b57c00..3c311cff33ed 100644
--- a/math/sdpa/files/Makefile
+++ b/math/sdpa/files/Makefile
@@ -6,7 +6,7 @@
PREFIX = %%PREFIX%%
LOCALBASE = %%LOCALBASE%%
-LAPACK_LIB = %%LAPACK%% %%CBLAS%%
+LAPACK_LIB = %%LAPACK%% %%BLAS%%
SDPA_LIB = -lsdpa
SDPA_EXAMPLES = example1-1.exe example1-2.exe \
example2-1.exe example2-2.exe \
diff --git a/math/sdpa/files/patch-Makefile b/math/sdpa/files/patch-Makefile
index fce34229a7a4..84cfbf5398aa 100644
--- a/math/sdpa/files/patch-Makefile
+++ b/math/sdpa/files/patch-Makefile
@@ -10,7 +10,7 @@
-LAPACK_LIB = -llapack -lcblaswr -lcblas \
- -lf77blas -lI77 -lF77 -latlas
-+LAPACK_LIB = %%LAPACK%% %%CBLAS%%
++LAPACK_LIB = %%LAPACK%% %%BLAS%% %%FORTRANLIBS%% %%GCCLIBDIR%%
# if you use BLAS in clapack.tgz, use next line
# and set NON_ATLAS_SDPA in rsdpa_include.h to 1.
diff --git a/math/sdpa/files/patch-rsdpa_include.h b/math/sdpa/files/patch-rsdpa_include.h
index fd8d39bd5a09..e27d3efbe5a4 100644
--- a/math/sdpa/files/patch-rsdpa_include.h
+++ b/math/sdpa/files/patch-rsdpa_include.h
@@ -17,3 +17,14 @@
};
using namespace std;
+--- rsdpa_include.h~ Thu Jan 11 16:32:04 2007
++++ rsdpa_include.h Thu Jan 11 16:32:45 2007
+@@ -32,7 +32,7 @@
+ // otherwise (for example, BLAS in clapack.tgz), set 1
+ // and edit Makefile to change LAPACK_LIB
+
+-#define NON_ATLAS_SDPA 0
++//#define NON_ATLAS_SDPA 0
+
+ #include <iostream>
+ #include <fstream>