diff options
author | Thierry Thomas <thierry@FreeBSD.org> | 2014-03-18 21:09:03 +0000 |
---|---|---|
committer | Thierry Thomas <thierry@FreeBSD.org> | 2014-03-18 21:09:03 +0000 |
commit | 55e6556d123a5c0c057d2c0a9b645123225b50a6 (patch) | |
tree | bee32239c442ebaba930b9099409230b15af97f7 /math | |
parent | 05ca91af7888bf367bebfb82ca89564b7df77038 (diff) | |
download | ports-55e6556d123a5c0c057d2c0a9b645123225b50a6.tar.gz ports-55e6556d123a5c0c057d2c0a9b645123225b50a6.zip |
Notes
Diffstat (limited to 'math')
-rw-r--r-- | math/metis-edf/Makefile | 70 | ||||
-rw-r--r-- | math/metis-edf/files/patch-CONFIG::configure | 60 | ||||
-rw-r--r-- | math/metis-edf/files/patch-CONFIG_onmetis.in | 26 | ||||
-rw-r--r-- | math/metis-edf/files/patch-Lib::proto.h | 12 | ||||
-rw-r--r-- | math/metis-edf/files/patch-Lib_Makefile | 16 | ||||
-rw-r--r-- | math/metis-edf/files/patch-Makefile | 30 | ||||
-rw-r--r-- | math/metis-edf/files/patch-Makefile.in | 14 | ||||
-rw-r--r-- | math/metis-edf/files/patch-Programs::Makefile | 11 | ||||
-rw-r--r-- | math/metis-edf/files/patch-Test::Makefile | 17 | ||||
-rw-r--r-- | math/metis-edf/files/patch-onmetis | 21 | ||||
-rw-r--r-- | math/metis-edf/pkg-plist | 18 |
11 files changed, 78 insertions, 217 deletions
diff --git a/math/metis-edf/Makefile b/math/metis-edf/Makefile index 0dd98c26d335..04bb84577d2b 100644 --- a/math/metis-edf/Makefile +++ b/math/metis-edf/Makefile @@ -2,8 +2,8 @@ # $FreeBSD$ PORTNAME= metis-edf -DISTVERSION= 4.1-2 -PORTREVISION= 5 +DISTVERSION= 4.0.3-1 +PORTEPOCH= 1 CATEGORIES= math MAINTAINER= thierry@FreeBSD.org @@ -12,78 +12,34 @@ COMMENT= Meshes partitioning tool used by Code_Aster CONFLICTS= metis-[0-9]* metis4-4* ALL_TARGET= default -MAKE_ENV+= AR="${AR}" PICFLAG="${PICFLAG}" -MAKE_JOBS_UNSAFE= yes -REINPLACE_ARGS= -i "" +MAKE_ENV= PICFLAG="${PICFLAG}" prefix="${PREFIX}" OPTFLAGS="${CFLAGS}" -USES= fortran -FFLAGS+= -O2 PICFLAG?= -fPIC -WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION:R} +WRKSRC= ${WRKDIR}/${PORTNAME:C|-edf||}-${PORTVERSION:R} -PROGS= kmetis onmetis.exe pmetis -DOCS= CHANGES Doc/manual.ps README_Code_Aster +DOCS= CHANGES Doc/manual.ps -FORTRANLIBS= -lgfortranbegin -lgfortran -GCCLIBDIR= -L`${CAT} ${WRKSRC}/LIBDIR` -L`${CAT} ${WRKSRC}/LIBDIR`/../../.. - -NO_STAGE= yes .include <bsd.port.pre.mk> .include "${.CURDIR}/../../french/aster/bsd.aster.mk" MACHINEARCH= ${ARCH} -.if ${ARCH} == "i386" USE_LDCONFIG= yes -PLIST_SUB+= SHLIB="" -.else -PLIST_SUB+= SHLIB="@comment " -.endif - -pre-configure: -.if ${MACHINEARCH} != "i386" - ${FIND} ${WRKSRC} -type f -name "*.c" -o -name "*.h" | ${XARGS} \ - ${REINPLACE_CMD} -e "s|long int|int|g" \ - -e "s|long|int|g" \ - -e "s|\(%[[:digit:]]\)ld|\1d|g" \ - -e "s|\(%[[:digit:]]\.[[:digit:]]\)le|\1e|g" \ - -e "s|%ld|%d|g" - ${REINPLACE_CMD} -e 's|%%SHLIB%%|#|' ${WRKSRC}/Lib/Makefile -.else - ${REINPLACE_CMD} -e 's|%%SHLIB%%||' ${WRKSRC}/Lib/Makefile -.endif - ${DIRNAME} `${FC} -print-libgcc-file-name` > ${WRKSRC}/LIBDIR - ${REINPLACE_CMD} -e 's|%%FORTRANLIBS%%|${FORTRANLIBS}|g' -e 's|%%GCCLIBDIR%%|${GCCLIBDIR}|g'\ - ${WRKSRC}/Programs/Makefile - ${REINPLACE_CMD} -e 's|$$prefix|${PREFIX}/bin|' ${WRKSRC}/CONFIG/onmetis.in - ${REINPLACE_CMD} -e 's|$$prefix|${WRKSRC}|' ${WRKSRC}/onmetis - -do-install: - ${MKDIR} ${PREFIX}/include/metis - ${INSTALL_DATA} ${WRKSRC}/Lib/*.h ${PREFIX}/include/metis - ${CP} ${WRKSRC}/CONFIG/onmetis.in ${WRKSRC}/onmetis - ${REINPLACE_CMD} -e "s#HOME_METIS#${PREFIX}/bin#" ${WRKSRC}/onmetis - ${INSTALL_SCRIPT} ${WRKSRC}/onmetis ${PREFIX}/bin - ${REINPLACE_CMD} -e 's|${WRKSRC}|${PREFIX}/bin|' ${PREFIX}/bin/onmetis - ${INSTALL_PROGRAM} ${PROGS:S|^|${WRKSRC}/|} ${PREFIX}/bin - ${INSTALL_DATA} ${WRKSRC}/libmetis.a ${PREFIX}/lib -.if ${MACHINEARCH} == "i386" - ${INSTALL_DATA} ${WRKSRC}/libmetis.so ${PREFIX}/lib - ${INSTALL_PROGRAM} ${WRKSRC}/libmetis.so.1 ${PREFIX}/lib -.endif post-install: .if !defined(NOPORTDOCS) - ${MKDIR} ${DOCSDIR} + ${MKDIR} ${STAGEDIR}${DOCSDIR} . for df in ${DOCS} - ${INSTALL_DATA} ${WRKSRC}/${df} ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/${df} ${STAGEDIR}${DOCSDIR} . endfor - @${ECHO_MSG} "===> Documentation installed in ${DOCSDIR}." .endif .if !defined(NOPORTEXAMPLES) - ${MKDIR} ${EXAMPLESDIR} - ${INSTALL_DATA} ${WRKSRC}/Test/fort.81 ${EXAMPLESDIR} - @${ECHO_MSG} "===> Test file installed in ${EXAMPLESDIR}." + ${MKDIR} ${STAGEDIR}${EXAMPLESDIR} + ${INSTALL_DATA} ${WRKSRC}/Graphs/* ${STAGEDIR}${EXAMPLESDIR} + ${INSTALL_PROGRAM} ${WRKSRC}/Graphs/mtest ${STAGEDIR}${EXAMPLESDIR} .endif +regression-test: + (cd ${WRKSRC}/Graphs && LD_LIBRARY_PATH=${WRKSRC} ./mtest 4elt.graph || ${TRUE}) + .include <bsd.port.post.mk> diff --git a/math/metis-edf/files/patch-CONFIG::configure b/math/metis-edf/files/patch-CONFIG::configure deleted file mode 100644 index 5d6dfbe76dd3..000000000000 --- a/math/metis-edf/files/patch-CONFIG::configure +++ /dev/null @@ -1,60 +0,0 @@ ---- CONFIG/configure.orig Wed Jun 28 15:28:35 2006 -+++ CONFIG/configure Sat Jul 8 21:54:50 2006 -@@ -20,7 +20,7 @@ - if [ -z "$rtn" ] || [ "$rtn" = "y" -o "$rtn" = "Y" ]; then - OS_TYPE=SunOS64 - fi --elif [ $OS_TYPE != "OSF1" -a $OS_TYPE != "IRIX64" -a $OS_TYPE != "Linux" -a $OS_TYPE != "CYGWIN_NT-5.1" ]; then -+elif [ $OS_TYPE != "OSF1" -a $OS_TYPE != "IRIX64" -a $OS_TYPE != "Linux" -a $OS_TYPE != "FreeBSD" -a $OS_TYPE != "CYGWIN_NT-5.1" ]; then - echo " Operating system $OS_TYPE unknown on this distribution" - echo " Installation failed !" - exit 8 -@@ -52,6 +52,15 @@ - F90_TEMP="g77" - LD_TEMP="g77" - fi -+elif [ $OS_TYPE = "FreeBSD" ]; then -+ CC_TEMP="$CC" -+ F90_TEMP="$F77" -+ LD_TEMP="$CC -v" -+ COPTIONS_TEMP="$CFLAGS" -+ OPTFLAGS="" -+ FOPTIONS_TEMP="$FFLAGS" -+ LDOPTIONS_TEMP="$LDFLAGS -L. -L.." -+ AR_TEMP="$AR rv" - elif [ $OS_TYPE = "CYGWIN_NT-5.1" ]; then - CC_TEMP="gcc" - F90_TEMP="g77" -@@ -76,32 +85,6 @@ - if [ -f Makefile.in ]; then - rm -f Makefile.in - fi -- -- -- --if [ "$CC" != "" ] ; then -- CC_TEMP=$CC --fi --if [ "$F77" != "" ] ; then -- F90_TEMP=$F77 --fi --if [ "$LD" != "" ] ; then -- LD_TEMP=$LD --fi --if [ "$CFLAGS" != "" ] ; then -- COPTIONS_TEMP=$CFLAGS --fi --if [ "$FFLAGS" != "" ] ; then -- FOPTIONS_TEMP=$FFLAGS --fi --if [ "$LDFLAGS" != "" ] ; then -- LDOPTIONS_TEMP=$LDFLAGS --fi --if [ "$AR" != "" ] ; then -- AR_TEMP=$AR --fi -- --LDOPTIONS_TEMP="$LDOPTIONS_TEMP -L. -L.." - - cat << EOF > Makefile.in - # Generated by CONFIG/configure diff --git a/math/metis-edf/files/patch-CONFIG_onmetis.in b/math/metis-edf/files/patch-CONFIG_onmetis.in deleted file mode 100644 index e04195c98c55..000000000000 --- a/math/metis-edf/files/patch-CONFIG_onmetis.in +++ /dev/null @@ -1,26 +0,0 @@ ---- CONFIG/onmetis.in.orig 2009-12-03 11:35:06.000000000 +0100 -+++ CONFIG/onmetis.in 2010-01-31 13:41:59.000000000 +0100 -@@ -1,4 +1,4 @@ --#!/bin/bash -+#! /bin/sh - # - # shell-script to call METIS from CODE_ASTER - # $1 : data file for METIS (numerotation) -@@ -8,17 +8,8 @@ - # $3 : result file (default fort.85) - # - # install directory --set_prefix() { -- local this=`readlink -n -f $1` -- prefix=`dirname $this` --} -- --set_prefix $0 - METIS_INSTALL=$prefix - --LD_LIBRARY_PATH=LD_LIB_PATH_VALUE:$LD_LIBRARY_PATH --export LD_LIBRARY_PATH -- - repinit=`pwd` - tmp_metis=$repinit/dir_metis - diff --git a/math/metis-edf/files/patch-Lib::proto.h b/math/metis-edf/files/patch-Lib::proto.h deleted file mode 100644 index 3b423fff5ae3..000000000000 --- a/math/metis-edf/files/patch-Lib::proto.h +++ /dev/null @@ -1,12 +0,0 @@ ---- Lib/proto.h.orig Thu Dec 12 13:47:59 2002 -+++ Lib/proto.h Tue Aug 12 22:53:22 2003 -@@ -456,7 +456,9 @@ - void saxpy(long, float, float *, long, float *, long); - void RandomPermute(long, idxtype *, long); - double drand48(); -+#if !defined(__FreeBSD__) - void srand48(long); -+#endif - long ispow2(long); - void InitRandom(long); - long log2(long); diff --git a/math/metis-edf/files/patch-Lib_Makefile b/math/metis-edf/files/patch-Lib_Makefile index c6dc857c8660..690da905a2e4 100644 --- a/math/metis-edf/files/patch-Lib_Makefile +++ b/math/metis-edf/files/patch-Lib_Makefile @@ -1,20 +1,20 @@ ---- Lib/Makefile.orig 2008-12-03 05:08:03.000000000 -0500 -+++ Lib/Makefile 2013-08-13 00:53:40.000000000 -0400 +--- Lib/Makefile.orig 2012-10-02 18:12:21.000000000 +0200 ++++ Lib/Makefile 2013-08-13 22:16:53.000000000 +0200 @@ -2,7 +2,7 @@ INCLUDES = -I. --CFLAGS = $(COPTIONS) $(INCLUDES) -+CFLAGS = $(COPTIONS) $(INCLUDES) $(PICFLAG) +-CFLAGS = $(COPTIONS) $(OPTFLAGS) $(INCLUDES) ++CFLAGS = $(COPTIONS) $(OPTFLAGS) $(INCLUDES) $(PICFLAG) LD = $(CC) -L. -@@ -22,6 +22,8 @@ - +@@ -23,6 +23,8 @@ ../libmetis.a: $(OBJS) $(AR) $@ $(OBJS) -+ %%SHLIB%%$(CC) -shared $(CFLAGS) $(LDFLAGS) -o ../libmetis.so.1 $(OBJS) -lm -+ %%SHLIB%%(cd .. && ln -sf libmetis.so.1 libmetis.so) + $(RANLIB) $@ ++ $(CC) -shared $(CFLAGS) $(LDFLAGS) -o ../libmetis.so.0 $(OBJS) -lm ++ (cd .. && ln -sf libmetis.so.0 libmetis.so) clean: rm -f *.o diff --git a/math/metis-edf/files/patch-Makefile b/math/metis-edf/files/patch-Makefile new file mode 100644 index 000000000000..767e2a5afe96 --- /dev/null +++ b/math/metis-edf/files/patch-Makefile @@ -0,0 +1,30 @@ +--- Makefile.orig 2012-12-17 18:35:40.000000000 +0100 ++++ Makefile 2014-01-17 09:29:52.000000000 +0100 +@@ -16,19 +16,19 @@ + (cd Test ; make realclean ) + + prefix ?= /usr/local +-bindir ?= $(prefix)/bin +-includedir ?= $(prefix)/include +-libdir ?= $(prefix)/lib ++bindir ?= $(DESTDIR)$(prefix)/bin ++includedir ?= $(DESTDIR)$(prefix)/include/metis ++libdir ?= $(DESTDIR)$(prefix)/lib + + $(bindir) $(includedir) $(libdir): + mkdir -p $@ + +-LIBS = libmetis.a ++LIBS = libmetis.a libmetis.so libmetis.so.0 + INCS = Lib/defs.h Lib/macros.h Lib/metis.h Lib/proto.h Lib/rename.h Lib/struct.h + PRGS = kmetis mesh2dual mesh2nodal oemetis onmetis partdmesh partnmesh pmetis + +-install: $(bindir) $(includedir) $(libdir) default | $(INCS) $(LIBS) $(PRGS) +- cp $(INCS) $(includedir) +- cp $(LIBS) $(libdir) +- cp $(PRGS) $(bindir) ++install: $(bindir) $(includedir) $(libdir) $(INCS) $(LIBS) $(PRGS) ++ $(BSD_INSTALL_DATA) $(INCS) $(includedir) ++ $(BSD_INSTALL_DATA) $(LIBS) $(libdir) ++ $(BSD_INSTALL_PROGRAM) $(PRGS) $(bindir) + diff --git a/math/metis-edf/files/patch-Makefile.in b/math/metis-edf/files/patch-Makefile.in new file mode 100644 index 000000000000..559d8b7926ab --- /dev/null +++ b/math/metis-edf/files/patch-Makefile.in @@ -0,0 +1,14 @@ +--- Makefile.in.orig 2012-10-02 18:12:21.000000000 +0200 ++++ Makefile.in 2013-08-13 23:09:15.000000000 +0200 +@@ -1,9 +1,9 @@ + + # Which compiler to use +-CC = cc ++#CC = cc + + # What optimization level to use +-OPTFLAGS = -O2 ++#OPTFLAGS = -O2 + + # What options to be used by the compiler + COPTIONS = diff --git a/math/metis-edf/files/patch-Programs::Makefile b/math/metis-edf/files/patch-Programs::Makefile deleted file mode 100644 index 1ca20dcd839a..000000000000 --- a/math/metis-edf/files/patch-Programs::Makefile +++ /dev/null @@ -1,11 +0,0 @@ ---- Programs/Makefile.orig Thu Dec 22 14:13:25 2005 -+++ Programs/Makefile Mon Jan 9 22:03:11 2006 -@@ -5,7 +5,7 @@ - INCLUDES = -I../Lib - CFLAGS = $(COPTIONS) $(INCLUDES) - FFLAGS = $(FOPTIONS) $(INCLUDES) --LIBS = -lmetis -lm -+LIBS = -lmetis -lm %%FORTRANLIBS%% %%GCCLIBDIR%% - METISLIB = ../libmetis.a - - diff --git a/math/metis-edf/files/patch-Test::Makefile b/math/metis-edf/files/patch-Test::Makefile deleted file mode 100644 index 054f0f307152..000000000000 --- a/math/metis-edf/files/patch-Test::Makefile +++ /dev/null @@ -1,17 +0,0 @@ ---- Test/Makefile.orig 2008-12-03 11:08:03.000000000 +0100 -+++ Test/Makefile 2010-05-16 16:42:30.000000000 +0200 -@@ -4,12 +4,12 @@ - - vers_check: - @echo "### Test 2 : test --version option, onmetis returns :" -- (../onmetis --version ; exit 0) -+ @echo `LD_LIBRARY_PATH=.. ../onmetis.exe --version` - @echo " " - - fort.85 : fort.81 - @echo "### Test 1 : data file produced by Code_Aster" -- ../onmetis fort.81 -+ LD_LIBRARY_PATH=.. ../onmetis.exe fort.81 - @echo " " - - clean: diff --git a/math/metis-edf/files/patch-onmetis b/math/metis-edf/files/patch-onmetis deleted file mode 100644 index d8c19fd0e4f8..000000000000 --- a/math/metis-edf/files/patch-onmetis +++ /dev/null @@ -1,21 +0,0 @@ ---- onmetis.orig 2009-12-03 14:51:21.000000000 +0100 -+++ onmetis 2010-01-31 13:43:11.000000000 +0100 -@@ -1,4 +1,4 @@ --#!/bin/bash -+#! /bin/sh - # - # shell-script to call METIS from CODE_ASTER - # $1 : data file for METIS (numerotation) -@@ -8,12 +8,6 @@ - # $3 : result file (default fort.85) - # - # install directory --set_prefix() { -- local this=`readlink -n -f $1` -- prefix=`dirname $this` --} -- --set_prefix $0 - METIS_INSTALL=$prefix - - LD_LIBRARY_PATH=LD_LIB_PATH_VALUE:$LD_LIBRARY_PATH diff --git a/math/metis-edf/pkg-plist b/math/metis-edf/pkg-plist index 1a122406aede..cc336ae6acc3 100644 --- a/math/metis-edf/pkg-plist +++ b/math/metis-edf/pkg-plist @@ -1,10 +1,14 @@ bin/kmetis +bin/mesh2dual +bin/mesh2nodal +bin/oemetis bin/onmetis -bin/onmetis.exe +bin/partdmesh +bin/partnmesh bin/pmetis lib/libmetis.a -%%SHLIB%%lib/libmetis.so -%%SHLIB%%lib/libmetis.so.1 +lib/libmetis.so +lib/libmetis.so.0 include/metis/defs.h include/metis/macros.h include/metis/metis.h @@ -13,8 +17,12 @@ include/metis/rename.h include/metis/struct.h @dirrm include/metis %%PORTDOCS%%%%DOCSDIR%%/CHANGES -%%PORTDOCS%%%%DOCSDIR%%/README_Code_Aster %%PORTDOCS%%%%DOCSDIR%%/manual.ps -%%PORTEXAMPLES%%%%EXAMPLESDIR%%/fort.81 +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/0README +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/4elt.graph +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/4elt.graph.part.10 +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/metis.mesh +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/mtest +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/test.mgraph %%PORTDOCS%%@dirrm %%DOCSDIR%% %%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%% |