diff --git a/.cvsignore b/.cvsignore index b7b6a93..2d19c34 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -raidem-0.3-src.zip +raidem-0.3.1-src.zip diff --git a/raidem-0.3-loadpng.patch b/raidem-0.3-loadpng.patch deleted file mode 100644 index f87d11e..0000000 --- a/raidem-0.3-loadpng.patch +++ /dev/null @@ -1,40 +0,0 @@ ---- raidem-0.3-src/lib/loadpng/loadpng.c.aap 2006-01-23 00:09:29.000000000 +0100 -+++ raidem-0.3-src/lib/loadpng/loadpng.c 2006-04-06 20:45:08.000000000 +0200 -@@ -193,12 +193,33 @@ - dest_bpp = _color_load_depth(bpp, (bpp == 32)); - bmp = create_bitmap_ex(bpp, width, height); - -- /* Maybe flip RGB to BGR. */ -+ /* Check for any nescesarry conversions */ - if ((bpp == 24) || (bpp == 32)) { -- int c = makecol_depth(bpp, 0, 0, 255); -+ int c = makeacol_depth(bpp, 1, 2, 3, 7); /* R, G, B, A */ - unsigned char *pc = (unsigned char *)&c; -- if (pc[0] == 255) -- png_set_bgr(png_ptr); -+ /* First find the alpha location, alpha will be 0 when not used/NA! */ -+ if ((pc[0] == 7) || (pc[0] == 0)) -+ { -+ /* alpha as byte 0 check if byte 1 is blue ifso flip RGB to BGR */ -+ if (pc[1] == 3) -+ png_set_bgr(png_ptr); -+ /* do we have an alpha channel? */ -+ if (bpp == 32) -+ { -+ if (pc[0] != 7) -+ fprintf(stderr, "loadpng: warning, png has alpha channel but allegro not in color_depth with an alpha channel!\n"); -+ png_set_swap_alpha(png_ptr); -+ } -+ } -+ else -+ { -+ /* alpha as byte 3 check if byte 0 is blue ifso flip RGB to BGR */ -+ if (pc[0] == 3) -+ png_set_bgr(png_ptr); -+ /* do we have an alpha channel? */ -+ if ((bpp == 32) && (pc[3] != 7)) -+ fprintf(stderr, "loadpng: warning, png has alpha channel but allegro not in color_depth with an alpha channel!\n"); -+ } - } - - /* Read the image, one line at a line (easier to debug!) */ diff --git a/raidem-0.3-no-mp3.patch b/raidem-0.3-no-mp3.patch deleted file mode 100644 index a72599e..0000000 --- a/raidem-0.3-no-mp3.patch +++ /dev/null @@ -1,87 +0,0 @@ -diff -urN raidem-0.3-src.orig/src/music.m raidem-0.3-src/src/music.m ---- raidem-0.3-src.orig/src/music.m 2006-01-21 09:24:01.000000000 +0100 -+++ raidem-0.3-src/src/music.m 2006-03-12 20:42:31.000000000 +0100 -@@ -3,6 +3,8 @@ - * This file handles music stuff using AllegroMP3. - */ - -+#ifndef NO_MP3 -+ - #include - #include - #include -@@ -287,3 +289,47 @@ - free(music_data); - music_data = NULL; - } -+ -+/*--------------------------------------------------------------*/ -+ -+#else /* ifndef NO_MP3 */ -+ -+int music_vol = 255; -+ -+void play_music(const char *directory) -+{ -+} -+ -+void poll_music(void) -+{ -+} -+ -+void free_music(void) -+{ -+} -+ -+void adjust_music_volume(void) -+{ -+} -+ -+void play_mp3(const char *filename) -+{ -+} -+ -+void start_autopoll_music(void) -+{ -+} -+ -+void stop_autopoll_music(void) -+{ -+} -+ -+void music_init(void) -+{ -+} -+ -+void music_shutdown(void) -+{ -+} -+ -+#endif -diff -urN raidem-0.3-src.orig/src/seborrhea/mp3.m raidem-0.3-src/src/seborrhea/mp3.m ---- raidem-0.3-src.orig/src/seborrhea/mp3.m 2005-09-01 18:55:28.000000000 +0200 -+++ raidem-0.3-src/src/seborrhea/mp3.m 2006-03-12 20:42:31.000000000 +0100 -@@ -1,3 +1,4 @@ -+#ifndef NO_MP3 - /* seborrhea-mp3.m, - * - * This is for music lumps. -@@ -76,3 +77,5 @@ - [parent addToList:seb]; - return YES; - } -+ -+#endif -diff -urN raidem-0.3-src.orig/include/seborrhea/seborrhea.h raidem-0.3-src/include/seborrhea/seborrhea.h ---- raidem-0.3-src.orig/include/seborrhea/seborrhea.h 2005-09-01 18:52:37.000000000 +0200 -+++ raidem-0.3-src/include/seborrhea/seborrhea.h 2006-03-12 20:42:31.000000000 +0100 -@@ -16,7 +16,9 @@ - #include "seborrhea/container-queue.h" - #include "seborrhea/container-shuffle.h" - -+#ifndef NO_MP3 - #include "seborrhea/mp3.h" -+#endif - - #include "seborrhea/spline.h" - diff --git a/raidem-0.3-syslibs.patch b/raidem-0.3-syslibs.patch deleted file mode 100644 index 0b81e20..0000000 --- a/raidem-0.3-syslibs.patch +++ /dev/null @@ -1,97 +0,0 @@ -diff -urN raidem-0.3-src.orig/Makefile raidem-0.3-src/Makefile ---- raidem-0.3-src.orig/Makefile 2006-01-31 06:33:08.000000000 +0100 -+++ raidem-0.3-src/Makefile 2006-03-12 20:42:31.000000000 +0100 -@@ -208,10 +208,7 @@ - spline.o \ - strdup.o \ - token.o \ -- zzpk.o) \ -- lib/alrand/alrand.o \ -- lib/alrand/lcg.o \ -- lib/alrand/mersenne.o -+ zzpk.o) - - UNITS := $(addprefix obj/units/,\ - all-units.o \ -diff -urN raidem-0.3-src.orig/include/alrand/alrand.h raidem-0.3-src/include/alrand/alrand.h ---- raidem-0.3-src.orig/include/alrand/alrand.h 1970-01-01 01:00:00.000000000 +0100 -+++ raidem-0.3-src/include/alrand/alrand.h 2006-03-12 20:43:25.000000000 +0100 -@@ -0,0 +1,30 @@ -+/* (partial) alrand emulation file for glibc */ -+#ifndef __alrand_h -+#define __alrand_h -+ -+#include -+ -+#define alrand_init() -+#define alrand_exit() -+#define alrand_set_global_generator_type(x) -+ -+ -+#define alrand_rand() random() -+#define alrand_srand(seed) srandom(seed) -+ -+ -+#define alrand_create(a, b) calloc(1, sizeof(struct drand48_data)) -+#define alrand_destroy(state) free(state) -+#define alrand_seed(state, seed) srand48_r(seed, state) -+ -+typedef unsigned int alrand_uint32_t; -+typedef struct drand48_data alrand_state; -+ -+static inline alrand_uint32_t alrand_generate(alrand_state *state) -+{ -+ long ret; -+ lrand48_r(state, &ret); -+ return ret; -+} -+ -+#endif -diff -urN raidem-0.3-src.orig/include/seborrhea/font-glyphkeeper.h raidem-0.3-src/include/seborrhea/font-glyphkeeper.h ---- raidem-0.3-src.orig/include/seborrhea/font-glyphkeeper.h 2005-09-01 17:18:13.000000000 +0200 -+++ raidem-0.3-src/include/seborrhea/font-glyphkeeper.h 2006-03-12 20:42:31.000000000 +0100 -@@ -2,7 +2,7 @@ - #ifndef _seb_included_font_glyphkeeper_h - #define _seb_included_font_glyphkeeper_h - --#include "glyph-keeper/include/glyph.h" -+#include - #include "seborrhea/font.h" - - @interface SebFontGlyphKeeper: AbstractSebFont -diff -urN raidem-0.3-src.orig/src/map-editor/map-proc.m raidem-0.3-src/src/map-editor/map-proc.m ---- raidem-0.3-src.orig/src/map-editor/map-proc.m 2006-01-20 03:33:33.000000000 +0100 -+++ raidem-0.3-src/src/map-editor/map-proc.m 2006-03-12 20:42:31.000000000 +0100 -@@ -4,7 +4,7 @@ - #include - #include - #include --#include "adime/include/adime.h" -+#include - #include "common.h" - #include "group.h" - #include "gui/gui-clip.h" -diff -urN raidem-0.3-src.orig/src/map-editor/redit.m raidem-0.3-src/src/map-editor/redit.m ---- raidem-0.3-src.orig/src/map-editor/redit.m 2005-12-06 00:38:24.000000000 +0100 -+++ raidem-0.3-src/src/map-editor/redit.m 2006-03-12 20:42:31.000000000 +0100 -@@ -7,7 +7,7 @@ - #include - #include - #include --#include "adime/include/adime.h" -+#include - #include "common.h" - #include "game.h" - #include "group.h" -diff -urN raidem-0.3-src.orig/src/seborrhea/font-glyphkeeper.m raidem-0.3-src/src/seborrhea/font-glyphkeeper.m ---- raidem-0.3-src.orig/src/seborrhea/font-glyphkeeper.m 2006-01-10 05:39:43.000000000 +0100 -+++ raidem-0.3-src/src/seborrhea/font-glyphkeeper.m 2006-03-12 20:42:31.000000000 +0100 -@@ -4,7 +4,7 @@ - */ - - #include --#include "glyph-keeper/include/glyph.h" -+#include - #include "seborrhea/font-glyphkeeper.h" - #include "seborrhea/seborrhea-common.h" - #include "seborrhea/seborrhea-debug.h" diff --git a/raidem-0.3-warn.patch b/raidem-0.3-warn.patch deleted file mode 100644 index 48dead9..0000000 --- a/raidem-0.3-warn.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -urN raidem-0.3-src.orig/src/map.m raidem-0.3-src/src/map.m ---- raidem-0.3-src.orig/src/map.m 2005-11-29 23:13:43.000000000 +0100 -+++ raidem-0.3-src/src/map.m 2006-03-12 20:42:31.000000000 +0100 -@@ -390,7 +390,7 @@ - - dirname = strrchr(temp, '/'); - if (dirname) -- *dirname++; -+ dirname++; - } - - music_dirname = strdup(dirname); diff --git a/raidem-0.3.1-syslibs.patch b/raidem-0.3.1-syslibs.patch index 1b47dd7..85e2a17 100644 --- a/raidem-0.3.1-syslibs.patch +++ b/raidem-0.3.1-syslibs.patch @@ -1,20 +1,5 @@ -diff -ur raidem-0.3.1-src.orig/Makefile raidem-0.3.1-src/Makefile ---- raidem-0.3.1-src.orig/Makefile 2006-04-08 06:54:03.000000000 +0200 -+++ raidem-0.3.1-src/Makefile 2006-04-09 20:46:18.000000000 +0200 -@@ -4,8 +4,8 @@ - - include Makefile.cfg - --CFLAGS += -W -Wall -Werror -Wno-deprecated-declarations \ -- -fno-strict-aliasing \ -+CFLAGS += -W -Wall -Wno-deprecated-declarations \ -+ -fno-strict-aliasing \ - -Iinclude -Ilib - #CFLAGS += -g3 - -diff -ur raidem-0.3.1-src.orig/configure.ac raidem-0.3.1-src/configure.ac ---- raidem-0.3.1-src.orig/configure.ac 2006-04-08 10:48:00.000000000 +0200 -+++ raidem-0.3.1-src/configure.ac 2006-04-11 22:06:03.000000000 +0200 +--- raidem-0.3.1-src/configure.ac.syslibs 2006-04-08 10:48:00.000000000 +0200 ++++ raidem-0.3.1-src/configure.ac 2006-04-29 15:01:51.000000000 +0200 @@ -53,7 +53,8 @@ AC_MSG_NOTICE([===== Using lib/adime =====]) && (cd lib/adime; sh fix.sh unix --quick) && @@ -34,20 +19,62 @@ diff -ur raidem-0.3.1-src.orig/configure.ac raidem-0.3.1-src/configure.ac AC_SUBST(NO_ALRAND, 1) fi -@@ -124,7 +125,8 @@ +@@ -120,7 +121,7 @@ + + + if ${ogg}; then +-AC_HAVE_LIBRARY([alogg], ++PKG_CHECK_MODULES(AllegroOGG, [AllegroOGG >= 1.0.0], AC_SUBST(HAVE_ALLEGROOGG, 1), AC_CHECK_FILE([lib/allegroogg/Makefile], AC_MSG_NOTICE([===== Using lib/allegroogg =====]), -- AC_SUBST(NO_OGG, 1))) -+ AC_SUBST(NO_OGG, 1)), -+ [`$alcfg --libs`]) +--- raidem-0.3.1-src/src/map-editor/map-proc.m.syslibs 2006-01-20 03:33:33.000000000 +0100 ++++ raidem-0.3.1-src/src/map-editor/map-proc.m 2006-04-29 15:01:51.000000000 +0200 +@@ -4,7 +4,7 @@ + #include + #include + #include +-#include "adime/include/adime.h" ++#include + #include "common.h" + #include "group.h" + #include "gui/gui-clip.h" +--- raidem-0.3.1-src/Makefile.cfg.in.syslibs 2006-04-08 07:23:28.000000000 +0200 ++++ raidem-0.3.1-src/Makefile.cfg.in 2006-04-29 15:01:51.000000000 +0200 +@@ -8,6 +8,7 @@ + INSTALL := install + alcfg := @alcfg@ + ftcfg := @ftcfg@ ++pkgcfg := @PKG_CONFIG@ + + # Install paths. + prefix := @prefix@ +--- raidem-0.3.1-src/Makefile.syslibs 2006-04-08 06:54:03.000000000 +0200 ++++ raidem-0.3.1-src/Makefile 2006-04-29 15:13:53.000000000 +0200 +@@ -4,8 +4,8 @@ + + include Makefile.cfg + +-CFLAGS += -W -Wall -Werror -Wno-deprecated-declarations \ +- -fno-strict-aliasing \ ++CFLAGS += -W -Wall -Wno-deprecated-declarations \ ++ -fno-strict-aliasing \ + -Iinclude -Ilib + #CFLAGS += -g3 + +--- raidem-0.3.1-src/misc/Makefile.all.syslibs 2006-04-08 09:12:44.000000000 +0200 ++++ raidem-0.3.1-src/misc/Makefile.all 2006-04-29 15:01:51.000000000 +0200 +@@ -30,7 +30,8 @@ + CFLAGS += -DNO_OGG else - AC_SUBST(NO_OGG, 1) - fi -diff -ur raidem-0.3.1-src.orig/misc/Makefile.all raidem-0.3.1-src/misc/Makefile.all ---- raidem-0.3.1-src.orig/misc/Makefile.all 2006-04-08 09:12:44.000000000 +0200 -+++ raidem-0.3.1-src/misc/Makefile.all 2006-04-09 21:06:03.000000000 +0200 -@@ -56,11 +56,14 @@ + ifdef HAVE_ALLEGROOGG +-LDLIBS += -lalogg ++LDLIBS += `$(pkgcfg) AllegroOGG --libs` ++CFLAGS += `$(pkgcfg) AllegroOGG --cflags` + else + CFLAGS += -Ilib/allegroogg/include + endif # HAVE_ALLEGROOGG +@@ -56,11 +57,14 @@ # Glyph-Keeper ifdef HAVE_GLYPH_KEEPER LDLIBS += -lglyph-alleg @@ -63,15 +90,3 @@ diff -ur raidem-0.3.1-src.orig/misc/Makefile.all raidem-0.3.1-src/misc/Makefile. CFLAGS += -Ilib/freetype/include endif -diff -ur raidem-0.3.1-src.orig/src/map-editor/map-proc.m raidem-0.3.1-src/src/map-editor/map-proc.m ---- raidem-0.3.1-src.orig/src/map-editor/map-proc.m 2006-01-20 03:33:33.000000000 +0100 -+++ raidem-0.3.1-src/src/map-editor/map-proc.m 2006-04-09 20:47:00.000000000 +0200 -@@ -4,7 +4,7 @@ - #include - #include - #include --#include "adime/include/adime.h" -+#include - #include "common.h" - #include "group.h" - #include "gui/gui-clip.h" diff --git a/raidem.spec b/raidem.spec index ee83c8d..01e11fb 100644 --- a/raidem.spec +++ b/raidem.spec @@ -1,6 +1,6 @@ Name: raidem -Version: 0.3 -Release: 2%{?dist} +Version: 0.3.1 +Release: 1%{?dist} Summary: 2d top-down shoot'em up Group: Amusements/Games License: zlib License @@ -10,13 +10,11 @@ URL: http://home.exetel.com.au/tjaden/raidem/ Source0: %{name}-%{version}-src.zip Source1: raidem.png Source2: raidem.desktop -Patch0: raidem-0.3-no-mp3.patch -Patch1: raidem-0.3-syslibs.patch -Patch2: raidem-0.3-warn.patch -Patch3: raidem-0.3-loadpng.patch +Patch0: raidem-0.3.1-syslibs.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: gcc-objc glyph-keeper-devel freetype-devel adime-devel -BuildRequires: zziplib-devel libpng-devel desktop-file-utils +BuildRequires: zziplib-devel libpng-devel libid3tag-devel AllegroOGG-devel +BuildRequires: automake desktop-file-utils %description Raid'em is a 2d top-down shoot'em up. It began as a remake of Raid II @@ -29,30 +27,29 @@ fun. %prep %setup -q -n %{name}-%{version}-src -%patch0 -p1 -z .no_mp3 -%patch1 -p1 -z .syslibs -%patch2 -p1 -z .warn -%patch3 -p1 -z .loadpng +%patch0 -p1 -z .syslibs # remove all included system libs, to avoid using the included system headers. mv lib/loadpng . rm -fr lib/* mv loadpng lib +aclocal +autoconf %build -make %{?_smp_mflags} lib/loadpng/libldpng.a raid \ - CFLAGS="$RPM_OPT_FLAGS -fsigned-char -Iinclude -Ilib -D__LINUX__ -DNO_MP3 \ - -DNO_ID3TAGS -DNO_FBLEND -DGLYPH_TARGET=GLYPH_TARGET_ALLEGRO -DITOUCH \ - -DRAIDEM_DATA_DIR=\\\"%{_datadir}/%{name}/\\\"" \ - LDLIBS="-lglyph-alleg `freetype-config --libs` lib/loadpng/libldpng.a -lpng \ - -lzzip -ladime `allegro-config --libs` -lz -lpthread -lobjc" +# override _datadir otherwise it expects its datafile directly under /use/share +%define _datadir /usr/share/%{name} +%configure +%define _datadir /use/share +make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT -#DIY, since the Makefile uses hardcoded ( := assigned) paths. +# DIY, since the Makefile uses hardcoded ( := assigned) paths and install -s +# and install -g games, etc. Fixable but this is easier mkdir -p $RPM_BUILD_ROOT%{_bindir} -install -m 755 raid $RPM_BUILD_ROOT%{_bindir}/%{name} +install -m 755 %{name} $RPM_BUILD_ROOT%{_bindir}/%{name} mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name} cp -a data demos maps $RPM_BUILD_ROOT%{_datadir}/%{name} @@ -89,11 +86,16 @@ fi %doc ChangeLog docs/LICENCE.txt docs/README.txt docs/damages.txt %{_bindir}/%{name} %{_datadir}/%{name} -%{_datadir}/applications/fedora-raidem.desktop -%{_datadir}/icons/hicolor/48x48/apps/raidem.png +%{_datadir}/applications/fedora-%{name}.desktop +%{_datadir}/icons/hicolor/48x48/apps/%{name}.png %changelog +* Sat Apr 29 2006 Hans de Goede 0.3.1-1 +- New upstream release 0.3.1 +- Upstream has merged most patches, dropped. +- Upstream has added ogg support (yeah!), add ogg and id3tag support. + * Sun Apr 2 2006 Hans de Goede 0.3-2 - Add missing RPM_OPT_FLAGS to CFLAGS - Add missing -D__LINUX__ to CFLAGS with this patch2 is no longer needed diff --git a/sources b/sources index ee08fe5..095eef7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -7a8de682a0fe122e784cc192b19ece4e raidem-0.3-src.zip +5bb3fa98b43e86afa453f88a8d90bf64 raidem-0.3.1-src.zip