pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

cblas: Add shared lib



Module Name:	pkgsrc-wip
Committed By:	Jason W. Bacon <bacon4000%gmail.com@localhost>
Pushed By:	outpaddling
Date:		Tue Sep 5 10:26:36 2017 -0500
Changeset:	4f557ba5e08cfa6aa6154917c561ae6c74690164

Modified Files:
	cblas/Makefile
	cblas/PLIST

Log Message:
cblas: Add shared lib

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=4f557ba5e08cfa6aa6154917c561ae6c74690164

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 cblas/Makefile | 16 +++++++++++++++-
 cblas/PLIST    |  1 +
 2 files changed, 16 insertions(+), 1 deletion(-)

diffs:
diff --git a/cblas/Makefile b/cblas/Makefile
index 01f3cdca6f..66d3c27efd 100644
--- a/cblas/Makefile
+++ b/cblas/Makefile
@@ -19,15 +19,29 @@ SUBST_CLASSES+=		libblas
 SUBST_STAGE.libblas=	post-patch
 SUBST_SED.libblas=	-e 's|libblas.a|-L${PREFIX}/lib -lblas|g'
 SUBST_SED.libblas+=	-e 's|cblas_$$(PLAT)|libcblas|g'
+SUBST_SED.libblas+=	-e 's|= -O3|+=|g'
+SUBST_SED.libblas+=	-e 's|CC =|CC ?=|g'
+SUBST_SED.libblas+=	-e 's|FC =|FC ?=|g'
 SUBST_FILES.libblas=	Makefile.in
 
+# Can't find -lssp* on NetBSD 7.0.1
+PKGSRC_USE_SSP=		no
+CFLAGS+=		-fPIC
+FFLAGS+=		-fPIC
+
 INSTALLATION_DIRS=	include lib
 
 post-extract:
 	${CP} ${WRKSRC}/Makefile.LINUX ${WRKSRC}/Makefile.in
 
+post-build:
+	${MKDIR} ${WRKSRC}/shared-lib
+	cd ${WRKSRC}/shared-lib && \
+		${AR} x ../lib/libcblas.a && \
+		${FC} -shared -o ../lib/libcblas.so *.o
+
 do-install:
-	${INSTALL_LIB} ${WRKSRC}/lib/libcblas.a ${DESTDIR}${PREFIX}/lib
+	${INSTALL_LIB} ${WRKSRC}/lib/libcblas.* ${DESTDIR}${PREFIX}/lib
 	${INSTALL_DATA} ${WRKSRC}/include/*.h ${DESTDIR}${PREFIX}/include
 
 .include "../../math/blas/buildlink3.mk"
diff --git a/cblas/PLIST b/cblas/PLIST
index f3140e9c7c..010f10c953 100644
--- a/cblas/PLIST
+++ b/cblas/PLIST
@@ -2,3 +2,4 @@
 include/cblas.h
 include/cblas_f77.h
 lib/libcblas.a
+lib/libcblas.so


Home | Main Index | Thread Index | Old Index