aboutsummaryrefslogtreecommitdiff
path: root/libraries/lapack/patches/generate-pkgconfig.diff
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/lapack/patches/generate-pkgconfig.diff')
-rw-r--r--libraries/lapack/patches/generate-pkgconfig.diff117
1 files changed, 117 insertions, 0 deletions
diff --git a/libraries/lapack/patches/generate-pkgconfig.diff b/libraries/lapack/patches/generate-pkgconfig.diff
new file mode 100644
index 0000000000000..f481ab80853d9
--- /dev/null
+++ b/libraries/lapack/patches/generate-pkgconfig.diff
@@ -0,0 +1,117 @@
+diff --git a/BLAS/CMakeLists.txt b/BLAS/CMakeLists.txt
+--- a/BLAS/CMakeLists.txt
++++ b/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 a/BLAS/blas.pc.in b/BLAS/blas.pc.in
+--- a/BLAS/blas.pc.in
++++ b/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 a/CBLAS/CMakeLists.txt b/CBLAS/CMakeLists.txt
+--- a/CBLAS/CMakeLists.txt
++++ b/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 a/CBLAS/cblas.pc.in b/CBLAS/cblas.pc.in
+--- a/CBLAS/cblas.pc.in
++++ b/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 a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt
++++ b/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 a/LAPACKE/CMakeLists.txt b/LAPACKE/CMakeLists.txt
+--- a/LAPACKE/CMakeLists.txt
++++ b/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 a/LAPACKE/lapacke.pc.in b/LAPACKE/lapacke.pc.in
+--- a/LAPACKE/lapacke.pc.in
++++ b/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 a/lapack.pc.in b/lapack.pc.in
+--- a/lapack.pc.in
++++ b/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/