aboutsummaryrefslogtreecommitdiff
path: root/math/suitesparse
diff options
context:
space:
mode:
authorMaho Nakata <maho@FreeBSD.org>2006-11-19 03:42:27 +0000
committerMaho Nakata <maho@FreeBSD.org>2006-11-19 03:42:27 +0000
commita86e0b5741cd261c87ea274b92c1fc9c5b66d969 (patch)
tree9f6c446099fb7d93783996f66a39d38b0c6006fe /math/suitesparse
parentc85d89f2cc9cee08e6c4f41e958ca0a27dcdfe88 (diff)
downloadports-a86e0b5741cd261c87ea274b92c1fc9c5b66d969.tar.gz
ports-a86e0b5741cd261c87ea274b92c1fc9c5b66d969.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
Notes
Notes: svn path=/head/; revision=177552
Diffstat (limited to 'math/suitesparse')
-rw-r--r--math/suitesparse/Makefile21
-rw-r--r--math/suitesparse/files/patch-CSparse+Source+Makefile11
-rw-r--r--math/suitesparse/files/patch-CXSparse+Source+Makefile11
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