From 2c8f3f5e3b0d0bcdad180c7613470e4d1cf0ed0aecf14eac3634dd2093951939 Mon Sep 17 00:00:00 2001
From: Jan Engelhardt <jengelh@inai.de>
Date: Wed, 7 Feb 2018 22:32:50 +0000
Subject: [PATCH] - Update to new upstream release 2018.0

OBS-URL: https://build.opensuse.org/package/show/X11:Wayland/spirv-tools?expand=0&rev=21
---
 _service                       |  5 +++--
 baselibs.conf                  |  2 +-
 spirv-tools-2017.0.g103.tar.xz |  3 ---
 spirv-tools-2018.0.tar.xz      |  3 +++
 spirv-tools.changes            | 10 +++++++++
 spirv-tools.spec               |  9 ++++----
 ver.diff                       | 38 +++++++++++++++++-----------------
 7 files changed, 41 insertions(+), 29 deletions(-)
 delete mode 100644 spirv-tools-2017.0.g103.tar.xz
 create mode 100644 spirv-tools-2018.0.tar.xz

diff --git a/_service b/_service
index c9c97ac..b0aff83 100644
--- a/_service
+++ b/_service
@@ -3,8 +3,9 @@
  		<param name="scm">git</param>
 		<param name="url">https://github.com/KhronosGroup/SPIRV-Tools</param>
 		<param name="filename">spirv-tools</param>
-		<param name="parent-tag">d16403a</param>
-		<param name="versionformat">2017.0.g@TAG_OFFSET@</param>
+		<param name="revision">v2018.0</param>
+		<param name="parent-tag">v2018.0</param>
+		<param name="versionformat">2018.0</param>
 	</service>
 	<service name="recompress" mode="disabled">
 		<param name="file">*.tar</param>
diff --git a/baselibs.conf b/baselibs.conf
index 1cd1183..4cd4475 100644
--- a/baselibs.conf
+++ b/baselibs.conf
@@ -1 +1 @@
-libSPIRV-Tools-suse4
+libSPIRV-Tools-suse5
diff --git a/spirv-tools-2017.0.g103.tar.xz b/spirv-tools-2017.0.g103.tar.xz
deleted file mode 100644
index 7dfb3c9..0000000
--- a/spirv-tools-2017.0.g103.tar.xz
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:5b5a0442de1979b02c6dc7631eea60baaba70614561d99df1afe31085886eda6
-size 508352
diff --git a/spirv-tools-2018.0.tar.xz b/spirv-tools-2018.0.tar.xz
new file mode 100644
index 0000000..3c54e08
--- /dev/null
+++ b/spirv-tools-2018.0.tar.xz
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e5dbc7474636266cf34762244e31f303d497be230286469ad26ac82d2fd005a0
+size 663044
diff --git a/spirv-tools.changes b/spirv-tools.changes
index 1da2a67..611c9f1 100644
--- a/spirv-tools.changes
+++ b/spirv-tools.changes
@@ -1,3 +1,13 @@
+-------------------------------------------------------------------
+Wed Feb  7 22:22:02 UTC 2018 - jengelh@inai.de
+
+- Update to new upstream release 2018.0
+  * Added OpenCL ExtInst validation rules
+  * Add adjacency validation pass
+  * Add memory semantics checks to validate atomics
+  * Allow relaxing validation of pointers in logical
+    addressing mode
+
 -------------------------------------------------------------------
 Thu Jan  4 15:47:38 UTC 2018 - tchvatal@suse.com
 
diff --git a/spirv-tools.spec b/spirv-tools.spec
index 9c1ef5f..56bfe42 100644
--- a/spirv-tools.spec
+++ b/spirv-tools.spec
@@ -16,11 +16,11 @@
 #
 
 
-%define version_unconverted 2017.0.g103
-%define lname libSPIRV-Tools-suse4
+%define version_unconverted 2018.0
+%define lname libSPIRV-Tools-suse5
 
 Name:           spirv-tools
-Version:        2017.0.g103
+Version:        2018.0
 Release:        0
 Summary:        API and commands for processing SPIR-V modules
 License:        Apache-2.0
@@ -37,7 +37,7 @@ BuildRequires:  cmake >= 2.8.12
 BuildRequires:  gcc-c++
 BuildRequires:  python3-base
 BuildRequires:  python3-xml
-BuildRequires:  spirv-headers >= 1.2
+BuildRequires:  spirv-headers >= 1.2.g22
 
 %description
 The package includes an assembler, binary module parser,
@@ -93,6 +93,7 @@ make %{?_smp_mflags}
 %_libdir/libSPIRV-Tools-comp.so
 %_libdir/libSPIRV-Tools-link.so
 %_libdir/libSPIRV-Tools-opt.so
+%_libdir/pkgconfig/SPIRV-Tools.pc
 %_includedir/spirv-tools/
 
 %changelog
diff --git a/ver.diff b/ver.diff
index 9227410..6a77885 100644
--- a/ver.diff
+++ b/ver.diff
@@ -10,51 +10,51 @@ Unversioned libraries suck!
  source/opt/CMakeLists.txt  |    1 +
  4 files changed, 4 insertions(+)
 
-Index: spirv-tools-2017.0.g103/source/CMakeLists.txt
+Index: spirv-tools-2018.0.g0/source/CMakeLists.txt
 ===================================================================
---- spirv-tools-2017.0.g103.orig/source/CMakeLists.txt
-+++ spirv-tools-2017.0.g103/source/CMakeLists.txt
-@@ -288,6 +288,7 @@ set_source_files_properties(
+--- spirv-tools-2018.0.g0.orig/source/CMakeLists.txt
++++ spirv-tools-2018.0.g0/source/CMakeLists.txt
+@@ -324,6 +324,7 @@ set_source_files_properties(
    PROPERTIES OBJECT_DEPENDS "${SPIRV_TOOLS_BUILD_VERSION_INC}")
  
  add_library(${SPIRV_TOOLS} ${SPIRV_SOURCES})
-+set_target_properties(${SPIRV_TOOLS} PROPERTIES SOVERSION suse3)
++set_target_properties(${SPIRV_TOOLS} PROPERTIES SOVERSION suse5)
  spvtools_default_compile_options(${SPIRV_TOOLS})
  target_include_directories(${SPIRV_TOOLS}
    PUBLIC ${spirv-tools_SOURCE_DIR}/include
-Index: spirv-tools-2017.0.g103/source/comp/CMakeLists.txt
+Index: spirv-tools-2018.0.g0/source/comp/CMakeLists.txt
 ===================================================================
---- spirv-tools-2017.0.g103.orig/source/comp/CMakeLists.txt
-+++ spirv-tools-2017.0.g103/source/comp/CMakeLists.txt
+--- spirv-tools-2018.0.g0.orig/source/comp/CMakeLists.txt
++++ spirv-tools-2018.0.g0/source/comp/CMakeLists.txt
 @@ -14,6 +14,7 @@
  
  if(SPIRV_BUILD_COMPRESSION)
    add_library(SPIRV-Tools-comp markv_codec.cpp)
-+  set_target_properties(SPIRV-Tools-comp PROPERTIES SOVERSION suse4)
++  set_target_properties(SPIRV-Tools-comp PROPERTIES SOVERSION suse5)
  
    spvtools_default_compile_options(SPIRV-Tools-comp)
    target_include_directories(SPIRV-Tools-comp
-Index: spirv-tools-2017.0.g103/source/link/CMakeLists.txt
+Index: spirv-tools-2018.0.g0/source/link/CMakeLists.txt
 ===================================================================
---- spirv-tools-2017.0.g103.orig/source/link/CMakeLists.txt
-+++ spirv-tools-2017.0.g103/source/link/CMakeLists.txt
+--- spirv-tools-2018.0.g0.orig/source/link/CMakeLists.txt
++++ spirv-tools-2018.0.g0/source/link/CMakeLists.txt
 @@ -14,6 +14,7 @@
  add_library(SPIRV-Tools-link
    linker.cpp
  )
-+set_target_properties(SPIRV-Tools-link PROPERTIES SOVERSION suse4)
++set_target_properties(SPIRV-Tools-link PROPERTIES SOVERSION suse5)
  
  spvtools_default_compile_options(SPIRV-Tools-link)
  target_include_directories(SPIRV-Tools-link
-Index: spirv-tools-2017.0.g103/source/opt/CMakeLists.txt
+Index: spirv-tools-2018.0.g0/source/opt/CMakeLists.txt
 ===================================================================
---- spirv-tools-2017.0.g103.orig/source/opt/CMakeLists.txt
-+++ spirv-tools-2017.0.g103/source/opt/CMakeLists.txt
-@@ -106,6 +106,7 @@ add_library(SPIRV-Tools-opt
-   instruction_list.cpp
+--- spirv-tools-2018.0.g0.orig/source/opt/CMakeLists.txt
++++ spirv-tools-2018.0.g0/source/opt/CMakeLists.txt
+@@ -142,6 +142,7 @@ add_library(SPIRV-Tools-opt
+   workaround1209.cpp
  )
  
-+set_target_properties(SPIRV-Tools-opt PROPERTIES SOVERSION suse3)
++set_target_properties(SPIRV-Tools-opt PROPERTIES SOVERSION suse5)
  spvtools_default_compile_options(SPIRV-Tools-opt)
  target_include_directories(SPIRV-Tools-opt
    PUBLIC ${spirv-tools_SOURCE_DIR}/include