diff options
author | maho <maho@FreeBSD.org> | 2006-11-19 11:42:27 +0800 |
---|---|---|
committer | maho <maho@FreeBSD.org> | 2006-11-19 11:42:27 +0800 |
commit | 1bdef5cfcd4cbbf3afe91a2eb98a5fc9d5620b18 (patch) | |
tree | f31b0c0eeb3e26a5724743a4bd299b71bb1b4cbe | |
parent | 2d54cfc398450d9fbc5b4ad1546822747b39c791 (diff) | |
download | freebsd-ports-gnome-1bdef5cfcd4cbbf3afe91a2eb98a5fc9d5620b18.tar.gz freebsd-ports-gnome-1bdef5cfcd4cbbf3afe91a2eb98a5fc9d5620b18.tar.zst freebsd-ports-gnome-1bdef5cfcd4cbbf3afe91a2eb98a5fc9d5620b18.zip |
Workaround build failure of octave-devel for
amd64. Passing -fPIC even though we build static lib.
A correct fix for this might be building shared libs
too.
PR: 105058
-rw-r--r-- | math/suitesparse/Makefile | 21 | ||||
-rw-r--r-- | math/suitesparse/files/patch-CSparse+Source+Makefile | 11 | ||||
-rw-r--r-- | math/suitesparse/files/patch-CXSparse+Source+Makefile | 11 |
3 files changed, 40 insertions, 3 deletions
diff --git a/math/suitesparse/Makefile b/math/suitesparse/Makefile index a633f0d9d64a..726143a87c9c 100644 --- a/math/suitesparse/Makefile +++ b/math/suitesparse/Makefile @@ -7,7 +7,7 @@ PORTNAME= suitesparse PORTVERSION= 2.1.1 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= math MASTER_SITES= http://www.cise.ufl.edu/research/sparse/SuiteSparse/current/ DISTNAME= SuiteSparse @@ -20,6 +20,17 @@ CONFLICTS= elmer-umfpack-4* BUILD_DEPENDS= ${LOCALBASE}/lib/libmetis.a:${PORTSDIR}/math/metis +.include <bsd.port.pre.mk> + +.if ${ARCH} == "sparc64" || ${ARCH} == "amd64" +FPIC= -fPIC +.else +FPIC= -fpic +.endif + +CFLAGS+= ${FPIC} +FFLAGS+= ${FPIC} + .if defined(WITH_BLAS) LIB_DEPENDS+= blas.1:${PORTSDIR}/math/blas BLAS= -L${LOCALBASE}/lib -lblas @@ -44,7 +55,11 @@ post-patch: -e 's,%%LAPACK%%,${LAPACK},g' \ -e 's,%%LOCALBASE%%,${LOCALBASE},g' \ ${WRKSRC}/UFconfig/UFconfig.mk -do-install: + @${REINPLACE_CMD} -e 's,%%CC%%,${CC},g' \ + -e 's,%%CFLAGS%%,${CFLAGS},g' \ + ${WRKSRC}/CSparse/Source/Makefile \ + ${WRKSRC}/CXSparse/Source/Makefile +do-install: ${MKDIR} ${PREFIX}/include/suitesparse ${LN} -sf ${PREFIX}/include/suitesparse ${PREFIX}/include/ufsparse ${INSTALL_DATA} ${WRKSRC}/UFconfig/UFconfig.h ${PREFIX}/include/suitesparse @@ -67,4 +82,4 @@ do-install: ${INSTALL_DATA} ${WRKSRC}/CAMD/Lib/libcamd.a ${PREFIX}/lib ${INSTALL_DATA} ${WRKSRC}/CXSparse/Source/libcxsparse.a ${PREFIX}/lib -.include <bsd.port.mk> +.include <bsd.port.post.mk> diff --git a/math/suitesparse/files/patch-CSparse+Source+Makefile b/math/suitesparse/files/patch-CSparse+Source+Makefile new file mode 100644 index 000000000000..e950c0252964 --- /dev/null +++ b/math/suitesparse/files/patch-CSparse+Source+Makefile @@ -0,0 +1,11 @@ +--- CSparse/Source/Makefile.old Sun Nov 19 11:34:50 2006 ++++ CSparse/Source/Makefile Sun Nov 19 11:35:02 2006 +@@ -1,6 +1,6 @@ + # Modify the "-O" optimization option for best performance (-O3 on Linux): +-CC = cc +-CFLAGS = -O ++CC = %%CC%% ++CFLAGS = %%CFLAGS%% + + AR = ar cr + RANLIB = ranlib diff --git a/math/suitesparse/files/patch-CXSparse+Source+Makefile b/math/suitesparse/files/patch-CXSparse+Source+Makefile new file mode 100644 index 000000000000..b3fb3ed84fee --- /dev/null +++ b/math/suitesparse/files/patch-CXSparse+Source+Makefile @@ -0,0 +1,11 @@ +--- CXSparse/Source/Makefile~ Sun Nov 19 11:43:12 2006 ++++ CXSparse/Source/Makefile Sun Nov 19 11:43:48 2006 +@@ -1,6 +1,6 @@ + # Modify the "-O" optimization option for best performance (-O3 on Linux): +-CC = cc +-CFLAGS = -O ++CC = %%CC%% ++CFLAGS = %%CFLAGS%% + I = -I../../UFconfig + + AR = ar cr |