Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Feb 2005 12:02:40 +0100
From:      Florent Thoumie <flz@xbsd.org>
To:        Volker Stolz <vs@FreeBSD.org>
Cc:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   Re: ports/76339: Update port: emulators/raine - update port toversion 0.42.3, unbreak on 4.x
Message-ID:  <420C90D0.90800@xbsd.org>
In-Reply-To: <200502111025.j1BAP8t9086802@freefall.freebsd.org>
References:  <200502111025.j1BAP8t9086802@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig8110E133C761CE43B40D960A
Content-Type: multipart/mixed;
 boundary="------------090203000600070101090004"

This is a multi-part message in MIME format.
--------------090203000600070101090004
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Here it is ! New patch.

--------------090203000600070101090004
Content-Type: text/plain;
 name="raine-v2.diff"
Content-Transfer-Encoding: 8bit
Content-Disposition: inline;
 filename="raine-v2.diff"

diff -ruN raine.orig/Makefile raine/Makefile
--- raine.orig/Makefile	Sat Aug 28 06:41:14 2004
+++ raine/Makefile	Fri Feb 11 11:59:24 2005
@@ -6,7 +6,7 @@
 #

 PORTNAME=	raine
-PORTVERSION=	0.40.5
+PORTVERSION=	0.42.3
 CATEGORIES=	emulators games
 MASTER_SITES=	http://www.rainemu.com/html/archive/
 DISTNAME=	${PORTNAME}s-${PORTVERSION}
@@ -30,12 +30,9 @@

 .include <bsd.port.pre.mk>

-.if ${OSVERSION} < 500000
-BROKEN=		"pengo.c doesn't compile on 4.10 (see ports/69509)"
-.endif
-
 post-patch:
 	${REINPLACE_CMD} -e "s, [$$]_mcpu,,g" ${WRKSRC}/detect-cpu
 	${REINPLACE_CMD} -e "s,sdl-config,${SDL_CONFIG},g" ${WRKSRC}/makefile
+	${REINPLACE_CMD} -e "s,/usr/share/games/raine,${DATADIR},g" ${WRKSRC}/source/raine.c

 .include <bsd.port.post.mk>
diff -ruN raine.orig/distinfo raine/distinfo
--- raine.orig/distinfo	Sat Aug 28 06:41:14 2004
+++ raine/distinfo	Fri Feb 11 11:59:24 2005
@@ -1,2 +1,2 @@
-MD5 (raines-0.40.5.tar.bz2) = d49cdd9186e5354290283e15866a2b32
-SIZE (raines-0.40.5.tar.bz2) = 1605975
+MD5 (raines-0.42.3.tar.bz2) = a5adc3e4b8e92b28392bc77504707c9e
+SIZE (raines-0.42.3.tar.bz2) = 1683108
diff -ruN raine.orig/files/patch-source::alleg::blit.c raine/files/patch-source::alleg::blit.c
--- raine.orig/files/patch-source::alleg::blit.c	Thu Jan  1 01:00:00 1970
+++ raine/files/patch-source::alleg::blit.c	Fri Feb 11 11:59:24 2005
@@ -0,0 +1,11 @@
+--- source/alleg/blit.c.orig	Mon Jan 17 12:37:21 2005
++++ source/alleg/blit.c	Mon Jan 17 12:38:10 2005
+@@ -1,6 +1,8 @@
+ #ifdef RAINE_WIN32
+ #include <allegro.h>
+ #include <winalleg.h>
++#elif defined(RAINE_UNIX)
++#include <sys/time.h>
+ #endif
+ #include "blit_x2.h"
+ #include "eagle.h"
diff -ruN raine.orig/files/patch-source::emumain.c raine/files/patch-source::emumain.c
--- raine.orig/files/patch-source::emumain.c	Thu Jan  1 01:00:00 1970
+++ raine/files/patch-source::emumain.c	Fri Feb 11 11:59:24 2005
@@ -0,0 +1,13 @@
+--- source/emumain.c.orig	Mon Jan 17 11:47:24 2005
++++ source/emumain.c	Mon Jan 17 11:49:36 2005
+@@ -9,6 +9,10 @@
+ #include <winalleg.h>
+ #endif
+
++#ifdef RAINE_UNIX
++#include <sys/time.h>
++#endif
++
+ #include "raine.h"              // General defines and stuff
+ #include "gui.h"                // Interface stuff
+ #include "sasound.h"            // Sound Sample stuff
diff -ruN raine.orig/files/patch-source::games::cps1.c raine/files/patch-source::games::cps1.c
--- raine.orig/files/patch-source::games::cps1.c	Thu Jan  1 01:00:00 1970
+++ raine/files/patch-source::games::cps1.c	Fri Feb 11 11:59:24 2005
@@ -0,0 +1,20 @@
+--- source/games/cps1.c.orig	Mon Jan 17 10:56:50 2005
++++ source/games/cps1.c	Mon Jan 17 11:35:07 2005
+@@ -1437,11 +1437,13 @@
+
+ void load_cps2() {
+   UINT16 *rom = (UINT16*)load_region[REGION_ROM1];
+-  xor = (UINT16*)load_region[REGION_USER1];
++  UINT8 *tmp;
++  int i, size_code, size_user1;
+ /*   int size = get_region_size(REGION_USER1)/2,i,size_code; */
+-  int size_code = get_region_size(REGION_ROM1),i;
+-  int size_user1 = get_region_size(REGION_USER1);
+-  UINT8 *tmp = AllocateMem(size_user1);
++  xor = (UINT16*)load_region[REGION_USER1];
++  size_code = get_region_size(REGION_ROM1);
++  size_user1 = get_region_size(REGION_USER1);
++  tmp = AllocateMem(size_user1);
+   if (!init_tilequeue()) return;
+   init_pbitmap();
+
diff -ruN raine.orig/files/patch-source::games::dkong.c raine/files/patch-source::games::dkong.c
--- raine.orig/files/patch-source::games::dkong.c	Thu Jan  1 01:00:00 1970
+++ raine/files/patch-source::games::dkong.c	Fri Feb 11 11:59:24 2005
@@ -0,0 +1,68 @@
+--- source/games/dkong.c.orig	Mon Jan 17 10:04:09 2005
++++ source/games/dkong.c	Mon Jan 17 10:33:14 2005
+@@ -479,7 +479,7 @@
+
+ static void draw_emudx() {
+   UINT8 code, color;
+-  SCROLL_REGS;
++  SCROLL_REGS
+   UINT8 *map,*gfx;
+   int offs;
+   int curlev = 0;
+@@ -517,8 +517,8 @@
+     gfx = gfx_ram;
+
+   if( check_layer_enabled(layer_id_data[0])) {
+-    MAKE_SCROLL_n_16(512,512,1,0, 0);
+-    START_SCROLL_16(BORDER,BORDER,512,512);
++    MAKE_SCROLL_n_16(512,512,1,0, 0)
++    START_SCROLL_16(BORDER,BORDER,512,512)
+
+     int sy = y-16*2;
+     if (sy < 0 || sy > 224*2+BORDER)
+@@ -716,20 +716,21 @@
+   /* As always for the color prom, great thanks go to mame for their decoding work */
+   for (i=0; i<256; i++) {
+     UINT8 bit0, bit1, bit2;
++    int r,g,b;
+     /* red component */
+     bit0 = (color_prom[256] >> 1) & 1;
+     bit1 = (color_prom[256] >> 2) & 1;
+     bit2 = (color_prom[256] >> 3) & 1;
+-    int r = 7 - (bit0 | (bit1<<1) | (bit2 << 2));
++    r = 7 - (bit0 | (bit1<<1) | (bit2 << 2));
+     /* green component */
+     bit0 = (color_prom[0] >> 2) & 1;
+     bit1 = (color_prom[0] >> 3) & 1;
+     bit2 = (color_prom[256] >> 0) & 1;
+-    int g = 7 - (bit0 | (bit1<<1) | (bit2 << 2));
++    g = 7 - (bit0 | (bit1<<1) | (bit2 << 2));
+     /* blue component */
+     bit0 = (color_prom[0] >> 0) & 1;
+     bit1 = (color_prom[0] >> 1) & 1;
+-    int b = 7 - ((bit0<<1) | (bit1 << 2));
++    b = 7 - ((bit0<<1) | (bit1 << 2));
+     RAM_PAL[i] = (b) | (g<<3) | (r<<6);
+     color_prom++;
+   }
+@@ -800,9 +801,9 @@
+
+ static void draw_dkong() {
+   UINT8 code, color;
+-  SCROLL_REGS;
++  SCROLL_REGS
+   UINT8 *map,*gfx;
+-  int offs;
++  int offs,sy;
+
+   if (*gfx_bank) {
+     gfx = gfx_ram + 0x100;
+@@ -813,7 +814,7 @@
+     MAKE_SCROLL_n_8(256,256,1,0, 0);
+     START_SCROLL_8(BORDER,BORDER,256,256);
+
+-    int sy = y-16;
++    sy = y-16;
+     if (sy < 0 || sy > 224+BORDER)
+       continue;
+     code = gfx[tile_index];
diff -ruN raine.orig/files/patch-source::games::frogger.c raine/files/patch-source::games::frogger.c
--- raine.orig/files/patch-source::games::frogger.c	Thu Jan  1 01:00:00 1970
+++ raine/files/patch-source::games::frogger.c	Fri Feb 11 11:59:24 2005
@@ -0,0 +1,30 @@
+--- source/games/frogger.c.orig	Mon Jan 17 10:37:51 2005
++++ source/games/frogger.c	Mon Jan 17 10:40:26 2005
+@@ -437,7 +437,7 @@
+
+ static void draw_emudx() {
+   UINT8 code,color;
+-  SCROLL_REGS;
++  SCROLL_REGS
+   UINT8 *map,*solid;
+   int coul1, coul2;
+
+@@ -794,7 +794,7 @@
+      rotated you call it either col or row scroll ! */
+
+   UINT8 code, color;
+-  SCROLL_REGS;
++  SCROLL_REGS
+   UINT8 *map,*solid;
+   int coul1, coul2;
+
+@@ -865,8 +865,8 @@
+   }
+
+   if( check_layer_enabled(layer_id_data[1])) {
+-    solid = GFX_SOLID[1];
+     int offs;
++    solid = GFX_SOLID[1];
+     for (offs = 0x20 - 4;offs >= 0;offs -= 4) {
+       UINT8 sx,sy,color;
+       int flipx,flipy,code;
diff -ruN raine.orig/files/patch-source::games::pengo.c raine/files/patch-source::games::pengo.c
--- raine.orig/files/patch-source::games::pengo.c	Thu Jan  1 01:00:00 1970
+++ raine/files/patch-source::games::pengo.c	Fri Feb 11 11:59:24 2005
@@ -0,0 +1,27 @@
+--- source/games/pengo.c.orig	Mon Jan 17 10:46:35 2005
++++ source/games/pengo.c	Mon Jan 17 10:47:35 2005
+@@ -444,11 +444,11 @@
+ }
+
+ static void load_pengo() {
+-  RAMSize = 0x1032+0x8000;
+   UINT8 *color_prom = load_region[REGION_PROMS];
+   UINT8 *decode1,*decode2,palette[32*2];
+   UINT32 dest_size;
+   int i;
++  RAMSize = 0x1032+0x8000;
+
+   if(!(RAM=AllocateMem(RAMSize))) return;
+
+@@ -1536,10 +1536,10 @@
+ {
+   // quite different from pengo for the init : no encoding, different memory map,
+   // different palette...
+-  RAMSize = 0x103a;
+   UINT8 *color_prom = load_region[REGION_PROMS];
+   UINT8 palette[32*2];
+   int i;
++  RAMSize = 0x103a;
+
+   if (!strcmp(current_game->main_name,"pacplus")) {
+     for (i = 0; i < 0x4000; i++)
diff -ruN raine.orig/files/patch-source::gui::rgui.c raine/files/patch-source::gui::rgui.c
--- raine.orig/files/patch-source::gui::rgui.c	Thu Jan  1 01:00:00 1970
+++ raine/files/patch-source::gui::rgui.c	Fri Feb 11 11:59:24 2005
@@ -0,0 +1,32 @@
+--- source/gui/rgui.c.orig	Mon Jan 17 12:07:21 2005
++++ source/gui/rgui.c	Mon Jan 17 12:23:46 2005
+@@ -9,6 +9,10 @@
+ #include <winalleg.h>
+ #endif
+
++#ifdef RAINE_UNIX
++#include <sys/time.h>
++#endif
++
+ #include "raine.h"
+ #include "rgui.h"
+ #include "rguiproc.h"
+@@ -1507,6 +1511,10 @@
+ void dialog_oxygen(void)
+ {
+
++#ifdef RAINE_UNIX
++  struct timeval timeout;
++#endif
++
+ #ifdef BUFFER_GUI
+    static int z,z1,z2,z3;
+    int ta;
+@@ -1560,7 +1568,6 @@
+   // its sleep function has a 1ms resolution instead of 1us. Too bad...
+    Sleep(1000/60);
+ #elif defined(RAINE_UNIX)
+-  struct timeval timeout;
+   timeout.tv_sec = 0;
+   timeout.tv_usec = 1000000/60;
+   select(0, NULL, NULL, NULL, &timeout);
diff -ruN raine.orig/pkg-plist raine/pkg-plist
--- raine.orig/pkg-plist	Sat Aug 28 06:41:14 2004
+++ raine/pkg-plist	Fri Feb 11 11:59:24 2005
@@ -1,29 +1,30 @@
 bin/raine
 %%DATADIR%%/cheats.cfg
 %%DATADIR%%/hiscore.dat
-%%DATADIR%%/languages/Brasil.cfg
-%%DATADIR%%/languages/CZECH.CFG
-%%DATADIR%%/languages/Catala.cfg
-%%DATADIR%%/languages/Dansk.cfg
-%%DATADIR%%/languages/Dutch.cfg
-%%DATADIR%%/languages/English.cfg
-%%DATADIR%%/languages/Espaņol.cfg
-%%DATADIR%%/languages/Euskera.cfg
-%%DATADIR%%/languages/Finnish.cfg
-%%DATADIR%%/languages/French.cfg
-%%DATADIR%%/languages/French2.cfg
-%%DATADIR%%/languages/German.cfg
-%%DATADIR%%/languages/German2.cfg
-%%DATADIR%%/languages/Italian.cfg
-%%DATADIR%%/languages/Japanese.cfg
-%%DATADIR%%/languages/POLISH.CFG
-%%DATADIR%%/languages/Portugal.cfg
-%%DATADIR%%/languages/Spanish.cfg
-%%DATADIR%%/languages/Svenska.cfg
-%%DATADIR%%/languages/Template.cfg
-%%DATADIR%%/languages/Turkish.cfg
+%%DATADIR%%/languages/brasil.cfg
+%%DATADIR%%/languages/czech.cfg
+%%DATADIR%%/languages/catala.cfg
+%%DATADIR%%/languages/dansk.cfg
+%%DATADIR%%/languages/dutch.cfg
+%%DATADIR%%/languages/english.cfg
+%%DATADIR%%/languages/espanol.cfg
+%%DATADIR%%/languages/euskera.cfg
+%%DATADIR%%/languages/finnish.cfg
+%%DATADIR%%/languages/french.cfg
+%%DATADIR%%/languages/french2.cfg
+%%DATADIR%%/languages/german.cfg
+%%DATADIR%%/languages/german2.cfg
+%%DATADIR%%/languages/italian.cfg
+%%DATADIR%%/languages/japanese.cfg
+%%DATADIR%%/languages/polish.cfg
+%%DATADIR%%/languages/portugal.cfg
+%%DATADIR%%/languages/spanish.cfg
+%%DATADIR%%/languages/svenska.cfg
+%%DATADIR%%/languages/template.cfg
+%%DATADIR%%/languages/turkish.cfg
 %%DATADIR%%/languages/galego.cfg
 %%DATADIR%%/raine.dat
-@dirrm %%DATADIR%%/roms
+@exec mkdir -p %D/%%DATADIR%%/roms
+@unexec rmdir %D/%%DATADIR%%/roms 2> /dev/null || true
 @dirrm %%DATADIR%%/languages
-@dirrm %%DATADIR%%
+@unexec rmdir %D/%%DATADIR%% 2> /dev/null || true

--------------090203000600070101090004--

--------------enig8110E133C761CE43B40D960A
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (FreeBSD)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCDJDUMxEkbVFH3PQRAnPsAJ0R92cb6QZMMhAfHW8D9aQiCQIyGACfZOm/
gOALaFLcQ/hDx7hfql8GY28=
=9a/U
-----END PGP SIGNATURE-----

--------------enig8110E133C761CE43B40D960A--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?420C90D0.90800>