summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandre Demers2019-11-20 04:28:39 -0500
committerAlexandre Demers2019-11-20 04:28:39 -0500
commitcbeb3bd8e06379942353b5f8df1139d582439438 (patch)
treea0a6362981d7433ebb8c47c91e1bf5e9df888164
parent66baabb3f3a3f1611b327e6af0aa8adaf0f13abd (diff)
downloadaur-cbeb3bd8e06379942353b5f8df1139d582439438.tar.gz
patch: solve conflict cmake files' installation folder
This is a temporary fix to issue 1965 Based on https://github.com/KhronosGroup/glslang/commit/bd69a4fb1206c3441ed56a9a058adfb6e46d55a6.patch Signed-off-by: Alexandre Demers <alexandre.f.demers@gmail.com>
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD28
-rw-r--r--fix-cmake-folder.patch122
3 files changed, 149 insertions, 7 deletions
diff --git a/.SRCINFO b/.SRCINFO
index edd9eb392c1..3dd08bf7e19 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = lib32-glslang
pkgdesc = OpenGL and OpenGL ES shader front end and validator (32bit)
pkgver = 7.13.3496
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/KhronosGroup/glslang
arch = x86_64
license = BSD
@@ -12,8 +12,10 @@ pkgbase = lib32-glslang
depends = lib32-spirv-tools
depends = python
options = staticlibs
- source = lib32-glslang-7.13.3496.tar.gz::https://github.com/KhronosGroup/glslang/archive/7.13.3496.tar.gz
+ source = -7.13.3496.tar.gz::https://github.com/KhronosGroup/glslang/archive/7.13.3496.tar.gz
+ source = fix-cmake-folder.patch
sha256sums = 170d1538a670af4cae300e875d7cda9744b1acee1ab7252ecf7c4004186bb922
+ sha256sums = 5b231d27cfde2178b937b115e9b92fe10c28e7624a638cca9f7b48b4bec3f71e
pkgname = lib32-glslang
diff --git a/PKGBUILD b/PKGBUILD
index 0778ed17b1d..2c9efc81914 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -8,7 +8,7 @@ _pkgbasename=glslang
pkgname=lib32-$_pkgbasename
pkgver=7.13.3496
-pkgrel=1
+pkgrel=2
pkgdesc='OpenGL and OpenGL ES shader front end and validator (32bit)'
arch=('x86_64')
url='https://github.com/KhronosGroup/glslang'
@@ -24,8 +24,20 @@ makedepends=(
'ninja'
)
options=('staticlibs')
-source=(${pkgname}-${pkgver}.tar.gz::https://github.com/KhronosGroup/glslang/archive/${pkgver}.tar.gz)
-sha256sums=('170d1538a670af4cae300e875d7cda9744b1acee1ab7252ecf7c4004186bb922')
+source=(
+ ${_pkgnamename}-${pkgver}.tar.gz::https://github.com/KhronosGroup/glslang/archive/${pkgver}.tar.gz
+ fix-cmake-folder.patch
+)
+sha256sums=(
+ '170d1538a670af4cae300e875d7cda9744b1acee1ab7252ecf7c4004186bb922'
+ '5b231d27cfde2178b937b115e9b92fe10c28e7624a638cca9f7b48b4bec3f71e'
+)
+
+prepare() {
+ echo "Patching"
+ cd ${_pkgbasename}-${pkgver}
+ patch --forward --strip=1 --verbose --input="${srcdir}/fix-cmake-folder.patch"
+}
build() {
export CCFLAGS="-m32"
@@ -41,7 +53,10 @@ build() {
-DCMAKE_INSTALL_PREFIX="/usr" \
-DCMAKE_INSTALL_LIBDIR="lib32" \
-DCMAKE_BUILD_TYPE=Release \
- -DBUILD_SHARED_LIBS=ON
+ -DCMAKE_C_FLAGS:STRING=-m32 \
+ -DCMAKE_CXX_FLAGS:STRING=-m32 \
+ -DBUILD_SHARED_LIBS=ON \
+ -DINSTALL_DOCS=OFF
ninja
)
(cd build-static
@@ -51,7 +66,10 @@ build() {
-DCMAKE_INSTALL_PREFIX="/usr" \
-DCMAKE_INSTALL_LIBDIR="lib32" \
-DCMAKE_BUILD_TYPE=Release \
- -DBUILD_SHARED_LIBS=OFF
+ -DCMAKE_C_FLAGS:STRING=-m32 \
+ -DCMAKE_CXX_FLAGS:STRING=-m32 \
+ -DBUILD_SHARED_LIBS=OFF \
+ -DINSTALL_DOCS=OFF
ninja
)
}
diff --git a/fix-cmake-folder.patch b/fix-cmake-folder.patch
new file mode 100644
index 00000000000..c03d7695f17
--- /dev/null
+++ b/fix-cmake-folder.patch
@@ -0,0 +1,122 @@
+From bd69a4fb1206c3441ed56a9a058adfb6e46d55a6 Mon Sep 17 00:00:00 2001
+From: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
+Date: Mon, 18 Nov 2019 11:11:55 -0800
+Subject: [PATCH] Respect CMAKE_INSTALL_LIBDIR in installed CMake files
+
+Fixes #1965
+---
+ OGLCompilersDLL/CMakeLists.txt | 2 +-
+ SPIRV/CMakeLists.txt | 4 ++--
+ StandAlone/CMakeLists.txt | 6 +++---
+ glslang/CMakeLists.txt | 2 +-
+ glslang/OSDependent/Unix/CMakeLists.txt | 2 +-
+ glslang/OSDependent/Windows/CMakeLists.txt | 2 +-
+ gtests/CMakeLists.txt | 2 +-
+ hlsl/CMakeLists.txt | 2 +-
+ 8 files changed, 11 insertions(+), 11 deletions(-)
+
+diff --git a/OGLCompilersDLL/CMakeLists.txt b/OGLCompilersDLL/CMakeLists.txt
+index af4ab587d..e0096743b 100644
+--- a/OGLCompilersDLL/CMakeLists.txt
++++ b/OGLCompilersDLL/CMakeLists.txt
+@@ -11,5 +11,5 @@ endif(WIN32)
+ if(ENABLE_GLSLANG_INSTALL)
+ install(TARGETS OGLCompiler EXPORT OGLCompilerTargets
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
+- install(EXPORT OGLCompilerTargets DESTINATION lib/cmake)
++ install(EXPORT OGLCompilerTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
+ endif(ENABLE_GLSLANG_INSTALL)
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index e25ec0a..364f04c 100644
+--- a/SPIRV/CMakeLists.txt
++++ b/SPIRV/CMakeLists-new.txt
+@@ -91,8 +91,8 @@ if(ENABLE_GLSLANG_INSTALL)
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ endif()
+
+- install(EXPORT SPVRemapperTargets DESTINATION lib/cmake)
+- install(EXPORT SPIRVTargets DESTINATION lib/cmake)
++ install(EXPORT SPVRemapperTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
++ install(EXPORT SPIRVTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
+
+ install(FILES ${HEADERS} ${SPVREMAP_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/glslang/SPIRV/)
+ endif(ENABLE_GLSLANG_INSTALL)
+diff --git a/StandAlone/CMakeLists.txt b/StandAlone/CMakeLists.txt
+index 0878965c1..d9d71d1ab 100644
+--- a/StandAlone/CMakeLists.txt
++++ b/StandAlone/CMakeLists.txt
+@@ -49,12 +49,12 @@ if(ENABLE_GLSLANG_INSTALL)
+ install(TARGETS spirv-remap EXPORT spirv-remapTargets
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+
+- install(EXPORT glslangValidatorTargets DESTINATION lib/cmake)
+- install(EXPORT spirv-remapTargets DESTINATION lib/cmake)
++ install(EXPORT glslangValidatorTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
++ install(EXPORT spirv-remapTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
+
+ if(BUILD_SHARED_LIBS)
+ install(TARGETS glslang-default-resource-limits EXPORT glslang-default-resource-limitsTargets
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
+- install(EXPORT glslang-default-resource-limitsTargets DESTINATION lib/cmake)
++ install(EXPORT glslang-default-resource-limitsTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
+ endif()
+ endif(ENABLE_GLSLANG_INSTALL)
+diff --git a/glslang/CMakeLists.txt b/glslang/CMakeLists.txt
+index 42df1d1e6..446cabb91 100644
+--- a/glslang/CMakeLists.txt
++++ b/glslang/CMakeLists.txt
+@@ -112,7 +112,7 @@ if(ENABLE_GLSLANG_INSTALL)
+ install(TARGETS glslang EXPORT glslangTargets
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ endif()
+- install(EXPORT glslangTargets DESTINATION lib/cmake)
++ install(EXPORT glslangTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
+ endif(ENABLE_GLSLANG_INSTALL)
+
+ if(ENABLE_GLSLANG_INSTALL)
+diff --git a/glslang/OSDependent/Unix/CMakeLists.txt b/glslang/OSDependent/Unix/CMakeLists.txt
+index 91fb45a71..9994314fd 100644
+--- a/glslang/OSDependent/Unix/CMakeLists.txt
++++ b/glslang/OSDependent/Unix/CMakeLists.txt
+@@ -22,5 +22,5 @@ endif()
+ if(ENABLE_GLSLANG_INSTALL)
+ install(TARGETS OSDependent EXPORT OSDependentTargets
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
+- install(EXPORT OSDependentTargets DESTINATION lib/cmake)
++ install(EXPORT OSDependentTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
+ endif(ENABLE_GLSLANG_INSTALL)
+diff --git a/glslang/OSDependent/Windows/CMakeLists.txt b/glslang/OSDependent/Windows/CMakeLists.txt
+index f6bd4e9db..c050ef61d 100644
+--- a/glslang/OSDependent/Windows/CMakeLists.txt
++++ b/glslang/OSDependent/Windows/CMakeLists.txt
+@@ -17,5 +17,5 @@ endif(WIN32)
+ if(ENABLE_GLSLANG_INSTALL)
+ install(TARGETS OSDependent EXPORT OSDependentTargets
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
+- install(EXPORT OSDependentTargets DESTINATION lib/cmake)
++ install(EXPORT OSDependentTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
+ endif(ENABLE_GLSLANG_INSTALL)
+diff --git a/gtests/CMakeLists.txt b/gtests/CMakeLists.txt
+index 77d217f1a..aadf9a54f 100644
+--- a/gtests/CMakeLists.txt
++++ b/gtests/CMakeLists.txt
+@@ -33,7 +33,7 @@ if(BUILD_TESTING)
+ if(ENABLE_GLSLANG_INSTALL)
+ install(TARGETS glslangtests EXPORT glslangtestsTargets
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+- install(EXPORT glslangtestsTargets DESTINATION lib/cmake)
++ install(EXPORT glslangtestsTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
+ endif(ENABLE_GLSLANG_INSTALL)
+
+ set(GLSLANG_TEST_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../Test")
+diff --git a/hlsl/CMakeLists.txt b/hlsl/CMakeLists.txt
+index 44f9d6a26..ae0d4d4eb 100644
+--- a/hlsl/CMakeLists.txt
++++ b/hlsl/CMakeLists.txt
+@@ -41,5 +41,5 @@ if(ENABLE_GLSLANG_INSTALL)
+ install(TARGETS HLSL EXPORT HLSLTargets
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ endif()
+- install(EXPORT HLSLTargets DESTINATION lib/cmake)
++ install(EXPORT HLSLTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
+ endif(ENABLE_GLSLANG_INSTALL)