diff --git a/.gitignore b/.gitignore index cb59829..3f57316 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1 @@ vdrift-2009-06-15-src.tar.bz2 -/vdrift-2010-06-30.tar.bz2 -/vdrift-2011-10-22.tar.bz2 -/vdrift-2012-07-22.tar.bz2 -/vdrift-2014-10-20.tar.bz2 -/vdrift-5ae309f.tar.gz -/vdrift-data-20210211.tar.xz diff --git a/sources b/sources index 42561eb..821c505 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -SHA512 (vdrift-5ae309f.tar.gz) = 54f578e70ef6a9b8d8697ad842b803adfff77230a392bb4e069469422f472571f2b47a6a87aecb46bf17f3d2cafce2a3989857fda43030ad67e5b6d9a8c13953 -SHA512 (vdrift-data-20210211.tar.xz) = d7beece201129b7be8cdca4d1d4e84c9656f2d6a03650f6576dad29d8231367402e7d32d4e24df22cbce2af842c930b8ed9492e4a1e7e480fe7569acdd992cf5 +bcb6ae8117134e954be00c8f074167eb vdrift-2009-06-15-src.tar.bz2 diff --git a/vdrift-20071226-configure.patch b/vdrift-20071226-configure.patch new file mode 100644 index 0000000..b8a3a6e --- /dev/null +++ b/vdrift-20071226-configure.patch @@ -0,0 +1,10 @@ +--- bullet-2.64/configure 2008-02-20 09:45:11.000000000 -0600 ++++ bullet-2.64/configure 2008-02-20 09:45:11.000000000 -0600 +@@ -5423,6 +5423,7 @@ + + case $host_cpu in + [Ii][3-9]86*|[Xx]86*) cs_host_cpu=x86 ;; ++ [ppc]*) cs_host_cpu=ppc ;; + *) cs_host_cpu=$host_cpu ;; + esac + cs_host_cpu_normalized="`echo "$cs_host_cpu" | $as_tr_cpp`" diff --git a/vdrift-20071226-gcc4.3.patch b/vdrift-20071226-gcc4.3.patch new file mode 100644 index 0000000..df66354 --- /dev/null +++ b/vdrift-20071226-gcc4.3.patch @@ -0,0 +1,28 @@ +--- include/utility.h 2008-02-14 19:22:46.000000000 +0100 ++++ include/utility.h 2008-02-14 19:22:46.000000000 +0100 +@@ -100,7 +100,7 @@ public: + void SetBox(float x1, float y1, float x2, float y2, const TEXTURE_HANDLE * const texid, int texsize, float opacity); + void SetButton(float x1, float y1, float x2, float y2, float sidewidth, TEXTURE_HANDLE * texid, float opacity); + void SetEllipse( float center_x, float center_y, float radius_x, float radius_y, float color_r, float color_g, float color_b, float opacity ); +- void SetQuad( float x1, float y2, float x2, float y2, float x3, float y3, float x4, float y4, TEXTURE_HANDLE * texid, float opacity); ++ void SetQuad( float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4, TEXTURE_HANDLE * texid, float opacity); + void SetRotation(float r) {rotation=r;} + + void SetDraw(const bool newdraw) {draw=newdraw;} +--- include/serialization.h 2008-02-14 19:30:02.000000000 +0100 ++++ include/serialization.h 2008-02-14 19:30:02.000000000 +0100 +@@ -8,6 +8,7 @@ + #include + #include + #include ++#include + + #include "simpletree.h" + +@@ -23,6 +24,7 @@ using std::ostream; + using std::ifstream; + using std::ofstream; + using std::pair; ++using std::memcmp; + + #define _GENERATEUID_(ptr,uidoutput) unsigned long long uidoutput = (size_t)ptr diff --git a/vdrift-20071226-jamfile.patch b/vdrift-20071226-jamfile.patch new file mode 100644 index 0000000..9823d41 --- /dev/null +++ b/vdrift-20071226-jamfile.patch @@ -0,0 +1,11 @@ +--- bullet-2.64/Jamfile.in 2008-02-15 06:55:36.000000000 -0600 ++++ bullet-2.64/Jamfile.in 2008-02-15 06:55:36.000000000 -0600 +@@ -60,7 +60,6 @@ + MsvcGenConfig GLEW.LIBS : glew32.lib ; + + SubInclude TOP src ; +-SubInclude TOP Extras ; +-SubInclude TOP Demos ; ++ + + Depends install_config : [ DoInstall bullet.pc : $(libdir)/pkgconfig ] ; diff --git a/vdrift-20071226-paths.patch b/vdrift-20071226-paths.patch index 807f337..552c8e4 100644 --- a/vdrift-20071226-paths.patch +++ b/vdrift-20071226-paths.patch @@ -1,13 +1,7 @@ ---- SConstruct~ 2014-08-04 07:43:04.000000000 -0500 -+++ SConstruct 2015-06-29 06:29:31.549810839 -0500 -@@ -29,8 +29,8 @@ - # define a list of CPPDEFINES so they don't get mangled... - cppdefines = [] - default_settingsdir = ".vdrift" --default_prefix = "/usr/local" +--- SConstruct~ 2009-06-30 13:31:08.000000000 -0500 ++++ SConstruct 2009-06-30 13:37:08.000000000 -0500 +@@ -38,2 +38,2 @@ -default_datadir = "share/games/vdrift/data" -+default_prefix = "/usr" -+default_datadir = "share/vdrift" - default_localedir = "share/locale" - default_bindir = "bin" - +-default_bindir = "bin" ++default_datadir = "/share/vdrift" ++default_bindir = "/bin" diff --git a/vdrift-20090615-dsolink.patch b/vdrift-20090615-dsolink.patch new file mode 100644 index 0000000..b82afb7 --- /dev/null +++ b/vdrift-20090615-dsolink.patch @@ -0,0 +1,11 @@ +--- SConstruct~ 2010-07-01 16:07:10.000000000 -0500 ++++ SConstruct 2010-07-01 16:15:43.529291853 -0500 +@@ -138,7 +138,7 @@ + CPPPATH = ['#include', '#bullet'], + CCFLAGS = ['-Wall', '-Wextra', '-Wno-unused-parameter', '-pthread'], + LIBPATH = ['.', '#lib'], +- LINKFLAGS = ['-pthread'], ++ LINKFLAGS = ['-pthread','-lGLU','-lGL'], + CC = 'gcc', CXX = 'g++', + options = opts) + check_headers = ['asio.hpp', 'boost/bind.hpp', 'GL/gl.h', 'GL/glu.h', 'SDL/SDL.h', 'SDL/SDL_image.h', 'SDL/SDL_rotozoom.h', 'vorbis/vorbisfile.h', 'GL/glew.h'] diff --git a/vdrift-SConstruct.patch b/vdrift-SConstruct.patch new file mode 100644 index 0000000..1d7b368 --- /dev/null +++ b/vdrift-SConstruct.patch @@ -0,0 +1,13 @@ +--- SConstruct 2007-04-16 10:25:43.000000000 -0500 ++++ SConstruct 2007-04-16 10:28:02.000000000 -0500 +@@ -352,8 +352,8 @@ + # Subdirectories # + #----------------# + Export(['env', 'version', 'src_dir', 'bin_dir']) +-if 'install' in COMMAND_LINE_TARGETS: +- SConscript('data/SConscript') ++#if 'install' in COMMAND_LINE_TARGETS: ++# SConscript('data/SConscript') + + if 'src-package' in COMMAND_LINE_TARGETS: + SConscript('po/SConscript') diff --git a/vdrift.spec b/vdrift.spec index fa6efb3..482c776 100644 --- a/vdrift.spec +++ b/vdrift.spec @@ -1,42 +1,48 @@ -%global commit 5ae309f1048c863f4745cd50c8cd81f98340b1d4 -%global shortcommit %(c=%{commit}; echo ${c:0:7}) - Name: vdrift -Version: 20141020 -Release: 36.git%{shortcommit}%{?dist} +Version: 20090615 +Release: 4%{?dist} Summary: Driving/drift racing simulation -License: GPL-3.0-or-later +Group: Amusements/Games +License: GPLv2+ URL: http://vdrift.net -Source0: https://github.com/VDrift/vdrift/archive/%{commit}/%{name}-%{shortcommit}.tar.gz +Source0: %{name}-2009-06-15-src.tar.bz2 +#Original upstream: +#Source0: http://downloads.sourceforge.net/%{name}/%{name}-2009-06-15-src.tar.bz2 +# Modified: +# cd docs +# rm SConscript INSTALL +# cd .. +# rm -rf tools/win + Source1: vdrift.desktop Source2: vdrift.png -# Data -# svn checkout https://svn.code.sf.net/p/vdrift/code/ vdrift-code -# mv vdrift-code/vdrift-data data -# tar cvfJ vdrift-data-20210211.tar.xz data -Source3: vdrift-data-20210211.tar.xz - +Patch0: vdrift-SConstruct.patch Patch1: vdrift-20071226-paths.patch +#Patch2: vdrift-20071226-gcc4.3.patch +#Patch3: vdrift-20071226-jamfile.patch Patch4: vdrift-20090215-joepack-includes.patch -BuildRequires: mesa-libGL-devel -BuildRequires: SDL2-devel -BuildRequires: SDL2_image-devel +Patch5: vdrift-20090615-dsolink.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root%(%{__id_u} -n) +BuildRequires: SDL-devel +BuildRequires: SDL_image-devel +BuildRequires: SDL_net-devel BuildRequires: SDL_gfx-devel -BuildRequires: python3-scons +BuildRequires: scons +BuildRequires: libGL-devel +BuildRequires: openal-devel +BuildRequires: freealut-devel +BuildRequires: jam BuildRequires: libvorbis-devel BuildRequires: desktop-file-utils BuildRequires: glew-devel BuildRequires: boost-devel BuildRequires: asio-devel -BuildRequires: bullet-devel -BuildRequires: libarchive-devel -BuildRequires: libcurl-devel -BuildRequires: python3-devel -BuildRequires: gcc-c++ -BuildRequires: subversion Requires: vdrift-data = %{version} +#Obsoletes: vdrift-data <= 20071226 +#Provides: vdrift-data = %{version}-%{release} + %description VDrift is a cross-platform, open source driving simulation made with drift @@ -46,6 +52,7 @@ available for Linux, FreeBSD, Mac OS X and Windows (Cygwin). %package data Summary: Driving/drift racing simulation data +Group: Amusements/Games Requires: vdrift = %{version} BuildArch: noarch @@ -59,26 +66,41 @@ These are the data files. %prep -%setup -qn vdrift-%{commit} -a 3 -# unbundling -rm -rf bullet +%setup -qn vdrift-2009-06-15 %ifarch ppc ppc64 sed -i 's/linuxx86/linuxppc/' src/SConscript %endif -%patch -P 1 -p0 -%patch -P 4 -p0 -%py3_shebang_fix . +%patch0 -p0 +%patch1 -p0 +#%patch2 -p0 +#%patch3 -p0 +%patch4 -p0 +%patch5 -p0 +#/bin/chmod -x src/gamestate.cpp +#/bin/chmod -x src/logo.cpp +#/bin/chmod -x src/objects.cpp /bin/chmod -x src/main.cpp /bin/chmod -x src/game.cpp %build -scons %{?_smp_mflags} +#tar -xzf bullet-2.73-sp1.tgz +#/bin/chmod -x bullet-2.73/src/LinearMath/*.h +#cd bullet-2.73 +#./autogen.sh +#./configure +#jam bulletcollision bulletmath +#cmake . +#make +#cd .. + +CC="gcc" CXX="g++" CXXFLAGS="%{optflags}" scons bin=/bin prefix=/usr use_binreloc=0 release=1 os_cc=1 os_cxx=1 os_cxxflags=1 NLS=0 %install +rm -rf %{buildroot} # As described in the README scons install is broken so DIY install -d %{buildroot}%{_bindir} install -d %{buildroot}%{_datadir} @@ -87,7 +109,7 @@ cp -pr data %{buildroot}%{_datadir}/vdrift rm `find %{buildroot}%{_datadir}/vdrift -name "SConscript*"` mkdir -p %{buildroot}%{_datadir}/applications -desktop-file-install \ +desktop-file-install --vendor fedora \ --dir %{buildroot}%{_datadir}/applications \ %{SOURCE1} @@ -95,262 +117,34 @@ mkdir -p %{buildroot}%{_datadir}/icons/hicolor/32x32/apps install -p -m 644 %{SOURCE2} \ %{buildroot}%{_datadir}/icons/hicolor/32x32/apps -# Register as an application to be visible in the software center -# -# NOTE: It would be *awesome* if this file was maintained by the upstream -# project, translated and installed into the right place during `make install`. -# -# See http://www.freedesktop.org/software/appstream/docs/ for more details. -# -mkdir -p $RPM_BUILD_ROOT%{_datadir}/appdata -cat > $RPM_BUILD_ROOT%{_datadir}/appdata/%{name}.appdata.xml < - - - - vdrift.desktop - CC0-1.0 - Drifting oriented racing simulation - -

- VDrift is a racing simulation oriented to drifting. -

-

- It features over 45 tracks based on famous real-world circuits and 45 cars - based on real-world vehicles. -

-
- http://vdrift.net - - - - - -
-EOF +%post +touch --no-create %{_datadir}/icons/hicolor || : +if [ -x %{_bindir}/gtk-update-icon-cache ]; then + %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || : +fi + +%postun +touch --no-create %{_datadir}/icons/hicolor || : +if [ -x %{_bindir}/gtk-update-icon-cache ]; then + %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || : +fi + +%clean +rm -rf %{buildroot} + %files -%license LICENSE -%doc README.md +%defattr(-,root,root,-) +%doc docs/* %{_bindir}/vdrift -%{_datadir}/appdata/%{name}.appdata.xml -%{_datadir}/applications/vdrift.desktop +%{_datadir}/applications/fedora-vdrift.desktop %{_datadir}/icons/hicolor/32x32/apps/vdrift.png %files data +%defattr(-,root,root,-) %{_datadir}/vdrift %changelog -* Fri Jul 17 2026 Fedora Release Engineering - 20141020-36.git5ae309f -- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild - -* Sat Jan 17 2026 Fedora Release Engineering - 20141020-35.git5ae309f -- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild - -* Fri Jul 25 2025 Fedora Release Engineering - 20141020-34.git5ae309f -- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild - -* Sun Jan 19 2025 Fedora Release Engineering - 20141020-33.git5ae309f -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Sat Jul 20 2024 Fedora Release Engineering - 20141020-32.git5ae309f -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Sat Jan 27 2024 Fedora Release Engineering - 20141020-31.git5ae309f -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Sat Jul 22 2023 Fedora Release Engineering - 20141020-30.git5ae309f -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Sat Mar 04 2023 Gwyn Ciesla - 20141020-29.git5ae309f -- migrated to SPDX license - -* Sat Jan 21 2023 Fedora Release Engineering - 20141020-28.git5ae309f -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Sat Jul 23 2022 Fedora Release Engineering - 20141020-27.git5ae309f -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Sat Jan 22 2022 Fedora Release Engineering - 20141020-26.git5ae309f -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Fri Jul 23 2021 Fedora Release Engineering - 20141020-25.git5ae309f -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Thu Feb 11 2021 Tom Callaway - 20141020-24.git5ae309f -- update code to latest git -- update data from latest svn - -* Wed Jan 27 2021 Fedora Release Engineering - 20141020-23 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Wed Jul 29 2020 Fedora Release Engineering - 20141020-22 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Mon Mar 23 2020 Gwyn Ciesla - 2014-1020-21 -- Change build options to fix crash. - -* Fri Jan 31 2020 Fedora Release Engineering - 20141020-20 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Fri Aug 02 2019 Gwyn Ciesla - 20141020-18 -- Fix FTBFS. - -* Sat Jul 27 2019 Fedora Release Engineering - 20141020-17 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Sun Feb 03 2019 Fedora Release Engineering - 20141020-16 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Mon Sep 10 2018 Gwyn Ciesla - 20171020-15 -- Fix shebang. - -* Sat Jul 14 2018 Fedora Release Engineering - 20141020-14 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Fri Feb 09 2018 Fedora Release Engineering - 20141020-13 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Thu Jan 18 2018 Igor Gnatenko - 20141020-12 -- Remove obsolete scriptlets - -* Mon Dec 18 2017 Rich Mattes - 20141020-11 -- Rebuild for bullet-2.87 -- Force scons to run with python 2 - -* Thu Aug 03 2017 Fedora Release Engineering - 20141020-10 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild - -* Thu Jul 27 2017 Fedora Release Engineering - 20141020-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Mon May 15 2017 Fedora Release Engineering - 20141020-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild - -* Sat Feb 11 2017 Fedora Release Engineering - 20141020-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Fri Jan 27 2017 Jonathan Wakely - 20141020-6 -- Rebuilt for Boost 1.63 - -* Fri Feb 05 2016 Fedora Release Engineering - 20141020-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Sat Jan 16 2016 Jonathan Wakely - 20141020-4 -- Rebuilt for Boost 1.60 - -* Wed Jul 29 2015 Fedora Release Engineering - 20141020-3 -- Rebuilt for https://fedoraproject.org/wiki/Changes/F23Boost159 - -* Wed Jul 22 2015 David Tardon - 20141020-2 -- rebuild for Boost 1.58 - -* Sun Jun 28 2015 Jon Ciesla - 20141020-1 -- Latest upstream. -- Fixed changelog dates. - -* Fri Jun 19 2015 Fedora Release Engineering - 20120722-16 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Sat May 02 2015 Kalev Lember - 20120722-15 -- Rebuilt for GCC 5 C++11 ABI change - -* Thu Mar 26 2015 Richard Hughes - 20120722-14 -- Add an AppData file for the software center - -* Tue Jan 27 2015 Petr Machata - 20120722-13 -- Rebuild for boost 1.57.0 - -* Mon Aug 18 2014 Fedora Release Engineering - 20120722-12 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild - -* Fri Jun 13 2014 Hans de Goede - 20120722-11 -- Rebuild for new SDL_gfx - -* Sun Jun 08 2014 Fedora Release Engineering - 20120722-10 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Fri May 23 2014 Petr Machata - 20120722-9 -- Rebuild for boost 1.55.0 - -* Sun Feb 09 2014 Rich Mattes - 20120722-8 -- Rebuild for bullet-2.82 - -* Mon Nov 18 2013 Dave Airlie - 20120722-7 -- rebuilt for GLEW 1.10 - -* Sun Aug 04 2013 Fedora Release Engineering - 20120722-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild - -* Tue Jul 30 2013 Petr Machata - 20120722-5 -- Rebuild for boost 1.54.0 - -* Sat Feb 09 2013 Parag Nemade - 20120722-4 -- Remove vendor tag from desktop file as per https://fedorahosted.org/fesco/ticket/1077 - -* Thu Jan 17 2013 Tomas Bzatek - 20120722-3 -- Rebuilt for new libarchive - -* Thu Dec 13 2012 Adam Jackson - 20120722-2 -- Rebuild for glew 1.9.0 - -* Wed Oct 24 2012 Jon Ciesla - 20120722-1 -- Latest upstream. - -* Sat Oct 13 2012 Rich Mattes - 20111022-8 -- Rebuild for new bullet -- Add fix for build error with new bullet - -* Wed Aug 01 2012 Adam Jackson - 20111022-7 -- Rebuild for new glew - -* Thu Jul 26 2012 Jon Ciesla - 20111022-6 -- Rebuilt for boost 1.50. - -* Sun Jul 22 2012 Fedora Release Engineering - 20111022-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - -* Mon May 28 2012 Rich Mattes - 20111022-4 -- Rebuild for bullet 2.80 - -* Tue Feb 28 2012 Fedora Release Engineering - 20111022-3 -- Rebuilt for c++ ABI breakage - -* Thu Jan 26 2012 Tomas Bzatek - 20111022-2 -- Rebuilt for new libarchive - -* Wed Jan 18 2012 Jon Ciesla - 20111022-1 -- New upstream. -- License changed to GPLv3+. - -* Sat Jan 14 2012 Fedora Release Engineering - 20100630-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild - -* Mon Dec 19 2011 Jon Ciesla - 20100630-7 -- Bump and rebuild for new bullet.. - -* Fri Jul 15 2011 Jon Ciesla - 20100630-6 -- Bump and rebuild for new SDL. - -* Mon Jun 20 2011 ajax@redhat.com - 20100630-5 -- Rebuild for new glew soname - -* Thu May 12 2011 Jon Ciesla - 20100630-4 -- Rebuild for new bullet. - -* Sat Feb 19 2011 Thomas Spura - 20100630-3 -- unbundle bullet (#621623) -- remove unneeded BR - -* Mon Feb 07 2011 Fedora Release Engineering - 20100630-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Thu Oct 28 2010 Jon Ciesla - 20100630-1 -- New upstream. - * Mon Jun 28 2010 Jon Ciesla - 20090615-4 - FTBFS fix, BZ 599767. @@ -398,8 +192,8 @@ EOF - Passing compiler flags to scons. - Turned off translations. -* Mon Apr 02 2007 Jon Ciesla - 20070323-2 +* Mon Apr 04 2007 Jon Ciesla - 20070323-2 - Split out minimal data. -* Thu Mar 29 2007 Jon Ciesla - 20070323-1 +* Thu Mar 28 2007 Jon Ciesla - 20070323-1 - Initial packaging