Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 127397 | Differences between
and this patch

Collapse All | Expand All

(-)/usr/portage/games-fps/doomsday/doomsday-1.8.6-r1.ebuild (-14 / +51 lines)
Lines 1-17 Link Here
1
# Copyright 1999-2006 Gentoo Foundation
1
# Copyright 1999-2006 Gentoo Foundation
2
# Distributed under the terms of the GNU General Public License v2
2
# Distributed under the terms of the GNU General Public License v2
3
# $Header: /var/cvsroot/gentoo-x86/games-fps/doomsday/doomsday-1.8.6-r1.ebuild,v 1.1 2006/03/13 21:33:02 tupone Exp $
3
# $Header: $
4
4
5
inherit eutils games
5
inherit eutils versionator games
6
6
7
DESCRIPTION="A modern gaming engine for Doom, Heretic, and Hexen"
7
# For compatibility with both 1.8.6-r2 & 1.9.0_beta3
8
MY_PV=$(replace_version_separator 3 '-')
9
10
DESCRIPTION="Modern gaming engine for Doom, Heretic and Hexen"
8
HOMEPAGE="http://www.doomsdayhq.com/"
11
HOMEPAGE="http://www.doomsdayhq.com/"
9
SRC_URI="mirror://sourceforge/deng/deng-${PV}.tar.gz"
12
SRC_URI="mirror://sourceforge/deng/deng-${MY_PV}.tar.gz"
10
13
11
LICENSE="GPL-2"
14
LICENSE="GPL-2"
12
SLOT="0"
15
SLOT="0"
13
KEYWORDS="~ppc ~x86"
16
KEYWORDS="~ppc ~x86"
14
IUSE="openal"
17
IUSE="freedoom openal demo"
15
18
16
DEPEND="virtual/opengl
19
DEPEND="virtual/opengl
17
	virtual/glu
20
	virtual/glu
Lines 19-53 Link Here
19
	media-libs/sdl-mixer
22
	media-libs/sdl-mixer
20
	media-libs/sdl-net
23
	media-libs/sdl-net
21
	media-libs/libpng
24
	media-libs/libpng
22
	|| ( x11-libs/libXext virtual/x11 )
25
	freedoom? ( >=games-fps/freedoom-0.4.1-r1 )
23
	openal? ( media-libs/openal )"
26
	demo? ( >=games-fps/doom-data-1-r1 )
27
	openal? ( media-libs/openal )
28
	|| (
29
		x11-libs/libXext
30
		virtual/x11 )"
24
31
25
S=${WORKDIR}/deng-${PV}
32
S=${WORKDIR}/deng-${MY_PV}
26
33
27
src_unpack() {
34
src_unpack() {
28
	unpack ${A}
35
	unpack ${A}
29
	cd "${S}"
36
	cd "${S}"
30
	# Fixing music driver init
37
	# Fix music driver init
31
	sed -i \
38
	sed -i Src/s_mus.c \
32
		-e "s/musd_loaded.Init/musd_loaded.Init \&\& musd_loaded.Init/" \
39
		-e "s/musd_loaded.Init/musd_loaded.Init \&\& musd_loaded.Init/" \
33
		-e "s/musd_loaded.Shut/if (musd_loaded.Shutdown) musd_loaded.Shut/" \
40
		-e "s/musd_loaded.Shut/if (musd_loaded.Shutdown) musd_loaded.Shut/" \
34
		Src/s_mus.c
41
		|| die "sed s_mus failed"
35
}
42
}
36
43
37
src_install() {
44
src_install() {
38
	make DESTDIR="${D}" install || die "make install failed"
45
	make DESTDIR="${D}" install || die "make install failed"
39
	rmdir "${D}/${GAMES_PREFIX}/include"
46
	rmdir "${D}/${GAMES_PREFIX}/include"
40
	mv "${D}/${GAMES_DATADIR}/"{deng/Data/jDoom,doom-data}
47
	mv "${D}/${GAMES_DATADIR}/"{deng/Data/jDoom,doom-data} || die "mv failed"
41
	dosym "${GAMES_DATADIR}"/doom-data "${GAMES_DATADIR}"/deng/Data/jDoom
48
	dosym "${GAMES_DATADIR}"/doom-data "${GAMES_DATADIR}"/deng/Data/jDoom
42
49
43
	local game
50
	local game
44
	for game in jdoom jheretic jhexen ; do
51
	for game in jdoom jheretic jhexen ; do
45
		newgamesbin "${FILESDIR}/wrapper" ${game}
52
		newgamesbin "${FILESDIR}/wrapper" ${game}
46
		sed -i \
53
		sed -i "${D}"/${GAMES_BINDIR}/${game} \
47
			-e "s:GAME:${game}:" "${D}"/${GAMES_BINDIR}/${game} \
54
			-e "s:GAME:${game}:" \
48
			|| die "sed ${GAMES_BINDIR}/${game} failed"
55
			|| die "sed ${GAMES_BINDIR}/${game} failed"
49
	done
56
	done
50
57
58
	# Make wrappers for the common wads
59
	for n in doom doom2 ; do
60
		games_make_wrapper ${PN}-${n} "jdoom -file ${GAMES_DATADIR}/doom-data/${n}.wad"
61
	done
62
63
	if use freedoom ; then
64
		# Make wrapper for the freedoom episode
65
		games_make_wrapper ${PN}-freedoom "jdoom -file ${GAMES_DATADIR}/doom-data/freedoom/*.wad"
66
		make_desktop_entry ${PN}-freedoom "Doomsday - Freedoom"
67
	fi
68
69
	if use demo ; then
70
		# Make wrapper for the demo episode (1st episode of Doom 1)
71
		games_make_wrapper ${PN}-demo "jdoom -file ${GAMES_DATADIR}/doom-data/doom1.wad"
72
		make_desktop_entry ${PN}-demo "Doomsday - Demo"
73
	fi
74
51
	dodoc Doc/*.txt Doc/*/*.txt README
75
	dodoc Doc/*.txt Doc/*/*.txt README
76
52
	prepgamesdirs
77
	prepgamesdirs
53
}
78
}
79
80
pkg_postinst() {
81
	einfo "To play the original Doom levels, place doom.wad and/or doom2.wad into:"
82
	einfo "   ${GAMES_DATADIR}/doom-data"
83
	einfo "Then run doomsday-doom or doomsday-doom2 accordingly."
84
	echo
85
	einfo "doom1.wad is the shareware demo wad consisting of 1 episode, and doom.wad"
86
	einfo "is the full Doom 1 set of 3 episodes (or 4 in the Final Doom wad)."
87
	echo
88
89
	games_pkg_postinst
90
}

Return to bug 127397