# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/app-emulation/pearpc/pearpc-0.3.0.ebuild,v 1.1 2004/08/16 01:41:02 port001 Exp $ inherit flag-o-matic IUSE="debug jit sdl" #IUSE="debug qt gtk jit sdl" DESCRIPTION="PowerPC Architecture Emulator" HOMEPAGE="http://pearpc.sourceforge.net/" SRC_URI="mirror://sourceforge/pearpc/${P}.tar.bz2 mirror://sourceforge/pearpc/pearpc-6gib.img.bz2 mirror://sourceforge/pearpc/pearpc-3gib.img.bz2 http://pearpc.sf.net/createdisk.py" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" DEPEND="x86? ( dev-lang/nasm )" RDEPEND="virtual/x11 media-libs/libmng media-libs/jpeg media-libs/libpng sys-libs/zlib media-libs/freetype sdl? ( media-libs/libsdl )" # gtk? ( >=x11-libs/gtk-2.0 ) # qt? ( >=x11-libs/qt-3.1.1 )" DEFAULT_TO_X11=0 #pkg_setup() { # if (use qt && use sdl) || (use qt && use gtk) || (use gtk && sdl) || (use gtk && use qt && use sdl); then # ewarn # ewarn "More than one frontend USE flags enabled, defaulting to X11 support." # ewarn # DEFAULT_TO_X11=1 # fi #} src_compile() { local myconf myconf="--enable-release" use jit && myconf="${myconf} --enable-cpu=jitc_x86" if use debug; then myconf="${myconf} --enable-debug" else myconf="${myconf} --disable-debug" fi if [ $DEFAULT_TO_X11 = 1 ]; then myconf="${myconf} --enable-ui=x11" else if use sdl; then myconf="${myconf} --enable-ui=sdl" # elif use qt; then # myconf="${myconf} --enable-ui=qt" # elif use gtk; then # myconf="${myconf} --enable-ui=gtk" else myconf="${myconf} --enable-ui=x11" fi fi econf ${myconf} || die "econf failed" emake || die "emake failed" } src_install() { # PearPC binary dodir /usr/bin insinto /usr/bin dobin src/ppc fperms 755 /usr/bin/ppc fowners root:root /usr/bin/ppc fperms u+s /usr/bin/ppc # Video driver dodir /usr/share/${P} insinto /usr/share/${P} doins video.x # Fix example sed -i -e "s:video.x:/usr/share/${P}/video.x:g" ppccfg.example # Install example dodir /usr/share/${P}/scripts insinto /usr/share/doc/${P} doins ppccfg.example # Networking scripts dodir /usr/share/${P}/scripts insinto /usr/share/${P}/scripts doins scripts/ifppc_{down,up,up.setuid,down.setuid,down.beos,up.beos} fperms 755 /usr/share/${P}/scripts/ifppc_{down,up,down.setuid,up.setuid,down.beos,up.beos} fowners root:root /usr/share/${P}/scripts{ifppc_{down,up,down.setuid,up.setuid,down.beos,up.beos} fperms u+s /usr/share/${P}/scripts/ifppc_{down.setuid,up.setuid} # Pyton script to efficiently create emtpy disk images dodir /usr/share/${P}/scripts insinto /usr/share/${P}/scripts doins ${DISTDIR}/createdisk.py fperms 755 /usr/share/${P}/scripts/createdisk.py # Compressed 3GB and 6GB disk images dodir /usr/share/${P}/images insinto /usr/share/${P}/images doins ${DISTDIR}/pearpc-3gib.img.bz2 doins ${DISTDIR}/pearpc-6gib.img.bz2 # Documentation dodoc ChangeLog AUTHORS COPYING README TODO } pkg_postinst() { echo einfo "You will need to update your configuration files to point" einfo "to the new location of video.x, which is now" einfo "/usr/share/${P}/video.x" echo einfo "To create a disk image for PearPC use the Python script" einfo "located at: /usr/share/${P}/scripts/createdisk.py" einfo "Or extract one of the two compressed images located at:" einfo "/usr/share/${P}/images" echo einfo "Also, be sure to check /usr/share/doc/${P}/ppccfg.example" einfo "for new configuration options." echo }