Compare commits

..

No commits in common. "rawhide" and "el6" have entirely different histories.

View file

@ -1,28 +1,21 @@
##Source code includes PDF documentation that is copyrighted
##You may download them for your personal use from upstream website
%undefine _package_note_file
%undefine _ld_as_needed
## The RPM macro for the linker flags does not exist on EPEL
%if 0%{?epel} < 7
%{!?__global_ldflags: %global __global_ldflags -Wl,-z,relro}
%endif
Name: wildmagic5
Name: wildmagic5
Summary: Wild Magic libraries
Version: 5.17
Release: %autorelease
License: BSL-1.0
URL: https://www.geometrictools.com
Source0: https://www.geometrictools.com/Downloads/WildMagic5p17.zip
Release: 1%{?dist}
License: Boost
URL: http://www.geometrictools.com
Source0: http://www.geometrictools.com/Downloads/WildMagic5p17.zip
BuildRequires: make
BuildRequires: freeglut-devel
BuildRequires: mesa-libGL-devel
BuildRequires: mesa-libGLU-devel
BuildRequires: libXext-devel
BuildRequires: libX11-devel
BuildRequires: glibc-devel
BuildRequires: libstdc++-devel
BuildRequires: dos2unix
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: freeglut-devel, mesa-libGL-devel, mesa-libGLU-devel, libXext-devel
BuildRequires: libX11-devel, glibc-devel, libstdc++-devel, dos2unix
Patch0: %{name}-fix-SimplePendulum_output_files.patch
Patch1: %{name}-fix-DistancePointEllipseEllipsoid.patch
@ -62,7 +55,7 @@ They are generally required when either using the library
or developing with it or developing it.
%prep
%autosetup -n GeometricTools -N
%setup -q -n GeometricTools
dos2unix WildMagic5/SamplePhysics/SimplePendulum/SimplePendulum.cpp
dos2unix WildMagic5/SampleMathematics/DistancePointEllipseEllipsoid/DistancePointEllipseEllipsoid.cpp
@ -70,19 +63,19 @@ dos2unix WildMagic5/SampleGraphics/makeapp.wm5
dos2unix WildMagic5/SamplePhysics/makeapp.wm5
dos2unix WildMagic5/SampleImagics/makeapp.wm5
dos2unix WildMagic5/SampleMathematics/makeapp.wm5
%patch -P 0 -p0
%patch -P 1 -p0
%patch -P 2 -p0
%patch0 -p0
%patch1 -p0
%patch2 -p0
sed -i 's|CFLAGS += -O2 -DNDEBUG|CFLAGS += %{optflags} -pthread -DNDEBUG|g' WildMagic5/LibGraphics/Renderers/GlxRenderer/makerend.wm5
sed -i 's|CFLAGS += -O2 -DNDEBUG|CFLAGS += %{optflags} -pthread -DNDEBUG|g' WildMagic5/SamplePhysics/makeapp.wm5
sed -i 's|@@LDFLAGS@@|%{__global_ldflags}|g' WildMagic5/SamplePhysics/makeapp.wm5
sed -i 's|CFLAGS += -O2 -DNDEBUG|CFLAGS += %{optflags} -pthread -DNDEBUG|g' WildMagic5/SampleGraphics/makeapp.wm5
sed -i 's|@@LDFLAGS@@|%{__global_ldflags}|g' WildMagic5/SampleGraphics/makeapp.wm5
sed -i 's|CFLAGS += -O2 -DNDEBUG|CFLAGS += %{optflags} -pthread -DNDEBUG|g' WildMagic5/SampleImagics/makeapp.wm5
sed -i 's|@@LDFLAGS@@|%{__global_ldflags}|g' WildMagic5/SampleImagics/makeapp.wm5
sed -i 's|CFLAGS += -O2 -DNDEBUG|CFLAGS += %{optflags} -pthread -DNDEBUG|g' WildMagic5/SampleMathematics/makeapp.wm5
sed -i 's|@@LDFLAGS@@|%{__global_ldflags}|g' WildMagic5/SampleMathematics/makeapp.wm5
sed -i 's|CFLAGS += -O2 -DNDEBUG|CFLAGS += %{optflags} -Wl,-z,relro -Wl,-z,now -fPIC -pthread -DNDEBUG|g' WildMagic5/LibGraphics/Renderers/GlxRenderer/makerend.wm5
sed -i 's|CFLAGS += -O2 -DNDEBUG|CFLAGS += %{optflags} -Wl,-z,relro -fPIC -pie -Wl,-z,now -pthread -DNDEBUG|g' WildMagic5/SamplePhysics/makeapp.wm5
sed -i 's|@@LDFLAGS@@|%{__global_ldflags} -fPIC -pie -Wl,-z,now|g' WildMagic5/SamplePhysics/makeapp.wm5
sed -i 's|CFLAGS += -O2 -DNDEBUG|CFLAGS += %{optflags} -Wl,-z,relro -fPIC -pie -Wl,-z,now -pthread -DNDEBUG|g' WildMagic5/SampleGraphics/makeapp.wm5
sed -i 's|@@LDFLAGS@@|%{__global_ldflags} -fPIC -pie -Wl,-z,now|g' WildMagic5/SampleGraphics/makeapp.wm5
sed -i 's|CFLAGS += -O2 -DNDEBUG|CFLAGS += %{optflags} -Wl,-z,relro -fPIC -pie -Wl,-z,now -pthread -DNDEBUG|g' WildMagic5/SampleImagics/makeapp.wm5
sed -i 's|@@LDFLAGS@@|%{__global_ldflags} -fPIC -pie -Wl,-z,now|g' WildMagic5/SampleImagics/makeapp.wm5
sed -i 's|CFLAGS += -O2 -DNDEBUG|CFLAGS += %{optflags} -Wl,-z,relro -fPIC -pie -Wl,-z,now -pthread -DNDEBUG|g' WildMagic5/SampleMathematics/makeapp.wm5
sed -i 's|@@LDFLAGS@@|%{__global_ldflags} -fPIC -pie -Wl,-z,now|g' WildMagic5/SampleMathematics/makeapp.wm5
##Fix soname bug
for i in `find . -type f \( -name "*makefile.wm5" \)`; do
@ -93,33 +86,33 @@ sed -e 's|15|17|g' -i WildMagic5/LibGraphics/Renderers/GlxRenderer/makerend.wm5
%build
##Build LibCore --> LibMathematics
export LDFLAGS="%{__global_ldflags} -lpthread -lm"
export CFLAGS="%{optflags} -pthread -DNDEBUG"
export LDFLAGS="%{__global_ldflags} -Wl,-z,now -lpthread -Wl,--as-needed -lm"
export CFLAGS="%{optflags} -Wl,-z,relro -Wl,-z,now -fPIC -pthread -DNDEBUG"
make CFG=ReleaseDynamic -f makefile.wm5 -C WildMagic5/LibCore -j1
export LDFLAGS="%{__global_ldflags} -lpthread -L../../SDK/Library/ReleaseDynamic -lWm5Core"
export CFLAGS="%{optflags} -pthread -DNDEBUG"
export LDFLAGS="%{__global_ldflags} -Wl,-z,now -lpthread -L../../SDK/Library/ReleaseDynamic -lWm5Core"
export CFLAGS="%{optflags} -Wl,-z,relro -Wl,-z,now -fPIC -pthread -DNDEBUG"
make CFG=ReleaseDynamic -f makefile.wm5 -C WildMagic5/LibMathematics -j1
##Build LibPhysics -> LibImagics -> LibGraphics
export LDFLAGS="%{__global_ldflags} -L../../SDK/Library/ReleaseDynamic -lWm5Mathematics -lpthread -L../../SDK/Library/ReleaseDynamic -lWm5Core"
export CFLAGS="%{optflags} -pthread -DNDEBUG"
export LDFLAGS="%{__global_ldflags} -Wl,-z,now -L../../SDK/Library/ReleaseDynamic -lWm5Mathematics -Wl,--as-needed -lpthread -L../../SDK/Library/ReleaseDynamic -lWm5Core"
export CFLAGS="%{optflags} -Wl,-z,relro -Wl,-z,now -fPIC -pthread -DNDEBUG"
make CFG=ReleaseDynamic -f makefile.wm5 -C WildMagic5/LibPhysics -j1
export LDFLAGS="%{__global_ldflags} -lpthread -L../../SDK/Library/ReleaseDynamic -lWm5Mathematics"
export CFLAGS="%{optflags} -pthread -DNDEBUG"
export LDFLAGS="%{__global_ldflags} -Wl,-z,now -lpthread -L../../SDK/Library/ReleaseDynamic -lWm5Mathematics"
export CFLAGS="%{optflags} -Wl,-z,relro -Wl,-z,now -fPIC -pthread -DNDEBUG"
make CFG=ReleaseDynamic -f makefile.wm5 -C WildMagic5/LibImagics -j1
export LDFLAGS="%{__global_ldflags} -L../../SDK/Library/ReleaseDynamic -lWm5Mathematics -L%{_libdir} -lGL -lGLU -L../../SDK/Library/ReleaseDynamic -lWm5Core"
export CFLAGS="%{optflags} -pthread -DNDEBUG"
export LDFLAGS="%{__global_ldflags} -Wl,-z,now -L../../SDK/Library/ReleaseDynamic -lWm5Mathematics -L%{_libdir} -lGL -Wl,--as-needed -lGLU -L../../SDK/Library/ReleaseDynamic -lWm5Core"
export CFLAGS="%{optflags} -Wl,-z,relro -Wl,-z,now -fPIC -pthread -DNDEBUG"
make CFG=ReleaseDynamic -f makefile.wm5 -C WildMagic5/LibGraphics -j1
##Build LibApplications
export LDFLAGS="%{__global_ldflags} \
-L../../SDK/Library/ReleaseDynamic -lWm5Core -lWm5Mathematics -lWm5Graphics -lGL -lGLU \
-L../../SDK/Library/ReleaseDynamic -lWm5Imagics -lWm5Physics"
export LDFLAGS="%{__global_ldflags} -fPIC -Wl,-z,now \
-L../../SDK/Library/ReleaseDynamic -lWm5Core -lWm5Mathematics -lWm5Graphics -Wl,--as-needed -lGL -lGLU \
-Wl,--as-needed -L../../SDK/Library/ReleaseDynamic -lWm5Imagics -lWm5Physics"
%global WILD_OPT_FLAGS %(echo "-c -D__LINUX__ -DWM5_USE_OPENGL %{optflags} -fPIC -pthread -DNDEBUG")
%global WILD_OPT_FLAGS %(echo "-c -D__LINUX__ -DWM5_USE_OPENGL %{optflags} -Wl,-z,relro -fPIC -Wl,-z,now -pthread -DNDEBUG")
make CFG=ReleaseDynamic -f makefile.wm5 -C WildMagic5/LibApplications CFLAGS="%{WILD_OPT_FLAGS}"
##Build sample applications
@ -275,7 +268,11 @@ EOF
done
########################################################################################
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%{!?_licensedir:%global license %doc}
%license WildMagic5/License/LICENSE_1_0.txt
%doc WildMagic5/Documentation/WildMagic5Overview.pdf
%{_libdir}/*.so.*
@ -288,10 +285,72 @@ done
%{_libexecdir}/WildMagic/
%files data
%{!?_licensedir:%global license %doc}
%doc WildMagic5/Documentation/*.txt
%doc WildMagic5/Documentation/Wm5InitTerm.pdf
%license WildMagic5/License/LICENSE_1_0.txt
%{_datadir}/WildMagic/
%changelog
%autochangelog
* Fri Oct 13 2017 Antonio Trande <sagitter@fedoraproject.org> - 5.17-1
- Update to 5.17
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.15-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.15-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Fri Jun 09 2017 Antonio Trande <sagitter@fedoraproject.org> - 5.15-1
- Update to 5.15
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 5.14-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Tue Jan 12 2016 Antonio Trande <sagitter@fedoraproject.org> - 5.14-1
- Update to 5.14
* Thu Dec 10 2015 Antonio Trande <sagitter@fedoraproject.org> - 5.13-13
- Fix compilation flags of 'libWm5Applications.so' library
* Wed Nov 04 2015 Antonio Trande <sagitter@fedoraproject.org> - 5.13-12
- Rebuild with -fPIC
* Sat Oct 31 2015 Antonio Trande <sagitter@fedoraproject.org> - 5.13-11
- Hardened builds on <F23
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.13-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Wed Apr 29 2015 Antonio Trande <sagitter@fedoraproject.org> - 5.13-9
- Added global ldflags
- Defined global ldflags macro for EPEL6
* Tue Apr 28 2015 Antonio Trande <sagitter@fedoraproject.org> - 5.13-8
- Added DistancePointEllipseEllipsoid patch
* Sat Apr 25 2015 Antonio Trande <sagitter@fedoraproject.org> - 5.13-7
- Fixed script's arguments
- Installed additional data files for execution of the samples
* Sat Apr 18 2015 Antonio Trande <sagitter@fedoraproject.org> - 5.13-6
- Packaged some data files needed to graphic tests
* Sat Apr 18 2015 Antonio Trande <sagitter@fedoraproject.org> - 5.13-5
- Removed source code from Sample* directories
- Packaged PDF documentation in the data sub-package
* Thu Apr 16 2015 Antonio Trande <sagitter@fedoraproject.org> - 5.13-4
- %%build section re-arranged
- Set LDFLAGS/CFLAGS separately
- Built samples sub-package
* Tue Apr 14 2015 Antonio Trande <sagitter@fedoraproject.org> - 5.13-3
- Set LDFLAGS
* Sun Apr 12 2015 Antonio Trande <sagitter@fedoraproject.org> - 5.13-2
- Fixed BR packages
- Set C/C++ optimization flags
* Sun Apr 12 2015 Antonio Trande <sagitter@fedoraproject.org> - 5.13-1
- First package