diff options
author | thierry <thierry@FreeBSD.org> | 2010-05-24 21:59:02 +0800 |
---|---|---|
committer | thierry <thierry@FreeBSD.org> | 2010-05-24 21:59:02 +0800 |
commit | 8eac25bad8dfc48f052d3f8895d9b7091e9ebb80 (patch) | |
tree | 23da5e18b1b6aa6d12ee66c804b7c71fd4128c40 | |
parent | 0f30a8a0716d523c40aebc728139e8ad3cb4a481 (diff) | |
download | freebsd-ports-gnome-8eac25bad8dfc48f052d3f8895d9b7091e9ebb80.tar.gz freebsd-ports-gnome-8eac25bad8dfc48f052d3f8895d9b7091e9ebb80.tar.zst freebsd-ports-gnome-8eac25bad8dfc48f052d3f8895d9b7091e9ebb80.zip |
Don't try to build a shared library on != i386, it fails.
Reported by: QAT
-rw-r--r-- | math/metis-edf/Makefile | 22 | ||||
-rw-r--r-- | math/metis-edf/files/patch-Lib_Makefile | 4 | ||||
-rw-r--r-- | math/metis-edf/pkg-plist | 4 |
3 files changed, 22 insertions, 8 deletions
diff --git a/math/metis-edf/Makefile b/math/metis-edf/Makefile index bfbdaa857db3..668c5061d8b1 100644 --- a/math/metis-edf/Makefile +++ b/math/metis-edf/Makefile @@ -29,7 +29,6 @@ MAKE_JOBS_UNSAFE= yes REINPLACE_ARGS= -i "" USE_FORTRAN= yes -USE_LDCONFIG= yes FFLAGS+= -O2 PICFLAG?= -fPIC @@ -38,10 +37,19 @@ WRKSRC= ${WRKDIR}/${PORTNAME:C/-/_/}-${PORTVERSION:R} PROGS= kmetis onmetis.exe pmetis DOCS= CHANGES Doc/manual.ps README_Code_Aster -MACHINEARCH= ${ARCH} FORTRANLIBS= -lgfortranbegin -lgfortran GCCLIBDIR= -L`${CAT} ${WRKSRC}/LIBDIR` -L`${CAT} ${WRKSRC}/LIBDIR`/../../.. +.include <bsd.port.pre.mk> + +MACHINEARCH= ${ARCH} +.if ${ARCH} == "i386" +USE_LDCONFIG= yes +PLIST_SUB+= SHLIB="" +.else +PLIST_SUB+= SHLIB="@comment " +.endif + post-extract: (cd ${WRKDIR} && \ ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${EXTRACT_WRKSRC}/${PORTNAME:C/-/_/}-${DISTVERSION}${DISTVERSIONSUFFIX}${EXTRACT_SUFX} ${EXTRACT_AFTER_ARGS}) @@ -54,6 +62,9 @@ pre-configure: -e "s|\(%[[:digit:]]\)ld|\1d|g" \ -e "s|\(%[[:digit:]]\.[[:digit:]]\)le|\1e|g" \ -e "s|%ld|%d|g" + ${REINPLACE_CMD} -e 's|%%SHLIB%%|#|' ${WRKSRC}/Lib/Makefile +.else + ${REINPLACE_CMD} -e 's|%%SHLIB%%||' ${WRKSRC}/Lib/Makefile .endif ${DIRNAME} `${FC} -print-libgcc-file-name` > ${WRKSRC}/LIBDIR ${REINPLACE_CMD} -e 's|%%FORTRANLIBS%%|${FORTRANLIBS}|g' -e 's|%%GCCLIBDIR%%|${GCCLIBDIR}|g'\ @@ -69,8 +80,11 @@ do-install: ${INSTALL_SCRIPT} ${WRKSRC}/onmetis ${PREFIX}/bin ${REINPLACE_CMD} -e 's|${WRKSRC}|${PREFIX}/bin|' ${PREFIX}/bin/onmetis ${INSTALL_PROGRAM} ${PROGS:S|^|${WRKSRC}/|} ${PREFIX}/bin - ${INSTALL_DATA} ${WRKSRC}/libmetis.a ${WRKSRC}/libmetis.so ${PREFIX}/lib + ${INSTALL_DATA} ${WRKSRC}/libmetis.a ${PREFIX}/lib +.if ${MACHINEARCH} == "i386" + ${INSTALL_DATA} ${WRKSRC}/libmetis.so ${PREFIX}/lib ${INSTALL_PROGRAM} ${WRKSRC}/libmetis.so.1 ${PREFIX}/lib +.endif post-install: .if !defined(NOPORTDOCS) @@ -86,4 +100,4 @@ post-install: @${ECHO_MSG} "===> Test file installed in ${EXAMPLESDIR}." .endif -.include <bsd.port.mk> +.include <bsd.port.post.mk> diff --git a/math/metis-edf/files/patch-Lib_Makefile b/math/metis-edf/files/patch-Lib_Makefile index 7b4f5707515d..7729cd8e605a 100644 --- a/math/metis-edf/files/patch-Lib_Makefile +++ b/math/metis-edf/files/patch-Lib_Makefile @@ -13,8 +13,8 @@ ../libmetis.a: $(OBJS) $(AR) $@ $(OBJS) -+ $(LD) -Wl,-Bshareable -Wl,-o,../libmetis.so.1 -Wl,-x -Wl,-soname,libmetis.so.1 -Wl,--whole-archive ../libmetis.a -Wl,-no-whole-archive -+ (cd .. && ln -sf libmetis.so.1 libmetis.so) ++ %%SHLIB%%$(LD) -Wl,-Bshareable -Wl,-o,../libmetis.so.1 -Wl,-x -Wl,-soname,libmetis.so.1 -Wl,--whole-archive ../libmetis.a -Wl,-no-whole-archive ++ %%SHLIB%%(cd .. && ln -sf libmetis.so.1 libmetis.so) clean: rm -f *.o diff --git a/math/metis-edf/pkg-plist b/math/metis-edf/pkg-plist index 2df8337770dd..1a122406aede 100644 --- a/math/metis-edf/pkg-plist +++ b/math/metis-edf/pkg-plist @@ -3,8 +3,8 @@ bin/onmetis bin/onmetis.exe bin/pmetis lib/libmetis.a -lib/libmetis.so -lib/libmetis.so.1 +%%SHLIB%%lib/libmetis.so +%%SHLIB%%lib/libmetis.so.1 include/metis/defs.h include/metis/macros.h include/metis/metis.h |