Sophie

Sophie

distrib > Mageia > 9 > x86_64 > by-pkgid > 6fe60068c0d1a8b486fcaa58e2a90265 > files > 4

glm-0.9.9.8-2.mga9.src.rpm

# The library consists of headers only
%global debug_package %{nil}

Name:           glm
Version:        0.9.9.8
Release:        %mkrel 2
Summary:        C++ mathematics library for graphics programming
Group:          Development/C++
License:        MIT
URL:            http://glm.g-truc.net/
Source0:        https://github.com/g-truc/glm/releases/download/%{version}/%{name}-%{version}.7z
Patch0:         glm-0.9.7.2-secondary.patch
Patch1:         glm-0.9.9.8-install.patch

BuildRequires:  cmake
BuildRequires:  dos2unix
BuildRequires:  p7zip

%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/C++
Summary:        C++ mathematics library for graphics programming

%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
%setup -q -n glm

# There are tons of files with CRLF line endings
find . -type f -exec dos2unix "{}" +;

# These are just for being able to apply the patch that
# was exported from git.
sed -i 's/\r//' glm/simd/platform.h
sed -i 's/\r//' test/core/core_setup_message.cpp

%ifnarch %{ix86} x86_64
#patch0 -p1 -b .secondary
%endif
%patch1 -p1 -b .cmakelists

%build
export CXXFLAGS="%{build_cxxflags} -fno-strict-aliasing"
%cmake -DGLM_TEST_ENABLE=ON
%cmake_build

%install
%cmake_install

find %{buildroot} -name CMakeLists.txt -delete

# Dirty hack to provide .pc file. Needed bc of upstream stupidity.
mkdir -p %{buildroot}%{_libdir}/pkgconfig/
cat << EOF > %{buildroot}%{_libdir}/pkgconfig/%{name}.pc
prefix=%{_prefix}
includedir=${prefix}/include

Name: GLM
Description: OpenGL Mathematics
Version: %{version}
Cflags: -I${includedir}
EOF

%check
export CXXFLAGS="%{build_cxxflags} -fno-strict-aliasing"
cd build
 
# Some tests are disabled due to failing tests (to be reported)
# - test-core_func_common fails on aarch64
# - packing test might fail on i586
%ifarch aarch64
ctest --output-on-failure -E '(test-core_func_common)'
%else
ctest --output-on-failure
%endif

%files devel
%doc readme.md
%{_includedir}/%{name}/
%{_libdir}/cmake/%{name}/
%{_libdir}/pkgconfig/%{name}.pc

%files doc
%doc doc/manual/
%doc doc/api/


%changelog
* Tue Nov 08 2022 ghibo <ghibo> 0.9.9.8-2.mga9
+ Revision: 1904647
- Fix package building against failing test
+ umeabot <umeabot>
- Mageia 9 Mass Rebuild

* Thu Apr 08 2021 daviddavid <daviddavid> 0.9.9.8-1.mga9
+ Revision: 1714104
- new version: 0.9.9.8 (fixes mga#26529)
- provide ourselves a pkgconfig file because upstream removed its support

* Tue Feb 11 2020 umeabot <umeabot> 0.9.9.1-2.mga8
+ Revision: 1489229
- Mageia 8 Mass Rebuild
+ wally <wally>
- build with new cmake macros

* Thu Sep 13 2018 daviddavid <daviddavid> 0.9.9.1-1.mga7
+ Revision: 1258870
- new version: 0.9.9.1
- new version: 0.9.9.0
- new version: 0.9.8.5
- rename and rediff cmakelists patch
+ akien <akien>
- Fix CRLF line endings
- Try to renable tests

* Thu Jan 14 2016 akien <akien> 0.9.7.2-1.mga6
+ Revision: 922965
- Version 0.9.7.2

* Fri Dec 11 2015 neoclust <neoclust> 0.9.5.4-5.mga6
+ Revision: 909379
- Rediff arm patch

* Sat Aug 22 2015 akien <akien> 0.9.5.4-4.mga6
+ Revision: 868066
- Rebuild for gcc 5.2.1

* Wed Oct 15 2014 umeabot <umeabot> 0.9.5.4-3.mga5
+ Revision: 746598
- Second Mageia 5 Mass Rebuild

* Tue Sep 16 2014 umeabot <umeabot> 0.9.5.4-2.mga5
+ Revision: 679646
- Mageia 5 Mass Rebuild

* Sat Aug 30 2014 colin <colin> 0.9.5.4-1.mga5
+ Revision: 669643
- Disable tests for now. They pass during local build but not on cluster
- Add BR on p7zip to decompress the sourceball
- New version: 0.9.5.4
- Don't ship unneeded liciense file.

* Fri Nov 22 2013 colin <colin> 0.9.4.6-1.mga4
+ Revision: 552312
- Import Fedora package and adapt to Mageia


* Tue Sep 24 2013 Joonas Sarajärvi <muep@iki.fi> - 0.9.4.6-2
- Fix building on ARM

* Tue Sep 24 2013 Joonas Sarajärvi <muep@iki.fi> - 0.9.4.6-1
- Update to upstream GLM version 0.9.4.6
- Bug fixes

* Tue Aug 20 2013 Joonas Sarajärvi <muep@iki.fi> - 0.9.4.5-1
- Update to upstream GLM version 0.9.4.5
- Bug fixes

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.4.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Sat Jul 06 2013 Joonas Sarajärvi <muep@iki.fi> - 0.9.4.4-1
- Update to upstream GLM version 0.9.4.4
- Bug fixes

* Mon Apr 15 2013 Joonas Sarajärvi <muep@iki.fi> - 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 <muep@iki.fi> - 0.9.4.2-1
- Update to upstream GLM version 0.9.4.2

* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.3.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Tue Sep 04 2012 Dan Horák <dan[at]danny.cz> - 0.9.3.4-2
- fix build on non-x86 arches

* Sun Sep 02 2012 Joonas Sarajärvi <muep@iki.fi> - 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 <muep@iki.fi> - 0.9.3.2-3
- Skip gtx_integer test that is known as broken

* Sat Sep 01 2012 Joonas Sarajärvi <muep@iki.fi> - 0.9.3.2-2
- Remove prebuilt binaries shipped in upstream source archive

* Fri May 04 2012 Joonas Sarajärvi <muep@iki.fi> - 0.9.3.2-1
- Update to upstream version 0.9.3.2

* Mon Feb 13 2012 Joonas Sarajärvi <muep@iki.fi> - 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 <muep@iki.fi> - 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 <muep@iki.fi> - 0.9.3.1-3
- Fix items pointed out in Comment 2 of #787510

* Mon Feb 06 2012 Joonas Sarajärvi <muep@iki.fi> - 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 <muep@iki.fi> - 0.9.3.1-1
- Initial RPM packaging