Skip to content
This repository has been archived by the owner on Jan 2, 2018. It is now read-only.

Commit

Permalink
pearpc: initial (from Torrentow)
Browse files Browse the repository at this point in the history
  • Loading branch information
11mariom committed Aug 6, 2011
1 parent 6d7f536 commit 5495fb0
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app-emulation/pearpc/Manifest
@@ -0,0 +1,3 @@
DIST createdisk.py 383 RMD160 ea30bd2d2c68754173e59d5423a68cfc738faff5 SHA1 529a7da0d0601be62055a52cc86e9d0d54925ac0 SHA256 59c41b98916df1a6a69cbc1d7e835a5662b8c08551893b22846d4a29accc6f6a
DIST pearpc-0.5.tar.bz2 800380 RMD160 5f2cd819c21a2cd69465737cf873fc7f00c59188 SHA1 17c5ec69f0139d5a5ce02186a3c990040f45f343 SHA256 4b5ac6b111ba55640c2b2d1de9c4f68cb211aadc472474a564ad9ce6a645fbd3
EBUILD pearpc-0.5.ebuild 2301 RMD160 31a2a95f7eb4d136f7b69f6e2eb7496bbf81de7e SHA1 39ab829c2fa9e1d33ca5b373c0a0531bbf15a907 SHA256 35ea75c7eb0578aa968a274a7cbf1cfcd117097cbb1b1ba8ffd3a490e0426ccd
85 changes: 85 additions & 0 deletions app-emulation/pearpc/pearpc-0.5.ebuild
@@ -0,0 +1,85 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-emulation/pearpc/pearpc-0.4.ebuild,v 1.13 2009/09/06 21:18:20 robbat2 Exp $

inherit eutils flag-o-matic linux-mod

DESCRIPTION="PowerPC Architecture Emulator"
HOMEPAGE="http://pearpc.sourceforge.net/"
SRC_URI="mirror://sourceforge/pearpc/${P}.tar.bz2
http://pearpc.sf.net/createdisk.py"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86"
IUSE="debug jit X sdl"

RDEPEND="sys-apps/net-tools
sdl? ( >=media-libs/libsdl-1.2.0 )
X? ( x11-libs/libX11 )
net-firewall/iptables
net-misc/bridge-utils"
DEPEND="${RDEPEND}
sys-devel/flex
sys-devel/bison
x86? ( dev-lang/nasm )
jit? ( dev-lang/nasm )"

src_unpack() {
unpack ${A}
cd "${S}"

#epatch "${FILESDIR}/${P}-configure.patch"
}

pkg_setup() {
linux-mod_pkg_setup
if ! linux_chkconfig_present TUN; then
die "You must have TUN/TAP enabled in your kernel."
fi
}

src_compile() {
local myconf

use jit && myconf="${myconf} --enable-cpu=jitc_x86"
if use sdl; then
myconf="${myconf} --enable-ui=sdl"
elif use X; then
myconf="${myconf} --enable-ui=x11"
else
die "You must set at least one of these flags: X, sdl"
fi

econf \
$(use_enable debug) \
${myconf} \
|| die "econf failed"
emake || die "emake failed"
sed -i -e "s:video.x:/usr/share/${P}/video.x:g" ppccfg.example
}

src_install() {
dobin src/ppc
dodoc ChangeLog AUTHORS README TODO ppccfg.example

insinto /usr/share/${P}
doins scripts/ifppc_{down,up}{,.setuid} video.x "${FILESDIR}"/settings
fperms u+s,a+x /usr/share/${P}/ifppc_{up,down}.setuid

insinto /usr/share/${P}/scripts
doins "${DISTDIR}"/createdisk.py
}

pkg_postinst() {
elog "You will need to update your configuration files to point"
elog "to the new location of video.x, which is now"
elog "/usr/share/${P}/video.x"
elog ""
elog "To create disk images for PearPC, you can use the Python"
elog "script located at: /usr/share/${P}/scripts/createdisk.py"
elog "Usage: createdisk.py <image name> <image size>"
elog ""
elog "Also, be sure to check ppccfg.example in /usr/share/doc/${P}/"
elog "for new configuration options."
}

0 comments on commit 5495fb0

Please sign in to comment.