summaryrefslogtreecommitdiff
path: root/parallel/pvm3
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2002-09-30 22:18:55 +0000
committerjlam <jlam@pkgsrc.org>2002-09-30 22:18:55 +0000
commit7a55cc271442d734727306da817a9589493d0957 (patch)
treeaf674777c7008efa622155d33ce89365455adb7d /parallel/pvm3
parentefdc57cd983dcaa336982ba0c5059e6cfeacfdf9 (diff)
downloadpkgsrc-7a55cc271442d734727306da817a9589493d0957.tar.gz
Use buildlink2, and provide a makefile fragment arch.mk to set PVM_ARCH to
the correct value. arch.mk can be used by other Makefiles or by buildlink2.mk files to find the PVM libraries and binaries.
Diffstat (limited to 'parallel/pvm3')
-rw-r--r--parallel/pvm3/Makefile82
-rw-r--r--parallel/pvm3/PLIST124
-rw-r--r--parallel/pvm3/arch.mk29
3 files changed, 136 insertions, 99 deletions
diff --git a/parallel/pvm3/Makefile b/parallel/pvm3/Makefile
index 4c5ee817d03..2370090c3b8 100644
--- a/parallel/pvm3/Makefile
+++ b/parallel/pvm3/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.23 2002/08/08 09:40:38 dmcmahill Exp $
+# $NetBSD: Makefile,v 1.24 2002/09/30 22:18:55 jlam Exp $
DISTNAME= pvm3.4.3
PKGNAME= pvm-3.4.3
@@ -17,15 +17,19 @@ DEPENDS+= {openssh-[0-9]*,ssh{,6}-1.2.27*}:../../security/ssh
PVM_SSH?= ${LOCALBASE}/bin/ssh
.endif
+USE_BUILDLINK2= yes
USE_FORTRAN= yes
USE_X11= yes
+
WRKSRC= ${WRKDIR}/pvm3
PVM_ROOT= ${WRKSRC}
MAKE_ENV+= PVM_ROOT=${WRKSRC}
MAKE_ENV+= PVM_ARCH=
MAKE_ENV+= SSH=${PVM_SSH}
ALL_TARGET= all install
-PLIST_SRC= ${WRKDIR}/PLIST-src
+
+# Set PVM_ARCH to the correct value for this machine platform.
+.include "arch.mk"
PVM_DIR= ${PREFIX}/pvm3
@@ -34,41 +38,45 @@ post-patch:
${RM} -f ${WRKSRC}/lib/pvmgetarch.orig
do-install:
- PVM_ARCH=`${PVM_ROOT}/lib/pvmgetarch` ; export PVM_ARCH ;\
- ${INSTALL_PROGRAM_DIR} ${PVM_DIR}/bin/$$PVM_ARCH ;\
- ${INSTALL_PROGRAM} ${WRKSRC}/bin/$$PVM_ARCH/* ${PVM_DIR}/bin/$$PVM_ARCH ;\
- ${INSTALL_DATA_DIR} ${PVM_DIR}/conf ;\
- ${INSTALL_DATA} ${WRKSRC}/conf/$$PVM_ARCH.def ${PVM_DIR}/conf ;\
- ${INSTALL_DATA} ${WRKSRC}/conf/$$PVM_ARCH.m4 ${PVM_DIR}/conf ;\
- ${INSTALL_DATA_DIR} ${PVM_DIR}/examples ;\
- ${INSTALL_DATA} ${WRKSRC}/examples/*.c ${PVM_DIR}/examples ;\
- ${INSTALL_DATA} ${WRKSRC}/examples/*.f ${PVM_DIR}/examples ;\
- ${INSTALL_DATA} ${WRKSRC}/examples/Readme ${PVM_DIR}/examples ;\
- ${INSTALL_DATA} ${WRKSRC}/examples/Makefile.aimk ${PVM_DIR}/examples ;\
- ${INSTALL_DATA_DIR} ${PVM_DIR}/gexamples ;\
- ${INSTALL_DATA} ${WRKSRC}/gexamples/*.c ${PVM_DIR}/gexamples ;\
- ${INSTALL_DATA} ${WRKSRC}/gexamples/*.f ${PVM_DIR}/gexamples ;\
- ${INSTALL_DATA} ${WRKSRC}/gexamples/Readme ${PVM_DIR}/gexamples ;\
- ${INSTALL_DATA} ${WRKSRC}/gexamples/Makefile.aimk ${PVM_DIR}/gexamples ;\
- ${INSTALL_DATA} ${WRKSRC}/gexamples/Makefile ${PVM_DIR}/gexamples ;\
- ${INSTALL_DATA_DIR} ${PVM_DIR}/include ;\
- ${INSTALL_DATA} ${WRKSRC}/include/* ${PVM_DIR}/include ;\
- ${INSTALL_PROGRAM_DIR} ${PVM_DIR}/lib/$$PVM_ARCH ;\
- ${INSTALL_PROGRAM} ${WRKSRC}/lib/$$PVM_ARCH/pvm* ${PVM_DIR}/lib/$$PVM_ARCH ;\
- ${INSTALL_DATA} ${WRKSRC}/lib/$$PVM_ARCH/*.a ${PVM_DIR}/lib/$$PVM_ARCH ;\
- for f in `ls ${WRKSRC}/lib` ; do \
- if [ -f ${WRKSRC}/lib/$$f ]; then \
- ${INSTALL_SCRIPT} ${WRKSRC}/lib/$$f ${PVM_DIR}/lib ;\
- fi ;\
- done ;\
- ${INSTALL_MAN_DIR} ${PREFIX}/man/man1 ;\
- ${INSTALL_MAN_DIR} ${PREFIX}/man/man3 ;\
- ${INSTALL_MAN} ${WRKSRC}/man/man1/* ${PREFIX}/man/man1 ;\
- ${INSTALL_MAN} ${WRKSRC}/man/man3/* ${PREFIX}/man/man3 ;\
- ${RM} ${PREFIX}/man/man1/PVM.1 ;\
- ${LN} -s ${PREFIX}/man/man1/pvm_intro.1 ${PREFIX}/man/man1/PVM.1
+ ${INSTALL_PROGRAM_DIR} ${PVM_DIR}/bin/${PVM_ARCH}
+ ${INSTALL_PROGRAM} ${WRKSRC}/bin/${PVM_ARCH}/* \
+ ${PVM_DIR}/bin/${PVM_ARCH}
+
+ ${INSTALL_DATA_DIR} ${PVM_DIR}/conf
+ ${INSTALL_DATA} ${WRKSRC}/conf/${PVM_ARCH}.def ${PVM_DIR}/conf
+ ${INSTALL_DATA} ${WRKSRC}/conf/${PVM_ARCH}.m4 ${PVM_DIR}/conf
+
+ ${INSTALL_DATA_DIR} ${PVM_DIR}/examples
+ ${INSTALL_DATA} ${WRKSRC}/examples/*.c ${PVM_DIR}/examples
+ ${INSTALL_DATA} ${WRKSRC}/examples/*.f ${PVM_DIR}/examples
+ ${INSTALL_DATA} ${WRKSRC}/examples/Readme ${PVM_DIR}/examples
+ ${INSTALL_DATA} ${WRKSRC}/examples/Makefile.aimk ${PVM_DIR}/examples
-post-install:
- ${SED} "s/@pvmarch@/`${PVM_ROOT}/lib/pvmgetarch`/g" < ${PKGDIR}/PLIST > ${PLIST_SRC}
+ ${INSTALL_DATA_DIR} ${PVM_DIR}/gexamples
+ ${INSTALL_DATA} ${WRKSRC}/gexamples/*.c ${PVM_DIR}/gexamples
+ ${INSTALL_DATA} ${WRKSRC}/gexamples/*.f ${PVM_DIR}/gexamples
+ ${INSTALL_DATA} ${WRKSRC}/gexamples/Readme ${PVM_DIR}/gexamples
+ ${INSTALL_DATA} ${WRKSRC}/gexamples/Makefile.aimk ${PVM_DIR}/gexamples
+ ${INSTALL_DATA} ${WRKSRC}/gexamples/Makefile ${PVM_DIR}/gexamples
+
+ ${INSTALL_DATA_DIR} ${PVM_DIR}/include
+ ${INSTALL_DATA} ${WRKSRC}/include/* ${PVM_DIR}/include
+
+ ${INSTALL_PROGRAM_DIR} ${PVM_DIR}/lib/${PVM_ARCH}
+ ${INSTALL_PROGRAM} ${WRKSRC}/lib/${PVM_ARCH}/pvm* \
+ ${PVM_DIR}/lib/${PVM_ARCH}
+ ${INSTALL_DATA} ${WRKSRC}/lib/${PVM_ARCH}/*.a ${PVM_DIR}/lib/${PVM_ARCH}
+ for f in `${LS} -1 ${WRKSRC}/lib`; do \
+ if [ -f ${WRKSRC}/lib/$$f ]; then \
+ ${INSTALL_SCRIPT} ${WRKSRC}/lib/$$f ${PVM_DIR}/lib; \
+ fi; \
+ done
+
+ ${INSTALL_MAN_DIR} ${PREFIX}/man/man1
+ ${INSTALL_MAN_DIR} ${PREFIX}/man/man3
+ ${INSTALL_MAN} ${WRKSRC}/man/man1/* ${PREFIX}/man/man1
+ ${INSTALL_MAN} ${WRKSRC}/man/man3/* ${PREFIX}/man/man3
+ ${RM} ${PREFIX}/man/man1/PVM.1
+ ${LN} -s ${PREFIX}/man/man1/pvm_intro.1 ${PREFIX}/man/man1/PVM.1
.include "../../mk/bsd.pkg.mk"
diff --git a/parallel/pvm3/PLIST b/parallel/pvm3/PLIST
index 6e18b587d0a..9ac91a2eeba 100644
--- a/parallel/pvm3/PLIST
+++ b/parallel/pvm3/PLIST
@@ -1,56 +1,56 @@
-@comment $NetBSD: PLIST,v 1.1 2001/10/31 22:58:23 zuntum Exp $
-pvm3/bin/@pvmarch@/dbwtest
-pvm3/bin/@pvmarch@/fgexample
-pvm3/bin/@pvmarch@/fmaster1
-pvm3/bin/@pvmarch@/frsg
-pvm3/bin/@pvmarch@/fslave1
-pvm3/bin/@pvmarch@/fspmd
-pvm3/bin/@pvmarch@/ge
-pvm3/bin/@pvmarch@/gexamp
-pvm3/bin/@pvmarch@/gexample
-pvm3/bin/@pvmarch@/gmbi
-pvm3/bin/@pvmarch@/gs
-pvm3/bin/@pvmarch@/hello
-pvm3/bin/@pvmarch@/hello_other
-pvm3/bin/@pvmarch@/hitc
-pvm3/bin/@pvmarch@/hitc_slave
-pvm3/bin/@pvmarch@/ibwtest
-pvm3/bin/@pvmarch@/inherit1
-pvm3/bin/@pvmarch@/inherit2
-pvm3/bin/@pvmarch@/inherit3
-pvm3/bin/@pvmarch@/inherita
-pvm3/bin/@pvmarch@/inheritb
-pvm3/bin/@pvmarch@/joinleave
-pvm3/bin/@pvmarch@/lmbi
-pvm3/bin/@pvmarch@/master1
-pvm3/bin/@pvmarch@/mhf_server
-pvm3/bin/@pvmarch@/mhf_tickle
-pvm3/bin/@pvmarch@/mtile
-pvm3/bin/@pvmarch@/pbwtest
-pvm3/bin/@pvmarch@/pvm_gstat
-pvm3/bin/@pvmarch@/pvmgroups
-pvm3/bin/@pvmarch@/pvmgs
-pvm3/bin/@pvmarch@/rbwtest
-pvm3/bin/@pvmarch@/rme
-pvm3/bin/@pvmarch@/slave1
-pvm3/bin/@pvmarch@/spmd
-pvm3/bin/@pvmarch@/srm
-pvm3/bin/@pvmarch@/task0
-pvm3/bin/@pvmarch@/task1
-pvm3/bin/@pvmarch@/task_end
-pvm3/bin/@pvmarch@/thb
-pvm3/bin/@pvmarch@/timing
-pvm3/bin/@pvmarch@/timing_slave
-pvm3/bin/@pvmarch@/tjf
-pvm3/bin/@pvmarch@/tjl
-pvm3/bin/@pvmarch@/tnb
-pvm3/bin/@pvmarch@/tracer
-pvm3/bin/@pvmarch@/trcsort
-pvm3/bin/@pvmarch@/trsg
-pvm3/bin/@pvmarch@/tst
-pvm3/bin/@pvmarch@/xep
-pvm3/conf/@pvmarch@.def
-pvm3/conf/@pvmarch@.m4
+@comment $NetBSD: PLIST,v 1.2 2002/09/30 22:18:55 jlam Exp $
+pvm3/bin/${PVM_ARCH}/dbwtest
+pvm3/bin/${PVM_ARCH}/fgexample
+pvm3/bin/${PVM_ARCH}/fmaster1
+pvm3/bin/${PVM_ARCH}/frsg
+pvm3/bin/${PVM_ARCH}/fslave1
+pvm3/bin/${PVM_ARCH}/fspmd
+pvm3/bin/${PVM_ARCH}/ge
+pvm3/bin/${PVM_ARCH}/gexamp
+pvm3/bin/${PVM_ARCH}/gexample
+pvm3/bin/${PVM_ARCH}/gmbi
+pvm3/bin/${PVM_ARCH}/gs
+pvm3/bin/${PVM_ARCH}/hello
+pvm3/bin/${PVM_ARCH}/hello_other
+pvm3/bin/${PVM_ARCH}/hitc
+pvm3/bin/${PVM_ARCH}/hitc_slave
+pvm3/bin/${PVM_ARCH}/ibwtest
+pvm3/bin/${PVM_ARCH}/inherit1
+pvm3/bin/${PVM_ARCH}/inherit2
+pvm3/bin/${PVM_ARCH}/inherit3
+pvm3/bin/${PVM_ARCH}/inherita
+pvm3/bin/${PVM_ARCH}/inheritb
+pvm3/bin/${PVM_ARCH}/joinleave
+pvm3/bin/${PVM_ARCH}/lmbi
+pvm3/bin/${PVM_ARCH}/master1
+pvm3/bin/${PVM_ARCH}/mhf_server
+pvm3/bin/${PVM_ARCH}/mhf_tickle
+pvm3/bin/${PVM_ARCH}/mtile
+pvm3/bin/${PVM_ARCH}/pbwtest
+pvm3/bin/${PVM_ARCH}/pvm_gstat
+pvm3/bin/${PVM_ARCH}/pvmgroups
+pvm3/bin/${PVM_ARCH}/pvmgs
+pvm3/bin/${PVM_ARCH}/rbwtest
+pvm3/bin/${PVM_ARCH}/rme
+pvm3/bin/${PVM_ARCH}/slave1
+pvm3/bin/${PVM_ARCH}/spmd
+pvm3/bin/${PVM_ARCH}/srm
+pvm3/bin/${PVM_ARCH}/task0
+pvm3/bin/${PVM_ARCH}/task1
+pvm3/bin/${PVM_ARCH}/task_end
+pvm3/bin/${PVM_ARCH}/thb
+pvm3/bin/${PVM_ARCH}/timing
+pvm3/bin/${PVM_ARCH}/timing_slave
+pvm3/bin/${PVM_ARCH}/tjf
+pvm3/bin/${PVM_ARCH}/tjl
+pvm3/bin/${PVM_ARCH}/tnb
+pvm3/bin/${PVM_ARCH}/tracer
+pvm3/bin/${PVM_ARCH}/trcsort
+pvm3/bin/${PVM_ARCH}/trsg
+pvm3/bin/${PVM_ARCH}/tst
+pvm3/bin/${PVM_ARCH}/xep
+pvm3/conf/${PVM_ARCH}.def
+pvm3/conf/${PVM_ARCH}.m4
pvm3/examples/Makefile.aimk
pvm3/examples/Readme
pvm3/examples/bwtest.c
@@ -121,13 +121,13 @@ pvm3/lib/pvmgetarch
pvm3/lib/pvmgetarch.cmd
pvm3/lib/pvmtmparch
pvm3/lib/xpvm
-pvm3/lib/@pvmarch@/libfpvm3.a
-pvm3/lib/@pvmarch@/libgpvm3.a
-pvm3/lib/@pvmarch@/libpvm3.a
-pvm3/lib/@pvmarch@/libpvmtrc.a
-pvm3/lib/@pvmarch@/pvm
-pvm3/lib/@pvmarch@/pvmd3
-pvm3/lib/@pvmarch@/pvmgs
+pvm3/lib/${PVM_ARCH}/libfpvm3.a
+pvm3/lib/${PVM_ARCH}/libgpvm3.a
+pvm3/lib/${PVM_ARCH}/libpvm3.a
+pvm3/lib/${PVM_ARCH}/libpvmtrc.a
+pvm3/lib/${PVM_ARCH}/pvm
+pvm3/lib/${PVM_ARCH}/pvmd3
+pvm3/lib/${PVM_ARCH}/pvmgs
man/man1/PVM.1
man/man1/aimk.1
man/man1/pvm.1
@@ -311,12 +311,12 @@ man/man3/pvmftidtoh.3
man/man3/pvmftrecv.3
man/man3/pvmfunpack.3
man/man3/pvmfupkmesg.3
-@dirrm pvm3/bin/@pvmarch@
+@dirrm pvm3/bin/${PVM_ARCH}
@dirrm pvm3/bin
@dirrm pvm3/conf
@dirrm pvm3/examples
@dirrm pvm3/gexamples
@dirrm pvm3/include
-@dirrm pvm3/lib/@pvmarch@
+@dirrm pvm3/lib/${PVM_ARCH}
@dirrm pvm3/lib
@dirrm pvm3
diff --git a/parallel/pvm3/arch.mk b/parallel/pvm3/arch.mk
new file mode 100644
index 00000000000..2228c7d4259
--- /dev/null
+++ b/parallel/pvm3/arch.mk
@@ -0,0 +1,29 @@
+.include "../../mk/bsd.prefs.mk"
+
+.if ${OPSYS} == "NetBSD"
+_PVM_OPSYS= NETBSD
+_PVM_ARCH!= ${ECHO} ${MACHINE_ARCH} | ${TR} [a-z] [A-Z]
+.elif ${OPSYS} == "Linux"
+_PVM_OPSYS= LINUX
+. if !empty(MACHINE_ARCH:Marm*)
+_PVM_ARCH= ALPHA
+. elif !empty(MACHINE_ARCH:Msparc*)
+_PVM_ARCH= SPARC
+. elif !empty(MACHINE_ARCH:Mhp_pa*)
+_PVM_ARCH= HPPA
+. elif !empty(MACHINE_ARCH:Mppc*)
+_PVM_ARCH= PPC
+. else
+_PVM_ARCH= # empty
+. endif
+.elif ${OPSYS} == "SunOS"
+_PVM_OPSYS= SUN4
+_PVM_ARCH= SOL2 # Solaris (SunOS 5.*)
+.else
+_PVM_OPSYS= UNKNOWN
+_PVM_ARCH= # empty
+.endif
+
+PVM_ARCH= ${_PVM_OPSYS}${_PVM_ARCH}
+PLIST_SUBST+= PVM_ARCH=${PVM_ARCH}
+FILES_SUBST+= PVM_ARCH=${PVM_ARCH}