pkgsrc-WIP-changes archive

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

cblas-ng: first version of new cblas



Module Name:	pkgsrc-wip
Committed By:	Dr. Thomas Orgis <thomas.orgis%uni-hamburg.de@localhost>
Pushed By:	thor
Date:		Sat Mar 23 10:31:28 2019 +0100
Changeset:	54538986cbdb5c936eb32f8a241e4b4a5d055d36

Modified Files:
	Makefile
Added Files:
	cblas-ng/DESCR
	cblas-ng/Makefile
	cblas-ng/PLIST
	cblas-ng/buildlink3.mk
	cblas-ng/distinfo
	cblas-ng/patches/patch-CMakeLists.txt

Log Message:
cblas-ng: first version of new cblas

This uses the cmake-enabled lapack-ng package, currently as a copy.
The next iteration will use the usual Makefile.common structure.

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

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

diffstat:
 Makefile                              |  1 +
 cblas-ng/DESCR                        | 13 +++++++++
 cblas-ng/Makefile                     | 40 +++++++++++++++++++++++++
 cblas-ng/PLIST                        | 11 +++++++
 cblas-ng/buildlink3.mk                | 13 +++++++++
 cblas-ng/distinfo                     |  7 +++++
 cblas-ng/patches/patch-CMakeLists.txt | 55 +++++++++++++++++++++++++++++++++++
 7 files changed, 140 insertions(+)

diffs:
diff --git a/Makefile b/Makefile
index be1737b7ef..356a957f81 100644
--- a/Makefile
+++ b/Makefile
@@ -350,6 +350,7 @@ SUBDIR+=	cataclysm-dda
 SUBDIR+=	catfish
 SUBDIR+=	cb2bib
 SUBDIR+=	cblas
+SUBDIR+=	cblas-ng
 SUBDIR+=	cc65
 SUBDIR+=	ccnet-server
 SUBDIR+=	ccrypt
diff --git a/cblas-ng/DESCR b/cblas-ng/DESCR
new file mode 100644
index 0000000000..086bc12090
--- /dev/null
+++ b/cblas-ng/DESCR
@@ -0,0 +1,13 @@
+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).
diff --git a/cblas-ng/Makefile b/cblas-ng/Makefile
new file mode 100644
index 0000000000..c36f53c92c
--- /dev/null
+++ b/cblas-ng/Makefile
@@ -0,0 +1,40 @@
+# $NetBSD$
+
+LAPACK_PART=	cblas
+LAPACK_PART_CMAKE_ARGS=	\
+	-DUSE_OPTIMIZED_BLAS=ON \
+	-DBLAS_LIBRARIES="-lblas" \
+	-DUSE_OPTIMIZED_LAPACK=ON \
+	-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"
+
diff --git a/cblas-ng/PLIST b/cblas-ng/PLIST
new file mode 100644
index 0000000000..f240c8b080
--- /dev/null
+++ b/cblas-ng/PLIST
@@ -0,0 +1,11 @@
+@comment $NetBSD$
+include/cblas.h
+include/cblas_f77.h
+include/cblas_mangling.h
+include/cblas_test.h
+lib/cmake/cblas-${PKGVERSION}/cblas-config-version.cmake
+lib/cmake/cblas-${PKGVERSION}/cblas-config.cmake
+lib/libcblas.so
+lib/libcblas.so.3
+lib/libcblas.so.${PKGVERSION}
+lib/pkgconfig/cblas.pc
diff --git a/cblas-ng/buildlink3.mk b/cblas-ng/buildlink3.mk
new file mode 100644
index 0000000000..89a753d04d
--- /dev/null
+++ b/cblas-ng/buildlink3.mk
@@ -0,0 +1,13 @@
+# $NetBSD$
+
+BUILDLINK_TREE+=	cblas
+
+.if !defined(CBLAS_BUILDLINK3_MK)
+CBLAS_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.cblas+=	cblas-ng>=3.8.0
+BUILDLINK_PKGSRCDIR.cblas?=	../../wip/cblas-ng
+BUILDLINK_DEPMETHOD.cblas?=	full
+.endif
+
+BUILDLINK_TREE+=	-cblas
diff --git a/cblas-ng/distinfo b/cblas-ng/distinfo
new file mode 100644
index 0000000000..8c347f81ba
--- /dev/null
+++ b/cblas-ng/distinfo
@@ -0,0 +1,7 @@
+$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
new file mode 100644
index 0000000000..00e124f1f7
--- /dev/null
+++ b/cblas-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