Index: head/cad/tochnog/Makefile =================================================================== --- head/cad/tochnog/Makefile (revision 182250) +++ head/cad/tochnog/Makefile (revision 182251) @@ -1,95 +1,105 @@ # New ports collection makefile for: tochnog # Date created: 19 Apr 2003 # Whom: Pedro Giffuni # # $FreeBSD$ # PORTNAME= tochnog PORTVERSION= 20010211 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= cad MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= tochnog DISTNAME= ${PORTNAME}_feb11_2001 MAINTAINER= ports@FreeBSD.org COMMENT= A free explicit/implicit Finite Element Program .ifdef WITH_ATLAS LIB_DEPENDS= atlas:${PORTSDIR}/math/atlas .else LIB_DEPENDS= blas:${PORTSDIR}/math/blas .endif BUILD_DEPENDS= ${LOCALBASE}/lib/libf2c.a:${PORTSDIR}/lang/f2c .ifdef WITH_THREADS BUILD_DEPENDS+= ${LOCALBASE}/lib/libsuperlu_mt.a:${PORTSDIR}/math/superlu_mt .else BUILD_DEPENDS+= ${LOCALBASE}/lib/libsuperlu.a:${PORTSDIR}/math/superlu .endif USE_GETOPT_LONG= yes WRKSRC= ${WRKDIR}/${PORTNAME}/src MAKEFILE= makefile # You can set GIDDIR to share/gid to install the scripts to be used # with the cad/linux-gid port, otherwise they can be linked to the data # directory to avoid polluting the port space. GIDDIR?= share/${PORTNAME} PLIST_SUB+= GIDDIR=${GIDDIR} GID_PTYPES= ${PREFIX}/${GIDDIR}/problemtypes .ifdef WITH_ATLAS .ifdef WITH_THREADS BLAS_LIBS= -lptf77blas -latlas_r .else BLAS_LIBS= -lf77blas -latlas .endif .else #BLAS BLAS_LIBS?= -lblas .endif .ifdef WITH_THREADS SUPERLU= superlu_mt ALL_TARGET= freebsd_parallel .else SUPERLU= superlu ALL_TARGET= freebsd_old .endif +WANT_FORTRAN= yes #dummy but future use +BUILD_DEPENDS+= gfortran42:${PORTSDIR}/lang/gcc42 +FC= gfortran42 +F77= gfortran42 +FORTRANLIBS= -lgfortranbegin -lgfortran +GCCLIBDIR= -L`${CAT} ${WRKSRC}/LIBDIR` -L`${CAT} ${WRKSRC}/LIBDIR`/../../.. + pre-build: + @${DIRNAME} `${FC} -print-libgcc-file-name` > ${WRKSRC}/LIBDIR @${REINPLACE_CMD} -e 's,%%LOCALBASE%%,${LOCALBASE},g ; \ s,%%PTHREAD_CFLAGS%%,${PTHREAD_CFLAGS},g ; s,%%PTHREAD_LIBS%%,${PTHREAD_LIBS},g ; \ s,%%SUPERLU%%,${SUPERLU},g ; \ + s,%%FORTRANLIBS%%,${FORTRANLIBS},g ; \ + s,%%GCCLIBDIR%%,${GCCLIBDIR},g ; \ s,%%BLAS_LIBS%%,-L${LOCALBASE}/lib ${BLAS_LIBS},g' \ ${WRKSRC}/makefile .ifdef WITH_THREADS @${REINPLACE_CMD} -e 's,SUPERLU_MT_USE 0,SUPERLU_MT_USE 1,' \ ${WRKSRC}/tnsuplu.h .else # Serial @${REINPLACE_CMD} -e 's,SUPERLU_USE 0,SUPERLU_USE 1,' \ ${WRKSRC}/tnsuplu.h .endif post-build: @(cd ${WRKDIR}/tochnog/tools; ${CXX} ${CXXFLAGS} -o aba2tn aba2tn.cc) do-install: ${INSTALL_PROGRAM} ${WRKSRC}/tochnog ${PREFIX}/bin ${INSTALL_PROGRAM} ${WRKDIR}/tochnog/tools/aba2tn ${PREFIX}/bin ${INSTALL_SCRIPT} ${WRKDIR}/tochnog/tools/*.awk ${PREFIX}/bin ${MKDIR} ${GID_PTYPES}/tochnog.gid ${INSTALL_DATA} ${WRKDIR}/tochnog/gid/tochnog.gid/tochnog.cnd \ ${GID_PTYPES}/tochnog.gid ${INSTALL_DATA} ${WRKDIR}/tochnog/gid/tochnog.gid/tochnog.mat \ ${GID_PTYPES}/tochnog.gid ${INSTALL_SCRIPT} ${WRKDIR}/tochnog/gid/tochnog.gid/tochnog.ba* \ ${GID_PTYPES}/tochnog.gid .if !defined(NOPORTDOCS) ${MKDIR} ${EXAMPLESDIR} @${RM} -f ${WRKDIR}/tochnog/test/*.orig ${INSTALL_DATA} ${WRKDIR}/tochnog/test/* ${EXAMPLESDIR} .endif .include Property changes on: head/cad/tochnog/Makefile ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.12 \ No newline at end of property +1.13 \ No newline at end of property Index: head/cad/tochnog/files/patch-makefile =================================================================== --- head/cad/tochnog/files/patch-makefile (revision 182250) +++ head/cad/tochnog/files/patch-makefile (revision 182251) @@ -1,99 +1,99 @@ --- makefile.orig Sun Aug 19 19:31:52 2001 +++ makefile Sun Aug 6 18:58:12 2006 @@ -1,6 +1,7 @@ # *********** fortran 2 c ******************* # Set F2C (for unix -lf2c and for MS windows to f2c.lib) -F2C= +F2C= -lf2c -L%%LOCALBASE%%/lib +F2C_INCLUDE= -I%%LOCALBASE%%/include # *********** hypoplasticity **************** # For hypoplasticity: @@ -8,8 +9,8 @@ # set HYPO_USE to 1 in tnhypo.h # set HYPO_SRC to hypo.c below # set HYPO_OBJ to hypo.o below -HYPO_SRC=hypo_dum.c -HYPO_OBJ=hypo_dum.o +HYPO_SRC=hypo.c +HYPO_OBJ=hypo.o # *********** profiler *********************** # for the gnu profiler, use as follows: @@ -26,11 +27,11 @@ SYS_FILE=sysother BCPP=-P VCPP= -COMPILER_C=bcc32 -COMPILER_CPP=bcc32 -COMPILER_FLAGS= -c -O2 -w- +COMPILER_C=$(CC) +COMPILER_CPP=$(CXX) +COMPILER_FLAGS=$(CFLAGS) -c OBJ=obj -LINK_FLAGS_BEFORE= -l$(F2C) +LINK_FLAGS_BEFORE= -l$(F2C) -L%%LOCALBASE%%/lib LINK_FLAGS_AFTER= # *********** SUPERLU library ******************* @@ -39,9 +40,9 @@ # Set SUPERLU_MT_USE to 1 in tnsuplu.h for the multi threaded version # Set SUPERLU_DIST_USE to 1 in tnsuplu.h for the distributed MPI version # 2. Activate and adjust the next three lines -# SUPERLU=/home/programs/src/SuperLU -# SUPERLU_LIB=$(SUPERLU)/superlu.a $(SUPERLU)/blas.a -# SUPERLU_INCLUDE=-I$(SUPERLU)/SRC +SUPERLU=%%LOCALBASE%% -+SUPERLU_LIB=$(SUPERLU)/lib/lib%%SUPERLU%%.a %%BLAS_LIBS%% ++SUPERLU_LIB=$(SUPERLU)/lib/lib%%SUPERLU%%.a %%BLAS_LIBS%% %%GCCLIBDIR%% %%FORTRANLIBS%% +SUPERLU_INCLUDE=-I$(SUPERLU)/include/%%SUPERLU%% # 3. For SuperLU_MT be sure to compile a multi threaded version # of Tochnog (sparc_parallel, alpha_parallel, linux, etc.) @@ -65,7 +66,7 @@ ALL_LIB= $(PETSC_LIB) $(SUPERLU_LIB) $(F2C) # *********** default platform ******************* -default: linux_old +default: freebsd_old # single and multi-processor windows; borland c++ compiler # set SYS_FILE above to syswin32 for multi-processor @@ -101,17 +102,22 @@ "LINK_FLAGS_AFTER= /link $(F2C) $(PROFILE) /OUT:tochnog.exe" # single processor linux; gnu gcc compiler -linux_old: +freebsd_old: make tochnog \ "SYS_FILE=sysother" \ "OBJ=o" \ - "BCPP=" \ - "VCPP=" \ - "COMPILER_C=gcc" \ - "COMPILER_CPP=g++" \ - "COMPILER_FLAGS= -ansi -c -O2 -Wall $(PROFILE) $(ALL_INCLUDE)" \ + "COMPILER_FLAGS= -c ${CFLAGS} ${CPPFLAGS} $(ALL_INCLUDE)" \ "LINK_FLAGS_BEFORE=" \ - "LINK_FLAGS_AFTER= $(PROFILE) $(ALL_LIB) -static -lm -o tochnog" + "LINK_FLAGS_AFTER= $(PROFILE) $(ALL_LIB) ${LDFLAGS} -lm -o tochnog" + +# Multithreaded FreeBSD +freebsd_parallel: + make tochnog \ + "SYS_FILE=sysposix" \ + "OBJ=o" \ + "COMPILER_FLAGS= -c ${CFLAGS} %%PTHREAD_CFLAGS%% -D_REENTRANT $(ALL_INCLUDE)" \ + "LINK_FLAGS_BEFORE=" \ + "LINK_FLAGS_AFTER= $(ALL_LIB) %%PTHREAD_LIBS%% -lm -o tochnog" # multi processor linux; gnu gcc compiler linux: @@ -375,7 +381,7 @@ $(COMPILER_CPP) $(COMPILER_FLAGS) $(BCPP) $(VCPP)hyperela.$(SRC_CPP) $(HYPO_OBJ): $(HYPO_SRC) - $(COMPILER_C) $(COMPILER_FLAGS) $(HYPO_SRC) + $(COMPILER_C) $(COMPILER_FLAGS) $(HYPO_SRC) $(F2C_INCLUDE) hypoplas.$(OBJ): hypoplas.$(SRC_CPP) tochnog.h $(COMPILER_CPP) $(COMPILER_FLAGS) $(BCPP) $(VCPP)hypoplas.$(SRC_CPP) Property changes on: head/cad/tochnog/files/patch-makefile ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.4 \ No newline at end of property +1.5 \ No newline at end of property