diff --git a/xu4-1.1-buildfix.patch b/xu4-1.1-buildfix.patch new file mode 100644 index 0000000..afb10ba --- /dev/null +++ b/xu4-1.1-buildfix.patch @@ -0,0 +1,35 @@ +diff -up u4/src/image.h.buildfix u4/src/image.h +--- u4/src/image.h.buildfix 2011-01-25 04:26:05.000000000 -0600 ++++ u4/src/image.h 2011-03-29 13:30:43.131293175 -0500 +@@ -6,6 +6,7 @@ + #define IMAGE_H + + #include ++#include + #include "types.h" + #include "u4file.h" + #include "textcolor.h" +diff -up u4/src/imagemgr.cpp.buildfix u4/src/imagemgr.cpp +--- u4/src/imagemgr.cpp.buildfix 2011-03-29 11:48:33.000000000 -0500 ++++ u4/src/imagemgr.cpp 2011-03-29 13:30:43.131293175 -0500 +@@ -544,7 +544,7 @@ ImageInfo *ImageMgr::get(const string &n + + } + else +- errorFatal("Failed to open file %s for reading.", filename); ++ errorFatal("Failed to open file %s for reading.", filename.c_str()); + + if (unscaled == NULL) + return NULL; +diff -up u4/src/sound_sdl.cpp.buildfix u4/src/sound_sdl.cpp +--- u4/src/sound_sdl.cpp.buildfix 2011-03-29 13:38:16.389287976 -0500 ++++ u4/src/sound_sdl.cpp 2011-03-29 13:38:26.329980784 -0500 +@@ -5,7 +5,7 @@ + * Author: Darren Janeczek + */ + +-#include "sound_SDL.h" ++#include "sound_sdl.h" + #include + #include + diff --git a/xu4-gcc46.patch b/xu4-gcc46.patch deleted file mode 100644 index 9d65f69..0000000 --- a/xu4-gcc46.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up ./src/moongate.cpp.gcc46 ./src/moongate.cpp ---- ./src/moongate.cpp.gcc46 2011-01-24 17:07:50.135961523 -0600 -+++ ./src/moongate.cpp 2011-01-24 17:08:12.663146906 -0600 -@@ -4,6 +4,7 @@ - - #include "vc6.h" // Fixes things if you're using VC6, does nothing if otherwise - -+#include - #include - - #include "error.h" diff --git a/xu4.spec b/xu4.spec index a28b32b..10c3894 100644 --- a/xu4.spec +++ b/xu4.spec @@ -1,9 +1,9 @@ -%define svndate 20110124 -%define svnrev 2792 +%define svndate 20110329 +%define svnrev 2869 Name: xu4 Version: 1.1 -Release: 0.12.%{svndate}svn%{svnrev}%{?dist} +Release: 0.13.%{svndate}svn%{svnrev}%{?dist} Summary: Ultima IV recreated Group: Amusements/Games License: GPLv2+ @@ -15,8 +15,9 @@ Source2: xu4.autodlrc Source3: u4download.txt Patch0: xu4-zipfile.patch Patch1: xu4-1.0beta3-desktop.patch -Patch10: xu4-gcc46.patch -BuildRequires: SDL_mixer-devel libxml2-devel libpng-devel desktop-file-utils +Patch2: xu4-1.1-buildfix.patch +BuildRequires: SDL_mixer-devel libxml2-devel +BuildRequires: libpng-devel desktop-file-utils Requires: hicolor-icon-theme autodownloader %description @@ -36,7 +37,7 @@ spirit of the original game will be added. %setup -q -n u4 %patch0 -p1 -z .zipfile %patch1 -p1 -z .desktop -%patch10 -p1 -z .gcc46 +%patch2 -p1 -z .buildfix if [ "%{_lib}" = "lib64" ]; then sed -i 's|/usr/lib|%{_libdir}|g' src/u4file.cpp fi @@ -45,32 +46,33 @@ cp %{SOURCE3} . %build pushd src -make DEBUGCXXFLAGS="$RPM_OPT_FLAGS" \ +make DEBUGCXXFLAGS="%{optflags}" \ bindir=%{_bindir} datadir=%{_datadir} libdir=%{_libdir} %{?_smp_mflags} popd %install pushd src -# Note: make install DESTDIR=$RPM_BUILD_ROOT, doesn't work +# Note: make install DESTDIR=%{buildroot}, doesn't work %{makeinstall} -find $RPM_BUILD_ROOT%{_libdir}/u4 -name '*.xml' -o -name '*.dtd'|xargs chmod -x +find %{buildroot}/%{_libdir}/u4 -name '*.xml' -o -name '*.dtd'|xargs chmod -x popd +cp mid/*.it %{buildroot}/%{_libdir}/u4/music # mv u4 to u4.bin and install our autodl wrapper script -mv $RPM_BUILD_ROOT%{_bindir}/u4 $RPM_BUILD_ROOT%{_bindir}/u4.bin -install -p -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/u4 -install -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_libdir}/u4 +mv %{buildroot}/%{_bindir}/u4 %{buildroot}/%{_bindir}/u4.bin +install -p -m 755 %{SOURCE1} %{buildroot}/%{_bindir}/u4 +install -p -m 644 %{SOURCE2} %{buildroot}/%{_libdir}/u4 # below is the desktop file and icon stuff. desktop-file-install --vendor fedora \ - --dir $RPM_BUILD_ROOT%{_datadir}/applications \ + --dir %{buildroot}/%{_datadir}/applications \ --delete-original \ - $RPM_BUILD_ROOT%{_datadir}/applications/u4.desktop + %{buildroot}/%{_datadir}/applications/u4.desktop -mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/64x64/apps -mv $RPM_BUILD_ROOT%{_datadir}/pixmaps/u4.png \ - $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/64x64/apps +mkdir -p %{buildroot}/%{_datadir}/icons/hicolor/64x64/apps +mv %{buildroot}/%{_datadir}/pixmaps/u4.png \ + %{buildroot}/%{_datadir}/icons/hicolor/64x64/apps %post @@ -98,6 +100,13 @@ fi %changelog +* Tue Mar 29 2011 Jason L Tibbitts III - 1.1-0.13.20110329svn2869 +- Update to latest SVN snapshot. +- Drop gcc46 patch; no longer needed. +- Add buildfix patch. +- Install the .it music files manually so that music works again. +- Switch from $RPM_* to macros with less yelling. + * Tue Feb 08 2011 Fedora Release Engineering - 1.1-0.12.20110124svn2792 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild