1 |
commit: de327d25985bcbbb47fe704f1957a1fddb67ebcb |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Feb 4 06:06:20 2018 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Feb 4 06:06:20 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=de327d25 |
7 |
|
8 |
games-simulation/openttd: Bump to version 1.7.2 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/646268 |
11 |
Package-Manager: Portage-2.3.24, Repoman-2.3.6 |
12 |
|
13 |
games-simulation/openttd/Manifest | 1 + |
14 |
games-simulation/openttd/openttd-1.7.2.ebuild | 170 ++++++++++++++++++++++++++ |
15 |
2 files changed, 171 insertions(+) |
16 |
|
17 |
diff --git a/games-simulation/openttd/Manifest b/games-simulation/openttd/Manifest |
18 |
index 14ac19cb516..d0028388230 100644 |
19 |
--- a/games-simulation/openttd/Manifest |
20 |
+++ b/games-simulation/openttd/Manifest |
21 |
@@ -1 +1,2 @@ |
22 |
DIST openttd-1.7.1-source.tar.gz 10090311 BLAKE2B 339171cd2895398ee1fedcfd24d1126fbc060b6d4530b267310b3f220448f8e6469a726e71e9882bea117585ea7b9f7271205f576ee2b26de6dec079f57f1620 SHA512 4a0d2ee424374b50fe0d089b86ff16b5de3159848a38143ca6745e349b6126567f1e4beda9afe2e6bc21ffffce1166acf719d3f5c95703a14c1379f8857e83d3 |
23 |
+DIST openttd-1.7.2-source.tar.gz 10097175 BLAKE2B a027b6ca6d3116dc3e6ad6ae43965682107268e367032418200cf1c1e16c5b5dad39c275ea57d923f17564d80cceb0e9909dc5aaf7ee230242f0ce0f46f06b1a SHA512 44d25061c42cb9c81baa67a40ff31a6681dcbb121c61db74c5179a31f189919471a82b7fd3f79c2cdeef02af5b47ec35fdbdc7feed74ca2360c028869fe772e8 |
24 |
|
25 |
diff --git a/games-simulation/openttd/openttd-1.7.2.ebuild b/games-simulation/openttd/openttd-1.7.2.ebuild |
26 |
new file mode 100644 |
27 |
index 00000000000..f6e90e926ac |
28 |
--- /dev/null |
29 |
+++ b/games-simulation/openttd/openttd-1.7.2.ebuild |
30 |
@@ -0,0 +1,170 @@ |
31 |
+# Copyright 1999-2018 Gentoo Foundation |
32 |
+# Distributed under the terms of the GNU General Public License v2 |
33 |
+ |
34 |
+EAPI=6 |
35 |
+inherit eutils gnome2-utils |
36 |
+ |
37 |
+DESCRIPTION="OpenTTD is a clone of Transport Tycoon Deluxe" |
38 |
+HOMEPAGE="http://www.openttd.org/" |
39 |
+SRC_URI="http://binaries.openttd.org/releases/${PV}/${P}-source.tar.gz" |
40 |
+ |
41 |
+LICENSE="GPL-2" |
42 |
+SLOT="0" |
43 |
+KEYWORDS="~amd64 ~ppc64 ~x86" |
44 |
+IUSE="aplaymidi debug dedicated iconv icu lzo +openmedia +png cpu_flags_x86_sse +timidity +truetype zlib" |
45 |
+RESTRICT="test" # needs a graphics set in order to test |
46 |
+ |
47 |
+RDEPEND="!dedicated? ( |
48 |
+ media-libs/libsdl[sound,X,video] |
49 |
+ icu? ( |
50 |
+ dev-libs/icu-layoutex |
51 |
+ dev-libs/icu-le-hb |
52 |
+ >=dev-libs/icu-58.1:= |
53 |
+ ) |
54 |
+ truetype? ( |
55 |
+ media-libs/fontconfig |
56 |
+ media-libs/freetype:2 |
57 |
+ sys-libs/zlib |
58 |
+ ) |
59 |
+ ) |
60 |
+ lzo? ( dev-libs/lzo:2 ) |
61 |
+ iconv? ( virtual/libiconv ) |
62 |
+ png? ( media-libs/libpng:0 ) |
63 |
+ zlib? ( sys-libs/zlib )" |
64 |
+DEPEND="${RDEPEND} |
65 |
+ virtual/pkgconfig" |
66 |
+PDEPEND=" |
67 |
+ !dedicated? ( |
68 |
+ openmedia? ( |
69 |
+ games-misc/openmsx |
70 |
+ games-misc/opensfx |
71 |
+ ) |
72 |
+ aplaymidi? ( media-sound/alsa-utils ) |
73 |
+ !aplaymidi? ( timidity? ( media-sound/timidity++ ) ) |
74 |
+ ) |
75 |
+ openmedia? ( >=games-misc/opengfx-0.4.7 )" |
76 |
+ |
77 |
+PATCHES=( |
78 |
+ "${FILESDIR}"/${PN}-1.6.0-cflags.patch |
79 |
+) |
80 |
+ |
81 |
+src_configure() { |
82 |
+ local myopts=() |
83 |
+ # there is an allegro interface available as well as sdl, but |
84 |
+ # the configure for it looks broken so the sdl interface is |
85 |
+ # always built instead. |
86 |
+ local myopts+=( --without-allegro ) |
87 |
+ |
88 |
+ # libtimidity not needed except for some embedded platform |
89 |
+ # nevertheless, it will be automagically linked if it is |
90 |
+ # installed. Hence, we disable it. |
91 |
+ myopts+=( --without-libtimidity ) |
92 |
+ |
93 |
+ use debug && myopts+=( --enable-debug=3 ) |
94 |
+ |
95 |
+ if use dedicated ; then |
96 |
+ myopts+=( --enable-dedicated ) |
97 |
+ else |
98 |
+ use aplaymidi && myopts+=( --with-midi='/usr/bin/aplaymidi' ) |
99 |
+ myopts+=( |
100 |
+ $(use_with truetype freetype) |
101 |
+ $(use_with icu) |
102 |
+ --with-sdl |
103 |
+ ) |
104 |
+ fi |
105 |
+ if use png || { use !dedicated && use truetype; } || use zlib ; then |
106 |
+ myopts+=( --with-zlib ) |
107 |
+ else |
108 |
+ myopts+=( --without-zlib ) |
109 |
+ fi |
110 |
+ |
111 |
+ # configure is a hand-written bash-script, so econf will not work. |
112 |
+ # It's all built as C++, upstream uses CFLAGS internally. |
113 |
+ CFLAGS="" ./configure \ |
114 |
+ --disable-strip \ |
115 |
+ --prefix-dir="${EPREFIX%/}/usr" \ |
116 |
+ --binary-dir="bin" \ |
117 |
+ --install-dir="${D}" \ |
118 |
+ --menu-group="Game;Simulation;" \ |
119 |
+ ${myopts[@]} \ |
120 |
+ $(use_with iconv) \ |
121 |
+ $(use_with png) \ |
122 |
+ $(use_with cpu_flags_x86_sse sse) \ |
123 |
+ $(use_with lzo liblzo2) \ |
124 |
+ || die |
125 |
+} |
126 |
+ |
127 |
+src_compile() { |
128 |
+ emake VERBOSE=1 |
129 |
+} |
130 |
+ |
131 |
+src_install() { |
132 |
+ default |
133 |
+ if use dedicated ; then |
134 |
+ newinitd "${FILESDIR}"/${PN}.initd-r1 ${PN} |
135 |
+ rm -rf "${ED}"/usr/share/{applications,icons,pixmaps} |
136 |
+ fi |
137 |
+ rm -f "${ED}"/usr/share/doc/${PF}/COPYING |
138 |
+} |
139 |
+ |
140 |
+pkg_preinst() { |
141 |
+ gnome2_icon_savelist |
142 |
+} |
143 |
+ |
144 |
+pkg_postinst() { |
145 |
+ gnome2_icon_cache_update |
146 |
+ |
147 |
+ if ! use lzo ; then |
148 |
+ elog "OpenTTD was built without 'lzo' in USE. While 'lzo' is not" |
149 |
+ elog "required, disabling it does mean that loading old savegames" |
150 |
+ elog "or scenarios from ancient versions (~0.2) will fail." |
151 |
+ elog |
152 |
+ fi |
153 |
+ |
154 |
+ if use dedicated ; then |
155 |
+ ewarn "Warning: The init script will kill all running openttd" |
156 |
+ ewarn "processes when triggered, including any running client sessions!" |
157 |
+ else |
158 |
+ if use aplaymidi ; then |
159 |
+ elog "You have emerged with 'aplaymidi' for playing MIDI." |
160 |
+ elog "This option is for those with a hardware midi device," |
161 |
+ elog "or who have set up ALSA to handle midi ports." |
162 |
+ elog "You must set the environment variable ALSA_OUTPUT_PORTS." |
163 |
+ elog "Available ports can be listed by using 'aplaymidi -l'." |
164 |
+ else |
165 |
+ if ! use timidity ; then |
166 |
+ elog "OpenTTD was built with neither 'aplaymidi' nor 'timidity'" |
167 |
+ elog "in USE. Music may or may not work in-game. If you happen" |
168 |
+ elog "to have timidity++ installed, music will work so long" |
169 |
+ elog "as it remains installed, but OpenTTD will not depend on it." |
170 |
+ fi |
171 |
+ fi |
172 |
+ if ! use openmedia ; then |
173 |
+ elog |
174 |
+ elog "OpenTTD was compiled without the 'openmedia' USE flag." |
175 |
+ elog |
176 |
+ elog "In order to play, you must at least install:" |
177 |
+ elog "games-misc/opengfx, and games-misc/opensfx, or copy the " |
178 |
+ elog "following 6 files from a version of Transport Tycoon Deluxe" |
179 |
+ elog "(windows or DOS) to ~/.openttd/data/ or" |
180 |
+ elog "${GAMES_DATADIR}/${PN}/data/." |
181 |
+ elog |
182 |
+ elog "From the WINDOWS version you need: " |
183 |
+ elog "sample.cat trg1r.grf trgcr.grf trghr.grf trgir.grf trgtr.grf" |
184 |
+ elog "OR from the DOS version you need: " |
185 |
+ elog "SAMPLE.CAT TRG1.GRF TRGC.GRF TRGH.GRF TRGI.GRF TRGT.GRF" |
186 |
+ elog |
187 |
+ elog "File names are case sensitive, but should work either with" |
188 |
+ elog "all upper or all lower case names" |
189 |
+ elog |
190 |
+ elog "In addition, in-game music will be unavailable: for music," |
191 |
+ elog "install games-misc/openmsx, or use the in-game download" |
192 |
+ elog "functionality to get a music set" |
193 |
+ elog |
194 |
+ fi |
195 |
+ fi |
196 |
+} |
197 |
+ |
198 |
+pkg_postrm() { |
199 |
+ gnome2_icon_cache_update |
200 |
+} |