aboutsummaryrefslogtreecommitdiffstats
path: root/math
diff options
context:
space:
mode:
authorbf <bf@FreeBSD.org>2011-09-29 02:10:37 +0800
committerbf <bf@FreeBSD.org>2011-09-29 02:10:37 +0800
commit226cbb89b25948d326d2f6ca6c7f84d9748f67bc (patch)
treef06f1486ad7de6a7fa54c459467ad0a0bc457b7d /math
parent94a7af2d453f282ea6b6fcdf430d5f18d91a1fd4 (diff)
downloadfreebsd-ports-gnome-226cbb89b25948d326d2f6ca6c7f84d9748f67bc.tar.gz
freebsd-ports-gnome-226cbb89b25948d326d2f6ca6c7f84d9748f67bc.tar.zst
freebsd-ports-gnome-226cbb89b25948d326d2f6ca6c7f84d9748f67bc.zip
avoid inconsistencies in internal symbol tables
and allow the test suite to be run after renaming by performing renaming before compilation via the preprocessor
Diffstat (limited to 'math')
-rw-r--r--math/arpack/Makefile18
1 files changed, 11 insertions, 7 deletions
diff --git a/math/arpack/Makefile b/math/arpack/Makefile
index 7214c96ccef0..f42ed82304f4 100644
--- a/math/arpack/Makefile
+++ b/math/arpack/Makefile
@@ -20,6 +20,7 @@ EXTRACT_ONLY= ${PORTNAME}${PORTVERSION}.tar.gz
MAINTAINER= bf@FreeBSD.org
COMMENT= Argand Library: large eigenvalue subroutines (serial version)
+FFLAGS+= -ffixed-line-length-none
LDFLAGS+= -L${LOCALBASE}/lib
USE_FORTRAN= yes
USE_LDCONFIG= yes
@@ -120,12 +121,17 @@ post-patch:
printf "%s\t%s\t%s%s\n%s\t%s\t%s%s\n", "#define", \
toupper($$i), "ARPACK_", toupper($$i), "#define", $$i, \
"ARPACK_", toupper($$i) \
- > "${WRKDIR}/arpack_compat_f.h" ; \
- printf "%s%s%s%s\n", $$i, "_ arpack_", $$i, "_" \
- > "${WRKDIR}/rename" } } ; \
+ > "${WRKDIR}/arpack_compat_f.h" } } ; \
END { print "\n#endif" > "${WRKDIR}/arpack_compat_c.h" ; \
print "\n#endif" > "${WRKDIR}/arpack_compat_f.h" }' -
+pre-build:
+ @${ECHO_CMD} "Renaming LAPACK functions ..."
+ @for f in `${FIND} ${WRKDIR} -type f -mindepth 2 -name '*.f'` ; do \
+ ${MV} $${f} $${f}.unproc ; \
+ ${CPP} -C -I${WRKDIR} -imacros arpack_compat_f.h -traditional-cpp \
+ $${f}.unproc $${f} ; done
+
do-build:
@cd ${WRKSRC} ; ${SETENV} ${MAKE_ENV} \
PICFLAG= home="${WRKSRC}" \
@@ -140,10 +146,8 @@ do-build:
do-install:
@${INSTALL_DATA} ${FILESDIR}/arpack.h ${WRKDIR}/arpack_compat_c.h \
${WRKDIR}/arpack_compat_f.h ${PREFIX}/include
-.for lib in /libarpack.a _SHARED/libarpack.so.1
- @${OBJCOPY} --redefine-syms ${WRKDIR}/rename ${WRKSRC}${lib}
- @${INSTALL_DATA} ${WRKSRC}${lib} ${PREFIX}/lib
-.endfor
+ @${INSTALL_DATA} ${WRKSRC}/libarpack.a ${PREFIX}/lib
+ @${INSTALL_DATA} ${WRKSRC}_SHARED/libarpack.so.1 ${PREFIX}/lib
@${LN} -sf libarpack.so.1 ${PREFIX}/lib/libarpack.so
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}