From cb6936631b61e4524586d2b67fbdc3b0be00d105 Mon Sep 17 00:00:00 2001 From: leigh123linux Date: Tue, 2 Jan 2018 17:14:43 +0000 Subject: [PATCH] First build --- .gitignore | 1 + ...ng-default-resource-limits_staticlib.patch | 9 +++ glslang.spec | 71 +++++++++++++++++++ nodate.patch | 20 ++++++ sources | 1 + 5 files changed, 102 insertions(+) create mode 100644 .gitignore create mode 100644 glslang-default-resource-limits_staticlib.patch create mode 100644 glslang.spec create mode 100644 nodate.patch create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a631ba8 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/glslang-*.tar.gz diff --git a/glslang-default-resource-limits_staticlib.patch b/glslang-default-resource-limits_staticlib.patch new file mode 100644 index 0000000..a04c2aa --- /dev/null +++ b/glslang-default-resource-limits_staticlib.patch @@ -0,0 +1,9 @@ +--- a/StandAlone/CMakeLists.txt ++++ b/StandAlone/CMakeLists.txt +@@ -1,4 +1,4 @@ +-add_library(glslang-default-resource-limits ++add_library(glslang-default-resource-limits STATIC + ${CMAKE_CURRENT_SOURCE_DIR}/ResourceLimits.cpp) + set_property(TARGET glslang-default-resource-limits PROPERTY FOLDER glslang) + set_property(TARGET glslang-default-resource-limits PROPERTY POSITION_INDEPENDENT_CODE ON) + diff --git a/glslang.spec b/glslang.spec new file mode 100644 index 0000000..93a7c18 --- /dev/null +++ b/glslang.spec @@ -0,0 +1,71 @@ +%global commit 715c353a15836e5ae192a64a4cf54e2ce7e8d66a +%global shortcommit %(c=%{commit}; echo ${c:0:7}) +%global commit_date 20171028 +%global gitrel .%{commit_date}.git%{shortcommit} + +Name: glslang +Version: 3.1 +Release: 0.1%{?gitrel}%{?dist} +Summary: OpenGL and OpenGL ES shader front end and validator + +License: BSD and GPLv3+ and ASL 2.0 +URL: https://github.com/KhronosGroup +Source0: %url/%{name}/archive/%{commit}.tar.gz#/%{name}-%{commit}.tar.gz +Patch0: nodate.patch +Patch1: glslang-default-resource-limits_staticlib.patch + +BuildRequires: cmake3 +BuildRequires: gcc-c++ + +%description +%{name} is the official reference compiler front end for the OpenGL +ES and OpenGL shading languages. It implements a strict +interpretation of the specifications for these languages. + +%package devel +Summary: Development files for %{name} + +%description devel +%{name} is the official reference compiler front end for the OpenGL +ES and OpenGL shading languages. It implements a strict +interpretation of the specifications for these languages. + +%prep +%autosetup -p1 -n %{name}-%{commit} +# Fix rpmlint warning on debuginfo +find . -name '*.h' -or -name '*.cpp' -or -name '*.hpp'| xargs chmod a-x + +%build +%__mkdir_p %_target_platform +pushd %_target_platform +%cmake3 -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_LIBDIR=%{_libdir} \ + -DCMAKE_SKIP_RPATH:BOOL=yes .. +%{make_build} +popd + +%install +%{make_install} -C %_target_platform + + +# Install .so file +install -pm 0644 %_target_platform/StandAlone/libglslang-default-resource-limits.a %{buildroot}%{_libdir}/ + +%files devel +%doc README.md README-spirv-remap.txt +%{_bindir}/glslangValidator +%{_bindir}/spirv-remap +%{_includedir}/SPIRV/ +%{_includedir}/glslang/ +%{_libdir}/libHLSL.a +%{_libdir}/libOGLCompiler.a +%{_libdir}/libOSDependent.a +%{_libdir}/libSPIRV.a +%{_libdir}/libSPVRemapper.a +%{_libdir}/libglslang.a +%{_libdir}/libglslang-default-resource-limits.a + +%changelog +* Thu Jul 13 2017 Leigh Scott - 3.1-0.1.20171028.git715c353 +- First build + diff --git a/nodate.patch b/nodate.patch new file mode 100644 index 0000000..f94015c --- /dev/null +++ b/nodate.patch @@ -0,0 +1,20 @@ +From: Jan Engelhardt +Date: 2017-08-07 20:22:29.456870387 +0200 + +--- + StandAlone/spirv-remap.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: glslang/StandAlone/spirv-remap.cpp +=================================================================== +--- a/StandAlone/spirv-remap.cpp ++++ b/StandAlone/spirv-remap.cpp +@@ -227,7 +227,7 @@ namespace { + } + } + else if (arg == "--version" || arg == "-V") { +- std::cout << basename(argv[0]) << " version 0.97 " << __DATE__ << " " << __TIME__ << std::endl; ++ std::cout << basename(argv[0]) << " version 0.97 " << std::endl; + exit(0); + } else if (arg == "--input" || arg == "-i") { + // Collect input files diff --git a/sources b/sources new file mode 100644 index 0000000..5cff0f4 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (glslang-715c353a15836e5ae192a64a4cf54e2ce7e8d66a.tar.gz) = 9c46249cf2addb31833fcf3b1ce47458b8d339f86e6a5896ed8511d8b8e48dfcf65d2e4b7291593d47161f1c23a82e5f42fc2bbcf33e2383e9b0bd951f092924