From bdc7d67fc0b78791e41b714039a80c8cec177c8d Mon Sep 17 00:00:00 2001 From: Jose V Beneyto Date: Fri, 8 Jan 2010 14:50:02 +0100 Subject: [PATCH] stella: initial import (verified compilation with my own patch) --- stella/.footprint | 8 ++++ stella/.md5sum | 2 + stella/Pkgfile | 38 +++++++++++++++++++ stella/stella-3.0.cross_compile.patch | 54 +++++++++++++++++++++++++++ 4 files changed, 102 insertions(+) create mode 100644 stella/.footprint create mode 100644 stella/.md5sum create mode 100644 stella/Pkgfile create mode 100644 stella/stella-3.0.cross_compile.patch diff --git a/stella/.footprint b/stella/.footprint new file mode 100644 index 0000000..2b28ae5 --- /dev/null +++ b/stella/.footprint @@ -0,0 +1,8 @@ +drwxr-xr-x root/root usr/ +drwxr-xr-x root/root usr/bin/ +-rwxr-xr-x root/root usr/bin/stella +drwxr-xr-x root/root usr/share/ +drwxr-xr-x root/root usr/share/applications/ +-rw-r--r-- root/root usr/share/applications/stella.desktop +drwxr-xr-x root/root usr/share/pixmaps/ +-rw-r--r-- root/root usr/share/pixmaps/stella.xpm diff --git a/stella/.md5sum b/stella/.md5sum new file mode 100644 index 0000000..a02dbfa --- /dev/null +++ b/stella/.md5sum @@ -0,0 +1,2 @@ +090c25bc446f94c4242479ae43013c79 stella-3.0-src.tar.gz +c107c42e2a8f281e4abffaaa4b9bfbc5 stella-3.0.cross_compile.patch diff --git a/stella/Pkgfile b/stella/Pkgfile new file mode 100644 index 0000000..ef10957 --- /dev/null +++ b/stella/Pkgfile @@ -0,0 +1,38 @@ +# Description: Stella is a multi-platform Atari 2600 VCS emulator +# URL: http://stella.sourceforge.net/ +# Maintainer: Jose V Beneyto, sepen at crux dot nu +# Packager: Jose V Beneyto, sepen at crux dot nu +# Arch Maintainer: CRUX-ARM System Team, crux-arm at mikeux dot dyndns dot org +# Depends on: libsdl + +name=stella +version=3.0 +release=1 +source=(http://dl.sourceforge.net/sourceforge/$name/$name-$version-src.tar.gz \ + $name-$version.cross_compile.patch) + +build() { + cd $name-$version + + patch -p1 -i $SRC/$name-$version.cross_compile.patch + sed -i configure \ + -e "s|^INCLUDES +=|INCLUDES += -I$CLFS/usr/include -I$CLFS/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT|" \ + -e "s|^LIBS +=|LIBS += -L$CLFS/usr/lib -lSDL -lpthread|" + + ./configure --build=$CHOST \ + --host=$CTARGET \ + --prefix=/usr \ + --disable-debugger \ + --x-libraries=/usr/lib \ + --with-sdl-prefix=$CLFS/usr + + sed -i Makefile \ + -e 's|all: tags|all:|' \ + -e 's|$(INSTALL) -c -s|$(INSTALL)|' + + make + make DESTDIR=$PKG install + + install -D -m 0644 src/common/$name.xpm $PKG/usr/share/pixmaps/$name.xpm + rm -rf $PKG/usr/share/{doc,icons} +} diff --git a/stella/stella-3.0.cross_compile.patch b/stella/stella-3.0.cross_compile.patch new file mode 100644 index 0000000..f10dd77 --- /dev/null +++ b/stella/stella-3.0.cross_compile.patch @@ -0,0 +1,54 @@ +diff -purN stella-3.0.orig/configure stella-3.0/configure +--- stella-3.0.orig/configure 2010-01-08 13:54:31.000000000 +0100 ++++ stella-3.0/configure 2010-01-08 14:32:03.000000000 +0100 +@@ -293,6 +293,10 @@ mingw32-cross) + _host_cpu=i386 + _host_prefix=i386-mingw32msvc + ;; ++arm-*) ++ _host_os=crux-arm ++ _host_cpu=arm ++ ;; + *) + guessed_host=`$_srcdir/config.guess` + _host_cpu=`echo $guessed_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +@@ -447,6 +451,10 @@ if test -n "$_host"; then + DEFINES="$DEFINES -DWIN32" + _host_os=win32 + ;; ++ arm-*) ++ echo "Cross-compiling for ARM processors ($_host)" ++ _build_gl=no ++ ;; + *) + echo "Cross-compiling to unknown target, please add your target to configure." + exit 1 +@@ -484,6 +492,11 @@ else + LIBS="$LIBS -lz" + _host_os=unix + ;; ++ arm-*) ++ DEFINES="$DEFINES -DUNIX" ++ LIBS="$LIBS -lz" ++ _host_os=crux-arm ++ ;; + # given this is a shell script assume some type of unix + *) + echo "WARNING: could not establish system type, assuming unix like" +@@ -673,6 +686,16 @@ case $_host_os in + _ranlib="arm-linux-ranlib" + _ar="arm-linux-ar cru" + ;; ++ crux-arm) ++ CXXFLAGS="-O2 -finline-functions" ++ DEFINES="$DEFINES -DUNIX -DBSPF_UNIX -DHAVE_GETTIMEOFDAY -DHAVE_INTTYPES" ++ MODULES="$MODULES $SRC/unix" ++ INCLUDES="$INCLUDES -I$SRC/unix -I$SRC/emucore $ZLIB_CFLAGS" ++ ++ _ranlib="arm-unknown-linux-gnu-ranlib" ++ _ar="arm-unknown-linux-gnu-ar cru" ++ _strip="arm-unknown-linux-gnu-strip" ++ ;; + *) + echo "WARNING: host system not currenty supported" + exit -- 2.26.2