1269a57
# The library consists of headers only
1269a57
%global debug_package %{nil}
1269a57
1269a57
Name:           glm
8269f52
Version:        0.9.9.2
bdc6c59
Release:        2%{?dist}
1269a57
Summary:        C++ mathematics library for graphics programming
1269a57
1269a57
License:        MIT
1269a57
URL:            http://glm.g-truc.net/
f986b91
Source0:        https://github.com/g-truc/glm/releases/download/%{version}/%{name}-%{version}.zip
2e09e20
Igor Gnatenko 14e13bb
BuildRequires:  gcc
Igor Gnatenko 14e13bb
BuildRequires:  gcc-c++
1269a57
BuildRequires:  cmake
1269a57
1269a57
%description
1269a57
GLM is a C++ library for doing mathematics operations
1269a57
required in many OpenGL based applications. Its interface
1269a57
has been designed to resemble the built-in matrix and vector
1269a57
types of the OpenGL shading language.
1269a57
1269a57
%package        devel
1269a57
Summary:        C++ mathematics library for graphics programming
75bc5ac
BuildArch:      noarch
1269a57
1269a57
# As required in
1269a57
# https://fedoraproject.org/wiki/Packaging:Guidelines#Packaging_Static_Libraries_2
1269a57
Provides:       %{name}-static = %{version}-%{release}
1269a57
1269a57
%description    devel
1269a57
GLM is a C++ library for doing mathematics operations
1269a57
required in many OpenGL based applications. Its interface
1269a57
has been designed to resemble the built-in matrix and vector
1269a57
types of the OpenGL shading language.
1269a57
1269a57
%{name}-devel is only required for building software that uses
1269a57
the GLM library. Because GLM currently is a header-only library,
1269a57
there is no matching run time package.
1269a57
1269a57
%package        doc
1269a57
Summary:        Documentation for %{name}-devel
1269a57
BuildArch:      noarch
1269a57
1269a57
%description    doc
1269a57
The %{name}-doc package contains reference documentation and
1269a57
a programming manual for the %{name}-devel package.
1269a57
1269a57
%prep
1269a57
# Some glm releases, like version 0.9.3.1, place contents of
1269a57
# the source archive directly into the archive root. Others,
1269a57
# like glm 0.9.3.2, place them into a single subdirectory.
1269a57
# The former case is inconvenient, but it can be be
1269a57
# compensated for with the -c option of the setup macro.
1269a57
#
1269a57
# When updating this package, take care to check if -c is
1269a57
# needed for the particular version.
60b09e2
#
60b09e2
# Also it looks like some versions get shipped with a common
60b09e2
# directory in archive root, but with an unusual name for the
60b09e2
# directory. In this case, use the -n option of the setup macro.
8269f52
%setup -q
1269a57
1269a57
# A couple of files had CRLF line-ends in them.
4bdf918
# Check with rpmlint after updating the package that we are not
4bdf918
# forgetting to convert line endings in some files.
27a95d6
#
27a95d6
# This release of glm seems to have shipped with no CRLF file
27a95d6
# endings at all, so these are commented out.
f986b91
sed -i 's/\r//' readme.md
f560c58
sed -i 's/\r//' doc/api/doxygen.css
bc3f050
sed -i 's/\r//' doc/api/dynsections.js
bc3f050
sed -i 's/\r//' doc/api/jquery.js
f560c58
sed -i 's/\r//' doc/api/tabs.css
1269a57
fc6717b
# These are just for being able to apply the patch that
fc6717b
# was exported from git.
fc6717b
sed -i 's/\r//' glm/detail/setup.hpp
2e09e20
sed -i 's/\r//' glm/simd/platform.h
fc6717b
sed -i 's/\r//' test/core/core_setup_message.cpp
fc6717b
fc6717b
1269a57
%build
1269a57
mkdir build
1269a57
cd build
cc1df44
%{cmake} -DGLM_TEST_ENABLE=ON ..
1269a57
make %{?_smp_mflags}
1269a57
1269a57
%check
1269a57
cd build
9d5634a
4f96509
# Some tests are disabled due to failing tests (to be reported)
4f96509
# - test-core_func_common fails on aarch64
4f96509
# - test-gtc_packing      fails on s390x
4f96509
ctest --output-on-failure -E '(test-core_func_common|test-gtc_packing)'
1269a57
1269a57
%install
1269a57
cd build
1269a57
1269a57
make install DESTDIR=$RPM_BUILD_ROOT
1269a57
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
1269a57
find $RPM_BUILD_ROOT -name CMakeLists.txt -exec rm -f {} ';'
1269a57
f986b91
# The cmake config files seem architecture independent and since
f986b91
# also glm-devel is otherwise noarch, it is desired to ship the
f986b91
# cmake configuration files under /usr/share.
f986b91
mkdir -pv $RPM_BUILD_ROOT%{_datadir}
f986b91
mv $RPM_BUILD_ROOT%{_libdir}/cmake $RPM_BUILD_ROOT%{_datadir}/cmake
40d6bf7
mv $RPM_BUILD_ROOT%{_libdir}/pkgconfig $RPM_BUILD_ROOT%{_datadir}/pkgconfig
40d6bf7
rmdir $RPM_BUILD_ROOT%{_libdir}
941ede5
40d6bf7
# Here it seems to be acceptable to own the cmake and pkgconfig directories
40d6bf7
# as an alternative to having glm-devel depending on cmake and pkg-config
40d6bf7
# https://fedoraproject.org/wiki/Packaging:Guidelines#The_directory_is_owned_by_a_package_which_is_not_required_for_your_package_to_function
1269a57
%files devel
8269f52
%doc readme.md
1269a57
%{_includedir}/%{name}
f986b91
%{_datadir}/cmake
40d6bf7
%{_datadir}/pkgconfig/
1269a57
1269a57
%files doc
8269f52
%doc doc/manual.pdf
4bdf918
%doc doc/api/
1269a57
1269a57
%changelog
bdc6c59
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.9.2-2
bdc6c59
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
bdc6c59
8269f52
* Thu Oct 11 2018 Joonas Sarajärvi <muep@iki.fi> - 0.9.9.2-1
8269f52
- Update to upstream GLM version 0.9.9.2
8269f52
45b2695
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.8.5-3
45b2695
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
45b2695
e3eab3a
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.8.5-2
e3eab3a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
e3eab3a
08bbac8
* Sun Feb 04 2018 Joonas Sarajärvi <muep@iki.fi> - 0.9.8.5-1
08bbac8
- Update to upstream GLM version 0.9.8.5
08bbac8
af6a3b1
* Mon Jan 29 2018 Joonas Sarajärvi <muep@iki.fi> - 0.9.8.4-5
af6a3b1
- Fix compatibility with GCC 7.3.1 #1539568
af6a3b1
fb87209
* Sat Aug 12 2017 Joonas Sarajärvi <muep@iki.fi> - 0.9.8.4-4
fb87209
- Update the workaround for known-broken tests
fb87209
276b262
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.8.4-3
276b262
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
276b262
cb21205
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.8.4-2
cb21205
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
cb21205
201fa3c
* Thu Mar 02 2017 Joonas Sarajärvi <muep@iki.fi> - 0.9.8.4-1
201fa3c
- Update to upstream GLM version 0.9.8.4
201fa3c
7f90d5b
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.8.3-2
7f90d5b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
7f90d5b
5f870d7
* Sat Nov 12 2016 Joonas Sarajärvi <muep@iki.fi> - 0.9.8.3-1
5f870d7
- Update to upstream GLM version 0.9.8.3
5f870d7
a6bf45d
* Mon Nov 07 2016 Joonas Sarajärvi <muep@iki.fi> - 0.9.8.2-1
a6bf45d
- Update to upstream GLM version 0.9.8.2
a6bf45d
40d6bf7
* Tue Sep 06 2016 Joonas Sarajärvi <muep@iki.fi> - 0.9.7.6-1
40d6bf7
- Update to upstream GLM version 0.9.7.6
40d6bf7
b2a4371
* Thu Mar 03 2016 Joonas Sarajärvi <muep@iki.fi> - 0.9.7.3-1
b2a4371
- Update to upstream GLM version 0.9.7.3
b2a4371
fc6717b
* Thu Feb 04 2016 Joonas Sarajärvi <muep@iki.fi> - 0.9.7.2-3
fc6717b
- Fix tests with GCC 6.0
fc6717b
bf4299e
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.7.2-2
bf4299e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
bf4299e
06e6fcb
* Fri Jan 15 2016 Joonas Sarajärvi <muep@iki.fi> - 0.9.7.2-1
06e6fcb
- Update to upstream GLM version 0.9.7.2
06e6fcb
f986b91
* Wed Aug 05 2015 Joonas Sarajärvi <muep@iki.fi> - 0.9.7.0-1
f986b91
- Update to upstream GLM version 0.9.7.0
f986b91
- CMake config files are added
f986b91
0e2d560
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.6.3-2
0e2d560
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
0e2d560
bc3f050
* Sun Apr 26 2015 Joonas Sarajärvi <muep@iki.fi> - 0.9.6.3-1
bc3f050
- Update to upstream GLM version 0.9.6.3
bc3f050
75bc5ac
* Mon Apr 20 2015 David Tardon <dtardon@redhat.com> - 0.9.6.1-3
75bc5ac
- make -devel noarch
7bbbf5a
- install license file in -doc, as required by packaging guidelines
75bc5ac
f6b43dd
* Wed Jan 28 2015 Dan Horák <dan[at]danny.cz> - 0.9.6.1-2
f6b43dd
- fix build on big endian arches, patch by Jakub Cajka from #1185298
f6b43dd
941ede5
* Tue Jan 06 2015 Joonas Sarajärvi <muep@iki.fi> - 0.9.6.1-1
941ede5
- Update to upstream GLM version 0.9.6.1
941ede5
6357357
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.5.2-4
6357357
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
6357357
345acb6
* Mon Jun 23 2014 Joonas Sarajärvi <muep@iki.fi> - 0.9.5.2-3
345acb6
- Reduce test array size to avoid memory allocation failure in tests
345acb6
- Resolve a number of aliasing warnings
345acb6
- Disable the packing test
345acb6
dc6cd78
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.5.2-2
dc6cd78
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
dc6cd78
73ed3c7
* Sat Mar 29 2014 Joonas Sarajärvi <muep@iki.fi> - 0.9.5.2-1
73ed3c7
- Update to upstream GLM version 0.9.5.2
73ed3c7
f560c58
* Tue Sep 24 2013 Joonas Sarajärvi <muep@iki.fi> - 0.9.4.6-2
f560c58
- Fix building on ARM
f560c58
f67383e
* Tue Sep 24 2013 Joonas Sarajärvi <muep@iki.fi> - 0.9.4.6-1
f67383e
- Update to upstream GLM version 0.9.4.6
f67383e
- Bug fixes
f67383e
60b09e2
* Tue Aug 20 2013 Joonas Sarajärvi <muep@iki.fi> - 0.9.4.5-1
60b09e2
- Update to upstream GLM version 0.9.4.5
60b09e2
- Bug fixes
60b09e2
f800e19
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.4.4-2
f800e19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
f800e19
ccdf88e
* Sat Jul 06 2013 Joonas Sarajärvi <muep@iki.fi> - 0.9.4.4-1
ccdf88e
- Update to upstream GLM version 0.9.4.4
ccdf88e
- Bug fixes
ccdf88e
be5f3ff
* Mon Apr 15 2013 Joonas Sarajärvi <muep@iki.fi> - 0.9.4.3-1
be5f3ff
- Update to upstream GLM version 0.9.4.3
be5f3ff
- This version introduces just minor bug fixes
be5f3ff
4bdf918
* Fri Mar 08 2013 Joonas Sarajärvi <muep@iki.fi> - 0.9.4.2-1
4bdf918
- Update to upstream GLM version 0.9.4.2
4bdf918
bc61715
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.3.4-3
bc61715
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
bc61715
47ace4e
* Tue Sep 04 2012 Dan Horák <dan[at]danny.cz> - 0.9.3.4-2
47ace4e
- fix build on non-x86 arches
47ace4e
cc1df44
* Sun Sep 02 2012 Joonas Sarajärvi <muep@iki.fi> - 0.9.3.4-1
cc1df44
- Update to a new upstream version
cc1df44
- Work around problems in glm::log2 for integers
cc1df44
9d5634a
* Sat Sep 01 2012 Joonas Sarajärvi <muep@iki.fi> - 0.9.3.2-3
9d5634a
- Skip gtx_integer test that is known as broken
9d5634a
1269a57
* Sat Sep 01 2012 Joonas Sarajärvi <muep@iki.fi> - 0.9.3.2-2
1269a57
- Remove prebuilt binaries shipped in upstream source archive
1269a57
1269a57
* Fri May 04 2012 Joonas Sarajärvi <muep@iki.fi> - 0.9.3.2-1
1269a57
- Update to upstream version 0.9.3.2
1269a57
1269a57
* Mon Feb 13 2012 Joonas Sarajärvi <muep@iki.fi> - 0.9.3.1-5
1269a57
- Use global instead of define
1269a57
- Clarify the comment about GLM zip archives
1269a57
- Remove the unnecessary rm command from install section
1269a57
- Remove misleading reference to non-existing glm package
1269a57
1269a57
* Mon Feb 06 2012 Joonas Sarajärvi <muep@iki.fi> - 0.9.3.1-4
1269a57
- Add virtual Provides: that is required for static-only libraries
1269a57
- Make descriptions in devel and doc packages more accurate
1269a57
1269a57
* Mon Feb 06 2012 Joonas Sarajärvi <muep@iki.fi> - 0.9.3.1-3
1269a57
- Fix items pointed out in Comment 2 of #787510
1269a57
1269a57
* Mon Feb 06 2012 Joonas Sarajärvi <muep@iki.fi> - 0.9.3.1-2
1269a57
- Build and run the self-test suite shipped with glm
1269a57
- Add subpackage for manual and reference docs
1269a57
1269a57
* Sun Feb 05 2012 Joonas Sarajärvi <muep@iki.fi> - 0.9.3.1-1
1269a57
- Initial RPM packaging