1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-02-06 11:41:52 +00:00

- Update to 0.43.2.

- More patches to make it compile properly with a C89 C compiler.
This commit is contained in:
Florent Thoumie 2005-11-17 18:03:14 +00:00
parent 7ff50fde20
commit 93350b1757
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=148640
12 changed files with 201 additions and 47 deletions

View File

@ -7,7 +7,6 @@
PORTNAME= raine
PORTVERSION= 0.42.3
PORTREVISION= 1
CATEGORIES= emulators games
MASTER_SITES= http://www.rainemu.com/html/archive/
DISTNAME= ${PORTNAME}s-${PORTVERSION}
@ -16,7 +15,8 @@ MAINTAINER= flz@FreeBSD.org
COMMENT= Arcade Emulator for M68000, M68020 and Z80 based hardware
BUILD_DEPENDS= ${LOCALBASE}/bin/nasm:${PORTSDIR}/devel/nasm
LIB_DEPENDS= alleg.42:${PORTSDIR}/devel/allegro
LIB_DEPENDS= alleg.41:${PORTSDIR}/devel/allegro \
png.5:${PORTSDIR}/graphics/png
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
USE_BZIP2= yes
@ -24,6 +24,7 @@ USE_GMAKE= yes
USE_REINPLACE= yes
USE_X_PREFIX= yes
USE_SDL= sdl
USE_GNOME= gnomehier
MAKEFILE= makefile
MAKE_ENV= PREFIX=${PREFIX}
@ -32,8 +33,14 @@ ONLY_FOR_ARCHS= i386
.include <bsd.port.pre.mk>
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
@${REINPLACE_CMD} -e "s, [$$]_mcpu,,g" ${WRKSRC}/detect-cpu
@${REINPLACE_CMD} -e "s,sdl-config,${SDL_CONFIG},g" -e "s,/usr/share/,/share/gnome/,g" \
${WRKSRC}/makefile
@${REINPLACE_CMD} -e "s,/usr/share/games/raine,${DATADIR},g" \
${WRKSRC}/source/raine.c
@${REINPLACE_CMD} -e "s,^#ifdef GFX_SVGA,#ifdef GFX_SVGALIB,g" \
${WRKSRC}/source/gui/rgui.c \
${WRKSRC}/source/alleg/display.c \
${WRKSRC}/source/config.c
.include <bsd.port.post.mk>

View File

@ -1,3 +1,3 @@
MD5 (raines-0.42.3.tar.bz2) = a5adc3e4b8e92b28392bc77504707c9e
SHA256 (raines-0.42.3.tar.bz2) = b16e5b19b210ac94fad1f906c06fb25f5b3fe129dadeff114b4ba22c7fc9e151
SIZE (raines-0.42.3.tar.bz2) = 1683108
MD5 (raines-0.43.2.tar.bz2) = 57bfd8c87b68242545d1ce8e50014e5e
SHA256 (raines-0.43.2.tar.bz2) = b3bb0743b27d8353e2d25c6fa70bd0460ef4cee0fde161a67eac86ce55eaa30f
SIZE (raines-0.43.2.tar.bz2) = 1740105

View File

@ -1,15 +1,17 @@
--- makefile Sat Jun 12 16:02:17 2004
+++ makefile.new Sat Jul 24 01:48:21 2004
@@ -30,7 +30,7 @@
# Try to detect mingw... If you want to build the dos and the mingw
# version on the same system you should unset djdir before making
# the mingw version.
-ifeq ($(shell uname),Linux)
+ifeq ($(shell uname),FreeBSD)
--- makefile.orig Tue Sep 20 09:24:09 2005
+++ makefile Thu Nov 17 13:02:40 2005
@@ -32,6 +32,10 @@
OSTYPE=linux-gnu
endif
@@ -182,11 +182,11 @@
+ifeq ("$(shell uname)","FreeBSD")
+OSTYPE=linux-gnu
+endif
+
ifeq ("$(OSTYPE)","msys")
MINGDIR=1
OSTYPE=mingw32
@@ -181,11 +185,11 @@
# SDL = 1
@ -25,12 +27,13 @@
+ rainedata = $(sharedir)/raine
langdir = $(rainedata)/languages
romdir = $(rainedata)/roms
artdir = $(rainedata)/artwork
@@ -205,7 +209,7 @@
@@ -205,6 +205,7 @@
AFLAGS = -f elf
INCDIR += ` allegro-config --cflags`
+ INCDIR += -I/usr/X11R6/include
- INCDIR += ` allegro-config --cflags` `libpng-config --cflags`
+ INCDIR += ` allegro-config --cflags` `libpng-config --cflags` -I$(X11BASE)/include -I$(LOCALBASE)/include
DEFINE = -D__RAINE__ \
-DRAINE_UNIX \

View File

@ -1,9 +1,9 @@
--- source/emumain.c.orig Mon Jan 17 11:47:24 2005
+++ source/emumain.c Mon Jan 17 11:49:36 2005
--- source/emumain.c.orig Wed Aug 17 13:14:36 2005
+++ source/emumain.c Thu Nov 17 18:04:37 2005
@@ -9,6 +9,10 @@
#include <winalleg.h>
#endif
+#ifdef RAINE_UNIX
+#include <sys/time.h>
+#endif
@ -11,3 +11,18 @@
#include "raine.h" // General defines and stuff
#include "gui.h" // Interface stuff
#include "sasound.h" // Sound Sample stuff
@@ -286,13 +290,13 @@
} else if (recording_video) { // if draw_screen
int current_video_frame = cpu_frame_count*video_fps / fps;
if (current_video_frame != last_video_frame) {
- last_video_frame = current_video_frame;
char full_name1[256],full_name2[256];
FILE *f,*f2;
char buffer[1024];
int lus,n;
char *extension = (display_cfg.screenshot_png ? "png" : "pcx");
+ last_video_frame = current_video_frame;
fprintf(stderr,"drop frame\n");
sprintf(full_name2,"%s%s_%06d.%s",dir_cfg.screen_dir, current_game->main_name,cpu_frame_count,extension);
n = 1;

View File

@ -1,30 +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 @@
--- source/games/frogger.c.orig Sat Sep 17 10:35:38 2005
+++ source/games/frogger.c Thu Nov 17 16:52:10 2005
@@ -438,7 +438,7 @@
static void draw_emudx() {
UINT8 code,color;
- SCROLL_REGS;
+ SCROLL_REGS
UINT8 *map,*solid;
int coul1, coul2;
@@ -794,7 +794,7 @@
@@ -796,7 +796,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 @@
UINT8 *gfx = load_region[REGION_GFX1];
@@ -868,8 +868,8 @@
}
if( check_layer_enabled(layer_id_data[1])) {
- solid = GFX_SOLID[1];
- solid = gfx_solid[1];
int offs;
+ solid = GFX_SOLID[1];
+ solid = gfx_solid[1];
for (offs = 0x20 - 4;offs >= 0;offs -= 4) {
UINT8 sx,sy,color;
int flipx,flipy,code;

View File

@ -1,19 +1,20 @@
--- 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 @@
}
--- source/games/pengo.c.orig Sat Sep 17 19:16:59 2005
+++ source/games/pengo.c Thu Nov 17 13:07:59 2005
@@ -446,11 +446,12 @@
static int tile_cache_init;
static void load_pengo() {
- RAMSize = 0x1032+0x8000;
UINT8 *color_prom = load_region[REGION_PROMS];
UINT8 *decode1,*decode2,palette[32*2];
UINT32 dest_size;
UINT8 palette[32*2];
int i;
+ RAMSize = 0x1032+0x8000;
+
if(!(RAM=AllocateMem(RAMSize))) return;
@@ -1536,10 +1536,10 @@
if (!strcmp(current_game->main_name,"pengo")) {// normal
@@ -1498,10 +1499,10 @@
{
// quite different from pengo for the init : no encoding, different memory map,
// different palette...
@ -22,6 +23,6 @@
UINT8 palette[32*2];
int i;
+ RAMSize = 0x103a;
if (!strcmp(current_game->main_name,"pacplus")) {
for (i = 0; i < 0x4000; i++)

View File

@ -0,0 +1,28 @@
--- source/bezel.c.orig Thu Nov 17 18:24:59 2005
+++ source/bezel.c Thu Nov 17 18:49:28 2005
@@ -18,7 +18,7 @@
#define __USE_ISOC99 1
#include <math.h>
-#ifdef RAINE_DOS
+#if defined(RAINE_DOS) || __FreeBSD_version < 500300
// djgpp seems to have specificities for rounding...
// why on earth non one implements cleanly such basic function ???
#define round rint
@@ -296,6 +296,7 @@
int w = bezel_width, h = bezel_height;
int multw =1, multh = 1;
int xoff2,yoff2,destx,desty,xxx,yyy;
+ BITMAP *scaled_bezel;
if (!w || !h) {
// if wants_switch_res = 0, then the bezel is not initalised when arriving here...
@@ -316,7 +317,7 @@
w *= multw; h *= multh;
print_debug("bezel: create bitmap %dx%d\n",w,h);
- BITMAP *scaled_bezel = create_bitmap_ex(bitmap_color_depth(bezel_bitmap),w,h);
+ scaled_bezel = create_bitmap_ex(bitmap_color_depth(bezel_bitmap),w,h);
stretch_blit(bezel_bitmap,scaled_bezel,0,0,bezel_bitmap->w-1,bezel_bitmap->h-1,0,0,w,h);
if (rotate_screen == 3 || rotate_screen == 1) { // 270

View File

@ -0,0 +1,22 @@
--- source/games/diverboy.c Tue Sep 20 08:37:39 2005
+++ source/games/diverboy.c.new Thu Nov 17 16:26:26 2005
@@ -138,6 +138,8 @@
{
static int framecounter = 0;
UINT8* map;
+ UINT8 *source;
+ UINT8 *finish;
framecounter++;
@@ -147,8 +149,8 @@
MAP_PALETTE_MAPPED_NEW(0x0,16,map);
clear_game_screen(ReadLong(&map[0]));
- UINT8 *source = RAM_SPRITE;
- UINT8 *finish = source + 0x4000;
+ source = RAM_SPRITE;
+ finish = source + 0x4000;
while (source < finish)
{

View File

@ -0,0 +1,17 @@
--- source/games/esd16.c.orig Thu Nov 17 16:34:24 2005
+++ source/games/esd16.c Thu Nov 17 16:34:48 2005
@@ -552,12 +552,13 @@
}
static void draw_multchmp() {
- ClearPaletteMap();
int x16,y16,zzz,zzzz;
int zz;
int x,y;
UINT16 code;
UINT8 *map;
+
+ ClearPaletteMap();
// 1 layer is opaque 1024x512, 8x8 sprites
if (check_layer_enabled(layer_id_data[1])) {

View File

@ -0,0 +1,19 @@
--- source/games/mitchell.c.orig Thu Nov 17 17:41:02 2005
+++ source/games/mitchell.c Thu Nov 17 17:41:34 2005
@@ -451,6 +451,7 @@
static UINT8 pang_port5_r (UINT32 offset) {
int bit;
+ UINT8 res;
bit = EEPROM_read_bit() << 7;
// 2 bits are togled in the cpu frame, 1 for the vblank, the other unknown
@@ -458,7 +459,7 @@
/* if (Machine->gamedrv == &driver_mgakuen2) /\* hack... music doesn't work otherwise *\/ */
/* bit ^= 0x08; */
- UINT8 res = (input_buffer[0] & 0x7f) | bit;
+ res = (input_buffer[0] & 0x7f) | bit;
return res;
}

View File

@ -0,0 +1,39 @@
--- source/raine.c.bak Thu Nov 17 17:58:51 2005
+++ source/raine.c Thu Nov 17 17:57:32 2005
@@ -92,6 +92,17 @@
{
int i,ta,version_id;
char str[256],*s;
+ char *dirs[] = {
+ "config",
+ "savegame",
+ "savedata",
+ "roms",
+ "demos",
+ "snapshot",
+ "artwork",
+ NULL
+ };
+ char **dirp = dirs;
#ifdef GFX_FBCON
FILE *f;
#endif
@@ -241,18 +252,6 @@
raine_cfg.hide = 0;
raine_cfg.req_load_game = 0;
raine_cfg.req_game_index = 0;
-
- char *dirs[] = {
- "config",
- "savegame",
- "savedata",
- "roms",
- "demos",
- "snapshot",
- "artwork",
- NULL
- };
- char **dirp = dirs;
mkdir_rwx(dir_cfg.exe_path);
while (*dirp) {

View File

@ -24,7 +24,10 @@ bin/raine
%%DATADIR%%/languages/turkish.cfg
%%DATADIR%%/languages/galego.cfg
%%DATADIR%%/raine.dat
@exec mkdir -p %D/%%DATADIR%%/roms
share/gnome/applications/raine.desktop
share/gnome/pixmaps/raine.png
@unexec rmdir %D/%%DATADIR%%/roms 2> /dev/null || true
@unexec rmdir %D/%%DATADIR%%/emudx 2> /dev/null || true
@unexec rmdir %D/%%DATADIR%%/artwork 2> /dev/null || true
@dirrm %%DATADIR%%/languages
@unexec rmdir %D/%%DATADIR%% 2> /dev/null || true