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