From 16b60bc078a4d82d625bbc55e12acd4d41613b61 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Nov 19 2015 08:52:51 +0000 Subject: import glm-0.9.6.3-1.el7 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5d1e3f7 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/glm-0.9.6.3.zip diff --git a/.glm.metadata b/.glm.metadata new file mode 100644 index 0000000..64f2b35 --- /dev/null +++ b/.glm.metadata @@ -0,0 +1 @@ +fb3cf9cc21cc87546fb94fa9e1773b1e4bf87cd5 SOURCES/glm-0.9.6.3.zip diff --git a/README.md b/README.md deleted file mode 100644 index 98f42b4..0000000 --- a/README.md +++ /dev/null @@ -1,4 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/glm-0.9.5.2-smallercount.patch b/SOURCES/glm-0.9.5.2-smallercount.patch new file mode 100644 index 0000000..096b5a6 --- /dev/null +++ b/SOURCES/glm-0.9.5.2-smallercount.patch @@ -0,0 +1,12 @@ +diff -ru glm/test/core/core_func_matrix.cpp glm_count/test/core/core_func_matrix.cpp +--- glm/test/core/core_func_matrix.cpp 2014-02-08 21:28:22.000000000 +0200 ++++ glm_count/test/core/core_func_matrix.cpp 2014-06-10 19:50:43.355854306 +0300 +@@ -186,7 +186,7 @@ + return Failed; + } + +-std::size_t const Count(10000000); ++std::size_t const Count(1000000); + + template + int test_inverse_perf(std::size_t Instance, char const * Message) diff --git a/SOURCES/glm-0.9.6.1-bigendian.patch b/SOURCES/glm-0.9.6.1-bigendian.patch new file mode 100644 index 0000000..b097412 --- /dev/null +++ b/SOURCES/glm-0.9.6.1-bigendian.patch @@ -0,0 +1,29 @@ +diff -up glm/glm/detail/func_integer.inl.befix glm/glm/detail/func_integer.inl +--- glm/glm/detail/func_integer.inl.befix 2015-01-28 08:44:30.468627717 +0100 ++++ glm/glm/detail/func_integer.inl 2015-01-28 08:46:19.990024091 +0100 +@@ -248,10 +248,8 @@ namespace detail + GLM_STATIC_ASSERT(sizeof(uint) == sizeof(uint32), "uint and uint32 size mismatch"); + + uint64 Value64 = static_cast(x) * static_cast(y); +- uint32* PointerMSB = (reinterpret_cast(&Value64) + 1); +- msb = *PointerMSB; +- uint32* PointerLSB = (reinterpret_cast(&Value64) + 0); +- lsb = *PointerLSB; ++ msb = Value64 >> 32; ++ lsb = Value64; + } + + template class vecType> +@@ -270,10 +268,8 @@ namespace detail + GLM_STATIC_ASSERT(sizeof(int) == sizeof(int32), "int and int32 size mismatch"); + + int64 Value64 = static_cast(x) * static_cast(y); +- int32* PointerMSB = (reinterpret_cast(&Value64) + 1); +- msb = *PointerMSB; +- int32* PointerLSB = (reinterpret_cast(&Value64)); +- lsb = *PointerLSB; ++ msb = Value64 >> 32; ++ lsb = Value64; + } + + template class vecType> diff --git a/SOURCES/glm-0.9.6.1-ulp.patch b/SOURCES/glm-0.9.6.1-ulp.patch new file mode 100644 index 0000000..c5ccb95 --- /dev/null +++ b/SOURCES/glm-0.9.6.1-ulp.patch @@ -0,0 +1,21 @@ +diff -ru glm/glm/gtc/ulp.inl glm-ulp/glm/gtc/ulp.inl +--- glm/glm/gtc/ulp.inl 2014-12-09 21:13:54.000000000 +0200 ++++ glm-ulp/glm/gtc/ulp.inl 2015-01-06 16:29:47.497932633 +0200 +@@ -316,7 +316,7 @@ + if(x < y) + { + T temp = x; +- while(temp != y)// && ulp < std::numeric_limits::max()) ++ while(temp < y)// && ulp < std::numeric_limits::max()) + { + ++ulp; + temp = next_float(temp); +@@ -325,7 +325,7 @@ + else if(y < x) + { + T temp = y; +- while(temp != x)// && ulp < std::numeric_limits::max()) ++ while(temp < x)// && ulp < std::numeric_limits::max()) + { + ++ulp; + temp = next_float(temp); diff --git a/SOURCES/glm-0.9.6.3-nom64.patch b/SOURCES/glm-0.9.6.3-nom64.patch new file mode 100644 index 0000000..dcf245d --- /dev/null +++ b/SOURCES/glm-0.9.6.3-nom64.patch @@ -0,0 +1,12 @@ +diff -ru glm/CMakeLists.txt glm-nom64/CMakeLists.txt +--- glm/CMakeLists.txt 2015-02-14 00:51:30.000000000 +0200 ++++ glm-nom64/CMakeLists.txt 2015-04-25 10:14:57.585689646 +0300 +@@ -129,7 +129,7 @@ + if(CMAKE_COMPILER_IS_GNUCXX) + #add_definitions(-S) + #add_definitions(-s) +- add_definitions(-m64) ++ #add_definitions(-m64) + add_definitions(-O2) + + #add_definitions(-fprofile-arcs -ftest-coverage) gcov diff --git a/SPECS/glm.spec b/SPECS/glm.spec new file mode 100644 index 0000000..aa23c49 --- /dev/null +++ b/SPECS/glm.spec @@ -0,0 +1,213 @@ +# The library consists of headers only +%global debug_package %{nil} + +Name: glm +Version: 0.9.6.3 +Release: 1%{?dist} +Summary: C++ mathematics library for graphics programming + +License: MIT +URL: http://glm.g-truc.net/ +Source0: http://downloads.sourceforge.net/ogl-math/%{name}-%{version}/%{name}-%{version}.zip +Patch0: glm-0.9.5.2-smallercount.patch +Patch1: glm-0.9.6.1-ulp.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1185298 +Patch2: glm-0.9.6.1-bigendian.patch +Patch3: glm-0.9.6.3-nom64.patch + +BuildRequires: cmake + +%description +GLM is a C++ library for doing mathematics operations +required in many OpenGL based applications. Its interface +has been designed to resemble the built-in matrix and vector +types of the OpenGL shading language. + +%package devel +Group: Development/Libraries +Summary: C++ mathematics library for graphics programming +BuildArch: noarch + +# As required in +# https://fedoraproject.org/wiki/Packaging:Guidelines#Packaging_Static_Libraries_2 +Provides: %{name}-static = %{version}-%{release} + +%description devel +GLM is a C++ library for doing mathematics operations +required in many OpenGL based applications. Its interface +has been designed to resemble the built-in matrix and vector +types of the OpenGL shading language. + +%{name}-devel is only required for building software that uses +the GLM library. Because GLM currently is a header-only library, +there is no matching run time package. + +%package doc +Summary: Documentation for %{name}-devel +Group: Documentation +BuildArch: noarch + +%description doc +The %{name}-doc package contains reference documentation and +a programming manual for the %{name}-devel package. + +%prep +# Some glm releases, like version 0.9.3.1, place contents of +# the source archive directly into the archive root. Others, +# like glm 0.9.3.2, place them into a single subdirectory. +# The former case is inconvenient, but it can be be +# compensated for with the -c option of the setup macro. +# +# When updating this package, take care to check if -c is +# needed for the particular version. +# +# Also it looks like some versions get shipped with a common +# directory in archive root, but with an unusual name for the +# directory. In this case, use the -n option of the setup macro. +%setup -q -n glm + +# A couple of files had CRLF line-ends in them. +# Check with rpmlint after updating the package that we are not +# forgetting to convert line endings in some files. +# +# This release of glm seems to have shipped with no CRLF file +# endings at all, so these are commented out. +sed -i 's/\r//' copying.txt +sed -i 's/\r//' readme.txt +sed -i 's/\r//' doc/api/doxygen.css +sed -i 's/\r//' doc/api/dynsections.js +sed -i 's/\r//' doc/api/jquery.js +sed -i 's/\r//' doc/api/tabs.css + + +%patch0 -p1 -b .smallercount +%patch1 -p1 -b .ulp +%patch2 -p1 -b .bigendian +%patch3 -p1 -b .nom64 + +%build +mkdir build +cd build +%{cmake} -DGLM_TEST_ENABLE=ON .. +make %{?_smp_mflags} + +%check +cd build + +# Some tests are disabled due to known upstream bugs: +# https://github.com/g-truc/glm/issues/212 +# https://github.com/g-truc/glm/issues/296 +ctest --output-on-failure -E '(test-gtc_packing|test-gtc_integer)' + +%install +cd build + +make install DESTDIR=$RPM_BUILD_ROOT +find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' +find $RPM_BUILD_ROOT -name CMakeLists.txt -exec rm -f {} ';' + +# This is not packaged until there is consensus that +# packages should install FindSomething.cmake files. +# https://bugzilla.redhat.com/show_bug.cgi?id=1022088 +rm $RPM_BUILD_ROOT%{_libdir}/cmake/FindGLM.cmake + +%files devel +%doc copying.txt readme.txt +%{_includedir}/%{name} + +%files doc +%doc copying.txt +%doc doc/%{name}.pdf +%doc doc/api/ + +%changelog +* Sun Apr 26 2015 Joonas Sarajärvi - 0.9.6.3-1 +- Update to upstream GLM version 0.9.6.3 + +* Mon Apr 20 2015 David Tardon - 0.9.6.1-3 +- make -devel noarch +- install license file in -doc, as required by packaging guidelines + +* Wed Jan 28 2015 Dan Horák - 0.9.6.1-2 +- fix build on big endian arches, patch by Jakub Cajka from #1185298 + +* Tue Jan 06 2015 Joonas Sarajärvi - 0.9.6.1-1 +- Update to upstream GLM version 0.9.6.1 + +* Sat Aug 16 2014 Fedora Release Engineering - 0.9.5.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Mon Jun 23 2014 Joonas Sarajärvi - 0.9.5.2-3 +- Reduce test array size to avoid memory allocation failure in tests +- Resolve a number of aliasing warnings +- Disable the packing test + +* Sat Jun 07 2014 Fedora Release Engineering - 0.9.5.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Sat Mar 29 2014 Joonas Sarajärvi - 0.9.5.2-1 +- Update to upstream GLM version 0.9.5.2 + +* Tue Sep 24 2013 Joonas Sarajärvi - 0.9.4.6-2 +- Fix building on ARM + +* Tue Sep 24 2013 Joonas Sarajärvi - 0.9.4.6-1 +- Update to upstream GLM version 0.9.4.6 +- Bug fixes + +* Tue Aug 20 2013 Joonas Sarajärvi - 0.9.4.5-1 +- Update to upstream GLM version 0.9.4.5 +- Bug fixes + +* Sat Aug 03 2013 Fedora Release Engineering - 0.9.4.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Sat Jul 06 2013 Joonas Sarajärvi - 0.9.4.4-1 +- Update to upstream GLM version 0.9.4.4 +- Bug fixes + +* Mon Apr 15 2013 Joonas Sarajärvi - 0.9.4.3-1 +- Update to upstream GLM version 0.9.4.3 +- This version introduces just minor bug fixes + +* Fri Mar 08 2013 Joonas Sarajärvi - 0.9.4.2-1 +- Update to upstream GLM version 0.9.4.2 + +* Wed Feb 13 2013 Fedora Release Engineering - 0.9.3.4-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Tue Sep 04 2012 Dan Horák - 0.9.3.4-2 +- fix build on non-x86 arches + +* Sun Sep 02 2012 Joonas Sarajärvi - 0.9.3.4-1 +- Update to a new upstream version +- Work around problems in glm::log2 for integers + +* Sat Sep 01 2012 Joonas Sarajärvi - 0.9.3.2-3 +- Skip gtx_integer test that is known as broken + +* Sat Sep 01 2012 Joonas Sarajärvi - 0.9.3.2-2 +- Remove prebuilt binaries shipped in upstream source archive + +* Fri May 04 2012 Joonas Sarajärvi - 0.9.3.2-1 +- Update to upstream version 0.9.3.2 + +* Mon Feb 13 2012 Joonas Sarajärvi - 0.9.3.1-5 +- Use global instead of define +- Clarify the comment about GLM zip archives +- Remove the unnecessary rm command from install section +- Remove misleading reference to non-existing glm package + +* Mon Feb 06 2012 Joonas Sarajärvi - 0.9.3.1-4 +- Add virtual Provides: that is required for static-only libraries +- Make descriptions in devel and doc packages more accurate + +* Mon Feb 06 2012 Joonas Sarajärvi - 0.9.3.1-3 +- Fix items pointed out in Comment 2 of #787510 + +* Mon Feb 06 2012 Joonas Sarajärvi - 0.9.3.1-2 +- Build and run the self-test suite shipped with glm +- Add subpackage for manual and reference docs + +* Sun Feb 05 2012 Joonas Sarajärvi - 0.9.3.1-1 +- Initial RPM packaging