summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorobache <obache@pkgsrc.org>2011-03-14 12:04:31 +0000
committerobache <obache@pkgsrc.org>2011-03-14 12:04:31 +0000
commit384601d5674fc28473cd95d1a7ba1b554c428ff7 (patch)
treec21bed8d188c35a8dd99e38b115555ee48f7d0c5
parent4e42408eb064dad6b2e75b041bb10fe55f9c2c5e (diff)
downloadpkgsrc-384601d5674fc28473cd95d1a7ba1b554c428ff7.tar.gz
* fixes build with libpng-1.5
* add user-destdir installation support * honor PKGMANDIR * manage desktopdb Bump PKGREVISION.
-rw-r--r--emulators/raine/Makefile13
-rw-r--r--emulators/raine/distinfo6
-rw-r--r--emulators/raine/patches/patch-aa68
-rw-r--r--emulators/raine/patches/patch-source_png_loadpng.c31
-rw-r--r--emulators/raine/patches/patch-source_png_savepng.c13
5 files changed, 95 insertions, 36 deletions
diff --git a/emulators/raine/Makefile b/emulators/raine/Makefile
index cec4a2aabaf..fb0c9e09112 100644
--- a/emulators/raine/Makefile
+++ b/emulators/raine/Makefile
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.21 2011/01/13 13:37:36 wiz Exp $
+# $NetBSD: Makefile,v 1.22 2011/03/14 12:04:31 obache Exp $
#
DISTNAME= raines-0.43.3
PKGNAME= ${DISTNAME:S/raines/raine/}
-PKGREVISION= 2
+PKGREVISION= 3
CATEGORIES= emulators
MASTER_SITES= http://rainemu.swishparty.co.uk/html/archive/
EXTRACT_SUFX= .tar.bz2
@@ -14,6 +14,8 @@ COMMENT= 680x0 Arcade Emulator
BUILD_DEPENDS+= nasm-[0-9]*:../../devel/nasm
+PKG_DESTDIR_SUPPORT= user-destdir
+
WRKSRC= ${WRKDIR}/${PKGNAME_NOREV}
USE_TOOLS+= gmake perl:run pkg-config
MAKE_FILE= makefile
@@ -21,7 +23,7 @@ MAKE_ENV+= OSTYPE=linux
REPLACE_PERL= makedep
PTHREAD_OPTS+= require
-INSTALLATION_DIRS= share/pixmaps
+INSTALL_MAKE_FLAGS+= prefix=${DESTDIR}${PREFIX}
# XXX Really?
ONLY_FOR_PLATFORM= *-*-i386
@@ -32,12 +34,13 @@ post-build:
> ${WRKSRC}/raine.sh
post-install:
- ${MV} ${PREFIX}/bin/raine ${PREFIX}/share/raine
- ${INSTALL_SCRIPT} ${WRKSRC}/raine.sh ${PREFIX}/bin/raine
+ ${MV} ${DESTDIR}${PREFIX}/bin/raine ${DESTDIR}${PREFIX}/share/raine
+ ${INSTALL_SCRIPT} ${WRKSRC}/raine.sh ${DESTDIR}${PREFIX}/bin/raine
.include "../../devel/SDL/buildlink3.mk"
.include "../../devel/allegro/buildlink3.mk"
.include "../../devel/zlib/buildlink3.mk"
.include "../../graphics/png/buildlink3.mk"
+.include "../../sysutils/desktop-file-utils/desktopdb.mk"
.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/emulators/raine/distinfo b/emulators/raine/distinfo
index 2254ebc1b69..72cba69a417 100644
--- a/emulators/raine/distinfo
+++ b/emulators/raine/distinfo
@@ -1,8 +1,10 @@
-$NetBSD: distinfo,v 1.6 2006/07/17 20:21:35 wiz Exp $
+$NetBSD: distinfo,v 1.7 2011/03/14 12:04:31 obache Exp $
SHA1 (raines-0.43.3.tar.bz2) = a6c9fa7b63aadca8f5a76ba71532c0502854188b
RMD160 (raines-0.43.3.tar.bz2) = c245930880cada5f965caf7a9f2d4d9301912b82
Size (raines-0.43.3.tar.bz2) = 1740971 bytes
-SHA1 (patch-aa) = ee9d56cfc6b157b3b4a8d77547cf093688b6079e
+SHA1 (patch-aa) = 7e0d7955c55c2aba6ebdee1c2b9b59a8655b29ae
SHA1 (patch-ab) = 9143d9f43150ec033d7a72d288256d0c759665d6
SHA1 (patch-ac) = 82f0bc91dc840b250ec45899306c19b56f98a7ed
+SHA1 (patch-source_png_loadpng.c) = 9831bfd7c841f9c4c04c0f319f59662d7f058cd8
+SHA1 (patch-source_png_savepng.c) = 608caca883fda9222f1dc0f798d032bc572bf7b7
diff --git a/emulators/raine/patches/patch-aa b/emulators/raine/patches/patch-aa
index f12dc307efc..6d1a904301b 100644
--- a/emulators/raine/patches/patch-aa
+++ b/emulators/raine/patches/patch-aa
@@ -1,4 +1,4 @@
-$NetBSD: patch-aa,v 1.3 2006/07/17 20:21:35 wiz Exp $
+$NetBSD: patch-aa,v 1.4 2011/03/14 12:04:31 obache Exp $
--- makefile.orig 2006-05-26 12:12:22.000000000 +0000
+++ makefile
@@ -44,8 +44,8 @@ $NetBSD: patch-aa,v 1.3 2006/07/17 20:21:35 wiz Exp $
- PNG_LFLAGS = "$(shell libpng-config --ldflags)"
- PNG_STATIC_LFLAGS = "$(shell libpng-config --static --ldflags)"
-+ PNG_LFLAGS = "$(shell pkg-config --libs libpng12)"
-+ PNG_STATIC_LFLAGS = "$(shell pkg-config --libs --static libpng12)"
++ PNG_LFLAGS = "$(shell pkg-config --libs libpng)"
++ PNG_STATIC_LFLAGS = "$(shell pkg-config --libs --static libpng)"
LIBS = -lz -lalleg $(PNG_LFAGS)
LIBS_STATIC = -lz -lalleg_s -lkernel32 -luser32 -lgdi32 -lcomdlg32 \
-lole32 -ldinput -lddraw -ldxguid -lwinmm -ldsound \
@@ -56,18 +56,36 @@ $NetBSD: patch-aa,v 1.3 2006/07/17 20:21:35 wiz Exp $
- PNG_CFLAGS = "$(shell libpng-config --cflags)"
- PNG_LFAGS = "$(shell libpng-config --ldflags)"
- PNG_STATIC_LFLAGS = "$(shell libpng-config --static --ldflags)"
-+ PNG_CFLAGS = "$(shell pkg-config --cflags libpng12)"
-+ PNG_LFAGS = "$(shell pkg-config --cflags libpng12)"
-+ PNG_STATIC_LFLAGS = "$(shell pkg-config --cflags --static libpng12)"
++ PNG_CFLAGS = "$(shell pkg-config --cflags libpng)"
++ PNG_LFAGS = "$(shell pkg-config --cflags libpng)"
++ PNG_STATIC_LFLAGS = "$(shell pkg-config --cflags --static libpng)"
INCDIR += $(PNG_CFLAGS)
DEFINE = -D__RAINE__ \
-DRAINE_WIN32 \
-@@ -214,7 +185,7 @@ else
+@@ -193,7 +164,7 @@ else
+ prefix = $(PREFIX)
+ bindir = $(prefix)/bin
+ sharedir = $(prefix)/share
+- mandir = $(prefix)/man/man6
++ mandir = $(prefix)/${PKGMANDIR}/man6
+ rainedata = $(sharedir)/raine
+ langdir = $(rainedata)/languages
+ romdir = $(rainedata)/roms
+@@ -207,14 +178,14 @@ else
+ RAINE_UNIX = 1
+
+ INSTALL = /usr/bin/install
+- INSTALL_BIN = $(INSTALL) -m 755
+- INSTALL_DATA = $(INSTALL) -m 644
++ INSTALL_BIN = $(BSD_INSTALL_PROGRAM)
++ INSTALL_DATA = $(BSD_INSTALL_DATA)
+ RD = rmdir --ignore-fail-on-non-empty
+ CD = cd
AFLAGS = -f elf
- PNG_CFLAGS = "$(shell libpng-config --cflags)"
-+ PNG_CFLAGS = "$(shell pkg-config --cflags libpng12)"
++ PNG_CFLAGS = "$(shell pkg-config --cflags libpng)"
ifndef SDL
ALLEGRO_CFLAGS = "$(shell allegro-config --cflags)"
endif
@@ -78,9 +96,9 @@ $NetBSD: patch-aa,v 1.3 2006/07/17 20:21:35 wiz Exp $
- LIBS = -lz `allegro-config --libs` `libpng-config --ldflags`
- LIBS_DEBUG = -lz `allegro-config --libs ` `libpng-config --ldflags` # -lefence
- LIBS_STATIC = -lz `allegro-config --static` `libpng-config --static --ldflags`
-+ LIBS = -lz `allegro-config --libs` `pkg-config --libs libpng12`
-+ LIBS_DEBUG = -lz `allegro-config --libs ` `pkg-config --libs libpng12` # -lefence
-+ LIBS_STATIC = -lz `allegro-config --static` `pkg-config --static --libs libpng12`
++ LIBS = -lz `allegro-config --libs` `pkg-config --libs libpng`
++ LIBS_DEBUG = -lz `allegro-config --libs ` `pkg-config --libs libpng` # -lefence
++ LIBS_STATIC = -lz `allegro-config --static` `pkg-config --static --libs libpng`
ifeq ("$(shell if [ -e /usr/include/vga.h ] || [ -e /usr/local/include/vga.h ]; then echo yes; fi)","yes")
GFX_SVGALIB=1
@@ -96,7 +114,7 @@ $NetBSD: patch-aa,v 1.3 2006/07/17 20:21:35 wiz Exp $
ifndef RAINE_DOS
@echo -n libpng:
- @libpng-config --version
-+ @pkg-config --version libpng12
++ @pkg-config --version libpng
@echo -n sdl:
@sdl-config --version
endif
@@ -112,33 +130,25 @@ $NetBSD: patch-aa,v 1.3 2006/07/17 20:21:35 wiz Exp $
# create directories
-@@ -1090,18 +1057,22 @@ vclean:
- install: install_dirs $(RAINE_LNG) $(RAINE_EXE)
- ifdef RAINE_UNIX
-
-- $(INSTALL_BIN) $(RAINE_EXE) $(bindir)
-- $(INSTALL_DATA) $(RAINE_DAT) $(rainedata)
-+ $(BSD_INSTALL_PROGRAM) $(RAINE_EXE) $(bindir)
-+ $(BSD_INSTALL_DATA) $(RAINE_DAT) $(rainedata)
+@@ -1094,11 +1061,18 @@ ifdef RAINE_UNIX
+ $(INSTALL_DATA) $(RAINE_DAT) $(rainedata)
sh -c "if [ -f hiscore.dat ]; then $(INSTALL_DATA) hiscore.dat $(rainedata); fi"
-- $(INSTALL_DATA) config/cheats.cfg $(rainedata)
+ $(INSTALL_DATA) config/cheats.cfg $(rainedata)
- $(INSTALL_DATA) raine.desktop $(prefix)/usr/share/applications
- $(INSTALL_DATA) raine.png $(prefix)/usr/share/pixmaps
-+ $(BSD_INSTALL_DATA) config/cheats.cfg $(rainedata)
-+ $(BSD_INSTALL_DATA) raine.desktop $(PREFIX)/share/applications
-+ $(BSD_INSTALL_DATA) raine.png $(PREFIX)/share/pixmaps
++ $(INSTALL_DATA) raine.desktop $(prefix)/share/applications
++ $(INSTALL_DATA) raine.png $(prefix)/share/pixmaps
install_dirs:
- $(MD) -pv $(bindir) $(rainedata) $(langdir) $(romdir) $(artdir) $(emudxdir) $(prefix)/usr/share/applications $(prefix)/usr/share/pixmaps
++ $(BSD_INSTALL_PROGRAM_DIR) $(bindir)
+ $(BSD_INSTALL_DATA_DIR) $(rainedata)
+ $(BSD_INSTALL_DATA_DIR) $(langdir)
+ $(BSD_INSTALL_DATA_DIR) $(romdir)
+ $(BSD_INSTALL_DATA_DIR) $(artdir)
+ $(BSD_INSTALL_DATA_DIR) $(emudxdir)
++ $(BSD_INSTALL_DATA_DIR) $(prefix)/share/applications
++ $(BSD_INSTALL_DATA_DIR) $(prefix)/share/pixmaps
$(RAINE_LNG):
-- $(INSTALL_DATA) config/language/$@ $(langdir)
-+ $(BSD_INSTALL_DATA) config/language/$@ $(langdir)
-
- else
- @echo There is no needs to install for a win32/dos system
+ $(INSTALL_DATA) config/language/$@ $(langdir)
diff --git a/emulators/raine/patches/patch-source_png_loadpng.c b/emulators/raine/patches/patch-source_png_loadpng.c
new file mode 100644
index 00000000000..ab8dcf9d3dc
--- /dev/null
+++ b/emulators/raine/patches/patch-source_png_loadpng.c
@@ -0,0 +1,31 @@
+$NetBSD: patch-source_png_loadpng.c,v 1.1 2011/03/14 12:04:31 obache Exp $
+
+--- source/png/loadpng.c.orig 2005-08-18 08:52:15.000000000 +0000
++++ source/png/loadpng.c
+@@ -275,7 +275,7 @@ BITMAP *load_png(AL_CONST char *filename
+ * the normal method of doing things with libpng). REQUIRED unless you
+ * set up your own error handlers in the png_create_read_struct() earlier.
+ */
+- if (setjmp(png_ptr->jmpbuf)) {
++ if (setjmp(png_jmpbuf(png_ptr))) {
+ /* Free all of the memory associated with the png_ptr and info_ptr */
+ png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
+ pack_fclose(fp);
+@@ -337,7 +337,7 @@ BITMAP *load_png_from_zip(unzFile uf, RG
+ * the normal method of doing things with libpng). REQUIRED unless you
+ * set up your own error handlers in the png_create_read_struct() earlier.
+ */
+- if (setjmp(png_ptr->jmpbuf)) {
++ if (setjmp(png_jmpbuf(png_ptr))) {
+ /* Free all of the memory associated with the png_ptr and info_ptr */
+ png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
+ /* If we get here, we had a problem reading the file */
+@@ -435,7 +435,7 @@ BITMAP *load_memory_png(AL_CONST void *b
+ * the normal method of doing things with libpng). REQUIRED unless you
+ * set up your own error handlers in the png_create_read_struct() earlier.
+ */
+- if (setjmp(png_ptr->jmpbuf)) {
++ if (setjmp(png_jmpbuf(png_ptr))) {
+ /* Free all of the memory associated with the png_ptr and info_ptr */
+ png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
+ /* If we get here, we had a problem reading the file */
diff --git a/emulators/raine/patches/patch-source_png_savepng.c b/emulators/raine/patches/patch-source_png_savepng.c
new file mode 100644
index 00000000000..2b9e05c657b
--- /dev/null
+++ b/emulators/raine/patches/patch-source_png_savepng.c
@@ -0,0 +1,13 @@
+$NetBSD: patch-source_png_savepng.c,v 1.1 2011/03/14 12:04:31 obache Exp $
+
+--- source/png/savepng.c.orig 2005-08-17 10:20:36.000000000 +0000
++++ source/png/savepng.c
+@@ -188,7 +188,7 @@ static int really_save_png(PACKFILE *fp,
+ goto Error;
+
+ /* Set error handling. */
+- if (setjmp(png_ptr->jmpbuf)) {
++ if (setjmp(png_jmpbuf(png_ptr))) {
+ /* If we get here, we had a problem reading the file. */
+ goto Error;
+ }