void-packages/srcpkgs/lapack/patches/cmake-pkgconfig-fix.patch
Alessio Sergi df3c218808 lapack: update to 3.6.0
Build cblas and lapacke.
2016-02-17 19:07:17 +01:00

117 lines
3.6 KiB
Diff

diff --git BLAS/CMakeLists.txt BLAS/CMakeLists.txt
--- BLAS/CMakeLists.txt
+++ BLAS/CMakeLists.txt
@@ -2,7 +2,7 @@
if(BUILD_TESTING)
add_subdirectory(TESTING)
endif(BUILD_TESTING)
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/blas.pc.in ${CMAKE_CURRENT_BINARY_DIR}/blas.pc)
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/blas.pc.in ${CMAKE_CURRENT_BINARY_DIR}/blas.pc @ONLY)
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/blas.pc
DESTINATION ${PKG_CONFIG_DIR}
diff --git BLAS/blas.pc.in BLAS/blas.pc.in
--- BLAS/blas.pc.in
+++ BLAS/blas.pc.in
@@ -1,7 +1,7 @@
prefix=@prefix@
libdir=@libdir@
-Name: blas
+Name: BLAS
Description: Basic Linear Algebra Subprograms F77 reference implementations
Version: @LAPACK_VERSION@
URL: http://www.netlib.org/blas/
diff --git CBLAS/CMakeLists.txt CBLAS/CMakeLists.txt
--- CBLAS/CMakeLists.txt
+++ CBLAS/CMakeLists.txt
@@ -71,7 +71,7 @@
${LAPACK_BINARY_DIR}/cblas-config.cmake @ONLY)
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cblas.pc.in ${CMAKE_CURRENT_BINARY_DIR}/cblas.pc)
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cblas.pc.in ${CMAKE_CURRENT_BINARY_DIR}/cblas.pc @ONLY)
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/cblas.pc
DESTINATION ${PKG_CONFIG_DIR}
diff --git CBLAS/cblas.pc.in CBLAS/cblas.pc.in
--- CBLAS/cblas.pc.in
+++ CBLAS/cblas.pc.in
@@ -1,9 +1,9 @@
prefix=@prefix@
libdir=@libdir@
-Name: lapacke
-Description: C Standard Interface to BLAS Linear Algebra PACKage
+Name: CBLAS
+Description: C Standard Interface to BLAS Basic Linear Algebra Subprograms
Version: @LAPACK_VERSION@
-URL: http://www.netlib.org/lapack/
+URL: http://www.netlib.org/blas/#_cblas
Libs: -L${libdir} -lcblas
Requires: blas
diff --git CMakeLists.txt CMakeLists.txt
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -112,6 +112,13 @@
set(DSECOND_SRC ${LAPACK_SOURCE_DIR}/INSTALL/dsecnd_${TIME_FUNC}.f)
set(PKG_CONFIG_DIR ${LIBRARY_DIR}/pkgconfig)
+set(prefix ${CMAKE_INSTALL_PREFIX})
+if(NOT IS_ABSOLUTE ${LIBRARY_DIR})
+ set(libdir "\${prefix}/${LIBRARY_DIR}")
+else()
+ set(libdir "${LIBRARY_DIR}")
+endif()
+
# --------------------------------------------------
# Precision to build
# By default all precisions are generated
@@ -333,7 +340,7 @@
${LAPACK_BINARY_DIR}/lapack-config.cmake @ONLY)
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lapack.pc.in ${CMAKE_CURRENT_BINARY_DIR}/lapack.pc)
+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}
diff --git LAPACKE/CMakeLists.txt LAPACKE/CMakeLists.txt
--- LAPACKE/CMakeLists.txt
+++ LAPACKE/CMakeLists.txt
@@ -65,7 +65,7 @@
endif(BUILD_TESTING)
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lapacke.pc.in ${CMAKE_CURRENT_BINARY_DIR}/lapacke.pc)
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lapacke.pc.in ${CMAKE_CURRENT_BINARY_DIR}/lapacke.pc @ONLY)
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/lapacke.pc
DESTINATION ${PKG_CONFIG_DIR}
diff --git LAPACKE/lapacke.pc.in LAPACKE/lapacke.pc.in
--- LAPACKE/lapacke.pc.in
+++ LAPACKE/lapacke.pc.in
@@ -1,9 +1,9 @@
prefix=@prefix@
libdir=@libdir@
-Name: lapacke
+Name: LAPACKE
Description: C Standard Interface to LAPACK Linear Algebra PACKage
Version: @LAPACK_VERSION@
-URL: http://www.netlib.org/lapack/
+URL: http://www.netlib.org/lapack/#_standard_c_language_apis_for_lapack
Libs: -L${libdir} -llapacke
Requires: lapack blas
diff --git lapack.pc.in lapack.pc.in
--- lapack.pc.in
+++ lapack.pc.in
@@ -1,7 +1,7 @@
prefix=@prefix@
libdir=@libdir@
-Name: lapack
+Name: LAPACK
Description: FORTRAN reference implementation of LAPACK Linear Algebra PACKage
Version: @LAPACK_VERSION@
URL: http://www.netlib.org/lapack/