Date: Friday, July 21, 2017 @ 10:39:38
  Author: lcarlier
Revision: 245920

upgpkg: lib32-vulkan-loader-layers 1.0.54.0-1

upstream update 1.0.54.0

Added:
  
lib32-vulkan-loader-layers/trunk/0001-loader-Remove-executable-stack-from-libvulkan.so.patch
Modified:
  lib32-vulkan-loader-layers/trunk/PKGBUILD

-------------------------------------------------------------+
 0001-loader-Remove-executable-stack-from-libvulkan.so.patch |   28 +++++
 PKGBUILD                                                    |   50 ++++++----
 2 files changed, 62 insertions(+), 16 deletions(-)

Added: 0001-loader-Remove-executable-stack-from-libvulkan.so.patch
===================================================================
--- 0001-loader-Remove-executable-stack-from-libvulkan.so.patch                 
        (rev 0)
+++ 0001-loader-Remove-executable-stack-from-libvulkan.so.patch 2017-07-21 
10:39:38 UTC (rev 245920)
@@ -0,0 +1,28 @@
+From 3152f2a5056077d3e1061ac61e3ef7888ff96dc7 Mon Sep 17 00:00:00 2001
+From: Lenny Komow <le...@lunarg.com>
+Date: Thu, 20 Jul 2017 16:07:14 -0600
+Subject: [PATCH] loader: Remove executable stack from libvulkan.so
+
+Change-Id: Id77d5560479cbbc6f5453a6362c5a20dd721fdd0
+---
+ loader/unknown_ext_chain_gas.asm | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/loader/unknown_ext_chain_gas.asm 
b/loader/unknown_ext_chain_gas.asm
+index e463f45b..798760bd 100644
+--- a/loader/unknown_ext_chain_gas.asm
++++ b/loader/unknown_ext_chain_gas.asm
+@@ -108,6 +108,10 @@ vkdev_ext\num:
+ 
+ .endif
+ 
++#if defined(__ELF__)
++.section .note.GNU-stack,"",%progbits
++#endif
++
+ .data
+ 
+ termin_error_string:
+-- 
+2.13.2
+

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2017-07-21 10:37:03 UTC (rev 245919)
+++ PKGBUILD    2017-07-21 10:39:38 UTC (rev 245920)
@@ -4,7 +4,7 @@
 pkgbase=lib32-vulkan-loader-layers
 pkgname=(lib32-vulkan-icd-loader lib32-vulkan-validation-layers)
 _pkgname=Vulkan-LoaderAndValidationLayers
-pkgver=1.0.51.0
+pkgver=1.0.54.0
 pkgrel=1
 arch=(x86_64)
 url="https://www.khronos.org/vulkan/";
@@ -11,10 +11,20 @@
 license=('custom')
 depends=()
 makedepends=(git cmake python-lxml lib32-libx11 lib32-libxrandr lib32-wayland)
-source=("https://github.com/KhronosGroup/${_pkgname}/archive/sdk-${pkgver}.tar.gz";)
-sha256sums=('20c07764e3f69d0d2158070a24faa6b8c5242af0bf8088ac538281c42c2ca119')
+source=("https://github.com/KhronosGroup/${_pkgname}/archive/sdk-${pkgver}.tar.gz";
+        0001-loader-Remove-executable-stack-from-libvulkan.so.patch)
+sha256sums=('f2556963f27309485c4d6bd9acece58d51df6a1b13699cc3a2c8d2579e6a3831'
+            '01c1e96916a9fc0ef6f62703cd968c14031ad75f64f61409f108bc9e427977a1')
 
+prepare() {
+  cd "${srcdir}/${_pkgname}-sdk-${pkgver}"
+
+  # 
https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers/issues/1956
+  patch -Np1 -i ../0001-loader-Remove-executable-stack-from-libvulkan.so.patch
+}
+
 build() {
+  export ASFLAGS=--32
   export CC="gcc -m32"
   export CXX="g++ -m32"                                                        
                                                                                
                                                                    
   export PKG_CONFIG_PATH="/usr/lib32/pkgconfig" 
@@ -26,6 +36,7 @@
   rm -rf build ; mkdir build ; cd build
   cmake -DCMAKE_INSTALL_PREFIX=/usr \
     -DCMAKE_INSTALL_SYSCONFDIR=/etc \
+    -DCMAKE_INSTALL_LIBDIR=lib32 \
     -DCMAKE_INSTALL_DATADIR=/share \
     -DCMAKE_SKIP_RPATH=True \
     -DBUILD_TESTS=Off \
@@ -36,32 +47,39 @@
     -DCMAKE_BUILD_TYPE=Release \
     ..
   make
-  make DESTDIR=install install
 }
 
 package_lib32-vulkan-icd-loader() {
-  pkgdesc="Vulkan Installable Client Driver (ICD) Loader"
+  pkgdesc="Vulkan Installable Client Driver (ICD) Loader (32-bit)"
   depends=(lib32-glibc)
   optdepends=(lib32-vulkan-driver: packaged vulkan driver)
-  cd "${srcdir}/${_pkgname}-sdk-${pkgver}"
+  cd "${srcdir}/${_pkgname}-sdk-${pkgver}/build"
   
-  install -dm755 ${pkgdir}/usr/lib32
+  make DESTDIR="${pkgdir}" install
+
+  rm -r ${pkgdir}/etc
+  rm -r ${pkgdir}/usr/bin
+  rm -r ${pkgdir}/usr/include
+  rm ${pkgdir}/usr/lib32/libVkLayer*.so
+
   install -dm755 ${pkgdir}/usr/share/licenses/${pkgname}
-  
-  cp -rv  build/loader/libvulkan.so* ${pkgdir}/usr/lib32
-  install -m644 LICENSE.txt "${pkgdir}"/usr/share/licenses/${pkgname}/
+  install -m644 ../LICENSE.txt "${pkgdir}"/usr/share/licenses/${pkgname}/
 }
 
 package_lib32-vulkan-validation-layers() {
-  pkgdesc="Vulkan Software Development Kit"
+  pkgdesc="Vulkan Software Development Kit (32-bit)"
   depends=(lib32-gcc-libs lib32-vulkan-icd-loader vulkan-headers)
-  cd "${srcdir}/${_pkgname}-sdk-${pkgver}"
+  cd "${srcdir}/${_pkgname}-sdk-${pkgver}/build"
   
-  install -dm755 ${pkgdir}/usr/lib32
-  install -dm755 ${pkgdir}/usr/share/licenses/${pkgname}
+  make DESTDIR="${pkgdir}" install
 
-  install -m644 build/layers/*.so ${pkgdir}/usr/lib32
+  rm -r ${pkgdir}/etc
+  rm -r ${pkgdir}/usr/bin
+  rm -r ${pkgdir}/usr/include
+  rm -r ${pkgdir}/usr/lib32/pkgconfig
+  rm ${pkgdir}/usr/lib32/libvulkan.so*
 
-  install -m644 LICENSE.txt "${pkgdir}"/usr/share/licenses/${pkgname}/
+  install -dm755 ${pkgdir}/usr/share/licenses/${pkgname}
+  install -m644 ../LICENSE.txt "${pkgdir}"/usr/share/licenses/${pkgname}/
 }
 

Reply via email to