View | Details | Raw Unified | Return to bug 92782
Collapse All | Expand All

(-)tochnog/Makefile (-17 / +12 lines)
Lines 6-13 Link Here
6
#
6
#
7
7
8
PORTNAME=	tochnog
8
PORTNAME=	tochnog
9
PORTVERSION=	20010211
9
PORTVERSION=	20020625
10
PORTREVISION=	2
11
CATEGORIES=	cad
10
CATEGORIES=	cad
12
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
11
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
13
MASTER_SITE_SUBDIR=	tochnog
12
MASTER_SITE_SUBDIR=	tochnog
Lines 24-44 Link Here
24
.endif
23
.endif
25
LIB_DEPENDS=	atlas:${PORTSDIR}/math/atlas
24
LIB_DEPENDS=	atlas:${PORTSDIR}/math/atlas
26
25
27
# This port installs some plugins into a directory which is owned by the
28
# the cad/linux-gid port, but it doesn't adds a dependency to linux-gid,
29
# since tochnog can be used standalone.
30
# The right thing to do would be to add a slave port which installs the
31
# plugins only. The slave port would have to depend upon linux-gid and
32
# tochnog.
33
34
USE_REINPLACE=	yes
26
USE_REINPLACE=	yes
35
WRKSRC=		${WRKDIR}/${PORTNAME}/src
27
WRKSRC=		${WRKDIR}/${PORTNAME}/src
36
MAKEFILE=	makefile
28
MAKEFILE=	makefile
37
29
38
GIDDIR?=	share/gid
30
# You can set GIDDIR to share/gid to install the scripts to be used
39
PLIST_SUB+=	GIDDIR=${GIDDIR}
31
# with the cad/linux-gid port, otherwise they can be linked to the data
32
# directory to avoid polluting the port space.
40
33
41
GID_PREFIX?=	${LOCALBASE}/${GIDDIR}/problemtypes
34
GIDDIR?=	share/${PORTNAME}
35
PLIST_SUB+=	GIDDIR=${GIDDIR}
36
GID_DATA=	${LOCALBASE}/${GIDDIR}/problemtypes
42
37
43
.ifdef WITH_THREADS
38
.ifdef WITH_THREADS
44
BLAS_LIBS?=	-L${LOCALBASE}/lib -lptf77blas -latlas_r
39
BLAS_LIBS?=	-L${LOCALBASE}/lib -lptf77blas -latlas_r
Lines 55-61 Link Here
55
	@${ECHO_MSG} "make WITH_THREADS=yes for threaded version"
50
	@${ECHO_MSG} "make WITH_THREADS=yes for threaded version"
56
.endif
51
.endif
57
52
58
post-patch:
53
pre-build:
59
	@${REINPLACE_CMD} -e 's,%%LOCALBASE%%,${LOCALBASE},g ; \
54
	@${REINPLACE_CMD} -e 's,%%LOCALBASE%%,${LOCALBASE},g ; \
60
	s,%%PTHREAD_CFLAGS%%,${PTHREAD_CFLAGS},g ; s,%%PTHREAD_LIBS%%,${PTHREAD_LIBS},g ; \
55
	s,%%PTHREAD_CFLAGS%%,${PTHREAD_CFLAGS},g ; s,%%PTHREAD_LIBS%%,${PTHREAD_LIBS},g ; \
61
	s,%%SUPERLU%%,${SUPERLU},g ; \
56
	s,%%SUPERLU%%,${SUPERLU},g ; \
Lines 76-88 Link Here
76
	${INSTALL_PROGRAM} ${WRKSRC}/tochnog ${PREFIX}/bin
71
	${INSTALL_PROGRAM} ${WRKSRC}/tochnog ${PREFIX}/bin
77
	${INSTALL_PROGRAM} ${WRKDIR}/tochnog/tools/aba2tn ${PREFIX}/bin
72
	${INSTALL_PROGRAM} ${WRKDIR}/tochnog/tools/aba2tn ${PREFIX}/bin
78
	${INSTALL_SCRIPT} ${WRKDIR}/tochnog/tools/*.awk ${PREFIX}/bin
73
	${INSTALL_SCRIPT} ${WRKDIR}/tochnog/tools/*.awk ${PREFIX}/bin
79
	${MKDIR} ${GID_PREFIX}/tochnog.gid
74
	${MKDIR} ${GID_DATA}/tochnog.gid
80
	${INSTALL_DATA} ${WRKDIR}/tochnog/gid/tochnog.gid/tochnog.cnd	\
75
	${INSTALL_DATA} ${WRKDIR}/tochnog/gid/tochnog.gid/tochnog.cnd	\
81
	  ${GID_PREFIX}/tochnog.gid
76
	  ${GID_DATA}/tochnog.gid
82
	${INSTALL_DATA} ${WRKDIR}/tochnog/gid/tochnog.gid/tochnog.mat	\
77
	${INSTALL_DATA} ${WRKDIR}/tochnog/gid/tochnog.gid/tochnog.mat	\
83
	  ${GID_PREFIX}/tochnog.gid
78
	  ${GID_DATA}/tochnog.gid
84
	${INSTALL_SCRIPT} ${WRKDIR}/tochnog/gid/tochnog.gid/tochnog.ba*	\
79
	${INSTALL_SCRIPT} ${WRKDIR}/tochnog/gid/tochnog.gid/tochnog.ba*	\
85
	  ${GID_PREFIX}/tochnog.gid
80
	  ${GID_DATA}/tochnog.gid
86
.if !defined(NOPORTDOCS)
81
.if !defined(NOPORTDOCS)
87
	${MKDIR} ${EXAMPLESDIR}
82
	${MKDIR} ${EXAMPLESDIR}
88
	@${RM} -f ${WRKDIR}/tochnog/test/*.orig
83
	@${RM} -f ${WRKDIR}/tochnog/test/*.orig
(-)tochnog/files/patch-makefile (-10 / +10 lines)
Lines 1-5 Link Here
1
--- makefile.orig	Sun Aug 19 12:31:52 2001
1
--- makefile.orig	Sun Aug 19 12:31:52 2001
2
+++ makefile	Wed Jun 18 12:57:01 2003
2
+++ makefile	Fri Feb  3 16:41:08 2006
3
@@ -1,6 +1,7 @@
3
@@ -1,6 +1,7 @@
4
 #  ***********  fortran 2 c *******************
4
 #  ***********  fortran 2 c *******************
5
 # Set F2C (for unix -lf2c and for MS windows to f2c.lib)
5
 # Set F2C (for unix -lf2c and for MS windows to f2c.lib)
Lines 29-35 Link Here
29
-COMPILER_FLAGS= -c -O2 -w-
29
-COMPILER_FLAGS= -c -O2 -w-
30
+COMPILER_C=$(CC)
30
+COMPILER_C=$(CC)
31
+COMPILER_CPP=$(CXX)
31
+COMPILER_CPP=$(CXX)
32
+COMPILER_FLAGS=$(CXXFLAGS) -c
32
+COMPILER_FLAGS=$(CFLAGS) -c
33
 OBJ=obj
33
 OBJ=obj
34
-LINK_FLAGS_BEFORE= -l$(F2C)
34
-LINK_FLAGS_BEFORE= -l$(F2C)
35
+LINK_FLAGS_BEFORE= -l$(F2C) -L%%LOCALBASE%%/lib
35
+LINK_FLAGS_BEFORE= -l$(F2C) -L%%LOCALBASE%%/lib
Lines 58-64 Link Here
58
 
58
 
59
 # single and multi-processor windows; borland c++ compiler
59
 # single and multi-processor windows; borland c++ compiler
60
 # set SYS_FILE above to syswin32 for multi-processor
60
 # set SYS_FILE above to syswin32 for multi-processor
61
@@ -101,18 +102,23 @@
61
@@ -101,17 +102,22 @@
62
 	"LINK_FLAGS_AFTER= /link $(F2C) $(PROFILE) /OUT:tochnog.exe"
62
 	"LINK_FLAGS_AFTER= /link $(F2C) $(PROFILE) /OUT:tochnog.exe"
63
 
63
 
64
 # single processor linux; gnu gcc compiler
64
 # single processor linux; gnu gcc compiler
Lines 72-93 Link Here
72
-	"COMPILER_C=gcc" \
72
-	"COMPILER_C=gcc" \
73
-	"COMPILER_CPP=g++" \
73
-	"COMPILER_CPP=g++" \
74
-	"COMPILER_FLAGS= -ansi -c -O2 -Wall $(PROFILE) $(ALL_INCLUDE)" \
74
-	"COMPILER_FLAGS= -ansi -c -O2 -Wall $(PROFILE) $(ALL_INCLUDE)" \
75
+	"COMPILER_FLAGS= -c ${CXXFLAGS} $(ALL_INCLUDE)" \
75
+	"COMPILER_FLAGS= -c ${CFLAGS} $(ALL_INCLUDE)" \
76
 	"LINK_FLAGS_BEFORE=" \
76
 	"LINK_FLAGS_BEFORE=" \
77
 	"LINK_FLAGS_AFTER= $(PROFILE) $(ALL_LIB) -static -lm -o tochnog"
77
-	"LINK_FLAGS_AFTER= $(PROFILE) $(ALL_LIB) -static -lm -o tochnog"
78
 
78
+	"LINK_FLAGS_AFTER= $(PROFILE) $(ALL_LIB) -lm -o tochnog"
79
+
79
+# Multithreaded FreeBSD
80
+# Multithreaded FreeBSD
80
+freebsd_parallel:
81
+freebsd_parallel:
81
+	make tochnog \
82
+	make tochnog \
82
+	"SYS_FILE=sysposix" \
83
+	"SYS_FILE=sysposix" \
83
+	"OBJ=o" \
84
+	"OBJ=o" \
84
+	"COMPILER_FLAGS= -c ${CXXFLAGS} %%PTHREAD_CFLAGS%% -D_REENTRANT $(ALL_INCLUDE)" \
85
+	"COMPILER_FLAGS= -c ${CFLAGS} %%PTHREAD_CFLAGS%% -D_REENTRANT $(ALL_INCLUDE)" \
85
+	"LINK_FLAGS_BEFORE=" \
86
+	"LINK_FLAGS_BEFORE=" \
86
+	"LINK_FLAGS_AFTER=  $(ALL_LIB) %%PTHREAD_LIBS%% -static -lm -o tochnog"
87
+	"LINK_FLAGS_AFTER=  $(ALL_LIB) %%PTHREAD_LIBS%% -lm -o tochnog"
87
+
88
 
88
 # multi processor linux; gnu gcc compiler
89
 # multi processor linux; gnu gcc compiler
89
 linux: 
90
 linux: 
90
 	make tochnog \
91
@@ -375,7 +381,7 @@
91
@@ -375,7 +381,7 @@
92
 	$(COMPILER_CPP) $(COMPILER_FLAGS) $(BCPP) $(VCPP)hyperela.$(SRC_CPP)
92
 	$(COMPILER_CPP) $(COMPILER_FLAGS) $(BCPP) $(VCPP)hyperela.$(SRC_CPP)
93
 
93
 
(-)tochnog/files/patch-tnsuplu.h (-4 / +4 lines)
Lines 1-15 Link Here
1
--- tnsuplu.h.orig	Wed Jun 18 12:39:20 2003
1
--- tnsuplu.h.orig	Sun Aug 19 12:31:52 2001
2
+++ tnsuplu.h	Wed Jun 18 12:45:46 2003
2
+++ tnsuplu.h	Fri Feb  3 15:55:13 2006
3
@@ -2,6 +2,12 @@
3
@@ -2,6 +2,12 @@
4
 #define SUPERLU_USE 0
4
 #define SUPERLU_USE 0
5
 #define SUPERLU_MT_USE 0
5
 #define SUPERLU_MT_USE 0
6
 #define SUPERLU_DIST_USE 0
6
 #define SUPERLU_DIST_USE 0
7
+#if SUPERLU_USE /* enums were changed for SuperLU v2 */
7
+/* enums were changed for SuperLU v2 */
8
+#define _D SLU_D
8
+#define _D SLU_D
9
+#define DN SLU_DN
9
+#define DN SLU_DN
10
+#define GE SLU_GE
10
+#define GE SLU_GE
11
+#define NC SLU_NC
11
+#define NC SLU_NC
12
+#endif
12
+
13
 /* don't change the next lines */
13
 /* don't change the next lines */
14
 #if SUPERLU_USE+SUPERLU_MT_USE+SUPERLU_DIST_USE > 1
14
 #if SUPERLU_USE+SUPERLU_MT_USE+SUPERLU_DIST_USE > 1
15
  ERROR___  just pick one 
15
  ERROR___  just pick one 
(-)tochnog/files/patch-tochnog.h (-17 / +18 lines)
Lines 1-31 Link Here
1
--- tochnog.h.orig	Sat Jul 12 13:05:15 2003
1
--- tochnog.h.orig	Sun Feb 11 05:05:27 2001
2
+++ tochnog.h	Sat Jul 12 15:29:05 2003
2
+++ tochnog.h	Fri Feb  3 15:15:51 2006
3
@@ -17,12 +17,25 @@
3
@@ -17,12 +17,17 @@
4
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
4
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
5
 */
5
 */
6
 
6
 
7
-#include <iostream.h>
7
-#include <iostream.h>
8
+#include <iostream>
8
+#include <iostream>
9
+// C++ iostream compatibility stuff
9
+// C++ headers
10
+using std::ios;
10
+#include <iostream>
11
+using std::cout;
11
+#include <fstream>
12
+using std::cin;
12
+#include <iomanip>
13
+using std::flush;
13
+using namespace std;
14
+//end iostream compatibility stuff
15
+
14
+
15
+// C headers
16
 #include <assert.h>
16
 #include <assert.h>
17
 #include <ctype.h>
17
 #include <ctype.h>
18
 #include <float.h>
18
 #include <float.h>
19
-#include <fstream.h>
19
-#include <fstream.h>
20
-#include <iomanip.h>
20
-#include <iomanip.h>
21
+#include <fstream>
22
+// C++ fstream compatibility stuff
23
+using std::ifstream;
24
+using std::ofstream;
25
+using std::fstream;
26
+//end fstream compatibility stuff
27
+
28
+#include <iomanip>
29
 #include <math.h>
21
 #include <math.h>
30
 #include <limits.h>
22
 #include <limits.h>
31
 #include <stdio.h>
23
 #include <stdio.h>
24
@@ -48,6 +53,8 @@
25
   VERSION_MACRO,        // mesh for control_macro
26
   MVERSION              // maximum number of versions, this must be the last item
27
 }; 
28
+
29
+#define TOCHNOG_VERSION "July_25_2002"
30
 
31
   // constants
32
 #define MCHAR 100  // maximum length of names

Return to bug 92782