1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-23 09:10:43 +00:00

1. make atlas thread safe

2. set an option that force atlas to make threaded
3. bump port revision
This commit is contained in:
Maho Nakata 2003-06-11 04:17:37 +00:00
parent 4aabedb545
commit 9bd1ed45e7
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=82727
3 changed files with 40 additions and 5 deletions

View File

@ -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)

View File

@ -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");

View File

@ -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;