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

Collapse All | Expand All

(-)freedroidrpg-0.16-r1.ebuild (-34 / +44 lines)
Lines 1-39 Link Here
1
# Copyright 1999-2016 Gentoo Foundation
1
# Copyright 1999-2019 Gentoo Authors
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
3
4
EAPI=6
4
EAPI=7
5
PYTHON_COMPAT=( python2_7 )
5
PYTHON_COMPAT=( python{2_7,3_{5,6,7}} )
6
inherit autotools eutils gnome2-utils python-any-r1
6
inherit autotools flag-o-matic desktop python-any-r1 xdg
7
7
8
MY_PV=$(ver_rs 2 '')
8
DESCRIPTION="A modification of the classical Freedroid engine into an RPG"
9
DESCRIPTION="A modification of the classical Freedroid engine into an RPG"
9
HOMEPAGE="http://freedroid.sourceforge.net/"
10
HOMEPAGE="http://www.freedroid.org"
10
SRC_URI="ftp://ftp.osuosl.org/pub/freedroid/freedroidRPG-${PV}//freedroidRPG-${PV}.tar.gz"
11
SRC_URI="ftp://ftp.osuosl.org/pub/freedroid/freedroidRPG-$(ver_cut 1-2)/freedroidRPG-${MY_PV}.tar.gz"
11
12
12
LICENSE="GPL-2+"
13
LICENSE="GPL-2+"
13
SLOT="0"
14
SLOT="0"
14
KEYWORDS="~amd64 ~x86"
15
KEYWORDS="~amd64 ~x86"
15
IUSE="nls opengl sound"
16
IUSE="debug devtools nls opengl profile sanitize sound"
16
17
17
RDEPEND="
18
RDEPEND="
19
	sys-libs/zlib
18
	virtual/jpeg:0
20
	virtual/jpeg:0
19
	media-libs/libpng:0
21
	media-libs/libpng:0
20
	media-libs/libsdl[opengl?,sound?,video]
22
	media-libs/libsdl[opengl?,sound?,video]
21
	>=media-libs/sdl-gfx-2.0.21
22
	media-libs/sdl-image[jpeg,png]
23
	media-libs/sdl-image[jpeg,png]
24
	>=media-libs/sdl-gfx-2.0.21
23
	nls? ( virtual/libintl )
25
	nls? ( virtual/libintl )
24
	opengl? ( virtual/opengl )
26
	opengl? ( virtual/opengl )
25
	sound? (
27
	sound? (
26
		media-libs/libogg
28
		media-libs/libogg
27
		media-libs/libvorbis
29
		media-libs/libvorbis
28
		media-libs/sdl-mixer[vorbis] )
30
		media-libs/sdl-mixer[vorbis] )
29
	x11-libs/libX11"
31
	devtools? ( media-libs/sdl-ttf )"
30
DEPEND="${RDEPEND}
32
DEPEND="${RDEPEND}
31
	${PYTHON_DEPS}
33
	${PYTHON_DEPS}
32
	nls? ( sys-devel/gettext )"
34
	nls? ( sys-devel/gettext )
35
	sanitize? ( || ( sys-devel/gcc[sanitize] sys-devel/clang-runtime[sanitize] ) )"
33
36
34
pkg_setup() {
37
S="${WORKDIR}/${PN}-${MY_PV^^}"
35
	python-any-r1_pkg_setup
36
}
37
38
38
src_prepare() {
39
src_prepare() {
39
	default
40
	default
Lines 43-60 Link Here
43
		-e '/-pipe/d' \
44
		-e '/-pipe/d' \
44
		-e '/^SUBDIRS/s/pkgs//' \
45
		-e '/^SUBDIRS/s/pkgs//' \
45
		Makefile.am || die
46
		Makefile.am || die
46
	python_fix_shebang src sound
47
	python_fix_shebang src data/sound
47
	eautoreconf
48
	eautoreconf
48
}
49
}
49
50
50
src_configure() {
51
src_configure() {
51
	econf \
52
	# this can produce strange results due to 'imprecise' math computations
52
		--disable-fastmath \
53
	filter-flags -ffast-math
53
		--with-embedded-lua \
54
54
		--localedir=/usr/share/locale \
55
	local myconf=(
55
		$(use_enable nls) \
56
		--disable-fastmath
56
		$(use_enable opengl) \
57
		--with-embedded-lua
58
		--localedir=/usr/share/locale
59
		$(use_enable nls)
60
		$(use_enable opengl)
57
		$(use_enable sound)
61
		$(use_enable sound)
62
		$(use_enable debug)
63
		$(use_with debug extra-warnings)
64
		$(use_enable debug backtrace)
65
		$(use_enable sanitize sanitize-address)
66
		$(use_enable profile rtprof)
67
		$(use_enable devtools dev-tools)
68
	)
69
	econf "${myconf[@]}"
58
}
70
}
59
71
60
src_install() {
72
src_install() {
Lines 63-86 Link Here
63
	default
75
	default
64
	for i in 48 64 96 128
76
	for i in 48 64 96 128
65
	do
77
	do
66
		doicon -s ${i} pkgs/freedesktop/icons/hicolor/${i}x${i}/apps/freedroidRPG.png
78
		doicon -s ${i} pkgs/freedesktop/icons/hicolor/${i}x${i}/apps/"${PN}".png
67
	done
79
	done
68
	doicon -s scalable pkgs/freedesktop/icons/hicolor/scalable/apps/freedroidRPG.svg
80
	doicon -s scalable pkgs/freedesktop/icons/hicolor/scalable/apps/freedroidRPG.svg
69
	make_desktop_entry freedroidRPG "Freedroid RPG" freedroidRPG
81
	make_desktop_entry "${PN}" "Freedroid RPG" "${PN}"
70
}
71
72
pkg_preinst() {
73
	gnome2_icon_savelist
74
}
82
}
75
83
76
pkg_postinst() {
84
pkg_postinst() {
77
	gnome2_icon_cache_update
85
	xdg_pkg_postinst
78
	echo
79
	ewarn "${P} is not compatible with old save games."
80
	ewarn "Please start a new character."
81
	echo
82
}
83
86
84
pkg_postrm() {
87
	local v min="1.0_rc1"
85
	gnome2_icon_cache_update
88
	for v in ${REPLACING_VERSIONS}; do
89
		if ver_test "${v}" -lt "${min}"; then
90
			echo
91
			ewarn "${P} is not compatible with save games before ${min}."
92
			ewarn "Please start a new character."
93
			echo
94
		fi
95
	done
86
}
96
}

Return to bug 699772