From max at tyndur.org Mon Apr 5 21:38:01 2010 From: max at tyndur.org (max at tyndur.org) Date: Mon, 5 Apr 2010 21:38:01 +0200 Subject: [tyndur-devel] [PATCH 0/3] xgbcemu-lbuild Message-ID: <1270496284-3381-1-git-send-email-max@tyndur.org> Mit diesen Patches wird ein lbuild für den xgbcemu hinzugefügt, einen Game-Boy-Color-Emulator. From max at tyndur.org Mon Apr 5 21:38:02 2010 From: max at tyndur.org (max at tyndur.org) Date: Mon, 5 Apr 2010 21:38:02 +0200 Subject: [tyndur-devel] =?utf-8?q?=5BPATCH_1/3=5D_lbuilds=3A_Build-Abh?= =?utf-8?q?=C3=A4ngigkeiten?= In-Reply-To: <1270496284-3381-1-git-send-email-max@tyndur.org> References: <1270496284-3381-1-git-send-email-max@tyndur.org> Message-ID: <1270496284-3381-2-git-send-email-max@tyndur.org> From: Max Reitz * Es ist sinnvoll abzubrechen, wenn die nicht erfüllt werden können. Signed-off-by: Max Reitz --- lbuild.sh | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lbuild.sh b/lbuild.sh index 6cc1cc7..c187f65 100755 --- a/lbuild.sh +++ b/lbuild.sh @@ -84,7 +84,7 @@ internal_prepare_env() { # Buildtime-Dependencies abarbeiten for dep in ${BUILD_DEPEND}; do pack="${PACKSDIR}/${dep:1}.tar" - tar -C "${WORKDIR}/env" -xf "${pack}" + tar -C "${WORKDIR}/env" -xf "${pack}" || die "Abhaengigkeit ${dep:1} konnte nicht erfuellt werden." done cp -rf ${WORKDIR}/env/packages/*/*/* ${WORKDIR}/env/ -- 1.6.4.2 From max at tyndur.org Mon Apr 5 21:38:03 2010 From: max at tyndur.org (max at tyndur.org) Date: Mon, 5 Apr 2010 21:38:03 +0200 Subject: [tyndur-devel] [PATCH 2/3] libcdi In-Reply-To: <1270496284-3381-1-git-send-email-max@tyndur.org> References: <1270496284-3381-1-git-send-email-max@tyndur.org> Message-ID: <1270496284-3381-3-git-send-email-max@tyndur.org> From: Max Reitz + Der xgbcemu findet zwei CDI-Funktionen ganz nett (Speicher mappen und BIOS-Interrupts aufrufen), daher muss er gegen die CDI-Lib gelinkt werden. Dieser lbuild erstellt eine solche Lib und auch gleich die Header (sollte immer die aktuelle týndur-Version sein). Signed-off-by: Max Reitz --- lbuilds/libcdi/42/libcdi-42.lbuild | 51 ++++++++++++++++++++++++++++++++++++ 1 files changed, 51 insertions(+), 0 deletions(-) create mode 100644 lbuilds/libcdi/42/libcdi-42.lbuild diff --git a/lbuilds/libcdi/42/libcdi-42.lbuild b/lbuilds/libcdi/42/libcdi-42.lbuild new file mode 100644 index 0000000..a218209 --- /dev/null +++ b/lbuilds/libcdi/42/libcdi-42.lbuild @@ -0,0 +1,51 @@ +include toolchain +include lutils + +DESCRIPTION="CDI-Bibliotheken" +HOMEPAGE="http://lowlevel.brainsware.org/wiki/index.php/CDI" +SRC_URI="http://git.tyndur.org/?p=tyndur.git;a=snapshot;sf=tgz" + +LICENSE="BSD" + +BUILD_DEPEND="" +RUN_DEPEND="" + +MY_S="${S}/tyndur/src/modules/cdi/lib" + +src_unpack() +{ + cp "${DISTDIR}/?p=tyndur.git;a=snapshot;sf=tgz" ${DISTDIR}/tyndur-master.tar.gz || die "package not found" + lunpack tyndur-master.tar.gz || die "could not unpack" +} + +src_compile() +{ + cd ${MY_S} + + echo "CC = i386-pc-tyndur-gcc" > Makefile + echo "CFLAGS = -std=gnu99 -c -I../include" >> Makefile + echo "AR = i386-pc-tyndur-ar" >> Makefile + echo "OBJS = \$(patsubst %.c,%.o,\$(subst cdi.c,,\$(wildcard *.c)) \$(wildcard net/*.c) \$(wildcard scsi/*.c))" >> Makefile + echo ".PHONY: all" >> Makefile + echo "all: libcdi.a" >> Makefile + echo "libcdi.a: \$(OBJS)" >> Makefile + echo -e "\t\$(AR) rcf \$@ \$^" >> Makefile + echo "%.o: %.c" >> Makefile + echo -e "\t\$(CC) \$(CFLAGS) \$< -o \$@" >> Makefile + lmake || die "make failed" + + cd ${S} +} + +src_install() +{ + cd ${MY_S} + + install -d ${D}/${R}/lib + install -d ${D}/${R}/include + cp libcdi.a ${D}/${R}/lib || die "installing libcdi failed" + cd ../include + cp -r * ${D}/${R}/include || die "installing CDI headers failed" + + cd ${S} +} -- 1.6.4.2 From max at tyndur.org Mon Apr 5 21:38:04 2010 From: max at tyndur.org (max at tyndur.org) Date: Mon, 5 Apr 2010 21:38:04 +0200 Subject: [tyndur-devel] [PATCH 3/3] xgbcemu In-Reply-To: <1270496284-3381-1-git-send-email-max@tyndur.org> References: <1270496284-3381-1-git-send-email-max@tyndur.org> Message-ID: <1270496284-3381-4-git-send-email-max@tyndur.org> From: Max Reitz + 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 --- 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 From kevin at tyndur.org Thu Apr 8 22:06:28 2010 From: kevin at tyndur.org (Kevin Wolf) Date: Thu, 8 Apr 2010 22:06:28 +0200 Subject: [tyndur-devel] [PATCH 0/3] xgbcemu-lbuild In-Reply-To: <1270496284-3381-1-git-send-email-max@tyndur.org> References: <1270496284-3381-1-git-send-email-max@tyndur.org> Message-ID: <20100408200627.GA22989@silvanus> On Mon, Apr 05, 2010 at 09:38:01PM +0200, max at tyndur.org wrote: > Mit diesen Patches wird ein lbuild für den xgbcemu hinzugefügt, > einen Game-Boy-Color-Emulator. Danke, sind alle drei drin.