summaryrefslogtreecommitdiff
path: root/math/atlas
diff options
context:
space:
mode:
authorMaho Nakata <maho@FreeBSD.org>2003-06-11 04:17:37 +0000
committerMaho Nakata <maho@FreeBSD.org>2003-06-11 04:17:37 +0000
commit9bd1ed45e7d3b45fc890b9aefe10417e7c060766 (patch)
tree3fce9a15d715300e3aec692744f81940299a3929 /math/atlas
parentUpdate to 2.2.2. (diff)
1. make atlas thread safe
2. set an option that force atlas to make threaded 3. bump port revision
Notes
Notes: svn path=/head/; revision=82727
Diffstat (limited to 'math/atlas')
-rw-r--r--math/atlas/Makefile12
-rw-r--r--math/atlas/files/patch-config.c22
-rw-r--r--math/atlas/files/thread-patch11
3 files changed, 40 insertions, 5 deletions
diff --git a/math/atlas/Makefile b/math/atlas/Makefile
index 67507c2ccc2f..70a2305bf00c 100644
--- a/math/atlas/Makefile
+++ b/math/atlas/Makefile
@@ -10,6 +10,7 @@
PORTNAME= atlas
PORTVERSION= 3.5.2
+PORTREVISION= 1
CATEGORIES= math
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= math-atlas
@@ -29,6 +30,17 @@ USE_REINPLACE= yes
USE_GCC= 3.1
.endif
+post-patch:
+ @${REINPLACE_CMD} -e 's+%%PTHREAD_CFLAGS%%+ ${PTHREAD_CFLAGS}+' \
+ ${WRKSRC}/config.c
+ @${REINPLACE_CMD} -e 's+%%PTHREAD_LIBS%%+ ${PTHREAD_LIBS}+' \
+ ${WRKSRC}/config.c
+.if !defined(USE_THREADS)
+ @${ECHO_MSG} "make USE_THREADS=yes for threaded version"
+.else
+ @(cd ${WRKSRC}; ${PATCH} < ${FILESDIR}/thread-patch)
+.endif
+
do-configure:
.if defined(BATCH) || defined(PACKAGE_BUILDING)
@(cd ${WRKSRC}; ${MAKE_ENV} ${MAKE} config < ${FILESDIR}/answer)
diff --git a/math/atlas/files/patch-config.c b/math/atlas/files/patch-config.c
index 653fbcc95ee0..32482f8625e0 100644
--- a/math/atlas/files/patch-config.c
+++ b/math/atlas/files/patch-config.c
@@ -1,5 +1,5 @@
--- config.c.orig Sun May 4 06:09:23 2003
-+++ config.c Tue Jun 10 13:12:30 2003
++++ config.c Wed Jun 11 12:01:08 2003
@@ -697,7 +697,7 @@
else if (mach == IA64Itan || MachIsUS(mach) ||
mach == Dec21164 || mach == Dec21264)
@@ -15,12 +15,24 @@
case OSOSX: /* don't know answer */
- case OSFreeBSD: /* don't know answer */
+ case OSFreeBSD:
-+ if (THREADS) strcpy(LIBS, "-pthread -lm");
++ if (THREADS) strcpy(LIBS, "%%PTHREAD_LIBS%% -lm");
+ break;
case OSLinux:
break;
case OSSunOS:
-@@ -2104,7 +2106,10 @@
+@@ -1240,6 +1242,11 @@
+ "-mcpu=ultrasparc -mtune=ultrasparc -fomit-frame-pointer -O3");
+ }
+ if (OS == OSFreeBSD && F77) strcpy(F77, "f77");
++ if (OS == OSFreeBSD && THREADS) {
++ strcat(F77FLAGS, "%%PTHREAD_CFLAGS%%");
++ strcat(CCFLAGS, "%%PTHREAD_CFLAGS%%");
++ strcat(MMFLAGS, "%%PTHREAD_CFLAGS%%");
++ }
+ break;
+ case OSSunOS:
+ np = 3;
+@@ -2104,7 +2111,10 @@
if (!CmndOneLine(targ, "sysctl hw.model", ln))
{
if (strstr(ln, "433au")) mach = Dec21164;
@@ -31,7 +43,7 @@
}
break;
case LAIA64: /* don't know */
-@@ -2113,14 +2118,22 @@
+@@ -2113,14 +2123,22 @@
if (!CmndOneLine(targ, "sysctl hw.model", ln))
{
if (strstr(ln, "Pentium Pro")) mach = IntPPRO;
@@ -54,7 +66,7 @@
}
break;
default:;
-@@ -3124,6 +3137,9 @@
+@@ -3124,6 +3142,9 @@
}
if (USEWINF77) strcpy(F77, "$(BINdir)/winf77.exe");
diff --git a/math/atlas/files/thread-patch b/math/atlas/files/thread-patch
new file mode 100644
index 000000000000..1660248f74fe
--- /dev/null
+++ b/math/atlas/files/thread-patch
@@ -0,0 +1,11 @@
+--- config.c~ Wed Jun 11 11:25:09 2003
++++ config.c Wed Jun 11 11:35:08 2003
+@@ -79,7 +79,7 @@
+ char *usermmnam[2] = {"", "GOTO"};
+ enum USERGEMM {UG_None=0, UG_GOTO};
+
+-int XCOMP=0, THREADS=0, USEWINF77=0, NLINES=0, ISWIN=0;
++int XCOMP=0, THREADS=1, USEWINF77=0, NLINES=0, ISWIN=0; //force threading
+ char TARGNAM[512];
+ enum MACHTYPE mach=MACHOther;
+