pkgsrc-WIP-changes archive

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

lapack, lapacke, blas, cblas: Clean up Makefiles and share version.mk



Module Name:	pkgsrc-wip
Committed By:	Jason Bacon <bacon%NetBSD.org@localhost>
Pushed By:	outpaddling
Date:		Thu Feb 27 10:54:20 2020 -0600
Changeset:	5f780d66a24fe05953eeecfd5e25af5ca024f8a9

Modified Files:
	blas/Makefile
	cblas/Makefile
	lapack/Makefile
	lapack/Makefile.common
	lapacke/Makefile
Added Files:
	lapack/version.mk

Log Message:
lapack, lapacke, blas, cblas: Clean up Makefiles and share version.mk

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

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

diffstat:
 blas/Makefile          |  4 ++--
 cblas/Makefile         |  6 +++---
 lapack/Makefile        |  4 ++--
 lapack/Makefile.common | 18 +++++++++++-------
 lapack/version.mk      |  3 +++
 lapacke/Makefile       |  6 +++---
 6 files changed, 24 insertions(+), 17 deletions(-)

diffs:
diff --git a/blas/Makefile b/blas/Makefile
index 6963606b24..d109f86bb6 100644
--- a/blas/Makefile
+++ b/blas/Makefile
@@ -7,8 +7,7 @@
 # until everyone uses mk/blas.buildlink3.mk (and people removed
 # math/blas from their pkgsrc-related scripts).
 
-PKGNAME=	blas-3.9.0
-PKGREVISION=	1
+PKGNAME=	blas-${NETLIB_BLAS_VERSION}
 CATEGORIES=	math
 
 MAINTAINER=	thomas.orgis%uni-hamburg.de@localhost
@@ -20,6 +19,7 @@ USE_LIBTOOL=	yes
 
 META_PACKAGE=	yes
 
+.include "../../wip/lapack/version.mk"
 .include "../../wip/lapack/buildlink3.mk"
 
 .include "../../mk/bsd.pkg.mk"
diff --git a/cblas/Makefile b/cblas/Makefile
index a314007ae9..0de20cb602 100644
--- a/cblas/Makefile
+++ b/cblas/Makefile
@@ -1,8 +1,8 @@
 # $NetBSD$
 
-COMMENT=	C interface to a BLAS library
-LAPACK_PART=	cblas
-LAPACK_PART_CMAKE_ARGS=	\
+COMMENT=		C interface to a BLAS library
+LAPACK_COMPONENT=	cblas
+LAPACK_COMPONENT_CMAKE_ARGS=	\
 	-DUSE_OPTIMIZED_BLAS=ON \
 	-DBLAS_LIBRARIES=${BLAS_LIBS:Q} \
 	-DUSE_OPTIMIZED_LAPACK=ON \
diff --git a/lapack/Makefile b/lapack/Makefile
index c5b8c8b238..9668c84a31 100644
--- a/lapack/Makefile
+++ b/lapack/Makefile
@@ -3,8 +3,8 @@
 MAINTAINER=	thomas.orgis%uni-hamburg.de@localhost
 COMMENT=	Linear Algebra PACKage (Netlib reference code)
 
-LAPACK_PART=	lapack
-LAPACK_PART_CMAKE_ARGS= \
+LAPACK_COMPONENT=	lapack
+LAPACK_COMPONENT_CMAKE_ARGS= \
 	-DUSE_OPTIMIZED_BLAS=OFF \
 	-DUSE_OPTIMIZED_LAPACK=OFF \
 	-DCBLAS=OFF -DLAPACKE=OFF
diff --git a/lapack/Makefile.common b/lapack/Makefile.common
index 1452b0e0a2..a52b8c56ad 100644
--- a/lapack/Makefile.common
+++ b/lapack/Makefile.common
@@ -4,14 +4,15 @@
 # used by wip/lapack/Makefile
 
 # Common Makefile for packages derived from the Netlib LAPACK sources.
-# You set LAPACK_PART (lowercase) and LAPACK_PART_CMAKE_ARGS to choose
-# the library to install.
+# Package Makefile sets LAPACK_COMPONENT and LAPACK_COMPONENT_CMAKE_ARGS to
+# choose the library to install.
+# LAPACK_COMPONENT can be "lapack", "lapacke", or "cblas"
 
-PORTVERSION=	3.9.0
-DISTNAME=	lapack-${PORTVERSION}
-PKGNAME=	${LAPACK_PART}-${PORTVERSION}
+DISTNAME=	lapack-${NETLIB_BLAS_VERSION}
+PKGNAME=	${LAPACK_COMPONENT}-${NETLIB_BLAS_VERSION}
 CATEGORIES=	math
-MASTER_SITES=	-https://github.com/Reference-LAPACK/lapack/archive/v${PORTVERSION}.tar.gz
+MASTER_SITES=	${MASTER_SITE_GITHUB:=Reference-LAPACK/}
+GITHUB_TAG=	v${NETLIB_BLAS_VERSION}
 
 HOMEPAGE=	https://www.netlib.org/lapack/
 LICENSE=	modified-bsd
@@ -23,6 +24,7 @@ DISTINFO_FILE=	${.CURDIR}/../../wip/lapack/distinfo
 USE_LANGUAGES=		c fortran
 USE_CMAKE=		yes
 
+WRKSRC=			${WRKDIR}/${DISTNAME}
 CONFIGURE_DIRS=		build
 CMAKE_ARG_PATH=		${WRKSRC}
 
@@ -31,7 +33,9 @@ CMAKE_ARG_PATH=		${WRKSRC}
 CMAKE_ARGS=	-DBUILD_DEPRECATED=ON \
 		-DBUILD_SHARED_LIBS=ON \
 		-DBUILD_STATIC_LIBS=ON \
-		${LAPACK_PART_CMAKE_ARGS}
+		${LAPACK_COMPONENT_CMAKE_ARGS}
+
+.include "../../wip/lapack/version.mk"
 
 post-extract:
 	${RUN} mkdir -p ${WRKSRC}/build
diff --git a/lapack/version.mk b/lapack/version.mk
new file mode 100644
index 0000000000..00ee810518
--- /dev/null
+++ b/lapack/version.mk
@@ -0,0 +1,3 @@
+# $NetBSD$
+
+NETLIB_BLAS_VERSION=	3.9.0
diff --git a/lapacke/Makefile b/lapacke/Makefile
index 3be824324f..9cb1b4dc5f 100644
--- a/lapacke/Makefile
+++ b/lapacke/Makefile
@@ -1,8 +1,8 @@
 # $NetBSD$
 
-COMMENT=	C interface to a LAPACK library
-LAPACK_PART=	lapacke
-LAPACK_PART_CMAKE_ARGS=	\
+COMMENT=		C interface to a LAPACK library
+LAPACK_COMPONENT=	lapacke
+LAPACK_COMPONENT_CMAKE_ARGS=	\
 	-DUSE_OPTIMIZED_BLAS=ON \
 	-DBLAS_LIBRARIES=${BLAS_LIBS:Q} \
 	-DUSE_OPTIMIZED_LAPACK=ON \


Home | Main Index | Thread Index | Old Index