aboutsummaryrefslogtreecommitdiff
path: root/math/metis
diff options
context:
space:
mode:
authorMaho Nakata <maho@FreeBSD.org>2007-01-09 04:32:51 +0000
committerMaho Nakata <maho@FreeBSD.org>2007-01-09 04:32:51 +0000
commit4092e1a374776854b7f43a1222c97cad3ca1a803 (patch)
treeb0844ca62e9aaf5d906ecbd872aadc5bc2c6e972 /math/metis
parenta7aa4e15f2c0fd06cd2a64b87f6a64dd37681564 (diff)
downloadports-4092e1a374776854b7f43a1222c97cad3ca1a803.tar.gz
ports-4092e1a374776854b7f43a1222c97cad3ca1a803.zip
Notes
Diffstat (limited to 'math/metis')
-rw-r--r--math/metis/Makefile19
-rw-r--r--math/metis/pkg-plist2
2 files changed, 16 insertions, 5 deletions
diff --git a/math/metis/Makefile b/math/metis/Makefile
index 84a6d2c1cdcd..85c25085a196 100644
--- a/math/metis/Makefile
+++ b/math/metis/Makefile
@@ -22,13 +22,19 @@ PROGRAMS= graphchk kmetis mesh2dual mesh2nodal \
oemetis onmetis partnmesh partdmesh pmetis
.include <bsd.port.pre.mk>
-
-.if ${ARCH} == "amd64"
-post-configure:
- @${REINPLACE_CMD} -e 's+COPTIONS =+COPTIONS = -fPIC+;' \
- ${WRKSRC}/Makefile.in
+.if ${ARCH} == "sparc64"
+PICFLAG?= -fPIC
+.else
+PICFLAG?= -fpic
.endif
+post-patch:
+ ${MKDIR} ${WRKSRC}_SHARED ; ${CP} -r ${WRKSRC}/* ${WRKSRC}_SHARED
+
+do-build:
+ cd ${WRKSRC} ; ${MAKE}
+ cd ${WRKSRC}_SHARED ; ${SETENV} CFLAGS="${CFLAGS} ${PICFLAG}" ${MAKE} ; ld -Bshareable -o libmetis.so.1 -x -soname libmetis.so.1 --whole-archive libmetis.a
+
do-install:
.for p in ${PROGRAMS}
${INSTALL_PROGRAM} ${WRKSRC}/${p} ${PREFIX}/bin
@@ -36,6 +42,9 @@ do-install:
@${MKDIR} ${PREFIX}/include/metis
${INSTALL_DATA} ${WRKSRC}/Lib/*.h ${PREFIX}/include/metis
${INSTALL_DATA} ${WRKSRC}/libmetis.a ${PREFIX}/lib
+ ${INSTALL_DATA} ${WRKSRC}_SHARED/libmetis.so.1 ${PREFIX}/lib
+ ${LN} -sf libmetis.so.1 ${PREFIX}/lib/libmetis.so
+
.ifndef NOPORTDOCS
@${MKDIR} ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/Doc/manual.ps ${DOCSDIR}
diff --git a/math/metis/pkg-plist b/math/metis/pkg-plist
index 83491793c815..ebcb4534b1c8 100644
--- a/math/metis/pkg-plist
+++ b/math/metis/pkg-plist
@@ -8,6 +8,8 @@ bin/partdmesh
bin/partnmesh
bin/pmetis
lib/libmetis.a
+lib/libmetis.so
+lib/libmetis.so.1
include/metis/defs.h
include/metis/macros.h
include/metis/metis.h