snes9x-sdl: new version that doesn't depend on qte and libstdc++, qte version still...
authorFrederic Bompart <frederic@unknown.openembedded.org>
Fri, 2 Dec 2005 09:12:35 +0000 (09:12 +0000)
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>
Fri, 2 Dec 2005 09:12:35 +0000 (09:12 +0000)
packages/snes9x/snes9x-sdl-qpe_1.39.bb
packages/snes9x/snes9x-sdl/.mtn2git_empty [moved from packages/snes9x/snes9x-sdl-qpe-1.39/.mtn2git_empty with 100% similarity]
packages/snes9x/snes9x-sdl/compile.patch [moved from packages/snes9x/snes9x-sdl-qpe-1.39/compile.patch with 74% similarity]
packages/snes9x/snes9x-sdl_1.39.bb [new file with mode: 0644]

index b953572..6d9fadf 100644 (file)
@@ -2,18 +2,20 @@ DESCRIPTION = "Super Nintendo Emulator based on SDL, QtE Palmtop Environments Ed
 SECTION = "opie/games"
 PRIORITY = "optional"
 DEPENDS = "libsdl-qpe"
-PR = "r1"
+PR = "r2"
 LICENSE = "snes9x"
 SRC_URI = "http://www.vanille.de/mirror/snes9x-sdl-${PV}.tar.bz2 \
           file://compile.patch;patch=1"
 S = "${WORKDIR}/snes9x-sdl-${PV}"
 
+FILESPATH = "${FILE_DIRNAME}/${PN}-${PV}:${FILE_DIRNAME}/snes9x-sdl-${PV}:${FILE_DIRNAME}/snes9x-sdl:${FILE_DIRNAME}/files:${FILE_DIRNAME}"
+
 FILES_${PN} = "${palmtopdir}/bin/snes9x"
 
 do_compile() {
        oe_runmake CC="${CC}" CCC="${CXX}" \
                   INCLUDES="-I${STAGING_INCDIR} `sdl-config --cflags`" \
-                  LDLIBS="`sdl-config --libs` -Wl,-rpath-link,${STAGING_LIBDIR}"
+                  LDLIBS="`sdl-config --libs` -Wl,-rpath-link,${STAGING_LIBDIR} -lqpe -lqte"
 }
 
 do_install() {
similarity index 74%
rename from packages/snes9x/snes9x-sdl-qpe-1.39/compile.patch
rename to packages/snes9x/snes9x-sdl/compile.patch
index 57ff0c4..b41a30f 100644 (file)
@@ -1,10 +1,10 @@
 
 #
-# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
+# Patch managed by http://www.holgerschurig.de/patcher.html
 #
 
---- snes9x-sdl-1.39/unix/svga.cpp~compile      2003-10-28 10:08:18.000000000 +0100
-+++ snes9x-sdl-1.39/unix/svga.cpp      2004-01-19 21:29:07.000000000 +0100
+--- snes9x-sdl-1.39/unix/svga.cpp~compile
++++ snes9x-sdl-1.39/unix/svga.cpp
 @@ -48,7 +48,7 @@
  #include <stdlib.h>
  #include <signal.h>
@@ -14,8 +14,8 @@
  
  #include "snes9x.h"
  #include "memmap.h"
---- snes9x-sdl-1.39/unix/unix.cpp~compile      2003-10-28 22:09:02.000000000 +0100
-+++ snes9x-sdl-1.39/unix/unix.cpp      2004-01-19 21:29:07.000000000 +0100
+--- snes9x-sdl-1.39/unix/unix.cpp~compile
++++ snes9x-sdl-1.39/unix/unix.cpp
 @@ -50,7 +50,7 @@
  #include <sys/types.h>
  #include <ctype.h>
  #include "keydef.h"
  
  #undef USE_THREADS
---- /dev/null  1970-01-01 01:00:00.000000000 +0100
-+++ snes9x-sdl-1.39/unzip/unzipP.h     2004-01-19 21:29:07.000000000 +0100
+@@ -189,8 +189,7 @@
+ }
+ /*#include "cheats.h"*/
+-extern "C"
+-int SDL_main (int argc, char **argv)
++int main (int argc, char **argv)
+ {
+     if (argc < 2)
+       S9xUsage ();
+--- /dev/null
++++ snes9x-sdl-1.39/unzip/unzipP.h
 @@ -0,0 +1,124 @@
 +#ifndef _UNZIPP_H_
 +#define _UNZIPP_H_
 +}               unz_s;
 +
 +#endif
---- snes9x-sdl-1.39/Makefile~compile   2003-10-28 16:49:50.000000000 +0100
-+++ snes9x-sdl-1.39/Makefile   2004-01-19 21:31:53.000000000 +0100
+--- snes9x-sdl-1.39/Makefile~compile
++++ snes9x-sdl-1.39/Makefile
 @@ -53,12 +53,12 @@
  
  ifdef THREAD_SOUND
 -INCLUDES=-I/usr/local/include
 +INCLUDES=
  
- OPTIMISE= -D_ZAURUS -Os -ffast-math -fstrict-aliasing -fomit-frame-pointer -mcpu=strongarm1100 -mtune=strongarm1100
+-OPTIMISE= -D_ZAURUS -Os -ffast-math -fstrict-aliasing -fomit-frame-pointer -mcpu=strongarm1100 -mtune=strongarm1100
++OPTIMISE= -D_ZAURUS -Os -ffast-math -fstrict-aliasing -fomit-frame-pointer
  CCFLAGS = $(OPTIMISE) \
 --I/opt/Qtopia/include/SDL \
  -I. \
  
  snes9x: $(OBJECTS) 
 -      $(CCC) $(INCLUDES) -o $@ $(OBJECTS) $(EXTRALIBS) -L/opt/QtPalmtop/lib/ -lSDL -lSDLmain $(LDLIBS) -lqpe -lqte -lpthread
-+      $(CCC) $(INCLUDES) -o $@ $(OBJECTS) $(EXTRALIBS) $(LDLIBS) -lqpe -lqte -lpthread
++      $(CC) $(INCLUDES) -o $@ $(OBJECTS) $(EXTRALIBS) $(LDLIBS) -lz -lpthread
  
  gsnes9x: $(OBJECTS) unix/x11.o unix/glide.o
        $(CCC) $(INCLUDES) -o $@ $(OBJECTS) unix/x11.o unix/glide.o $(LDLIBS) $(GLIDELIBS) -lXext -lX11 -lXxf86dga -lXxf86vm $(EXTRALIBS) -lz -lm
+--- snes9x-sdl-1.39/snapshot.cpp~compile
++++ snes9x-sdl-1.39/snapshot.cpp
+@@ -671,7 +671,7 @@
+                                                 fields [i].type);
+     }
+-    uint8 *block = new uint8 [len];
++    uint8 *block = (uint8*) malloc(len);
+     uint8 *ptr = block;
+     uint16 word;
+     uint32 dword;
+@@ -739,7 +739,7 @@
+     }
+     FreezeBlock (stream, name, block, len);
+-    delete block;
++    free(block);
+ }
+ void FreezeBlock (STREAM stream, char *name, uint8 *block, int size)
+@@ -767,7 +767,7 @@
+                                                 fields [i].type);
+     }
+-    uint8 *block = new uint8 [len];
++    uint8 *block = (uint8*) malloc(len);
+     uint8 *ptr = block;
+     uint16 word;
+     uint32 dword;
+@@ -776,7 +776,7 @@
+     if ((result = UnfreezeBlock (stream, name, block, len)) != SUCCESS)
+     {
+-      delete block;
++      free(block);
+       return (result);
+     }
+@@ -841,7 +841,7 @@
+       }
+     }
+-    delete block;
++    free(block);
+     return (result);
+ }
+@@ -865,9 +865,9 @@
+     if (rem)
+     {
+-      char *junk = new char [rem];
++      char *junk = (char*) malloc(rem);
+       READ_STREAM (junk, rem, stream);
+-      delete junk;
++      free(junk);
+     }
+       
+     return (SUCCESS);
diff --git a/packages/snes9x/snes9x-sdl_1.39.bb b/packages/snes9x/snes9x-sdl_1.39.bb
new file mode 100644 (file)
index 0000000..9c37b12
--- /dev/null
@@ -0,0 +1,23 @@
+DESCRIPTION = "Super Nintendo Emulator based on SDL"
+SECTION = "games"
+PRIORITY = "optional"
+DEPENDS = "virtual/libsdl zlib"
+PR = "r2"
+LICENSE = "snes9x"
+SRC_URI = "http://www.vanille.de/mirror/snes9x-sdl-${PV}.tar.bz2 \
+          file://compile.patch;patch=1"
+S = "${WORKDIR}/snes9x-sdl-${PV}"
+
+FILES_${PN} = "${bindir}/snes9x"
+
+do_compile() {
+       oe_runmake CC="${CC}" CCC="${CXX} -fno-rtti -fno-exceptions" \
+                  INCLUDES="-I${STAGING_INCDIR} `sdl-config --cflags`" \
+                  LDLIBS="`sdl-config --libs`"
+}
+
+do_install() {
+       install -d ${D}${bindir}
+       install -m 0755 snes9x ${D}${bindir}/snes9x
+}
+