games-arcade/gnome-robots: x86 stable wrt bug #702260
[gentoo.git] / games-arcade / abe / abe-1.1-r1.ebuild
1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 inherit desktop toolchain-funcs
6
7 DESCRIPTION="A scrolling, platform-jumping, key-collecting, ancient pyramid exploring game"
8 HOMEPAGE="http://abe.sourceforge.net/"
9 SRC_URI="mirror://sourceforge/abe/${P}.tar.gz"
10
11 LICENSE="GPL-2"
12 SLOT="0"
13 KEYWORDS="~amd64 ~x86"
14 IUSE=""
15
16 DEPEND="media-libs/libsdl[sound,video]
17         x11-libs/libXi
18         media-libs/sdl-mixer[vorbis]"
19 RDEPEND=${DEPEND}
20
21 src_unpack() {
22         unpack ${A}
23         cd "${S}"
24         unpack ./images/images.tar
25 }
26
27 PATCHES=(
28         # From Fedora:
29         # Enable changing the video settings.  Sent upstream 2 Apr 2006:
30         # https://sourceforge.net/p/abe/bugs/1/
31         "${FILESDIR}"/${P}-settings.patch
32
33         # Fix a double free() bug.  Sent upstream 15 Mar 2011:
34         # https://sourceforge.net/p/abe/patches/1/
35         "${FILESDIR}"/${P}-doublefree.patch
36
37         # Fix an incorrect printf format specifier.  Sent upstream 15 Mar 2011:
38         # https://sourceforge.net/p/abe/patches/2/
39         "${FILESDIR}"/${P}-format.patch
40
41         # Fix build failure with -Werror=format-security
42         "${FILESDIR}"/${P}-format-security.patch
43 )
44
45 src_prepare() {
46         default
47         sed -i \
48                 -e "/^TR_CFLAGS/d" \
49                 -e "/^TR_CXXFLAGS/d" \
50                 configure || die
51 }
52
53 src_configure() {
54         econf --with-data-dir=/usr/share/${PN}
55 }
56
57 src_install() {
58         dobin src/abe
59         insinto /usr/share/${PN}
60         doins -r images sounds maps
61         newicon tom1.bmp abe.bmp
62         make_desktop_entry abe "Abe's Amazing Adventure" /usr/share/pixmaps/abe.bmp
63         einstalldocs
64 }