[packages/vulkan-sdk] I give up, building those separately makes no sense

jajcus jajcus at pld-linux.org
Wed Feb 24 11:23:23 CET 2016


commit 0c2b688d6cd86269bd9d8c1a6a9d3d530ff67256
Author: Jacek Konieczny <j.konieczny at eggsoft.pl>
Date:   Wed Feb 24 11:14:02 2016 +0100

    I give up, building those separately makes no sense
    
    Upstream binary release is a single 'SDK' package, built from
    both Vulkan-LoaderAndValidationLayers and VulkanTools repositories.

 rpath.patch          |  24 +++++
 system_glslang.patch | 107 +++++++++++++++----
 vulkan-loader.spec   | 169 ------------------------------
 vulkan-sdk.spec      | 285 +++++++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 395 insertions(+), 190 deletions(-)
---
diff --git a/vulkan-loader.spec b/vulkan-loader.spec
deleted file mode 100644
index 2084e78..0000000
--- a/vulkan-loader.spec
+++ /dev/null
@@ -1,169 +0,0 @@
-#
-# Conditional build:
-%bcond_with	tests		# build with tests (require a working Vulkan
-				# driver (ICD))
-%define snap	20160222
-%define commit	b654da708be8f14e7f4c6f78df656229939422c8
-%define	rel	1
-Summary:	Vulkan API loader
-Name:		vulkan-loader
-Version:	1.0.3.0
-Release:	3.s%{snap}.%{rel}
-License:	MIT-like
-Group:		Applications
-Source0:	https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers/archive/%{commit}/%{name}-s%{snap}.tar.gz
-# Source0-md5:	25e8092b69d15090af5cada36d4fc92d
-Patch0:		system_glslang.patch
-URL:		https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers
-#BuildRequires:	LunarGLASS-devel
-BuildRequires:	cmake
-BuildRequires:	glslang
-BuildRequires:	glslang-devel
-BuildRequires:	python3
-BuildRequires:	python3-modules
-BuildRequires:	spirv-tools-devel
-BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-
-%description
-Common loader for Vulkan API drivers.
-
-%package -n vulkan-layers
-Summary:	Validation layers for Vulkan
-Group:		Development/Libraries
-Requires:	%{name} = %{version}-%{release}
-
-%description -n vulkan-layers
-Validation layers for Vulkan.
-
-%package -n vulkan-devel
-Summary:	Header files for the Vulkan API
-Summary(pl.UTF-8):	Pliki nagłówkowe API Vulkan
-Group:		Development/Libraries
-Requires:	%{name} = %{version}-%{release}
-
-%description -n vulkan-devel
-Header files for the Vulkan API.
-
-%description -n vulkan-devel -l pl.UTF-8
-Pliki nagłówkowe API Vulkan.
-
-%package demos
-Summary:	Vulkan demos
-Group:		Development/Libraries
-Requires:	%{name} = %{version}-%{release}
-
-%description demos
-Vulkan demos.
-
-%package utils
-Summary:	Vulkan loader utilities
-Group:		Development/Libraries
-Requires:	%{name} = %{version}-%{release}
-
-%description utils
-Vulkan loader utilities.
-
-%prep
-%setup -qn Vulkan-LoaderAndValidationLayers-%{commit}
-%patch0 -p1
-
-%build
-install -d build
-cd build
-%cmake \
-	-DCMAKE_INSTALL_DATADIR=share \
-	-DCMAKE_INSTALL_SYSCONFDIR=etc \
-	%{?with_tests:-DBUILD_TESTS=ON} \
-	%{!?with_tests:-DBUILD_TESTS=OFF} \
-		../
-%{__make}
-
-%if %{with tests}
-cd tests
-LC_ALL=C.utf-8 VK_LAYER_PATH=../layers LD_LIBRARY_PATH=../loader:../layers ./run_all_tests.sh
-cd ..
-%endif
-
-%install
-rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_datadir},%{_sysconfdir}}/vulkan/icd.d \
-$RPM_BUILD_ROOT{%{_datadir},%{_sysconfdir}}/vulkan/{explicit,implicit}_layer.d \
-	$RPM_BUILD_ROOT{%{_bindir},%{_libdir}/vulkan/layer} \
-	$RPM_BUILD_ROOT%{_includedir}/vulkan \
-	$RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
-
-
-cd build
-%{__make} install
-
-cp -p loader/libvulkan.so.1.0.3 $RPM_BUILD_ROOT%{_libdir}
-ln -s libvulkan.so.1.0.3 $RPM_BUILD_ROOT%{_libdir}/libvulkan.so
-ln -s libvulkan.so.1.0.3 $RPM_BUILD_ROOT%{_libdir}/libvulkan.so.1
-
-cp -p demos/vulkaninfo $RPM_BUILD_ROOT%{_bindir}/vulkaninfo
-cp -p demos/tri $RPM_BUILD_ROOT%{_bindir}/vulkan-tri
-cp -p demos/cube $RPM_BUILD_ROOT%{_bindir}/vulkan-cube
-
-cp -p install_staging/*.so $RPM_BUILD_ROOT%{_libdir}/vulkan/layer
-for f in layers/*.json ; do
-sed -e's@"library_path": "./@"library_path": "%{_libdir}/vulkan/layer/@' $f > $RPM_BUILD_ROOT%{_datadir}/vulkan/explicit_layer.d/$(basename $f)
-done
-
-cp -p libs/vkjson/libvkjson.a $RPM_BUILD_ROOT%{_libdir}
-cp -p libs/vkjson/vkjson_{info,unittest} $RPM_BUILD_ROOT%{_bindir}
-
-cd ..
-
-cp -p libs/vkjson/vkjson.h $RPM_BUILD_ROOT%{_includedir}
-cp -p include/vulkan/* $RPM_BUILD_ROOT%{_includedir}/vulkan
-
-cp -p demos/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-%post	-p /sbin/ldconfig
-%postun	-p /sbin/ldconfig
-
-%files
-%defattr(644,root,root,755)
-%doc LICENSE.txt
-%doc loader/{README.md,LoaderAndLayerInterface.md}
-%dir %{_sysconfdir}/vulkan
-%dir %{_sysconfdir}/vulkan/icd.d
-%dir %{_sysconfdir}/vulkan/explicit_layer.d
-%dir %{_sysconfdir}/vulkan/implicit_layer.d
-%dir %{_datadir}/vulkan
-%dir %{_datadir}/vulkan/icd.d
-%dir %{_datadir}/vulkan/explicit_layer.d
-%dir %{_datadir}/vulkan/implicit_layer.d
-%{_libdir}/libvulkan.so.1.*.*
-%ghost %{_libdir}/libvulkan.so.1
-%dir %{_libdir}/vulkan
-
-%files demos
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/vulkan-tri
-%attr(755,root,root) %{_bindir}/vulkan-cube
-
-%files utils
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/vulkaninfo
-%attr(755,root,root) %{_bindir}/vkjson_info
-%attr(755,root,root) %{_bindir}/vkjson_unittest
-
-%files -n vulkan-layers
-%defattr(644,root,root,755)
-%doc LICENSE.txt layers/README.md layers/vk_layer_settings.txt
-%dir %{_libdir}/vulkan/layer
-%{_libdir}/vulkan/layer/*.so
-%{_datadir}/vulkan/explicit_layer.d/*.json
-
-%files -n vulkan-devel
-%defattr(644,root,root,755)
-%doc LICENSE.txt README.md
-%{_libdir}/libvulkan.so
-%{_libdir}/libvkjson.a
-%{_includedir}/vulkan
-%{_includedir}/vkjson.h
-%{_examplesdir}/%{name}-%{version}
diff --git a/vulkan-sdk.spec b/vulkan-sdk.spec
new file mode 100644
index 0000000..006dccf
--- /dev/null
+++ b/vulkan-sdk.spec
@@ -0,0 +1,285 @@
+#
+# Conditional build:
+%bcond_with	tests		# build with tests (require a working Vulkan
+				# driver (ICD))
+%bcond_with	intel_icd	# build experimental Intel GPU driver
+
+%define	api_version 1.0.3
+
+%define snap	20160223
+# sdk-1.0.3 branch
+%define loader_commit	b654da708be8f14e7f4c6f78df656229939422c8
+# master branch
+%define tools_commit	e5dccf86cf999ff9988be97337d0e3a3d508b085
+%define	rel	1
+Summary:	LunarG Vulkan SDK
+Name:		vulkan-sdk
+Version:	1.0.3.0
+Release:	3.s%{snap}.%{rel}
+License:	MIT-like
+Group:		Development
+Source0:	https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers/archive/%{loader_commit}/Vulkan-LoaderAndValidationLayers-s%{snap}.tar.gz
+# Source0-md5:	25e8092b69d15090af5cada36d4fc92d
+Source1:	https://github.com/LunarG/VulkanTools/archive/%{tools_commit}/VulkanTools-s%{snap}.tar.gz
+# Source1-md5:	89ae56a0c0270a7043548bc30c99aa36
+Patch0:		system_glslang.patch
+URL:		http://lunarg.com/vulkan-sdk/
+%{?with_intel_icd:BuildRequires:	Mesa-libGL-devel}
+BuildRequires:	bison
+BuildRequires:	cmake
+BuildRequires:	GLM
+BuildRequires:	glslang
+BuildRequires:	glslang-devel
+BuildRequires:	graphviz
+BuildRequires:	ImageMagick-devel
+BuildRequires:	libpng
+BuildRequires:	libxcb-devel
+BuildRequires:	python3
+BuildRequires:	python3-modules
+BuildRequires:	spirv-tools-devel
+BuildRequires:	udev-devel
+%{?with_intel_icd:BuildRequires:	xorg-lib-libpciaccess-devel}
+Requires:	vulkan-debug-layers = %{version}-%{release}
+Requires:	vulkan-devel = %{version}-%{release}
+Requires:	vulkan-loader = %{version}-%{release}
+Requires:	vulkan-tools = %{version}-%{release}
+Requires:	vulkan-validation-layers = %{version}-%{release}
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Vulkan API Software Development Kit
+
+%package -n vulkan-loader
+Summary:	Vulkan API loader
+License:	MIT-like
+Group:		Library
+Provides:	vulkan(loader) = %{api_version}
+
+%description -n vulkan-loader
+Common loader for Vulkan API drivers.
+
+%package -n vulkan-validation-layers
+Summary:	Validation layers for Vulkan
+Group:		Development/Libraries
+Requires:	%{name} = %{version}-%{release}
+
+%description -n vulkan-validation-layers
+Validation layers for Vulkan.
+
+%package -n vulkan-debug-layers
+Summary:	Debug layers for Vulkan
+Group:		Development/Libraries
+Requires:	%{name} = %{version}-%{release}
+
+%description -n vulkan-debug-layers
+Debug layers for Vulkan.
+
+%package -n vulkan-devel
+Summary:	Header files for the Vulkan API
+Summary(pl.UTF-8):	Pliki nagłówkowe API Vulkan
+Group:		Development/Libraries
+Requires:	%{name} = %{version}-%{release}
+
+%description -n vulkan-devel
+Header files for the Vulkan API.
+
+%description -n vulkan-devel -l pl.UTF-8
+Pliki nagłówkowe API Vulkan.
+
+%package demos
+Summary:	Vulkan demos
+Group:		Development/Libraries
+Requires:	vulkan(icd)
+Requires:	vulkan-loader = %{version}-%{release}
+
+%description demos
+Vulkan demos.
+
+%package tools
+Summary:	Vulkan tools
+Group:		Development
+Suggests:	vulkan(icd)
+Requires:	vulkan-loader = %{version}-%{release}
+
+%description tools
+Vulkan tools.
+
+%prep
+%setup -q -c -a1
+
+mv Vulkan-LoaderAndValidationLayers-%{loader_commit} Vulkan-LoaderAndValidationLayers
+mv VulkanTools-%{tools_commit} VulkanTools
+
+%patch0 -p1
+
+ln -s Vulkan-LoaderAndValidationLayers LoaderAndValidationLayers
+
+%build
+install -d {Vulkan-LoaderAndValidationLayers,VulkanTools}/build
+cd Vulkan-LoaderAndValidationLayers/build
+%cmake \
+	-DCMAKE_INSTALL_DATADIR=share \
+	-DCMAKE_INSTALL_SYSCONFDIR=etc \
+	%{?with_tests:-DBUILD_TESTS=ON} \
+	%{!?with_tests:-DBUILD_TESTS=OFF} \
+		../
+%{__make}
+
+%if %{with tests}
+cd tests
+LC_ALL=C.utf-8 VK_LAYER_PATH=../layers LD_LIBRARY_PATH=../loader:../layers ./run_all_tests.sh
+cd ..
+%endif
+cd ../..
+
+cd VulkanTools/build
+%cmake \
+	-DBUILD_ICD=%{?with_intel_icd:ON}%{!?with_intel_icd:OFF} \
+	../
+
+%{__make}
+cd ../..
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{_datadir},%{_sysconfdir}}/vulkan/icd.d \
+$RPM_BUILD_ROOT{%{_datadir},%{_sysconfdir}}/vulkan/{explicit,implicit}_layer.d \
+	$RPM_BUILD_ROOT{%{_bindir},%{_libdir}/vulkan/layer} \
+	$RPM_BUILD_ROOT%{_includedir}/vulkan \
+	$RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+
+
+cd Vulkan-LoaderAndValidationLayers/build
+%{__make} install
+
+cp -p loader/libvulkan.so.1.0.3 $RPM_BUILD_ROOT%{_libdir}
+ln -s libvulkan.so.1.0.3 $RPM_BUILD_ROOT%{_libdir}/libvulkan.so
+ln -s libvulkan.so.1.0.3 $RPM_BUILD_ROOT%{_libdir}/libvulkan.so.1
+
+cp -p demos/vulkaninfo $RPM_BUILD_ROOT%{_bindir}/vulkaninfo
+cp -p demos/tri $RPM_BUILD_ROOT%{_bindir}/vulkan-tri
+cp -p demos/cube $RPM_BUILD_ROOT%{_bindir}/vulkan-cube
+
+cp -p install_staging/*.so $RPM_BUILD_ROOT%{_libdir}/vulkan/layer
+for f in layers/*.json ; do
+sed -e's@"library_path": "./@"library_path": "%{_libdir}/vulkan/layer/@' $f > $RPM_BUILD_ROOT%{_datadir}/vulkan/explicit_layer.d/$(basename $f)
+done
+
+cp -p libs/vkjson/libvkjson.a $RPM_BUILD_ROOT%{_libdir}
+cp -p libs/vkjson/vkjson_{info,unittest} $RPM_BUILD_ROOT%{_bindir}
+
+cp -p ../libs/vkjson/vkjson.h $RPM_BUILD_ROOT%{_includedir}
+cp -p ../include/vulkan/* $RPM_BUILD_ROOT%{_includedir}/vulkan
+
+cp -p ../demos/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+
+cd ../..
+cd VulkanTools/build
+%{__make} install
+
+cp -p install_staging/*.so $RPM_BUILD_ROOT%{_libdir}/vulkan/layer
+for f in layers/*.json ; do
+sed -e's@"library_path": "./@"library_path": "%{_libdir}/vulkan/layer/@' $f > $RPM_BUILD_ROOT%{_datadir}/vulkan/explicit_layer.d/$(basename $f)
+done
+
+cp -p vktrace/libVkLayer_vktrace_layer.so $RPM_BUILD_ROOT%{_libdir}/vulkan/layer
+cp -p vktrace/vkreplay $RPM_BUILD_ROOT%{_bindir}
+cp -p vktrace/vktrace $RPM_BUILD_ROOT%{_bindir}
+sed -e's@"library_path": "./@"library_path": "%{_libdir}/vulkan/layer/@' ../vktrace/src/vktrace_layer/linux/VkLayer_vktrace_layer.json > $RPM_BUILD_ROOT%{_datadir}/vulkan/explicit_layer.d/VkLayer_vktrace_layer.json
+
+cd ../..
+
+cp -p VulkanTools/vktrace/README.md vktrace-README.md
+cp -p VulkanTools/vktrace/TODO.md vktrace-TODO.md
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post	-p /sbin/ldconfig
+%postun	-p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+
+%files -n vulkan-loader
+%defattr(644,root,root,755)
+%doc Vulkan-LoaderAndValidationLayers/LICENSE.txt
+%doc Vulkan-LoaderAndValidationLayers/loader/{README.md,LoaderAndLayerInterface.md}
+%dir %{_sysconfdir}/vulkan
+%dir %{_sysconfdir}/vulkan/icd.d
+%dir %{_sysconfdir}/vulkan/explicit_layer.d
+%dir %{_sysconfdir}/vulkan/implicit_layer.d
+%dir %{_datadir}/vulkan
+%dir %{_datadir}/vulkan/icd.d
+%dir %{_datadir}/vulkan/explicit_layer.d
+%dir %{_datadir}/vulkan/implicit_layer.d
+%{_libdir}/libvulkan.so.1.*.*
+%ghost %{_libdir}/libvulkan.so.1
+%dir %{_libdir}/vulkan
+%dir %{_libdir}/vulkan/layer
+
+%files demos
+%defattr(644,root,root,755)
+%doc Vulkan-LoaderAndValidationLayers/LICENSE.txt
+%attr(755,root,root) %{_bindir}/vulkan-tri
+%attr(755,root,root) %{_bindir}/vulkan-cube
+
+%files tools
+%defattr(644,root,root,755)
+%doc VulkanTools/LICENSE.txt
+%doc vktrace-README.md vktrace-TODO.md
+%attr(755,root,root) %{_bindir}/vkjson_info
+%attr(755,root,root) %{_bindir}/vkjson_unittest
+%attr(755,root,root) %{_bindir}/vkreplay
+%attr(755,root,root) %{_bindir}/vktrace
+%attr(755,root,root) %{_bindir}/vulkaninfo
+%attr(755,root,root) %{_libdir}/vulkan/layer/libVkLayer_vktrace_layer.so
+
+%files -n vulkan-validation-layers
+%defattr(644,root,root,755)
+%doc Vulkan-LoaderAndValidationLayers/LICENSE.txt
+%doc Vulkan-LoaderAndValidationLayers/layers/{README.md,vk_layer_settings.txt}
+%attr(755,root,root) %{_libdir}/vulkan/layer/libVkLayer_device_limits.so
+%attr(755,root,root) %{_libdir}/vulkan/layer/libVkLayer_draw_state.so
+%attr(755,root,root) %{_libdir}/vulkan/layer/libVkLayer_image.so
+%attr(755,root,root) %{_libdir}/vulkan/layer/libVkLayer_mem_tracker.so
+%attr(755,root,root) %{_libdir}/vulkan/layer/libVkLayer_object_tracker.so
+%attr(755,root,root) %{_libdir}/vulkan/layer/libVkLayer_param_checker.so
+%attr(755,root,root) %{_libdir}/vulkan/layer/libVkLayer_swapchain.so
+%attr(755,root,root) %{_libdir}/vulkan/layer/libVkLayer_threading.so
+%attr(755,root,root) %{_libdir}/vulkan/layer/libVkLayer_unique_objects.so
+%attr(755,root,root) %{_libdir}/vulkan/layer/liblayer_utils.so
+%{_datadir}/vulkan/explicit_layer.d/VkLayer_device_limits.json
+%{_datadir}/vulkan/explicit_layer.d/VkLayer_draw_state.json
+%{_datadir}/vulkan/explicit_layer.d/VkLayer_image.json
+%{_datadir}/vulkan/explicit_layer.d/VkLayer_mem_tracker.json
+%{_datadir}/vulkan/explicit_layer.d/VkLayer_object_tracker.json
+%{_datadir}/vulkan/explicit_layer.d/VkLayer_param_checker.json
+%{_datadir}/vulkan/explicit_layer.d/VkLayer_swapchain.json
+%{_datadir}/vulkan/explicit_layer.d/VkLayer_threading.json
+%{_datadir}/vulkan/explicit_layer.d/VkLayer_unique_objects.json
+
+%files -n vulkan-debug-layers
+%defattr(644,root,root,755)
+%doc VulkanTools/LICENSE.txt
+%doc VulkanTools/layers/{README.md,vk_layer_settings.txt}
+%attr(755,root,root) %{_libdir}/vulkan/layer/libVkLayer_api_dump.so
+%attr(755,root,root) %{_libdir}/vulkan/layer/libVkLayer_basic.so
+%attr(755,root,root) %{_libdir}/vulkan/layer/libVkLayer_generic.so
+%attr(755,root,root) %{_libdir}/vulkan/layer/libVkLayer_multi.so
+%attr(755,root,root) %{_libdir}/vulkan/layer/libVkLayer_screenshot.so
+%{_datadir}/vulkan/explicit_layer.d/VkLayer_api_dump.json
+%{_datadir}/vulkan/explicit_layer.d/VkLayer_basic.json
+%{_datadir}/vulkan/explicit_layer.d/VkLayer_generic.json
+%{_datadir}/vulkan/explicit_layer.d/VkLayer_multi.json
+%{_datadir}/vulkan/explicit_layer.d/VkLayer_screenshot.json
+%{_datadir}/vulkan/explicit_layer.d/VkLayer_vktrace_layer.json
+
+%files -n vulkan-devel
+%defattr(644,root,root,755)
+%doc Vulkan-LoaderAndValidationLayers/{LICENSE.txt,README.md}
+%{_libdir}/libvulkan.so
+%{_libdir}/libvkjson.a
+%{_includedir}/vulkan
+%{_includedir}/vkjson.h
+%{_examplesdir}/%{name}-%{version}
diff --git a/rpath.patch b/rpath.patch
new file mode 100644
index 0000000..6147f9c
--- /dev/null
+++ b/rpath.patch
@@ -0,0 +1,24 @@
+diff -dur -x '*~' -x '*.orig' vulkan-sdk-1.0.3.0.orig/Vulkan-LoaderAndValidationLayers/layers/CMakeLists.txt vulkan-sdk-1.0.3.0/Vulkan-LoaderAndValidationLayers/layers/CMakeLists.txt
+--- vulkan-sdk-1.0.3.0.orig/Vulkan-LoaderAndValidationLayers/layers/CMakeLists.txt	2016-02-24 10:16:45.000000000 +0100
++++ vulkan-sdk-1.0.3.0/Vulkan-LoaderAndValidationLayers/layers/CMakeLists.txt	2016-02-24 10:17:24.000000000 +0100
+@@ -26,7 +26,7 @@
+     VkLayer_device_limits
+     )
+ 
+-set(VK_LAYER_RPATH /usr/lib/x86_64-linux-gnu/vulkan/layer:/usr/lib/i386-linux-gnu/vulkan/layer)
++set(VK_LAYER_RPATH "${CMAKE_INSTALL_LIBDIR}/vulkan/layer")
+ set(CMAKE_INSTALL_RPATH ${VK_LAYER_RPATH})
+ 
+ if (NOT WIN32)
+diff -dur -x '*~' -x '*.orig' vulkan-sdk-1.0.3.0.orig/VulkanTools/layers/CMakeLists.txt vulkan-sdk-1.0.3.0/VulkanTools/layers/CMakeLists.txt
+--- vulkan-sdk-1.0.3.0.orig/VulkanTools/layers/CMakeLists.txt	2016-02-23 00:08:24.000000000 +0100
++++ vulkan-sdk-1.0.3.0/VulkanTools/layers/CMakeLists.txt	2016-02-24 10:17:37.000000000 +0100
+@@ -23,7 +23,7 @@
+     VkLayer_screenshot
+     )
+ 
+-set(VK_LAYER_RPATH /usr/lib/x86_64-linux-gnu/vulkan/layer:/usr/lib/i386-linux-gnu/vulkan/layer)
++set(VK_LAYER_RPATH "${CMAKE_INSTALL_LIBDIR}/vulkan/layer")
+ set(CMAKE_INSTALL_RPATH ${VK_LAYER_RPATH})
+ 
+ if (NOT WIN32)
diff --git a/system_glslang.patch b/system_glslang.patch
index 188d1c5..0474cc9 100644
--- a/system_glslang.patch
+++ b/system_glslang.patch
@@ -1,6 +1,7 @@
-diff -dur Vulkan-LoaderAndValidationLayers-windows-rt-1.0.3.0.orig/CMakeLists.txt Vulkan-LoaderAndValidationLayers-windows-rt-1.0.3.0/CMakeLists.txt
---- Vulkan-LoaderAndValidationLayers-windows-rt-1.0.3.0.orig/CMakeLists.txt	2016-02-14 02:19:50.000000000 +0100
-+++ Vulkan-LoaderAndValidationLayers-windows-rt-1.0.3.0/CMakeLists.txt	2016-02-19 22:36:04.792275587 +0100
+Only in vulkan-sdk-1.0.3.0: LoaderAndValidationLayers
+diff -dur vulkan-sdk-1.0.3.0.orig/Vulkan-LoaderAndValidationLayers/CMakeLists.txt vulkan-sdk-1.0.3.0/Vulkan-LoaderAndValidationLayers/CMakeLists.txt
+--- vulkan-sdk-1.0.3.0.orig/Vulkan-LoaderAndValidationLayers/CMakeLists.txt	2016-02-22 22:02:54.000000000 +0100
++++ vulkan-sdk-1.0.3.0/Vulkan-LoaderAndValidationLayers/CMakeLists.txt	2016-02-24 10:16:23.000000000 +0100
 @@ -72,7 +72,7 @@
  
  if (BUILD_TESTS)
@@ -10,9 +11,9 @@ diff -dur Vulkan-LoaderAndValidationLayers-windows-rt-1.0.3.0.orig/CMakeLists.tx
  
      if(NOT EXISTS ${GLSLANG_PREFIX})
          message(FATAL_ERROR "Necessary glslang components do not exist: " ${GLSLANG_PREFIX})
-diff -dur Vulkan-LoaderAndValidationLayers-windows-rt-1.0.3.0.orig/demos/CMakeLists.txt Vulkan-LoaderAndValidationLayers-windows-rt-1.0.3.0/demos/CMakeLists.txt
---- Vulkan-LoaderAndValidationLayers-windows-rt-1.0.3.0.orig/demos/CMakeLists.txt	2016-02-14 02:19:50.000000000 +0100
-+++ Vulkan-LoaderAndValidationLayers-windows-rt-1.0.3.0/demos/CMakeLists.txt	2016-02-19 22:36:04.792275587 +0100
+diff -dur vulkan-sdk-1.0.3.0.orig/Vulkan-LoaderAndValidationLayers/demos/CMakeLists.txt vulkan-sdk-1.0.3.0/Vulkan-LoaderAndValidationLayers/demos/CMakeLists.txt
+--- vulkan-sdk-1.0.3.0.orig/Vulkan-LoaderAndValidationLayers/demos/CMakeLists.txt	2016-02-22 22:02:54.000000000 +0100
++++ vulkan-sdk-1.0.3.0/Vulkan-LoaderAndValidationLayers/demos/CMakeLists.txt	2016-02-24 10:16:23.000000000 +0100
 @@ -28,45 +28,45 @@
      endif()
  
@@ -75,18 +76,9 @@ diff -dur Vulkan-LoaderAndValidationLayers-windows-rt-1.0.3.0.orig/demos/CMakeLi
         )
  endif()
  
-diff -dur Vulkan-LoaderAndValidationLayers-windows-rt-1.0.3.0.orig/layers/CMakeLists.txt Vulkan-LoaderAndValidationLayers-windows-rt-1.0.3.0/layers/CMakeLists.txt
---- Vulkan-LoaderAndValidationLayers-windows-rt-1.0.3.0.orig/layers/CMakeLists.txt	2016-02-14 02:19:50.000000000 +0100
-+++ Vulkan-LoaderAndValidationLayers-windows-rt-1.0.3.0/layers/CMakeLists.txt	2016-02-19 22:37:15.242851047 +0100
-@@ -26,7 +26,7 @@
-     VkLayer_device_limits
-     )
- 
--set(VK_LAYER_RPATH /usr/lib/x86_64-linux-gnu/vulkan/layer:/usr/lib/i386-linux-gnu/vulkan/layer)
-+set(VK_LAYER_RPATH "${CMAKE_INSTALL_LIBDIR}/vulkan/layer")
- set(CMAKE_INSTALL_RPATH ${VK_LAYER_RPATH})
- 
- if (NOT WIN32)
+diff -dur vulkan-sdk-1.0.3.0.orig/Vulkan-LoaderAndValidationLayers/layers/CMakeLists.txt vulkan-sdk-1.0.3.0/Vulkan-LoaderAndValidationLayers/layers/CMakeLists.txt
+--- vulkan-sdk-1.0.3.0.orig/Vulkan-LoaderAndValidationLayers/layers/CMakeLists.txt	2016-02-22 22:02:54.000000000 +0100
++++ vulkan-sdk-1.0.3.0/Vulkan-LoaderAndValidationLayers/layers/CMakeLists.txt	2016-02-24 10:16:23.000000000 +0100
 @@ -79,7 +79,7 @@
  	${CMAKE_CURRENT_SOURCE_DIR}/../loader
  	${CMAKE_CURRENT_SOURCE_DIR}/../include/vulkan
@@ -96,9 +88,9 @@ diff -dur Vulkan-LoaderAndValidationLayers-windows-rt-1.0.3.0.orig/layers/CMakeL
  )
  
  if (WIN32)
-diff -dur Vulkan-LoaderAndValidationLayers-windows-rt-1.0.3.0.orig/tests/CMakeLists.txt Vulkan-LoaderAndValidationLayers-windows-rt-1.0.3.0/tests/CMakeLists.txt
---- Vulkan-LoaderAndValidationLayers-windows-rt-1.0.3.0.orig/tests/CMakeLists.txt	2016-02-14 02:19:50.000000000 +0100
-+++ Vulkan-LoaderAndValidationLayers-windows-rt-1.0.3.0/tests/CMakeLists.txt	2016-02-19 22:36:04.792275587 +0100
+diff -dur vulkan-sdk-1.0.3.0.orig/Vulkan-LoaderAndValidationLayers/tests/CMakeLists.txt vulkan-sdk-1.0.3.0/Vulkan-LoaderAndValidationLayers/tests/CMakeLists.txt
+--- vulkan-sdk-1.0.3.0.orig/Vulkan-LoaderAndValidationLayers/tests/CMakeLists.txt	2016-02-22 22:02:54.000000000 +0100
++++ vulkan-sdk-1.0.3.0/Vulkan-LoaderAndValidationLayers/tests/CMakeLists.txt	2016-02-24 10:16:23.000000000 +0100
 @@ -67,13 +67,13 @@
                           IMPORTED_LOCATION_DEBUG "${GLSLANG_PREFIX}/${BUILDTGT_DIR}/SPIRV/Debug/SPIRV.lib")
  else ()
@@ -117,3 +109,76 @@ diff -dur Vulkan-LoaderAndValidationLayers-windows-rt-1.0.3.0.orig/tests/CMakeLi
  endif()
  
  include_directories(
+diff -dur vulkan-sdk-1.0.3.0.orig/VulkanTools/CMakeLists.txt vulkan-sdk-1.0.3.0/VulkanTools/CMakeLists.txt
+--- vulkan-sdk-1.0.3.0.orig/VulkanTools/CMakeLists.txt	2016-02-23 00:08:24.000000000 +0100
++++ vulkan-sdk-1.0.3.0/VulkanTools/CMakeLists.txt	2016-02-24 10:16:23.000000000 +0100
+@@ -77,7 +77,7 @@
+ 
+ if (BUILD_ICD OR BUILD_TESTS)
+     # Hard code our glslang path for now
+-    get_filename_component(GLSLANG_PREFIX ../glslang ABSOLUTE)
++    set(GLSLANG_PREFIX /usr/include/glslang)
+ 
+     if(NOT EXISTS ${GLSLANG_PREFIX})
+         message(FATAL_ERROR "Necessary glslang components do not exist: " ${GLSLANG_PREFIX})
+diff -dur vulkan-sdk-1.0.3.0.orig/VulkanTools/icd/intel/compiler/CMakeLists.txt vulkan-sdk-1.0.3.0/VulkanTools/icd/intel/compiler/CMakeLists.txt
+--- vulkan-sdk-1.0.3.0.orig/VulkanTools/icd/intel/compiler/CMakeLists.txt	2016-02-23 00:08:24.000000000 +0100
++++ vulkan-sdk-1.0.3.0/VulkanTools/icd/intel/compiler/CMakeLists.txt	2016-02-24 10:16:23.000000000 +0100
+@@ -38,15 +38,6 @@
+   message(FATAL_ERROR "llvm-config failed: " ${LLVM_LIBS_RESULT})
+ endif()
+ 
+-# Expect libraries to be in either the build (release build) or dbuild (debug) directories
+-if(EXISTS ${GLSLANG_PREFIX}/${BUILDTGT_DIR}/install/lib)
+-    set(GLSLANG_BUILD ${GLSLANG_PREFIX}/${BUILDTGT_DIR})
+-elseif(EXISTS ${GLSLANG_PREFIX}/dbuild/install/lib)
+-    set(GLSLANG_BUILD ${GLSLANG_PREFIX}/dbuild)
+-else()
+-    message(FATAL_ERROR "Necessary glslang libraries cannot be found: " ${GLSLANG_PREFIX})
+-endif()
+-
+ if(EXISTS ${LUNARGLASS_PREFIX}/${BUILDTGT_DIR}/install/lib)
+     set(LUNARGLASS_BUILD ${LUNARGLASS_PREFIX}/${BUILDTGT_DIR})
+ elseif(EXISTS ${LUNARGLASS_PREFIX}/dbuild/install/lib)
+@@ -75,7 +66,6 @@
+       COMPILE_FLAGS "${LLVM_CXX_CONFIG}")
+ 
+ SET(COMPILER_LINK_DIRS
+-    -L${GLSLANG_BUILD}/install/lib
+     -L${LUNARGLASS_PREFIX}/Core/LLVM/llvm-3.4/${BUILDTGT_DIR}/install/usr/local/lib
+     -L${LUNARGLASS_PREFIX}/${BUILDTGT_DIR}/Core
+     -L${LUNARGLASS_PREFIX}/${BUILDTGT_DIR}/Frontends/glslang
+@@ -121,9 +111,9 @@
+ set_target_properties(SpvFrontend     PROPERTIES IMPORTED_LOCATION ${LUNARGLASS_PREFIX}/${BUILDTGT_DIR}/Frontends/SPIRV/libSpvFrontend.a)
+ set_target_properties(core            PROPERTIES IMPORTED_LOCATION ${LUNARGLASS_PREFIX}/${BUILDTGT_DIR}/Core/libcore.a)
+ set_target_properties(LLVMipo         PROPERTIES IMPORTED_LOCATION ${LUNARGLASS_PREFIX}/Core/LLVM/llvm-3.4/${BUILDTGT_DIR}/install/usr/local/lib/libLLVMipo.a)
+-set_target_properties(glslang         PROPERTIES IMPORTED_LOCATION ${GLSLANG_BUILD}/install/lib/libglslang.a)
+-set_target_properties(SPIRV           PROPERTIES IMPORTED_LOCATION ${GLSLANG_BUILD}/install/lib/libSPIRV.a)
+-set_target_properties(OGLCompiler     PROPERTIES IMPORTED_LOCATION ${GLSLANG_BUILD}/install/lib/libOGLCompiler.a)
++set_target_properties(glslang         PROPERTIES IMPORTED_LOCATION ${CMAKE_INSTALL_LIBDIR}/libglslang.a)
++set_target_properties(SPIRV           PROPERTIES IMPORTED_LOCATION ${CMAKE_INSTALL_LIBDIR}/libSPIRV.a)
++set_target_properties(OGLCompiler     PROPERTIES IMPORTED_LOCATION ${CMAKE_INSTALL_LIBDIR}/libOGLCompiler.a)
+ 
+ SET(COMPILER_INCLUDE_DIRS
+     ${GLSLANG_PREFIX}
+diff -dur vulkan-sdk-1.0.3.0.orig/VulkanTools/tests/CMakeLists.txt vulkan-sdk-1.0.3.0/VulkanTools/tests/CMakeLists.txt
+--- vulkan-sdk-1.0.3.0.orig/VulkanTools/tests/CMakeLists.txt	2016-02-23 00:08:24.000000000 +0100
++++ vulkan-sdk-1.0.3.0/VulkanTools/tests/CMakeLists.txt	2016-02-24 10:16:23.000000000 +0100
+@@ -78,13 +78,13 @@
+                          IMPORTED_LOCATION_DEBUG "${GLSLANG_PREFIX}/${BUILDTGT_DIR}/SPIRV/Debug/SPIRV.lib")
+ else ()
+    set_target_properties(glslang PROPERTIES
+-                         IMPORTED_LOCATION       "${GLSLANG_PREFIX}/build/install/lib/libglslang.a")
++                         IMPORTED_LOCATION       "${CMAKE_INSTALL_LIBDIR}/libglslang.a")
+    set_target_properties(OGLCompiler PROPERTIES
+-                         IMPORTED_LOCATION       "${GLSLANG_PREFIX}/build/install/lib/libOGLCompiler.a")
++                         IMPORTED_LOCATION       "${CMAKE_INSTALL_LIBDIR}/libOGLCompiler.a")
+    set_target_properties(OSDependent PROPERTIES
+-                         IMPORTED_LOCATION       "${GLSLANG_PREFIX}/build/install/lib/libOSDependent.a")
++                         IMPORTED_LOCATION       "${CMAKE_INSTALL_LIBDIR}/libOSDependent.a")
+    set_target_properties(SPIRV PROPERTIES
+-                         IMPORTED_LOCATION       "${GLSLANG_PREFIX}/build/install/lib/libSPIRV.a")
++                         IMPORTED_LOCATION       "${CMAKE_INSTALL_LIBDIR}/libSPIRV.a")
+ endif()
+ 
+ #hacky get include files from loader repo
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/vulkan-sdk.git/commitdiff/0c2b688d6cd86269bd9d8c1a6a9d3d530ff67256



More information about the pld-cvs-commit mailing list