You are not logged in.

#1 2007-03-25 13:48:46

venomous
Member
Registered: 2007-03-18
Posts: 7

Proposed gcc 4 fix for dgen-sdl pkgbuild

Current PKGBUILD in abs doesn't compile because of gcc 4 breakages.

I got it to compile with current gcc 4.1.2 version by applying fixes in this patch:

http://sources.gentoo.org/viewcvs.py/*c … ch?rev=1.1

and also removing one more compiler error that wasn't fixed by this. Resulting files that work for me:

PKGBUILD:

# $Id: PKGBUILD,v 1.5 2004/04/19 06:21:02 dorphell Exp $
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
# Maintainer: Jason Chu <jason@archlinux.org>

pkgname=dgen-sdl
pkgver=1.23
pkgrel=1
pkgdesc=" DGen/SDL is a free, open source emulator for Sega Genesis/MegaDrive systems"
depends=('sdl' 'nasm')
source=(http://www.pknet.com/~joe/$pkgname-$pkgver.tar.gz
    dgen-sdl-1.23-gcc4.patch)
url="http://pknet.com/~joe/dgen-sdl.html"
build() {
cd $startdir/src/$pkgname-$pkgver
patch -Np1 -i ${startdir}/dgen-sdl-1.23-gcc4.patch || return 1
./configure --prefix=/usr
make || return 1
make prefix=$startdir/pkg/usr install
}

dgen-sdl-1.23-gcc4.patch:

diff -uNr dgen-sdl-1.23/musa/m68kmake.c dgen-sdl-1.23-gcc4.1/musa/m68kmake.c
--- dgen-sdl-1.23/musa/m68kmake.c    1999-12-19 19:15:59.000000000 -0800
+++ dgen-sdl-1.23-gcc4.1/musa/m68kmake.c    2007-03-25 14:33:12.000000000 -0700
@@ -1029,10 +1029,10 @@
     fprintf(filep, "/* ========================= OPCODE TABLE BUILDER ========================= */\n");
     fprintf(filep, "/* ======================================================================== */\n\n");
 
-    fprintf(filep, "#include \"m68kops.h\"\n");
-    fprintf(filep, "#include \"m68kcpu.h\"\n");
     fprintf(filep, "#include <stdlib.h>\n\n");
     fprintf(filep, "#include <string.h>\n\n");
+    fprintf(filep, "#include \"m68kops.h\"\n");
+    fprintf(filep, "#include \"m68kcpu.h\"\n");
 
     fprintf(filep, "extern void  (*m68k_instruction_jump_table[])(void); /* opcode handler jump table */\n\n");
 
diff -uNr dgen-sdl-1.23/star/star.c dgen-sdl-1.23-gcc4.1/star/star.c
--- dgen-sdl-1.23/star/star.c    1999-12-19 22:19:04.000000000 -0800
+++ dgen-sdl-1.23-gcc4.1/star/star.c    2007-03-25 14:33:12.000000000 -0700
@@ -1931,7 +1931,7 @@
     case aind: case ainc: case adec:
     case adsp: case axdp:
         usereg();
-    default:
+    default: ;
     }
 }

Maybe this can be included into abs or otherwise useful to somebody.

This could remove the older version of libstdc++requirement in the dgen-sdl binary package.

Offline

#2 2007-03-25 22:20:36

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: Proposed gcc 4 fix for dgen-sdl pkgbuild

Please submit a bug report. Most dev don't read the forums.

Offline

Board footer

Powered by FluxBB