From 0d72feee8cc6be5fc57bc276bd70e1ebd99b7f7f Mon Sep 17 00:00:00 2001 From: leigh123linux Date: Fri, 9 Feb 2018 23:52:54 +0000 Subject: [PATCH] Fix pkgconfig file --- fix_pkconfig_pc_file.patch | 38 ++++++++++++++++++++++++++++++++++++++ spirv-tools.spec | 15 +++++++++++---- 2 files changed, 49 insertions(+), 4 deletions(-) create mode 100644 fix_pkconfig_pc_file.patch diff --git a/fix_pkconfig_pc_file.patch b/fix_pkconfig_pc_file.patch new file mode 100644 index 0000000..1410cf0 --- /dev/null +++ b/fix_pkconfig_pc_file.patch @@ -0,0 +1,38 @@ +From 4e4a254bc85ea41af93a048f1713ef27e04c01ab Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B3zef=20Kucia?= +Date: Fri, 9 Feb 2018 12:30:08 +0100 +Subject: [PATCH] Do not hardcode libdir and includedir in pkg config files + +--- + CMakeLists.txt | 4 ++++ + cmake/SPIRV-Tools-shared.pc.in | 4 ++-- + cmake/SPIRV-Tools.pc.in | 4 ++-- + 3 files changed, 8 insertions(+), 4 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 011baf9b0..a2fc21620 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -234,6 +234,8 @@ add_custom_target(spirv-tools-pkg-config ALL + -DTEMPLATE_FILE=${CMAKE_CURRENT_SOURCE_DIR}/cmake/SPIRV-Tools.pc.in + -DOUT_FILE=${CMAKE_CURRENT_BINARY_DIR}/SPIRV-Tools.pc + -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} ++ -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR} ++ -DCMAKE_INSTALL_INCLUDEDIR=${CMAKE_INSTALL_INCLUDEDIR} + -DSPIRV_LIBRARIES=${SPIRV_LIBRARIES} + -P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/write_pkg_config.cmake + DEPENDS "CHANGES" "cmake/SPIRV-Tools.pc.in" "cmake/write_pkg_config.cmake") +diff --git a/cmake/SPIRV-Tools-shared.pc.in b/cmake/SPIRV-Tools-shared.pc.in +index a652d5e49..2984dc57f 100644 +--- a/cmake/SPIRV-Tools.pc.in ++++ b/cmake/SPIRV-Tools.pc.in +@@ -1,7 +1,7 @@ + prefix=@CMAKE_INSTALL_PREFIX@ + exec_prefix=${prefix} +-libdir=${prefix}/lib64 +-includedir=${prefix}/include ++libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@ ++includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ + + Name: SPIRV-Tools + Description: Tools for SPIR-V diff --git a/spirv-tools.spec b/spirv-tools.spec index 565f696..2db6f1c 100644 --- a/spirv-tools.spec +++ b/spirv-tools.spec @@ -5,12 +5,14 @@ Name: spirv-tools Version: 2016.7 -Release: 0.5%{?gitrel}%{?dist} +Release: 0.6%{?gitrel}%{?dist} Summary: API and commands for processing SPIR-V modules License: ASL 2.0 -URL: https://github.com/KhronosGroup -Source0: %url/SPIRV-Tools/archive/%{commit}.tar.gz#/%{name}-%{commit}.tar.gz +URL: https://github.com/KhronosGroup/SPIRV-Tools +Source0: %url/archive/%{commit}.tar.gz#/%{name}-%{commit}.tar.gz +# Based on https://github.com/KhronosGroup/SPIRV-Tools/commit/4e4a254bc85ea41af93a048f1713ef27e04c01ab +Patch0: fix_pkconfig_pc_file.patch BuildRequires: cmake3 BuildRequires: gcc-c++ @@ -26,6 +28,7 @@ disassembler, and validator for SPIR-V.. %package libs Summary: Library files for %{name} +Provides: %{name}-libs = 2018.1.0 %description libs library files for %{name} @@ -45,7 +48,7 @@ Development files for %{name} pushd %_target_platform %cmake3 -DCMAKE_BUILD_TYPE=Release \ -DPYTHON_EXECUTABLE:FILEPATH=%{_bindir}/python%{python2_version} \ - -DCMAKE_INSTALL_LIBDIR=%{_libdir} \ + -DCMAKE_INSTALL_LIBDIR=%{_lib} \ -DSPIRV_WERROR=OFF \ -DSPIRV-Headers_SOURCE_DIR=%{_prefix} \ -GNinja .. @@ -79,6 +82,10 @@ popd %{_libdir}/pkgconfig/SPIRV-Tools.pc %changelog +* Fri Feb 09 2018 Leigh Scott - 2016.7-0.6.20180205.git9e19fc0 +- Fix pkgconfig file +- Add version provides to -libs package + * Fri Feb 09 2018 Leigh Scott - 2016.7-0.5.20180205.git9e19fc0 - Update for vulkan 1.0.68.0 - Try building as shared object