summaryrefslogtreecommitdiff
blob: 459a4a1d08b11870fa687ff94c80225e103fe2b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-emulation/generator/generator-0.35.ebuild,v 1.2 2003/12/20 18:23:37 dholm Exp $

inherit games gcc

DESCRIPTION="Sega Genesis / Mega Drive console emulator"
HOMEPAGE="http://www.squish.net/generator/"
SRC_URI="http://www.squish.net/generator/files/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="x86 ~ppc"
IUSE="svga tcltk gtk" #allegro fails to compile

DEPEND="gtk? ( =x11-libs/gtk+-1* media-libs/libsdl )
	svga? ( media-libs/svgalib )
	jpeg? ( media-libs/jpeg )
	x86? ( dev-lang/nasm )"
#	allegro? ( media-libs/allegro )
#	tcltk? ( dev-lang/tk dev-lang/tcl ) #deprecated upstream

src_unpack() {
	unpack ${A}

	cd ${S}
	if [ "${ARCH}" == "ppc" ]; then
		sed -i -e 's/-minline-all-stringops//g' configure
	fi
}

src_compile() {
	mkdir my-bins

	local myconf="--with-gcc=`gcc-major-version`"
	[ "${ARCH}" == "x86" ] \
		&& myconf="${myconf} --with-raze" \
		|| myconf="${myconf} --with-cmz80"

	local mygui
	for mygui in `use gtk` `use svga` ; do #`use allegro` `use tcltk`
		[ "${mygui}" == "svga" ] && mygui=svgalib
		make clean
		egamesconf ${myconf} --with-${mygui} || die
		make || die "building ${mygui}"
		mv main/generator-${mygui} my-bins/
	done
	if [ -z "`use gtk``use allegro``use svga``use tcltk`" ] ; then
		egamesconf ${myconf} --with-gtk || die
		make || die "building ${mygui}"
		mv main/generator-gtk my-bins/
	fi
}

src_install() {
	#make install DESTDIR=${D} || die #all it does is install the binary ;)
	dogamesbin my-bins/*
	dodoc AUTHORS ChangeLog NEWS README TODO
	prepgamesdirs
}