From 69fc288632c40cf94562c2c388c782ab79f969b0 Mon Sep 17 00:00:00 2001 From: leigh123linux Date: Tue, 2 Jan 2018 23:38:38 +0000 Subject: [PATCH] First build --- .gitignore | 1 + SPIRV-Tools_staticlib.patch | 47 +++++++++++++++++++++++++ sources | 1 + spirv-tools.spec | 69 +++++++++++++++++++++++++++++++++++++ 4 files changed, 118 insertions(+) create mode 100644 .gitignore create mode 100644 SPIRV-Tools_staticlib.patch create mode 100644 sources create mode 100644 spirv-tools.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8ce781f --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/spirv-tools-*.tar.gz diff --git a/SPIRV-Tools_staticlib.patch b/SPIRV-Tools_staticlib.patch new file mode 100644 index 0000000..ba3d0f4 --- /dev/null +++ b/SPIRV-Tools_staticlib.patch @@ -0,0 +1,47 @@ +--- SPIRV-Tools-5834719fc17d4735fce0102738b87b70255cfd5f/source/CMakeLists.txt ++++ SPIRV-Tools-5834719fc17d4735fce0102738b87b70255cfd5f-new/source/CMakeLists.txt +@@ -287,7 +287,7 @@ + ${CMAKE_CURRENT_SOURCE_DIR}/software_version.cpp + PROPERTIES OBJECT_DEPENDS "${SPIRV_TOOLS_BUILD_VERSION_INC}") + +-add_library(${SPIRV_TOOLS} ${SPIRV_SOURCES}) ++add_library(${SPIRV_TOOLS} STATIC ${SPIRV_SOURCES}) + spvtools_default_compile_options(${SPIRV_TOOLS}) + target_include_directories(${SPIRV_TOOLS} + PUBLIC ${spirv-tools_SOURCE_DIR}/include + +--- SPIRV-Tools-5834719fc17d4735fce0102738b87b70255cfd5f/source/comp/CMakeLists.txt ++++ SPIRV-Tools-5834719fc17d4735fce0102738b87b70255cfd5f-new/source/comp/CMakeLists.txt +@@ -13,7 +13,7 @@ + # limitations under the License. + + if(SPIRV_BUILD_COMPRESSION) +- add_library(SPIRV-Tools-comp markv_codec.cpp) ++ add_library(SPIRV-Tools-comp STATIC markv_codec.cpp) + + spvtools_default_compile_options(SPIRV-Tools-comp) + target_include_directories(SPIRV-Tools-comp + +--- SPIRV-Tools-5834719fc17d4735fce0102738b87b70255cfd5f/source/opt/CMakeLists.txt ++++ SPIRV-Tools-5834719fc17d4735fce0102738b87b70255cfd5f-new/source/opt/CMakeLists.txt +@@ -11,7 +11,7 @@ + # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + # See the License for the specific language governing permissions and + # limitations under the License. +-add_library(SPIRV-Tools-opt ++add_library(SPIRV-Tools-opt STATIC + aggressive_dead_code_elim_pass.h + basic_block.h + block_merge_pass.h +--- SPIRV-Tools-5834719fc17d4735fce0102738b87b70255cfd5f/source/link/CMakeLists.txt ++++ SPIRV-Tools-5834719fc17d4735fce0102738b87b70255cfd5f-new/source/link/CMakeLists.txt +@@ -11,7 +11,7 @@ + # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + # See the License for the specific language governing permissions and + # limitations under the License. +-add_library(SPIRV-Tools-link ++add_library(SPIRV-Tools-link STATIC + linker.cpp + ) + + diff --git a/sources b/sources new file mode 100644 index 0000000..9f3279a --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (spirv-tools-5834719fc17d4735fce0102738b87b70255cfd5f.tar.gz) = fbaa8445c4c6deedd6dcec14f266feb414f1e0da694270a5b2821b4b59ba61e207839cd66d9144ebf2c3c28719d53125b884b8d7039db20db55fc2694befdd6d diff --git a/spirv-tools.spec b/spirv-tools.spec new file mode 100644 index 0000000..804660f --- /dev/null +++ b/spirv-tools.spec @@ -0,0 +1,69 @@ +%global commit 5834719fc17d4735fce0102738b87b70255cfd5f +%global shortcommit %(c=%{commit}; echo ${c:0:7}) +%global commit_date 20171023 +%global gitrel .%{commit_date}.git%{shortcommit} + +Name: spirv-tools +Version: 2016.7 +Release: 0.1%{?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 +Patch0: SPIRV-Tools_staticlib.patch + +BuildRequires: cmake3 +BuildRequires: gcc-c++ +BuildRequires: python2-devel +BuildRequires: python-simplejson +BuildRequires: spirv-headers-devel + +%description +The package includes an assembler, binary module parser, +disassembler, and validator for SPIR-V.. + +%package devel +Summary: Development files for %{name} + +%description devel +The SPIR-V Tool library contains all of the implementation details +driving the SPIR-V assembler, binary module parser, disassembler and +validator, and is used in the standalone tools whilst also enabling +integration into other code bases directly. + +%prep +%autosetup -p1 -n SPIRV-Tools-%{commit} + +%build +%__mkdir_p %_target_platform +pushd %_target_platform +%cmake3 -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_LIBDIR=%{_libdir} \ + -DSPIRV-Headers_SOURCE_DIR=%{_prefix} .. +%{make_build} +popd + +%install +%{make_install} -C %_target_platform + +%files devel +%license LICENSE +%doc README.md CHANGES +%{_bindir}/spirv-as +%{_bindir}/spirv-cfg +%{_bindir}/spirv-dis +%{_bindir}/spirv-lesspipe.sh +%{_bindir}/spirv-link +%{_bindir}/spirv-opt +%{_bindir}/spirv-stats +%{_bindir}/spirv-val +%{_includedir}/spirv-tools/ +%{_libdir}/libSPIRV-Tools-link.a +%{_libdir}/libSPIRV-Tools-opt.a +%{_libdir}/libSPIRV-Tools.a + +%changelog +* Thu Jul 13 2017 Leigh Scott - 2016.7-0.1.20171023.git5834719 +- First build +