pkgsrc-WIP-changes archive

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

cblas-ng, lapack-ng: merged Makefiles, moved patches to lapack-ng



Module Name:	pkgsrc-wip
Committed By:	Dr. Thomas Orgis <thomas.orgis%uni-hamburg.de@localhost>
Pushed By:	thor
Date:		Sat Mar 23 11:00:27 2019 +0100
Changeset:	37aae93baa35f4370e6ff7439fdb413f614ec312

Modified Files:
	cblas-ng/DESCR
	cblas-ng/Makefile
	lapack-ng/Makefile
	lapack-ng/PLIST
	lapack-ng/distinfo
Added Files:
	lapack-ng/Makefile.common
	lapack-ng/patches/patch-CMakeLists.txt
Removed Files:
	cblas-ng/distinfo
	cblas-ng/patches/patch-CMakeLists.txt

Log Message:
cblas-ng, lapack-ng: merged Makefiles, moved patches to lapack-ng

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

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

diffstat:
 cblas-ng/DESCR                         | 15 ++--------
 cblas-ng/Makefile                      | 32 ++------------------
 cblas-ng/distinfo                      |  7 -----
 cblas-ng/patches/patch-CMakeLists.txt  | 55 ----------------------------------
 lapack-ng/Makefile                     | 49 +++++-------------------------
 lapack-ng/Makefile.common              | 41 +++++++++++++++++++++++++
 lapack-ng/PLIST                        |  8 ++---
 lapack-ng/distinfo                     |  1 +
 lapack-ng/patches/patch-CMakeLists.txt | 55 ++++++++++++++++++++++++++++++++++
 9 files changed, 113 insertions(+), 150 deletions(-)

diffs:
diff --git a/cblas-ng/DESCR b/cblas-ng/DESCR
index 086bc12090..e3232c7f03 100644
--- a/cblas-ng/DESCR
+++ b/cblas-ng/DESCR
@@ -1,13 +1,2 @@
-LAPACK is a highly portable Fortran 77 library which provides routines
-for solving systems of simultaneous linear equations, least-squares
-solutions of linear systems of equations, eigenvalue problems, and
-singular value problems. The associated matrix factorizations (LU,
-Cholesky, QR, SVD, Schur, generalized Schur) are also provided, as are
-related computations such as reordering of the Schur factorizations
-and estimating condition numbers. Dense and banded matrices are
-handled, but not general sparse matrices. In all areas, similar
-functionality is provided for real and complex matrices, in both
-single and double precision.
-
-This package delivers only the base BLAS and LAPACK libraries from
-the Netlib reference code (not the C wrappers).
+This is the C wrapper to the Basic Linear Algebra Support library
+(CBLAS), extracted from the Netlib reference implementation of LAPACK.
diff --git a/cblas-ng/Makefile b/cblas-ng/Makefile
index c36f53c92c..324539bc84 100644
--- a/cblas-ng/Makefile
+++ b/cblas-ng/Makefile
@@ -1,5 +1,6 @@
 # $NetBSD$
 
+COMMENT=	C interface to a BLAS library
 LAPACK_PART=	cblas
 LAPACK_PART_CMAKE_ARGS=	\
 	-DUSE_OPTIMIZED_BLAS=ON \
@@ -8,33 +9,4 @@ LAPACK_PART_CMAKE_ARGS=	\
 	-DLAPACK_LIBRARIES="-llapack" \
 	-DCBLAS=ON -DLAPACKE=OFF
 
-# To-be Makefile.common
-PORTVERSION=    3.8.0
-DISTNAME=	lapack-${PORTVERSION}
-PKGNAME=        ${LAPACK_PART}-ng-${PORTVERSION}
-PKGREVISION=	1
-CATEGORIES=	math
-MASTER_SITES=	${MASTER_SITE_NETLIB:=lapack/}
-EXTRACT_SUFX=	.tar.gz
-
-MAINTAINER=	thomas.orgis%uni-hamburg.de@localhost
-HOMEPAGE=	http://www.netlib.org/lapack/
-LICENSE=	modified-bsd
-
-USE_LANGUAGES=		c fortran
-USE_TOOLS+=		cmake
-USE_CMAKE=		yes
-
-WRKSRC=			${WRKDIR}/${DISTNAME}
-CONFIGURE_DIRS=		${WRKDIR}/build
-CMAKE_ARG_PATH=		${WRKSRC}
-
-CMAKE_ARGS=	-DBUILD_DEPRECATED=yes \
-		-DBUILD_SHARED_LIBS=ON \
-		${LAPACK_PART_CMAKE_ARGS}
-
-post-extract:
-	${RUN} mkdir -p ${WRKDIR}/build
-
-.include "../../mk/bsd.pkg.mk"
-
+.include "../lapack-ng/Makefile.common"
diff --git a/cblas-ng/distinfo b/cblas-ng/distinfo
deleted file mode 100644
index 8c347f81ba..0000000000
--- a/cblas-ng/distinfo
+++ /dev/null
@@ -1,7 +0,0 @@
-$NetBSD: distinfo,v 1.21 2017/09/11 20:56:28 wiz Exp $
-
-SHA1 (lapack-3.8.0.tar.gz) = 55ac9d6be510883c5442c8aca967722cdf58fb29
-RMD160 (lapack-3.8.0.tar.gz) = ff306181c4c125e7594c57c1eeece8b0aa8f8523
-SHA512 (lapack-3.8.0.tar.gz) = 17786cb7306fccdc9b4a242de7f64fc261ebe6a10b6ec55f519deb4cb673cb137e8742aa5698fd2dc52f1cd56d3bd116af3f593a01dcf6770c4dcc86c50b2a7f
-Size (lapack-3.8.0.tar.gz) = 7426094 bytes
-SHA1 (patch-CMakeLists.txt) = 3f93b4745b1e64fb248249b845c0a44761c382d6
diff --git a/cblas-ng/patches/patch-CMakeLists.txt b/cblas-ng/patches/patch-CMakeLists.txt
deleted file mode 100644
index 00e124f1f7..0000000000
--- a/cblas-ng/patches/patch-CMakeLists.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-$NetBSD$
-
-Avoid installation of LAPACK CMake and pkg-config files when not installing
-LAPACK.
-
---- CMakeLists.txt.orig	2019-03-23 09:03:24.021091079 +0000
-+++ CMakeLists.txt
-@@ -332,10 +332,12 @@ include(CPack)
- 
- if(NOT BLAS_FOUND)
-   set(ALL_TARGETS ${ALL_TARGETS} blas)
-+  set(BLAS ON)
- endif()
- 
- if(NOT LATESTLAPACK_FOUND)
-   set(ALL_TARGETS ${ALL_TARGETS} lapack)
-+  set(LAPACK ON)
- endif()
- 
- if(BUILD_TESTING OR LAPACKE_WITH_TMG)
-@@ -378,11 +380,13 @@ configure_file(${LAPACK_SOURCE_DIR}/CMAK
-   ${LAPACK_BINARY_DIR}/lapack-config.cmake @ONLY)
- 
- 
--configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lapack.pc.in ${CMAKE_CURRENT_BINARY_DIR}/lapack.pc @ONLY)
--  install(FILES
--  ${CMAKE_CURRENT_BINARY_DIR}/lapack.pc
--  DESTINATION ${PKG_CONFIG_DIR}
--  )
-+if(LAPACK)
-+  configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lapack.pc.in ${CMAKE_CURRENT_BINARY_DIR}/lapack.pc @ONLY)
-+    install(FILES
-+    ${CMAKE_CURRENT_BINARY_DIR}/lapack.pc
-+    DESTINATION ${PKG_CONFIG_DIR}
-+    )
-+endif()
- 
- configure_file(${LAPACK_SOURCE_DIR}/CMAKE/lapack-config-install.cmake.in
-   ${LAPACK_BINARY_DIR}/CMakeFiles/lapack-config.cmake @ONLY)
-@@ -394,8 +398,10 @@ write_basic_package_version_file(
-   COMPATIBILITY SameMajorVersion
-   )
- 
--install(FILES
--  ${LAPACK_BINARY_DIR}/CMakeFiles/lapack-config.cmake
--  ${LAPACK_BINARY_DIR}/lapack-config-version.cmake
--  DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/lapack-${LAPACK_VERSION}
--  )
-+if(LAPACK)
-+  install(FILES
-+    ${LAPACK_BINARY_DIR}/CMakeFiles/lapack-config.cmake
-+    ${LAPACK_BINARY_DIR}/lapack-config-version.cmake
-+    DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/lapack-${LAPACK_VERSION}
-+    )
-+endif()
diff --git a/lapack-ng/Makefile b/lapack-ng/Makefile
index 9f4bf66f47..9e9b8826d2 100644
--- a/lapack-ng/Makefile
+++ b/lapack-ng/Makefile
@@ -1,43 +1,10 @@
 # $NetBSD$
 
-# This is the first version of updated math/lapack using the upstream
-# cmake build system instead of patched Makefiles.
-# It is part of the new concept discussed on tech-pkg in the past year,
-# with BLAS and LAPACK from either this or OpenBLAS (or others, even external
-# MKL), and further cblas and lapacke packages created from the same
-# sources as this one, relying on the former.
-# This can be considered as replacement of the old math/lapack and
-# math/blas once I'm through. I need to figure out good structure
-# for math/cblas and math/lapacke first. Maybe even sharing code
-# is not needed, as the Makefile is simple enough. Maybe just a decision
-# to keep everything from Netlib at the same version.
-
-DISTNAME=	lapack-3.8.0
-PKGREVISION=	1
-CATEGORIES=	math
-MASTER_SITES=	${MASTER_SITE_NETLIB:=lapack/}
-EXTRACT_SUFX=	.tar.gz
-
-MAINTAINER=	thomas.orgis%uni-hamburg.de@localhost
-HOMEPAGE=	http://www.netlib.org/lapack/
-LICENSE=	modified-bsd
-
-USE_LANGUAGES=		c fortran
-USE_TOOLS+=		cmake
-USE_CMAKE=		yes
-
-WRKSRC=			${WRKDIR}/${DISTNAME}
-CONFIGURE_DIRS=		${WRKDIR}/build
-CMAKE_ARG_PATH=		${WRKSRC}
-
-CMAKE_ARGS=	-DBUILD_DEPRECATED=yes \
-		-DBUILD_SHARED_LIBS=ON \
-		-DUSE_OPTIMIZED_BLAS=OFF \
-		-DUSE_OPTIMIZED_LAPACK=OFF \
-		-DCBLAS=OFF -DLAPACKE=OFF
-
-post-extract:
-	${RUN} mkdir -p ${WRKDIR}/build
-
-.include "../../mk/bsd.pkg.mk"
-
+COMMENT=	Linear Algebra PACKage (Netlib reference code)
+LAPACK_PART=	lapack
+LAPACK_PART_CMAKE_ARGS= \
+	-DUSE_OPTIMIZED_BLAS=OFF \
+	-DUSE_OPTIMIZED_LAPACK=OFF \
+	-DCBLAS=OFF -DLAPACKE=OFF
+
+.include	"../lapack-ng/Makefile.common"
diff --git a/lapack-ng/Makefile.common b/lapack-ng/Makefile.common
new file mode 100644
index 0000000000..d6855da9a8
--- /dev/null
+++ b/lapack-ng/Makefile.common
@@ -0,0 +1,41 @@
+# $NetBSD$
+
+# 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.
+
+PORTVERSION=	3.8.0
+DISTNAME=	lapack-${PORTVERSION}
+# TODO: remove the -ng once we replace the old math/lapack.
+PKGNAME=	${LAPACK_PART}-ng-${PORTVERSION}
+PKGREVISION=	1
+CATEGORIES=	math
+MASTER_SITES=	${MASTER_SITE_NETLIB:=lapack/}
+EXTRACT_SUFX=	.tar.gz
+
+MAINTAINER=	thomas.orgis%uni-hamburg.de@localhost
+HOMEPAGE=	http://www.netlib.org/lapack/
+LICENSE=	modified-bsd
+
+# All parts are in the same section (now wip, later math).
+# TODO: remove the -ng once we replace the old math/lapack
+PATCHDIR=       ${.CURDIR}/../lapack-ng/patches
+DISTINFO_FILE=  ${.CURDIR}/../lapack-ng/distinfo
+
+USE_LANGUAGES=		c fortran
+USE_TOOLS+=		cmake
+USE_CMAKE=		yes
+
+WRKSRC=			${WRKDIR}/${DISTNAME}
+CONFIGURE_DIRS=		${WRKDIR}/build
+CMAKE_ARG_PATH=		${WRKSRC}
+
+CMAKE_ARGS=	-DBUILD_DEPRECATED=yes \
+		-DBUILD_SHARED_LIBS=ON \
+		${LAPACK_PART_CMAKE_ARGS}
+
+post-extract:
+	${RUN} mkdir -p ${WRKDIR}/build
+
+.include "../../mk/bsd.pkg.mk"
+
diff --git a/lapack-ng/PLIST b/lapack-ng/PLIST
index 0e5cb7a9a2..afd1efed2f 100644
--- a/lapack-ng/PLIST
+++ b/lapack-ng/PLIST
@@ -1,8 +1,8 @@
 @comment $NetBSD$
-lib/cmake/${PKGNAME}/lapack-config-version.cmake
-lib/cmake/${PKGNAME}/lapack-config.cmake
-lib/cmake/${PKGNAME}/lapack-targets-release.cmake
-lib/cmake/${PKGNAME}/lapack-targets.cmake
+lib/cmake/lapack-${PKGVERSION}/lapack-config-version.cmake
+lib/cmake/lapack-${PKGVERSION}/lapack-config.cmake
+lib/cmake/lapack-${PKGVERSION}/lapack-targets-release.cmake
+lib/cmake/lapack-${PKGVERSION}/lapack-targets.cmake
 lib/libblas.so
 lib/libblas.so.3
 lib/libblas.so.${PKGVERSION}
diff --git a/lapack-ng/distinfo b/lapack-ng/distinfo
index cef6873a61..8c347f81ba 100644
--- a/lapack-ng/distinfo
+++ b/lapack-ng/distinfo
@@ -4,3 +4,4 @@ SHA1 (lapack-3.8.0.tar.gz) = 55ac9d6be510883c5442c8aca967722cdf58fb29
 RMD160 (lapack-3.8.0.tar.gz) = ff306181c4c125e7594c57c1eeece8b0aa8f8523
 SHA512 (lapack-3.8.0.tar.gz) = 17786cb7306fccdc9b4a242de7f64fc261ebe6a10b6ec55f519deb4cb673cb137e8742aa5698fd2dc52f1cd56d3bd116af3f593a01dcf6770c4dcc86c50b2a7f
 Size (lapack-3.8.0.tar.gz) = 7426094 bytes
+SHA1 (patch-CMakeLists.txt) = 3f93b4745b1e64fb248249b845c0a44761c382d6
diff --git a/lapack-ng/patches/patch-CMakeLists.txt b/lapack-ng/patches/patch-CMakeLists.txt
new file mode 100644
index 0000000000..00e124f1f7
--- /dev/null
+++ b/lapack-ng/patches/patch-CMakeLists.txt
@@ -0,0 +1,55 @@
+$NetBSD$
+
+Avoid installation of LAPACK CMake and pkg-config files when not installing
+LAPACK.
+
+--- CMakeLists.txt.orig	2019-03-23 09:03:24.021091079 +0000
++++ CMakeLists.txt
+@@ -332,10 +332,12 @@ include(CPack)
+ 
+ if(NOT BLAS_FOUND)
+   set(ALL_TARGETS ${ALL_TARGETS} blas)
++  set(BLAS ON)
+ endif()
+ 
+ if(NOT LATESTLAPACK_FOUND)
+   set(ALL_TARGETS ${ALL_TARGETS} lapack)
++  set(LAPACK ON)
+ endif()
+ 
+ if(BUILD_TESTING OR LAPACKE_WITH_TMG)
+@@ -378,11 +380,13 @@ configure_file(${LAPACK_SOURCE_DIR}/CMAK
+   ${LAPACK_BINARY_DIR}/lapack-config.cmake @ONLY)
+ 
+ 
+-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lapack.pc.in ${CMAKE_CURRENT_BINARY_DIR}/lapack.pc @ONLY)
+-  install(FILES
+-  ${CMAKE_CURRENT_BINARY_DIR}/lapack.pc
+-  DESTINATION ${PKG_CONFIG_DIR}
+-  )
++if(LAPACK)
++  configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lapack.pc.in ${CMAKE_CURRENT_BINARY_DIR}/lapack.pc @ONLY)
++    install(FILES
++    ${CMAKE_CURRENT_BINARY_DIR}/lapack.pc
++    DESTINATION ${PKG_CONFIG_DIR}
++    )
++endif()
+ 
+ configure_file(${LAPACK_SOURCE_DIR}/CMAKE/lapack-config-install.cmake.in
+   ${LAPACK_BINARY_DIR}/CMakeFiles/lapack-config.cmake @ONLY)
+@@ -394,8 +398,10 @@ write_basic_package_version_file(
+   COMPATIBILITY SameMajorVersion
+   )
+ 
+-install(FILES
+-  ${LAPACK_BINARY_DIR}/CMakeFiles/lapack-config.cmake
+-  ${LAPACK_BINARY_DIR}/lapack-config-version.cmake
+-  DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/lapack-${LAPACK_VERSION}
+-  )
++if(LAPACK)
++  install(FILES
++    ${LAPACK_BINARY_DIR}/CMakeFiles/lapack-config.cmake
++    ${LAPACK_BINARY_DIR}/lapack-config-version.cmake
++    DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/lapack-${LAPACK_VERSION}
++    )
++endif()


Home | Main Index | Thread Index | Old Index