1 |
commit: 56788f810102a008b518ee2bccd949ec6d27703a |
2 |
Author: Austin English <wizardedit <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Aug 5 21:06:00 2016 +0000 |
4 |
Commit: Austin English <wizardedit <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Aug 5 21:31:13 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=56788f81 |
7 |
|
8 |
games-roguelike/angband: remove deprecated games eclass |
9 |
|
10 |
Also update to EAPI 6 |
11 |
|
12 |
Gentoo-Bug: https://bugs.gentoo.org/574082 |
13 |
|
14 |
Package-Manager: portage-2.3.0 |
15 |
|
16 |
games-roguelike/angband/angband-4.0.5-r1.ebuild | 114 ++++++++++++++++++++++++ |
17 |
1 file changed, 114 insertions(+) |
18 |
|
19 |
diff --git a/games-roguelike/angband/angband-4.0.5-r1.ebuild b/games-roguelike/angband/angband-4.0.5-r1.ebuild |
20 |
new file mode 100644 |
21 |
index 0000000..6b11f3c |
22 |
--- /dev/null |
23 |
+++ b/games-roguelike/angband/angband-4.0.5-r1.ebuild |
24 |
@@ -0,0 +1,114 @@ |
25 |
+# Copyright 1999-2016 Gentoo Foundation |
26 |
+# Distributed under the terms of the GNU General Public License v2 |
27 |
+# $Id$ |
28 |
+ |
29 |
+EAPI=6 |
30 |
+inherit autotools eutils gnome2-utils versionator |
31 |
+ |
32 |
+MAJOR_PV=$(get_version_component_range 1-2) |
33 |
+ |
34 |
+DESCRIPTION="A roguelike dungeon exploration game based on the books of J.R.R. Tolkien" |
35 |
+HOMEPAGE="http://rephial.org/" |
36 |
+SRC_URI="http://rephial.org/downloads/${MAJOR_PV}/${P}.tar.gz" |
37 |
+ |
38 |
+LICENSE="GPL-2" |
39 |
+SLOT="0" |
40 |
+KEYWORDS="~amd64 ~ppc ~x86" |
41 |
+IUSE="ncurses sdl +sound X" |
42 |
+ |
43 |
+RDEPEND="X? ( x11-libs/libX11 ) |
44 |
+ !ncurses? ( !X? ( !sdl? ( sys-libs/ncurses:0=[unicode] ) ) ) |
45 |
+ ncurses? ( sys-libs/ncurses:0=[unicode] ) |
46 |
+ sdl? ( media-libs/libsdl[video,X] |
47 |
+ media-libs/sdl-image |
48 |
+ media-libs/sdl-ttf |
49 |
+ sound? ( media-libs/libsdl[sound] ) |
50 |
+ media-libs/sdl-mixer[mp3] )" |
51 |
+DEPEND="${RDEPEND} |
52 |
+ dev-python/docutils |
53 |
+ virtual/pkgconfig" |
54 |
+ |
55 |
+src_prepare() { |
56 |
+ default |
57 |
+ |
58 |
+ sed -i -e '/libpath/s#datarootdir#datadir#' configure.ac || die |
59 |
+ sed -i -e "/^.SILENT/d" mk/buildsys.mk.in || die |
60 |
+ sed -i -e '/^DOC =/s/=.*/=/' doc/Makefile || die |
61 |
+ |
62 |
+ if use !sound ; then |
63 |
+ sed -i -e 's/sounds//' lib/Makefile || die |
64 |
+ fi |
65 |
+ |
66 |
+ # Game constant files are now system config files in Angband, but |
67 |
+ # users will be hidden from applying updates by default |
68 |
+ { |
69 |
+ echo "CONFIG_PROTECT_MASK=\"/etc/${PN}/customize/\"" |
70 |
+ echo "CONFIG_PROTECT_MASK=\"/etc/${PN}/gamedata/\"" |
71 |
+ } > "${T}"/99${PN} || die |
72 |
+ |
73 |
+ eautoreconf |
74 |
+} |
75 |
+ |
76 |
+src_configure() { |
77 |
+ local myconf |
78 |
+ |
79 |
+ if use sdl; then |
80 |
+ myconf="$(use_enable sound sdl-mixer)" |
81 |
+ else |
82 |
+ myconf="--disable-sdl-mixer" |
83 |
+ fi |
84 |
+ |
85 |
+ ac_cv_path_NCURSES_CONFIG="pkg-config ncursesw" \ |
86 |
+ econf \ |
87 |
+ --bindir=/usr/bin \ |
88 |
+ --with-private-dirs \ |
89 |
+ $(use_enable X x11) \ |
90 |
+ $(use_enable sdl) \ |
91 |
+ $(use_enable ncurses curses) \ |
92 |
+ $(use !sdl && use !ncurses && use !X && \ |
93 |
+ echo --enable-curses) \ |
94 |
+ ${myconf} |
95 |
+} |
96 |
+ |
97 |
+src_install() { |
98 |
+ DOCS="changes.txt faq.txt readme.txt thanks.txt" \ |
99 |
+ default |
100 |
+ |
101 |
+ dodoc doc/manual.html |
102 |
+ doenvd "${T}"/99${PN} |
103 |
+ |
104 |
+ if use X || use sdl ; then |
105 |
+ if use X; then |
106 |
+ make_desktop_entry "angband -mx11" "Angband (X11)" "${PN}" |
107 |
+ fi |
108 |
+ |
109 |
+ if use sdl; then |
110 |
+ make_desktop_entry "angband -msdl" "Angband (SDL)" "${PN}" |
111 |
+ fi |
112 |
+ |
113 |
+ local s |
114 |
+ for s in 16 32 128 256 512 |
115 |
+ do |
116 |
+ newicon -s ${s} lib/icons/att-${s}.png "${PN}.png" |
117 |
+ done |
118 |
+ newicon -s scalable lib/icons/att.svg "${PN}.svg" |
119 |
+ fi |
120 |
+} |
121 |
+ |
122 |
+pkg_preinst() { |
123 |
+ if use X || use sdl ; then |
124 |
+ gnome2_icon_savelist |
125 |
+ fi |
126 |
+} |
127 |
+ |
128 |
+pkg_postinst() { |
129 |
+ echo |
130 |
+ elog "Angband now uses private savefiles instead of system-wide ones." |
131 |
+ elog "This version of Angband is not compatible with the save files" |
132 |
+ elog "of previous versions." |
133 |
+ echo |
134 |
+ |
135 |
+ if use X || use sdl ; then |
136 |
+ gnome2_icon_cache_update |
137 |
+ fi |
138 |
+} |