aboutsummaryrefslogtreecommitdiff
path: root/math/metis-edf
diff options
context:
space:
mode:
authorThierry Thomas <thierry@FreeBSD.org>2010-05-19 18:59:17 +0000
committerThierry Thomas <thierry@FreeBSD.org>2010-05-19 18:59:17 +0000
commit6668894f5da4aa19ded597fa77aa9313043c87f4 (patch)
tree561e626bc2f324207e99e2e3e24621735792d280 /math/metis-edf
parentd7274c2b1d685b7cf0c6b339e31ca94d2fc9e58d (diff)
downloadports-6668894f5da4aa19ded597fa77aa9313043c87f4.tar.gz
ports-6668894f5da4aa19ded597fa77aa9313043c87f4.zip
Notes
Diffstat (limited to 'math/metis-edf')
-rw-r--r--math/metis-edf/Makefile16
-rw-r--r--math/metis-edf/files/patch-Lib_Makefile20
-rw-r--r--math/metis-edf/files/patch-Test::Makefile14
-rw-r--r--math/metis-edf/pkg-plist9
4 files changed, 52 insertions, 7 deletions
diff --git a/math/metis-edf/Makefile b/math/metis-edf/Makefile
index d27ed72c0ac5..d6fe9ce77d1a 100644
--- a/math/metis-edf/Makefile
+++ b/math/metis-edf/Makefile
@@ -9,7 +9,7 @@ PORTNAME= metis-edf
DISTVERSIONPREFIX= full-src-
DISTVERSION= 4.1-2
DISTVERSIONSUFFIX= .noarch
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= math
MASTER_SITES= http://www.code-aster.org/V2/UPLOAD/DOC/Telechargement/
DISTNAME= aster-${DISTVERSIONPREFIX}${ASTER_DISTVERSION}${DISTVERSIONSUFFIX}
@@ -24,11 +24,12 @@ ASTER_DISTVERSION= ${ASTER_VER}-4
EXTRACT_WRKSRC= ${WRKDIR}/aster-${DISTVERSIONPREFIX}${ASTER_VER}/SRC
ALL_TARGET= default
-MAKE_ENV+= AR="${AR}"
+MAKE_ENV+= AR="${AR}" PICFLAG="${PICFLAG}"
MAKE_JOBS_UNSAFE= yes
REINPLACE_ARGS= -i ""
USE_FORTRAN= yes
+USE_LDCONFIG= yes
FFLAGS+= -O2
WRKSRC= ${WRKDIR}/${PORTNAME:C/-/_/}-${PORTVERSION:R}
@@ -42,6 +43,12 @@ GCCLIBDIR= -L`${CAT} ${WRKSRC}/LIBDIR` -L`${CAT} ${WRKSRC}/LIBDIR`/../../..
.include <bsd.port.pre.mk>
+.if ${ARCH} == "sparc64"
+PICFLAG?= -fPIC
+.else
+PICFLAG?= -fpic
+.endif
+
post-extract:
(cd ${WRKDIR} && \
${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${EXTRACT_WRKSRC}/${PORTNAME:C/-/_/}-${DISTVERSION}${DISTVERSIONSUFFIX}${EXTRACT_SUFX} ${EXTRACT_AFTER_ARGS})
@@ -62,12 +69,15 @@ pre-configure:
${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
+ ${INSTALL_DATA} ${WRKSRC}/libmetis.a ${WRKSRC}/libmetis.so ${PREFIX}/lib
+ ${INSTALL_PROGRAM} ${WRKSRC}/libmetis.so.1 ${PREFIX}/lib
post-install:
.if !defined(NOPORTDOCS)
diff --git a/math/metis-edf/files/patch-Lib_Makefile b/math/metis-edf/files/patch-Lib_Makefile
new file mode 100644
index 000000000000..7b4f5707515d
--- /dev/null
+++ b/math/metis-edf/files/patch-Lib_Makefile
@@ -0,0 +1,20 @@
+--- Lib/Makefile.orig 2008-12-03 11:08:03.000000000 +0100
++++ Lib/Makefile 2010-05-16 16:33:40.000000000 +0200
+@@ -2,7 +2,7 @@
+
+ INCLUDES = -I.
+
+-CFLAGS = $(COPTIONS) $(INCLUDES)
++CFLAGS = $(COPTIONS) $(INCLUDES) $(PICFLAG)
+ LD = $(CC) -L.
+
+
+@@ -22,6 +22,8 @@
+
+ ../libmetis.a: $(OBJS)
+ $(AR) $@ $(OBJS)
++ $(LD) -Wl,-Bshareable -Wl,-o,../libmetis.so.1 -Wl,-x -Wl,-soname,libmetis.so.1 -Wl,--whole-archive ../libmetis.a -Wl,-no-whole-archive
++ (cd .. && ln -sf libmetis.so.1 libmetis.so)
+
+ clean:
+ rm -f *.o
diff --git a/math/metis-edf/files/patch-Test::Makefile b/math/metis-edf/files/patch-Test::Makefile
index 85f5ddecfed0..054f0f307152 100644
--- a/math/metis-edf/files/patch-Test::Makefile
+++ b/math/metis-edf/files/patch-Test::Makefile
@@ -1,11 +1,17 @@
---- Test/Makefile.orig Thu Dec 12 13:47:59 2002
-+++ Test/Makefile Sun Jun 29 16:00:25 2003
-@@ -4,7 +4,7 @@
+--- 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 `../onmetis --version`
++ @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/pkg-plist b/math/metis-edf/pkg-plist
index c7edb5cb8833..2df8337770dd 100644
--- a/math/metis-edf/pkg-plist
+++ b/math/metis-edf/pkg-plist
@@ -3,6 +3,15 @@ bin/onmetis
bin/onmetis.exe
bin/pmetis
lib/libmetis.a
+lib/libmetis.so
+lib/libmetis.so.1
+include/metis/defs.h
+include/metis/macros.h
+include/metis/metis.h
+include/metis/proto.h
+include/metis/rename.h
+include/metis/struct.h
+@dirrm include/metis
%%PORTDOCS%%%%DOCSDIR%%/CHANGES
%%PORTDOCS%%%%DOCSDIR%%/README_Code_Aster
%%PORTDOCS%%%%DOCSDIR%%/manual.ps