[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[tyndur-devel] [PATCH 3/3] xgbcemu



From: Max Reitz <max@xxxxxxxxxx>

+ xgbcemu ist ein Game-Boy-Color-Emulator. Für týndur wird er im
  cdi-13h-Modus kompiliert (benötigt zwei CDI-Funktionen und ein
  paar sehr einfache libc-Funktionen). Dieser lbuild lädt immer
  die aktuellste Version (master).

Signed-off-by: Max Reitz <max@xxxxxxxxxx>
---
 lbuilds/xgbcemu/42/xgbcemu-42.lbuild |   45 ++++++++++++++++++++++++++++++++++
 1 files changed, 45 insertions(+), 0 deletions(-)
 create mode 100644 lbuilds/xgbcemu/42/xgbcemu-42.lbuild

diff --git a/lbuilds/xgbcemu/42/xgbcemu-42.lbuild b/lbuilds/xgbcemu/42/xgbcemu-42.lbuild
new file mode 100644
index 0000000..80ee307
--- /dev/null
+++ b/lbuilds/xgbcemu/42/xgbcemu-42.lbuild
@@ -0,0 +1,45 @@
+include toolchain
+include lutils
+
+DESCRIPTION="GBC-Emulator"
+HOMEPAGE="http://gitorious.org/xgbcemu";
+SRC_URI="http://gitorious.org/xgbcemu/xgbcemu/archive-tarball/master";
+
+LICENSE="GPLv2"
+
+BUILD_DEPEND="llibcdi-42"
+RUN_DEPEND=""
+
+MY_S="${S}/${P}"
+
+src_unpack()
+{
+    if [ "$(head -c 11 ${DISTDIR}/master)" == "The archive" ]; then
+        rm ${DISTDIR}/master
+        die "Try loading the archive again."
+    fi
+    cp ${DISTDIR}/master ${DISTDIR}/master.tar.gz || die "package not found"
+    lunpack master.tar.gz || die "could not unpack"
+    mv xgbcemu-xgbcemu ${MY_S}
+}
+
+src_compile()
+{
+    cd ${MY_S}
+
+    export "LDFLAGS=$LDFLAGS -lcdi"
+    export "CFLAGS=$CPPFLAGS"
+    ./configure --os=cdi-13h --cc=i386-pc-tyndur-gcc --link=i386-pc-tyndur-gcc || die "could not configure"
+    lmake || die "make failed"
+    cd ..
+}
+
+src_install()
+{
+    cd ${MY_S}
+
+    install -d install -d ${D}/${R}/bin
+    cp xgbcemu ${D}/${R}/bin || die "installing xgbcemu failed"
+
+    cd ${S}
+}
-- 
1.6.4.2