cblas-ng: first version of new cblas
authorDr. Thomas Orgis <thomas.orgis@uni-hamburg.de>
Sat, 23 Mar 2019 09:31:28 +0000 (10:31 +0100)
committerDr. Thomas Orgis <thomas.orgis@uni-hamburg.de>
Sat, 23 Mar 2019 10:00:37 +0000 (11:00 +0100)
This uses the cmake-enabled lapack-ng package, currently as a copy.
The next iteration will use the usual Makefile.common structure.

Makefile
cblas-ng/DESCR [new file with mode: 0644]
cblas-ng/Makefile [new file with mode: 0644]
cblas-ng/PLIST [new file with mode: 0644]
cblas-ng/buildlink3.mk [new file with mode: 0644]
cblas-ng/distinfo [new file with mode: 0644]
cblas-ng/patches/patch-CMakeLists.txt [new file with mode: 0644]

index be1737b7efe3b3bc375979c87e59051587c34122..356a957f81eff0507422175561ca75f27668437d 100644 (file)
--- 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 (file)
index 0000000..086bc12
--- /dev/null
@@ -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 (file)
index 0000000..c36f53c
--- /dev/null
@@ -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
+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 (file)
index 0000000..f240c8b
--- /dev/null
@@ -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 (file)
index 0000000..89a753d
--- /dev/null
@@ -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 (file)
index 0000000..8c347f8
--- /dev/null
@@ -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 (file)
index 0000000..00e124f
--- /dev/null
@@ -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()