aboutsummaryrefslogtreecommitdiffstats
path: root/math/blacs
diff options
context:
space:
mode:
authormaho <maho@FreeBSD.org>2007-03-09 08:54:46 +0800
committermaho <maho@FreeBSD.org>2007-03-09 08:54:46 +0800
commitba1589e71522d7e09abc02ad8aefcac55b92d3a5 (patch)
treeb8099fc6c127c3b2c81447d20e6598e5199e39b2 /math/blacs
parentd1100d22bcb5a947c9e0557c6f93fa6d07a9b619 (diff)
downloadfreebsd-ports-gnome-ba1589e71522d7e09abc02ad8aefcac55b92d3a5.tar.gz
freebsd-ports-gnome-ba1589e71522d7e09abc02ad8aefcac55b92d3a5.tar.zst
freebsd-ports-gnome-ba1589e71522d7e09abc02ad8aefcac55b92d3a5.zip
* Install shared libs as well.
* Bump port revision.
Diffstat (limited to 'math/blacs')
-rw-r--r--math/blacs/Makefile47
-rw-r--r--math/blacs/pkg-plist6
2 files changed, 46 insertions, 7 deletions
diff --git a/math/blacs/Makefile b/math/blacs/Makefile
index fd058d8a45ca..0252932c7abd 100644
--- a/math/blacs/Makefile
+++ b/math/blacs/Makefile
@@ -7,7 +7,7 @@
PORTNAME= blacs
PORTVERSION= 1.7
-PORTREVISION= 5
+PORTREVISION= 6
CATEGORIES= math
MASTER_SITES= ftp://ftp.netlib.org/blacs/
DISTNAME= BLACS
@@ -36,11 +36,13 @@ BUILD_DEPENDS= ${LOCALBASE}/mpi/openmpi/lib/libmpi.so:${PORTSDIR}/net/openmpi
RUN_DEPENDS= ${LOCALBASE}/mpi/openmpi/bin/mpirun:${PORTSDIR}/net/openmpi
EXTRA_PATCHES+= ${FILESDIR}/Bmake.inc-openmpi.diff
.else
-BUILD_DEPENDS= ${LOCALBASE}/mpich2/lib/libmpich.a:${PORTSDIR}/net/mpich2
+LIB_DEPENDS= mpich:${PORTSDIR}/net/mpich2
RUN_DEPENDS= ${LOCALBASE}/mpich2/bin/mpirun:${PORTSDIR}/net/mpich2
EXTRA_PATCHES+= ${FILESDIR}/Bmake.inc-mpich.diff
.endif
+USE_LDCONFIG= yes
+
WANT_FORTRAN= yes #dummy but future use
BUILD_DEPENDS+= gfortran42:${PORTSDIR}/lang/gcc42
FC= gfortran42
@@ -50,6 +52,17 @@ USE_GMAKE=yes
F77EXTRAFLAGS= #-w -fno-globals -fugly-complex
DEBUG_LEVEL= 0
+.if ${ARCH} == "sparc64" || ${ARCH} == "amd64"
+FPIC= -fPIC
+.else
+FPIC= -fpic
+.endif
+
+WRKSRC_SHARED=${WRKSRC}_shared
+CFLAGS_SHARED=${CFLAGS} ${FPIC}
+FFLAGS_SHARED=${CFLAGS} ${FPIC}
+SVERSION=1
+
.if defined(WITH_OPTIMIZED_FLAGS)
.if ${ARCH} == "amd64"
FFLAGS+= -pipe -O3 -ffast-math -funroll-all-loops -fpeel-loops -ftracer -funswitch-loops -funit-at-a-time
@@ -66,23 +79,43 @@ CFLAGS+= -O3 -ffast-math -finline-functions -fomit-frame-pointer -funroll-loops
pre-patch:
(${CP} ${WRKSRC}/BMAKES/Bmake.MPI-LINUX ${WRKSRC}/Bmake.inc)
+post-patch:
+ ${CP} -r ${WRKSRC} ${WRKSRC_SHARED}
+
pre-configure:
(${REINPLACE_CMD} -e 's,@WRKSRC@,${WRKSRC},g ; s,@DEBUG_LEVEL@,${DEBUG_LEVEL},g ; s,@LOCALBASE@,${LOCALBASE},g ; s,@CC@,${CC},g ; s,@CFLAGS@,${CFLAGS},g ; s,@F77@,${F77},g ; s,@FFLAGS@,${FFLAGS},g ; s,@F77EXTRAFLAGS@,${F77EXTRAFLAGS},g ; s, ARCH *.= ar, ARCMD = ar,' ${WRKSRC}/Bmake.inc)
+ (${REINPLACE_CMD} -e 's,@WRKSRC@,${WRKSRC_SHARED},g ; s,@DEBUG_LEVEL@,${DEBUG_LEVEL},g ; s,@LOCALBASE@,${LOCALBASE},g ; s,@CC@,${CC},g ; s,@CFLAGS@,${CFLAGS_SHARED},g ; s,@F77@,${F77},g ; s,@FFLAGS@,${FFLAGS_SHARED},g ; s,@F77EXTRAFLAGS@,${F77EXTRAFLAGS},g ; s, ARCH *.= ar, ARCMD = ar,' ${WRKSRC_SHARED}/Bmake.inc)
${REINPLACE_CMD} -e 's|\$$(ARCH)|$$(ARCMD)|' ${WRKSRC}/SRC/MPI/Makefile
-.if ${OSVERSION} < 500000
- ${REINPLACE_CMD} -e 's|F77LOADFLAGS = |F77LOADFLAGS = ${PTHREAD_LIBS}|' ${WRKSRC}/Bmake.inc
-.endif
+ ${REINPLACE_CMD} -e 's|\$$(ARCH)|$$(ARCMD)|' ${WRKSRC_SHARED}/SRC/MPI/Makefile
do-build:
(cd ${WRKSRC}; make mpi; make tester)
-# (cd ${WRKSRC}_SHARED; make mpi; make tester)
+ (cd ${WRKSRC_SHARED}; make mpi; make tester)
+
+post-build:
+ ${RM} -rf ${WRKDIR}/tmp_shared
+ ${MKDIR} ${WRKDIR}/tmp_shared
+ ${FIND} ${WRKSRC_SHARED} -name "*\.a" -exec ${MV} {} ${WRKDIR}/tmp_shared \;
+ cd ${WRKDIR}/tmp_shared ; for i in `ls *.a | ${SED} 's/\.a//' `; do \
+ ld -Bshareable -o $${i}.so.${SVERSION} -x -soname $${i}.so.${SVERSION} --whole-archive $${i}.a ;\
+ ${LN} -s $${i}.so.${SVERSION} $${i}.so ;\
+ done
do-install:
${INSTALL_DATA} ${WRKSRC}/LIB/blacsCinit_MPI-FreeBSD-${DEBUG_LEVEL}.a ${PREFIX}/lib/libblacsc.a
${INSTALL_DATA} ${WRKSRC}/LIB/blacsF77init_MPI-FreeBSD-${DEBUG_LEVEL}.a ${PREFIX}/lib/libblacsf77.a
${INSTALL_DATA} ${WRKSRC}/LIB/blacs_MPI-FreeBSD-${DEBUG_LEVEL}.a ${PREFIX}/lib/libblacs.a
+
+ ${INSTALL_DATA} ${WRKDIR}/tmp_shared/blacsCinit_MPI-FreeBSD-${DEBUG_LEVEL}.so.${SVERSION} ${PREFIX}/lib/libblacsc.so.${SVERSION}
+ ${INSTALL_DATA} ${WRKDIR}/tmp_shared/blacsF77init_MPI-FreeBSD-${DEBUG_LEVEL}.so.${SVERSION} ${PREFIX}/lib/libblacsf77.so.${SVERSION}
+ ${INSTALL_DATA} ${WRKDIR}/tmp_shared/blacs_MPI-FreeBSD-${DEBUG_LEVEL}.so.${SVERSION} ${PREFIX}/lib/libblacs.so.${SVERSION}
+
+ ${INSTALL_DATA} ${WRKDIR}/tmp_shared/blacsCinit_MPI-FreeBSD-${DEBUG_LEVEL}.so ${PREFIX}/lib/libblacsc.so
+ ${INSTALL_DATA} ${WRKDIR}/tmp_shared/blacsF77init_MPI-FreeBSD-${DEBUG_LEVEL}.so ${PREFIX}/lib/libblacsf77.so
+ ${INSTALL_DATA} ${WRKDIR}/tmp_shared/blacs_MPI-FreeBSD-${DEBUG_LEVEL}.so ${PREFIX}/lib/libblacs.so
+
${MKDIR} ${PREFIX}/share/BLACS/TESTING
- ( cd ${WRKSRC}/TESTING/EXE ; \
+ ( cd ${WRKSRC_SHARED}/TESTING/EXE ; \
${INSTALL_PROGRAM} xCbtest_MPI-FreeBSD-${DEBUG_LEVEL} ${PREFIX}/share/BLACS/TESTING/xCbtest_MPI-FreeBSD; \
${INSTALL_PROGRAM} xFbtest_MPI-FreeBSD-${DEBUG_LEVEL} ${PREFIX}/share/BLACS/TESTING/xFbtest_MPI-FreeBSD; \
${INSTALL_DATA} bsbr.dat ${PREFIX}/share/BLACS/TESTING; \
diff --git a/math/blacs/pkg-plist b/math/blacs/pkg-plist
index 2556d919ba49..92656554f035 100644
--- a/math/blacs/pkg-plist
+++ b/math/blacs/pkg-plist
@@ -1,6 +1,12 @@
lib/libblacs.a
lib/libblacsc.a
lib/libblacsf77.a
+lib/libblacs.so
+lib/libblacs.so.1
+lib/libblacsc.so
+lib/libblacsc.so.1
+lib/libblacsf77.so
+lib/libblacsf77.so.1
share/BLACS/TESTING/xCbtest_MPI-FreeBSD
share/BLACS/TESTING/xFbtest_MPI-FreeBSD
share/BLACS/TESTING/bsbr.dat