aboutsummaryrefslogtreecommitdiffstats
path: root/math
diff options
context:
space:
mode:
authormaho <maho@FreeBSD.org>2007-01-09 12:32:51 +0800
committermaho <maho@FreeBSD.org>2007-01-09 12:32:51 +0800
commit79361ec9163ccfd86441270f879ec448da87ef9e (patch)
tree966a9a7a20aacd7c5aafe412d499871c9a6e832a /math
parentdbf1fc07e13097bd6bb8ebe9979290634c1b1f02 (diff)
downloadfreebsd-ports-graphics-79361ec9163ccfd86441270f879ec448da87ef9e.tar.gz
freebsd-ports-graphics-79361ec9163ccfd86441270f879ec448da87ef9e.tar.zst
freebsd-ports-graphics-79361ec9163ccfd86441270f879ec448da87ef9e.zip
Install shared lib as well.
Diffstat (limited to 'math')
-rw-r--r--math/metis/Makefile19
-rw-r--r--math/metis/pkg-plist2
-rw-r--r--math/metis4/Makefile19
-rw-r--r--math/metis4/pkg-plist2
4 files changed, 32 insertions, 10 deletions
diff --git a/math/metis/Makefile b/math/metis/Makefile
index 84a6d2c1cdc..85c25085a19 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 83491793c81..ebcb4534b1c 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
diff --git a/math/metis4/Makefile b/math/metis4/Makefile
index 84a6d2c1cdc..85c25085a19 100644
--- a/math/metis4/Makefile
+++ b/math/metis4/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/metis4/pkg-plist b/math/metis4/pkg-plist
index 83491793c81..ebcb4534b1c 100644
--- a/math/metis4/pkg-plist
+++ b/math/metis4/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