%define svn_revision 2215 %define svn_stamp 20130517 Summary: Almost Native Graphics Layer Engine Name: angleproject Version: 0 Release: 0.3.%{svn_stamp}svn%{svn_revision}%{?dist} License: BSD URL: http://code.google.com/p/angleproject/ # Upstream hasn't done any official releases yet # To generate snapshot: # svn checkout http://angleproject.googlecode.com/svn/trunk/ angleproject # tar --exclude-vcs -cjvpf angleproject-r$(svnversion angleproject).tar.bz2 angleproject Source: angleproject-r%{svn_revision}.tar.bz2 # -debuginfo useless for (only) static libs %define debug_package %{nil} BuildRequires: flex BuildRequires: gyp %description ANGLE is a conformant implementation of the OpenGL ES 2.0 specification that is hardware‐accelerated via Direct3D. ANGLE v1.0.772 was certified compliant by passing the ES 2.0.3 conformance tests in October 2011. ANGLE also provides an implementation of the EGL 1.4 specification. ANGLE is used as the default WebGL backend for both Google Chrome and Mozilla Firefox on Windows platforms. Chrome uses ANGLE for all graphics rendering on Windows, including the accelerated Canvas2D implementation and the Native Client sandbox environment. Portions of the ANGLE shader compiler are used as a shader validator and translator by WebGL implementations across multiple platforms. It is used on Mac OS X, Linux, and in mobile variants of the browsers. Having one shader validator helps to ensure that a consistent set of GLSL ES shaders are accepted across browsers and platforms. The shader translator can be used to translate shaders to other shading languages, and to optionally apply shader modifications to work around bugs or quirks in the native graphics drivers. The translator targets Desktop GLSL, Direct3D HLSL, and even ESSL for native GLES2 platforms. %package devel Summary: Almost Native Graphics Layer Engine Provides: %{name}-static = %{version}-%{release} Provides: %{name}-static%{?_isa} = %{version}-%{release} Requires: khrplatform-devel %description devel Portions of the ANGLE shader compiler are used as a shader validator and translator by WebGL implementations across multiple platforms. It is used on Mac OS X, Linux, and in mobile variants of the browsers. Having one shader validator helps to ensure that a consistent set of GLSL ES shaders are accepted across browsers and platforms. The shader translator can be used to translate shaders to other shading languages, and to optionally apply shader modifications to work around bugs or quirks in the native graphics drivers. The translator targets Desktop GLSL, Direct3D HLSL, and even ESSL for native GLES2 platforms. %prep %setup -q -n angleproject %build export RPM_OPT_FLAGS="-fPIC %{optflags}" mkdir %{_target_platform} pushd %{_target_platform} gyp --depth . -I ../build/common.gypi ../src/build_angle.gyp popd # hack around gyp wierdness creating non-relocatable thin static archives sed -i -e "s|alink_thin|alink|g" src/*.mk make %{?_smp_mflags} V=1 -C %{_target_platform} \ BUILDTYPE=Release # In case the default (and unwise for release builds) use of -Werror ever causes problems... # CXXFLAGS="-Wno-unused-variable -Wno-missing-noreturn -Wno-unused-function -Wno-reorder -Wno-error -Wno-unknown-pragmas -Wno-undef" %install # The gyp build system doesn't know how to install files mkdir -p %{buildroot}%{_includedir} cp -Rv \ include/GLSLANG/ \ %{buildroot}%{_includedir}/ mkdir -p %{buildroot}%{_libdir} install -m644 -p \ %{_target_platform}/out/Release/src/libpreprocessor.a \ %{_target_platform}/out/Release/src/libtranslator_common.a \ %{_target_platform}/out/Release/src/libtranslator_glsl.a \ %{buildroot}%{_libdir}/ %check # verify library archive readability (ie, verify against problems like thin archives) nm %{buildroot}%{_libdir}/lib*.a %files devel %doc AUTHORS CONTRIBUTORS %doc LICENSE %{_includedir}/GLSLANG/ %{_libdir}/libpreprocessor.a %{_libdir}/libtranslator_common.a %{_libdir}/libtranslator_glsl.a %changelog * Thu May 30 2013 Rex Dieter 0-0.3.20130517svn2215 - %%doc AUTHORS CONTRIBUTORS - trim %%description * Sat May 25 2013 Rex Dieter 0-0.2.20130517svn2215 - 20130517 snapshot (svn r2215) * Wed May 15 2013 Rex Dieter 0-0.1.20121214svn1561 - first try (starting with mingw-angleproject as template)