xmame: fix runtime endianess issue and bump PR
authorDenis 'GNUtoo' Carikli <GNUtoo@no-log.org>
Fri, 26 Nov 2010 10:39:52 +0000 (11:39 +0100)
committerDenis 'GNUtoo' Carikli <GNUtoo@no-log.org>
Tue, 30 Nov 2010 16:17:53 +0000 (17:17 +0100)
Without that fix we have(at runtime):
  xmame.SDL
    error: compiled byte ordering doesn't match machine byte ordering.
    compiled for MSB first, are you sure you chose the right cpu in makefile.unix?

on arm little endian

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
recipes/xmame/xmame_0.100.bb

index ce95744..cd326a2 100644 (file)
@@ -1,4 +1,4 @@
-DESCRIPTION = "Multiple Arcade Machine Emulator based on SDL"
+DESCRIPTION = "Multiple Arcade Machine Emulator based on SDL     "
 LICENSE = "xmame"
 SECTION = "games"
 PRIORITY = "optional"
@@ -7,14 +7,18 @@ DEPENDS = "expat virtual/libsdl libsdl-mixer"
 SRC_URI = "http://x.mame.net/download/historic/xmame-${PV}.tar.bz2 file://tiny.mak"
 S = "${WORKDIR}/xmame-${PV}"
 
-inherit flow-lossage
+PR = "r1"
+
+inherit flow-lossage siteinfo
+
+ENDIANESS = "${@base_conditional('SITEINFO_ENDIANNESS', 'le', '-DLSB_FIRST', '-DMSB_FIRST', d)}"
 
 do_compile() {
     test -z "${TINY}" && oe_runmake TARGET="mame" CC="${BUILD_CC}" maketree xmame.obj/cpu/m68000/m68kmake
-    oe_runmake TARGET="mame" JOY_SDL=1 SOUND_SDL=1 DISPLAY_METHOD=SDL                                   \
-               CC="${CC}" CXX="${CXX}" CFLAGS="-I. -Isrc -Isrc/include -Isrc/unix ${CFLAGS}"          \
-               CXXFLAGS="${CXXFLAGS}" LD="${CC}" LDFLAGS="${LDFLAGS}"                                 \
-               RANLIB="${RANLIB}" MY_CPU="${TARGET_ARCH}" ARCH="${TARGET_OS}"                         \
+    oe_runmake TARGET="mame" JOY_SDL=1 SOUND_SDL=1 DISPLAY_METHOD=SDL                                      \
+               CC="${CC}" CXX="${CXX}" CFLAGS="-I. -Isrc -Isrc/include -Isrc/unix ${CFLAGS} ${ENDIANESS}"  \
+               CXXFLAGS="${CXXFLAGS}" LD="${CC}" LDFLAGS="${LDFLAGS}"                                      \
+               RANLIB="${RANLIB}" MY_CPU="${TARGET_ARCH}" ARCH="${TARGET_OS}"                              \
                GLLIBS="" STRIP="${STRIP}" AR="${AR}"
 }