Gentoo Archives: gentoo-commits

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