aboutsummaryrefslogtreecommitdiffstats
path: root/net/pvm
diff options
context:
space:
mode:
authorwen <wen@FreeBSD.org>2010-02-24 11:14:08 +0800
committerwen <wen@FreeBSD.org>2010-02-24 11:14:08 +0800
commitdccd7a1db4380441261132bbeb23238167126e7f (patch)
tree6d33049d801d524604ef0f9d9914cc26487a38e0 /net/pvm
parent6b79a2c360aa2ddc5ec699d91e7a89977eca9a33 (diff)
downloadfreebsd-ports-gnome-dccd7a1db4380441261132bbeb23238167126e7f.tar.gz
freebsd-ports-gnome-dccd7a1db4380441261132bbeb23238167126e7f.tar.zst
freebsd-ports-gnome-dccd7a1db4380441261132bbeb23238167126e7f.zip
- Make the port build and install shared libraries
PR: ports/143866 Submitted by: Rob Farmer <rfarmer@predatorlabs.net> Feature safe: yes
Diffstat (limited to 'net/pvm')
-rw-r--r--net/pvm/Makefile11
-rw-r--r--net/pvm/files/patch-pvmgs-Makefile.aimk95
-rw-r--r--net/pvm/pkg-plist4
3 files changed, 108 insertions, 2 deletions
diff --git a/net/pvm/Makefile b/net/pvm/Makefile
index 81832faeb9b2..f4448c51b081 100644
--- a/net/pvm/Makefile
+++ b/net/pvm/Makefile
@@ -7,6 +7,7 @@
PORTNAME= pvm
PORTVERSION= 3.4.6
+PORTREVISION= 1
CATEGORIES= net parallel
MASTER_SITES= http://www.netlib.org/pvm3/ \
ftp://ftp.chg.ru/pub/prog/parallel/pvm3/
@@ -26,10 +27,11 @@ PLIST_SUB+= X11=''
.endif
USE_FORTRAN= yes
+USE_LDCONFIG= yes
WRKSRC= ${WRKDIR}/pvm3
-MAKE_ENV+= PVM_ROOT=${WRKSRC} ARCHCFLAGS="${CFLAGS}"
-ALL_TARGET= all install
+MAKE_ENV+= PVM_ROOT=${WRKSRC} SHAREDLDFLAGS="-lgfortran -shared"
+ALL_TARGET= all shared install
PVM_ROOT= ${PREFIX}/lib/pvm
REINPLACE_ARGS= -i ""
MAKE_JOBS_UNSAFE=yes
@@ -115,6 +117,7 @@ SUB_FILES= pkg-message
.include <bsd.port.pre.mk>
pre-patch:
+ @${REINPLACE_CMD} -e 's|$$(ARCHCFLAGS)|$$(ARCHCFLAGS) -fPIC|g' ${WRKSRC}/src/Makefile.aimk
@${REINPLACE_CMD} -e 's,<malloc.h>,<stdlib.h>,' \
${WRKSRC}/tracer/tracer.h ${WRKSRC}/tracer/trclib.h \
${WRKSRC}/tracer/trcsort.c
@@ -138,6 +141,10 @@ do-install:
@ ${INSTALL_DATA} ${WRKSRC}/lib/FREEBSD/libfpvm3.a ${PREFIX}/lib
@ ${INSTALL_DATA} ${WRKSRC}/lib/FREEBSD/libgpvm3.a ${PREFIX}/lib
@ ${INSTALL_DATA} ${WRKSRC}/lib/FREEBSD/libpvmtrc.a ${PREFIX}/lib
+ @ ${INSTALL_DATA} ${WRKSRC}/lib/FREEBSD/libpvm3.so ${PREFIX}/lib
+ @ ${INSTALL_DATA} ${WRKSRC}/lib/FREEBSD/libpvm3.so ${PREFIX}/lib/libpvm3.so.3
+ @ ${INSTALL_DATA} ${WRKSRC}/lib/FREEBSD/libgpvm3.so ${PREFIX}/lib
+ @ ${INSTALL_DATA} ${WRKSRC}/lib/FREEBSD/libgpvm3.so ${PREFIX}/lib/libgpvm3.so.3
@ ${INSTALL_DATA} ${WRKSRC}/conf/FREEBSD.def ${PVM_ROOT}/conf
@ ${INSTALL_DATA} ${WRKSRC}/include/* ${PREFIX}/include
cd ${WRKSRC}/man/man1 && ${INSTALL_MAN} ${MAN1} ${PREFIX}/man/man1
diff --git a/net/pvm/files/patch-pvmgs-Makefile.aimk b/net/pvm/files/patch-pvmgs-Makefile.aimk
new file mode 100644
index 000000000000..8ac3e5338ddc
--- /dev/null
+++ b/net/pvm/files/patch-pvmgs-Makefile.aimk
@@ -0,0 +1,95 @@
+Index: pvmgs/Makefile.aimk
+===================================================================
+--- pvmgs/Makefile.aimk
++++ pvmgs/Makefile.aimk
+@@ -45,13 +45,13 @@ PROGS = $(PVMXDIR)/pvm_gstat$(EXESFX) \
+
+ LPROGS = $(PVMLDIR)/pvmgs$(EXESFX)
+
+-LIBGPVM = $(LIBPREFIX)gpvm3.a
++LIBGPVM = $(LIBPREFIX)gpvm3
+
+ install: all
+
+ install-mpp: all-mpp
+
+-all: $(DIRS) $(PROGS) $(PVMLDIR)/$(LIBGPVM) $(LPROGS)
++all: $(DIRS) $(PROGS) $(PVMLDIR)/$(LIBGPVM).a $(PVMLDIR)/$(LIBGPVM).so $(LPROGS)
+
+ all-mpp: $(DIRS) $(PROGS) $(PVMLDIR)/$(LIBGPVM)-mpp $(LPROGS)
+
+@@ -71,40 +71,57 @@ $(PVMXDIR)/pvmgs$(EXESFX): pvmgs$(EXESF
+ $(PVMXDIR)/pvmgroups$(EXESFX): pvmgroups$(EXESFX)
+ cp pvmgroups$(EXESFX) $(PVMXDIR)
+
+-$(PVMLDIR)/$(LIBGPVM): $(LIBGPVM)
+- cp $(LIBGPVM) $(PVMLDIR)
+- case x$(HASRANLIB) in xt ) echo ranlib; ranlib $(PVMLDIR)/$(LIBGPVM) ;; esac
++$(PVMLDIR)/$(LIBGPVM).a: $(LIBGPVM).a
++ cp $(LIBGPVM).a $(PVMLDIR)
++ case x$(HASRANLIB) in xt ) echo ranlib; ranlib $(PVMLDIR)/$(LIBGPVM).a ;; esac
+
+ $(PVMLDIR)/$(LIBGPVM)-mpp: $(LIBGPVM)-mpp
+- cp $(LIBGPVM) $(PVMLDIR)
+- case x$(HASRANLIB) in xt ) echo ranlib; ranlib $(PVMLDIR)/$(LIBGPVM) ;; esac
++ cp $(LIBGPVM).a $(PVMLDIR)
++ case x$(HASRANLIB) in xt ) echo ranlib; ranlib $(PVMLDIR)/$(LIBGPVM).a ;; esac
+ touch $(PVMLDIR)/$(LIBGPVM)-mpp
+
++$(PVMLDIR)/$(LIBGPVM).so: $(LIBGPVM).so
++ cp $(LIBGPVM).so $(PVMLDIR)
++
+ $(PVMLDIR)/pvmgs$(EXESFX): pvmgs$(EXESFX)
+ cp pvmgs$(EXESFX) $(PVMLDIR)
+
+-pvmgroups$(EXESFX): pvmgroups.o $(LIBGPVM) $(PVMLIBDEP)
+- $(CC) $(CFLAGS) -o $@ pvmgroups.o $(LIBGPVM) $(LIBS)
++pvmgroups$(EXESFX): pvmgroups.o $(LIBGPVM).a $(PVMLIBDEP)
++ $(CC) $(CFLAGS) -o $@ pvmgroups.o $(LIBGPVM).a $(LIBS)
+
+ pvmgs$(EXESFX): $(DOBJ) $(PVMLIBDEP)
+ $(CC) $(CFLAGS) -o $@ $(DOBJ) $(LIBS)
+
+-$(LIBGPVM): $(LOBJ)
+- rm -f $(LIBGPVM)
+- $(AR) cr $(LIBGPVM) $(LOBJ)
+- case x$(HASRANLIB) in xt ) echo ranlib; ranlib $(LIBGPVM) ;; esac
++$(LIBGPVM).a:
++ echo -------------------------------
++ echo --- Building static Library ---
++ echo -------------------------------
++ rm -f $(LIBGPVM).a $(LOBJ)
++ pwd
++ cd .. && ../lib/aimk CFLOPTS='$(CFLOPTS)' $(LOBJ)
++ $(AR) cr $(LIBGPVM).a $(LOBJ)
++ case x$(HASRANLIB) in xt ) echo ranlib; ranlib $(LIBGPVM).a ;; esac
++
++$(LIBGPVM).so:
++ echo -------------------------------
++ echo --- Building shared Library ---
++ echo -------------------------------
++ rm -f $(LIBGPVM).a $(LOBJ)
++ pwd
++ cd .. && ../lib/aimk CFLOPTS='-fPIC $(CFLOPTS)' $(LOBJ)
++ $(CC) -shared -Wl,-soname,libgpvm3.so.3 -o $(LIBGPVM).so $(LOBJ) -lc
+
+ $(LIBGPVM)-mpp: $(LOBJ)
+- rm -f $(LIBGPVM)
+- $(AR_FRONT) cr $(LIBGPVM) $(LOBJ)
+- case x$(HASRANLIB) in xt ) echo ranlib; ranlib $(LIBGPVM) ;; esac
++ rm -f $(LIBGPVM).a
++ $(AR_FRONT) cr $(LIBGPVM).a $(LOBJ)
++ case x$(HASRANLIB) in xt ) echo ranlib; ranlib $(LIBGPVM).a ;; esac
+ touch $(LIBGPVM)-mpp
+
+-pvm_gstat$(EXESFX): pvm_gstat.o $(LIBGPVM) $(PVMLIBDEP)
+- $(CC) $(CFLAGS) -o $@ pvm_gstat.o $(LIBGPVM) $(LIBS)
++pvm_gstat$(EXESFX): pvm_gstat.o $(LIBGPVM).a $(PVMLIBDEP)
++ $(CC) $(CFLAGS) -o $@ pvm_gstat.o $(LIBGPVM).a $(LIBS)
+
+ clean:
+- rm -f $(DOBJ) $(LOBJ) pvmgs$(EXESFX) $(LIBGPVM) \
++ rm -f $(DOBJ) $(LOBJ) pvmgs$(EXESFX) $(LIBGPVM).a \
+ pvm_gstat.o pvmgroups.o pvm_gstat$(EXESFX) pvmgroups$(EXESFX)
+
+ tidy:
diff --git a/net/pvm/pkg-plist b/net/pvm/pkg-plist
index f6b4d21fc472..2f681b3797f1 100644
--- a/net/pvm/pkg-plist
+++ b/net/pvm/pkg-plist
@@ -67,6 +67,10 @@ lib/libpvm3.a
lib/libpvmtrc.a
lib/libfpvm3.a
lib/libgpvm3.a
+lib/libpvm3.so
+lib/libpvm3.so.3
+lib/libgpvm3.so
+lib/libgpvm3.so.3
@dirrm lib/pvm/lib/FREEBSD
@dirrm lib/pvm/lib
@dirrm lib/pvm/conf