From c3f69d47c8b1dfe3afeeb96e65674c01e1c82191 Mon Sep 17 00:00:00 2001 From: Albert Ziegenhagel Date: Thu, 20 Aug 2020 23:22:14 +0200 Subject: [PATCH] [openblas] Fix generating pkg-config file (#12956) --- ports/openblas/CONTROL | 2 +- ports/openblas/fix-pkg-config.patch | 19 +++++++++++++++++++ ports/openblas/portfile.cmake | 1 + 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 ports/openblas/fix-pkg-config.patch diff --git a/ports/openblas/CONTROL b/ports/openblas/CONTROL index ea246834dd9953..a5240e2b49b079 100644 --- a/ports/openblas/CONTROL +++ b/ports/openblas/CONTROL @@ -1,6 +1,6 @@ Source: openblas Version: 0.3.9 -Port-Version: 2 +Port-Version: 3 Homepage: https://github.com/xianyi/OpenBLAS Build-Depends: pthread (linux&osx) Description: OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version. diff --git a/ports/openblas/fix-pkg-config.patch b/ports/openblas/fix-pkg-config.patch new file mode 100644 index 00000000000000..9ed84d1bb7a514 --- /dev/null +++ b/ports/openblas/fix-pkg-config.patch @@ -0,0 +1,19 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c324e224..4b82d767 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -389,11 +389,9 @@ if(NOT NO_LAPACKE) + install (FILES ${CMAKE_BINARY_DIR}/lapacke_mangling.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/openblas${SUFFIX64}) + endif() + +-include(FindPkgConfig QUIET) +-if(PKG_CONFIG_FOUND) +- configure_file(${PROJECT_SOURCE_DIR}/cmake/openblas.pc.in ${PROJECT_BINARY_DIR}/openblas${SUFFIX64}.pc @ONLY) +- install (FILES ${PROJECT_BINARY_DIR}/openblas${SUFFIX64}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig/) +-endif() ++# Install pkg-config files ++configure_file(${PROJECT_SOURCE_DIR}/cmake/openblas.pc.in ${PROJECT_BINARY_DIR}/openblas${SUFFIX64}.pc @ONLY) ++install (FILES ${PROJECT_BINARY_DIR}/openblas${SUFFIX64}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig/) + + + # GNUInstallDirs "DATADIR" wrong here; CMake search path wants "share". diff --git a/ports/openblas/portfile.cmake b/ports/openblas/portfile.cmake index 57b9236ace6cd6..8f26b42ad6feb2 100644 --- a/ports/openblas/portfile.cmake +++ b/ports/openblas/portfile.cmake @@ -9,6 +9,7 @@ vcpkg_from_github( fix-space-path.patch fix-redefinition-function.patch github_2481.patch + fix-pkg-config.patch ) find_program(GIT NAMES git git.cmd)