summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2008-09-21 17:40:56 +0000
committerLuca Barbato <lu_zero@gentoo.org>2008-09-21 17:40:56 +0000
commitc57ae41e66499a28eb3a176aea62b9a6d7e9eac7 (patch)
tree268ea65af2e90fc7745051f73791ba7072f8408d
parentUpdate felix deps (diff)
downloadlu_zero-c57ae41e66499a28eb3a176aea62b9a6d7e9eac7.tar.gz
lu_zero-c57ae41e66499a28eb3a176aea62b9a6d7e9eac7.tar.bz2
lu_zero-c57ae41e66499a28eb3a176aea62b9a6d7e9eac7.zip
First try
svn path=/; revision=101
-rw-r--r--app-emulation/qemu-neo1973/Manifest2
-rw-r--r--app-emulation/qemu-neo1973/qemu-neo1973-0.9.1.4659.ebuild122
2 files changed, 124 insertions, 0 deletions
diff --git a/app-emulation/qemu-neo1973/Manifest b/app-emulation/qemu-neo1973/Manifest
new file mode 100644
index 0000000..fbc4400
--- /dev/null
+++ b/app-emulation/qemu-neo1973/Manifest
@@ -0,0 +1,2 @@
+DIST qemu-neo1973-0.9.1.4659.tar.bz2 4989970 RMD160 eec2605dfb35081104879c4a39f5ed4791096463 SHA1 a666545e31a7fbfac3ca08922ea07176688dae2d SHA256 83d25b841b2453fcfcc213c6e8a7b25f3919d370bb0e7b83500836912950af30
+EBUILD qemu-neo1973-0.9.1.4659.ebuild 3346 RMD160 da513f0f3eeed7d32f8193ca7ce64f9d02d91785 SHA1 0ece6805f8f8f7a9a45f91ec29e7cf98b56b828e SHA256 f616f4527f99a18ba902ca027344847c2f9401ae2da4aa742eadb4a865942188
diff --git a/app-emulation/qemu-neo1973/qemu-neo1973-0.9.1.4659.ebuild b/app-emulation/qemu-neo1973/qemu-neo1973-0.9.1.4659.ebuild
new file mode 100644
index 0000000..0cc7def
--- /dev/null
+++ b/app-emulation/qemu-neo1973/qemu-neo1973-0.9.1.4659.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu-softmmu/qemu-softmmu-0.9.1-r3.ebuild,v 1.4 2008/05/14 20:25:37 maekke Exp $
+
+inherit eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="Openmoko patched qemu snapshot"
+HOMEPAGE="http://wiki.openmoko.org/wiki/Openmoko_under_QEMU"
+SRC_URI="mirror://gentoo/${P}.tar.bz2"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="-alpha amd64 ppc -sparc x86"
+IUSE="sdl gnutls alsa"
+RESTRICT="binchecks test"
+
+DEPEND="virtual/libc
+ sys-libs/zlib
+ sdl? ( media-libs/libsdl )
+ gnutls? (
+ dev-util/pkgconfig
+ net-libs/gnutls
+ )
+ app-text/texi2html"
+RDEPEND="sys-libs/zlib
+ sdl? ( media-libs/libsdl )
+ gnutls? ( net-libs/gnutls )
+ alsa? ( media-libs/alsa-lib )"
+
+S="${WORKDIR}/${PN}"
+
+src_unpack() {
+ unpack ${A}
+
+ cd "${S}"
+ # Alter target makefiles to accept CFLAGS set via flag-o.
+ sed -i 's/^\(C\|OP_C\|HELPER_C\)FLAGS=/\1FLAGS+=/' \
+ Makefile Makefile.target tests/Makefile
+ # Ensure mprotect restrictions are relaxed for emulator binaries
+ [[ -x /sbin/paxctl ]] && \
+ sed -i 's/^VL_LDFLAGS=$/VL_LDFLAGS=-Wl,-z,execheap/' \
+ Makefile.target
+ # Prevent install of kernel module by qemu's makefile
+ sed -i 's/\(.\/install.sh\)/#\1/' Makefile
+ # avoid strip
+ sed -i 's:$(INSTALL) -m 755 -s:$(INSTALL) -m 755:' Makefile Makefile.target
+}
+
+src_compile() {
+ if use x86 ; then
+ # Force -march=pentium-mmx or lower. Fixes bug #212351.
+ local march
+ march=$(echo "${CFLAGS}" | sed 's:^.*-march=\([[:alnum:]-]\+\)\([[:blank:]].*\)\?$:\1:p;d')
+ case ${march} in
+ i386|i486|i586|pentium) ;;
+ *) # Either march is not enough low or not exists at all
+ case ${CHOST} in
+ i486-*-*) march=i486 ;;
+ i586-*-*) march=i586 ;;
+ *) march=pentium-mmx ;;
+ esac ;;
+ esac
+ #Let the application set its cflags
+ unset CFLAGS
+ append-flags -march=${march}
+ else
+ #Let the application set its cflags
+ unset CFLAGS
+ fi
+
+ # Switch off hardened tech
+ filter-flags -fpie -fstack-protector
+
+ myconf="--disable-gcc-check"
+ if use alsa; then
+ myconf="$myconf --enable-alsa"
+ fi
+ if ! use gnutls; then
+ myconf="$myconf --disable-vnc-tls"
+ fi
+# if ! use kqemu; then
+ myconf="$myconf --disable-kqemu"
+# fi
+ if ! use sdl ; then
+ myconf="$myconf --disable-sdl --disable-gfx-check"
+ fi
+ # econf does not work
+ ./configure \
+ --prefix=/usr \
+ --enable-adlib \
+ --cc=$(tc-getCC) \
+ --host-cc=$(tc-getCC) \
+ --disable-linux-user \
+ --target-list=arm-softmmu \
+ ${myconf} \
+ || die "could not configure"
+
+ emake OS_CFLAGS="${CFLAGS}" || die "make failed"
+}
+
+src_install() {
+# emake install \
+# prefix="${D}/usr" \
+# bindir="${D}/usr/bin" \
+# datadir="${D}/usr/share/qemu" \
+# docdir="${D}/usr/share/doc/${P}" \
+# mandir="${D}/usr/share/man" || die
+ newbin "${S}/arm-softmmu/qemu-system-arm" qemu-openmoko
+ insinto /usr/share/openmoko
+ doins "${S}"/openmoko/*
+ sed -i -e 's:script_dir.*:script_dir=".":' \
+ -e 's:qemu=.*:qemu="qemu-openmoko -M gta01 -m 130":' \
+ "${D}/usr/share/openmoko/env"
+}
+
+pkg_postinst() {
+ einfo "You will need the Universal TUN/TAP driver compiled into"
+ einfo "kernel or as a module to use the virtual network device."
+ einfo "In order to have gta01 and gta02fake virtual machine"
+ einfo "working you need to put a u-boot.bin file in"
+ einfo "/usr/share/openmoko"
+}