/[gentoo-x86]/app-emulation/e-uae/e-uae-0.8.29_rc4-r1.ebuild
Gentoo

Contents of /app-emulation/e-uae/e-uae-0.8.29_rc4-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Sun Mar 27 10:22:51 2011 UTC (3 years, 9 months ago) by nirbheek
Branch: MAIN
Changes since 1.2: +5 -3 lines
Fix slot-dep on gtk+

(Portage version: 2.1.9.44/cvs/Linux x86_64)

1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/app-emulation/e-uae/e-uae-0.8.29_rc4-r1.ebuild,v 1.2 2007/07/22 06:28:08 pva Exp $
4
5 EAPI="1"
6
7 inherit eutils flag-o-matic pax-utils
8
9 DESCRIPTION="The Ubiquitous Amiga Emulator with an emulation core largely based on WinUAE"
10 HOMEPAGE="http://www.rcdrummond.net/uae/"
11 # We support _rcX for WIPX versions and _preYYYYMMDD for CVS snapshots.
12 if [[ "${PV%%_rc*}" = "${PV}" ]] ; then
13 # _pre is used, cvs version
14 my_ver=${PV%%_pre*}
15 snap_ver=${PV##*_pre}
16 S="${WORKDIR}"/${PN}-${my_ver}-${snap_ver}
17 SRC_URI="http://www.rcdrummond.net/uae/test/${snap_ver}/${PN}-${my_ver}-${snap_ver}.tar.bz2"
18 else
19 my_ver=${PV%%_rc*}
20 WIP_ver=${PV##*_rc}
21 S="${WORKDIR}"/${PN}-${my_ver}-WIP${WIP_ver}
22 SRC_URI="http://www.rcdrummond.net/uae/${PN}-${my_ver}-WIP${WIP_ver}/${PN}-${my_ver}-WIP${WIP_ver}.tar.bz2"
23 fi
24
25 LICENSE="GPL-2"
26 SLOT="0"
27 KEYWORDS="~amd64 ~ppc ~x86"
28 IUSE="X dga ncurses sdl gtk alsa oss sdl-sound capslib"
29
30 # Note: opposed to ./configure --help zlib support required! Check
31 # src/Makefile.am that includes zfile.c unconditionaly.
32 RDEPEND="X? ( x11-libs/libXt
33 x11-libs/libxkbfile
34 x11-libs/libXext
35 dga? ( x11-libs/libXxf86dga
36 x11-libs/libXxf86vm )
37 )
38 !X? ( sdl? ( media-libs/libsdl )
39 !sdl? ( sys-libs/ncurses ) )
40 alsa? ( media-libs/alsa-lib )
41 !alsa? ( sdl-sound? ( media-libs/sdl-sound ) )
42 gtk? ( x11-libs/gtk+:2 )
43 capslib? ( >=games-emulation/caps-20060612 )
44 sys-libs/zlib
45 virtual/cdrtools"
46
47 DEPEND="$RDEPEND
48 X? ( dga? ( x11-proto/xf86vidmodeproto
49 x11-proto/xf86dgaproto ) )"
50
51 pkg_setup() {
52 # Sound setup.
53 if use alsa; then
54 elog "Choosing alsa as sound target to use."
55 myconf="--with-alsa --without-sdl-sound"
56 elif use sdl-sound ; then
57 if ! use sdl ; then
58 ewarn "sdl-sound is not enabled because sdl USE flag is disabled. Leaving"
59 ewarn "sound on oss autodetection."
60 myconf="--without-alsa --without-sdl-sound"
61 ebeep
62 else
63 elog "Choosing sdl-sound as sound target to use."
64 ewarn "E-UAE with the SDL audio back-end doesn't work correctly in Linux."
65 ewarn "Better use alsa... You've been warned ;)"
66 ebeep
67 myconf="--without-alsa --with-sdl-sound"
68 fi
69 elif use oss ; then
70 elog "Choosing oss as sound target to use."
71 ewarn "oss will be autodetected. See output of configure."
72 myconf="--without-alsa --without-sdl-sound"
73 else
74 ewarn "There is no alsa, sdl-sound or oss in USE. Sound target disabled!"
75 myconf="--disable-audio"
76 fi
77
78 # VIDEO setup. X is autodetected (there is no --with-X option).
79 if use X ; then
80 elog "Using X11 for video output."
81 ewarn "Fullscreen mode is not working in X11 currently. Use sdl."
82 myconf="$myconf --without-curses --without-sdl-gfx"
83 use dga && ewarn "To use dga you have to run e-uae as root."
84 use dga && myconf="$myconf --enable-dga --enable-vidmode"
85 elif use sdl ; then
86 elog "Using sdl for video output."
87 myconf="$myconf --with-sdl --with-sdl-gfx --without-curses"
88 elif use ncurses; then
89 elog "Using ncurses for video output."
90 myconf="$myconf --with-curses --without-sdl-gfx"
91 else
92 ewarn "There is no X or sdl or ncurses in USE!"
93 ewarn "Following upstream falling back on ncurses."
94 myconf="$myconf --with-curses --without-sdl-gfx"
95 ebeep
96 fi
97
98 use gtk && myconf="$myconf --enable-ui --enable-threads"
99 use gtk || myconf="$myconf --disable-ui"
100
101 myconf="$myconf $(use_with capslib caps)"
102
103 myconf="$myconf --with-zlib"
104
105 # And explicitly state defaults:
106 myconf="$myconf --enable-aga"
107 myconf="$myconf --enable-autoconfig --enable-scsi-device --enable-cdtv --enable-cd32"
108 myconf="$myconf --enable-bsdsock"
109 }
110
111 src_unpack() {
112 unpack ${A}
113 cd "${S}"
114
115 # Fix for high cpu use when compiled with --disable-audio
116 use alsa || use sdl-sound || use oss || epatch "${FILESDIR}"/${P}-high-cpu-usage.patch
117 }
118
119 src_compile() {
120 strip-flags
121
122 econf ${myconf} \
123 --with-libscg-includedir=/usr/include/scsilib \
124 || die "./configure failed"
125
126 emake -j1 || die "emake failed"
127 }
128
129 src_install() {
130 make DESTDIR="${D}" install || die "make install failed"
131
132 # The emulator needs to be able to create executable heap
133 # - doesn't need trampoline emulation though.
134 pax-mark me "${D}/usr/bin/uae"
135
136 # Rename it to e-uae
137 mv "${D}/usr/bin/uae" "${D}/usr/bin/${PN}"
138 mv "${D}/usr/bin/readdisk" "${D}/usr/bin/e-readdisk"
139
140 dodoc docs/* README ChangeLog
141 }

  ViewVC Help
Powered by ViewVC 1.1.20