From 777e181558bea826f60358be95912ffd03190167 Mon Sep 17 00:00:00 2001 From: Pietro Cerutti Date: Fri, 14 Feb 2014 08:56:25 +0000 Subject: [PATCH] - STAGE-clean - Build a shlib version as well - Remove article from COMMENT line --- math/newmat/Makefile | 16 ++++++++++------ math/newmat/distinfo | 4 ++-- math/newmat/files/patch-nm_gnu.mak | 21 +++++++++++++++++++++ math/newmat/pkg-plist | 2 ++ 4 files changed, 35 insertions(+), 8 deletions(-) create mode 100644 math/newmat/files/patch-nm_gnu.mak diff --git a/math/newmat/Makefile b/math/newmat/Makefile index 93d5542d667d..72d47016ff26 100644 --- a/math/newmat/Makefile +++ b/math/newmat/Makefile @@ -9,18 +9,22 @@ MASTER_SITES= http://www.robertnz.net/ftp/ DISTNAME= ${PORTNAME}${PORTVERSION:S/.//} MAINTAINER= gahr@FreeBSD.org -COMMENT= A C++ matrix library +COMMENT= C++ matrix library NO_WRKSUBDIR= yes -USE_GMAKE= yes +USES= gmake +USE_LDCONFIG= yes MAKEFILE= nm_gnu.mak +CXXFLAGS+= -fPIC MAKE_ARGS= CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" ALL_TARGET= everything -NO_STAGE= yes do-install: - @${MKDIR} ${PREFIX}/include/${PORTNAME} - ${INSTALL_DATA} ${WRKSRC}/*.h ${PREFIX}/include/${PORTNAME} - ${INSTALL_DATA} ${WRKSRC}/libnewmat.a ${PREFIX}/lib + @${MKDIR} ${STAGEDIR}${PREFIX}/include/${PORTNAME} + ${INSTALL_DATA} ${WRKSRC}/*.h ${STAGEDIR}${PREFIX}/include/${PORTNAME} + ${INSTALL_DATA} ${WRKSRC}/libnewmat.a ${STAGEDIR}${PREFIX}/lib + ${INSTALL_DATA} ${WRKSRC}/libnewmat.so.1 ${STAGEDIR}${PREFIX}/lib + ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libnewmat.so.1 + ${LN} -sf libnewmath.so.1 ${STAGEDIR}${PREFIX}/lib/libnewmat.so .include diff --git a/math/newmat/distinfo b/math/newmat/distinfo index 522ab9a39c3e..7545b40301a9 100644 --- a/math/newmat/distinfo +++ b/math/newmat/distinfo @@ -1,2 +1,2 @@ -SHA256 (newmat11.tar.gz) = 723d96ecc2cf4c6987d04bb0810ce12fd22b3170ad50db2a14e7e4ef77c4ec89 -SIZE (newmat11.tar.gz) = 240888 +SHA256 (newmat11.tar.gz) = daf313a4db0db14dfcce236ad3cdc514d449e62ddd4f1b07cc31179b0787db6f +SIZE (newmat11.tar.gz) = 247137 diff --git a/math/newmat/files/patch-nm_gnu.mak b/math/newmat/files/patch-nm_gnu.mak new file mode 100644 index 000000000000..f888e00dbe73 --- /dev/null +++ b/math/newmat/files/patch-nm_gnu.mak @@ -0,0 +1,21 @@ +--- nm_gnu.mak.orig 2014-02-14 09:47:53.000000000 +0100 ++++ nm_gnu.mak 2014-02-14 09:49:32.000000000 +0100 +@@ -9,7 +9,7 @@ + %.o: %.cpp + $(CXX) $(CXXFLAGS) -c $*.cpp + +-everything: tmt example nm_ex1 nm_ex2 nm_ex3 test_exc nl_ex sl_ex garch ++everything: tmt example nm_ex1 nm_ex2 nm_ex3 test_exc nl_ex sl_ex garch libnewmat.so.1 + + newmat_lobj = newmat1.o newmat2.o newmat3.o newmat4.o newmat5.o newmat6.o newmat7.o newmat8.o newmatex.o bandmat.o submat.o myexcept.o cholesky.o evalue.o fft.o hholder.o jacobi.o newfft.o sort.o svd.o nm_misc.o newmatrm.o newmat9.o + +@@ -17,6 +17,9 @@ + $(AR) -cr $@ $(newmat_lobj) + ranlib $@ + ++libnewmat.so.1: $(newmat_lobj) ++ $(CXX) $(CXXFLAGS) -shared -Wl,-soname=$@ -o $@ $(newmat_lobj) ++ + tmt_obj = tmt.o tmt1.o tmt2.o tmt3.o tmt4.o tmt5.o tmt6.o tmt7.o tmt8.o tmt9.o tmta.o tmtb.o tmtc.o tmtd.o tmte.o tmtf.o tmtg.o tmth.o tmti.o tmtj.o tmtk.o tmtl.o tmtm.o + + tmt: $(tmt_obj) libnewmat.a diff --git a/math/newmat/pkg-plist b/math/newmat/pkg-plist index c4f155be1374..c7a45ebebfca 100644 --- a/math/newmat/pkg-plist +++ b/math/newmat/pkg-plist @@ -12,3 +12,5 @@ include/newmat/solution.h include/newmat/tmt.h @dirrm include/newmat lib/libnewmat.a +lib/libnewmat.so.1 +lib/libnewmat.so