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-strategy/freeciv/
Date: Tue, 03 Apr 2018 14:19:37
Message-Id: 1522765129.6dfcb5f136b411c139fd8a39f99d2e6a9430b0ce.polynomial-c@gentoo
1 commit: 6dfcb5f136b411c139fd8a39f99d2e6a9430b0ce
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Tue Apr 3 14:18:49 2018 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Tue Apr 3 14:18:49 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6dfcb5f1
7
8 games-strategy/freeciv: Bump to version 2.5.11
9
10 Closes: https://bugs.gentoo.org/652332
11 Package-Manager: Portage-2.3.28, Repoman-2.3.9
12
13 games-strategy/freeciv/Manifest | 1 +
14 games-strategy/freeciv/freeciv-2.5.11.ebuild | 177 +++++++++++++++++++++++++++
15 2 files changed, 178 insertions(+)
16
17 diff --git a/games-strategy/freeciv/Manifest b/games-strategy/freeciv/Manifest
18 index 1abf5589715..98389d908fc 100644
19 --- a/games-strategy/freeciv/Manifest
20 +++ b/games-strategy/freeciv/Manifest
21 @@ -1,3 +1,4 @@
22 DIST freeciv-2.5.10.tar.bz2 40920632 BLAKE2B 1fb6d3d8130088c818ffe95c68a4061732278da8b7e477347cc67e7cc770526a65006844db0d3ecdb462a903fb5589d18666ffe6c9262956bf30fbc0c79742e5 SHA512 198ea42af083ebbfc4d79cbcbc9fc2dd548c92581301d77fd9cff0e2addc7b7255090471dc52aceb966320958b3a4c542615d5ec91a114dfc805fe993864a6f5
23 +DIST freeciv-2.5.11.tar.bz2 40940090 BLAKE2B dfc1e714e1a3122335f555c2e57352726bda60dc0d1700b0d8ae937c85cba6beb0b2a6ffa6266b77437934ed85f1740f319c379a10c217161ee147f2339a50d3 SHA512 f5eac2fc2b7e09b9fd3b8b45145a5359f8216aef49050c692893d30584000c7db2f2a6e66ac19e67186e2653efaa0aa7656abefe2d2de25d123e9a52ce604456
24 DIST freeciv-2.5.9.tar.bz2 41176249 BLAKE2B d590318e8f03c726fd36714751ed666574951bf988a37b1ee6527a07dcdf4e637cfa525c2ecdf83d537fefdc4c3fd4a3db2c0e037424825af6d1c38f009293c9 SHA512 e8002dc2d0c313ec34d6245f69bf8cc9ed4f98a826d9f564e21cbca379529f6060b8efb3453ec38cb2c7efd222a4aea04033c3ff84b191271ba0af5b770c7677
25 DIST freeciv-2.6.0-beta2.tar.bz2 51503051 BLAKE2B 45bf863a530d726261670cbdcd16daefeecaa72e3f090d98d274baa0cd52f3cd0dd1807d660863c822a2dafd170ad51a6b45d756c43aaf6e95e70c74460ce90b SHA512 e92411f43192dc28bcd492f7e78f455cbc18264c7720dd8d35eb86fcc6da5e3927d79751bd1cd6f88d2904283c0844910415df5d7e36d0b9b76ab5fe3c872976
26
27 diff --git a/games-strategy/freeciv/freeciv-2.5.11.ebuild b/games-strategy/freeciv/freeciv-2.5.11.ebuild
28 new file mode 100644
29 index 00000000000..b235bb640ff
30 --- /dev/null
31 +++ b/games-strategy/freeciv/freeciv-2.5.11.ebuild
32 @@ -0,0 +1,177 @@
33 +# Copyright 1999-2018 Gentoo Foundation
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=6
37 +inherit eutils flag-o-matic gnome2-utils
38 +
39 +DESCRIPTION="multiplayer strategy game (Civilization Clone)"
40 +HOMEPAGE="http://www.freeciv.org/"
41 +SRC_URI="mirror://sourceforge/freeciv/${P}.tar.bz2"
42 +
43 +LICENSE="GPL-2+"
44 +SLOT="0"
45 +KEYWORDS="~amd64 ~ppc64 ~x86"
46 +IUSE="auth aimodules dedicated +gtk ipv6 mapimg modpack mysql nls qt5 readline sdl +server +sound sqlite system-lua"
47 +
48 +# postgres isn't yet really supported by upstream
49 +RDEPEND="app-arch/bzip2
50 + app-arch/xz-utils
51 + net-misc/curl
52 + sys-libs/zlib
53 + auth? (
54 + mysql? ( virtual/mysql )
55 + sqlite? ( dev-db/sqlite:3 )
56 + !mysql? ( ( !sqlite? ( virtual/mysql ) ) )
57 + )
58 + readline? ( sys-libs/readline:0= )
59 + dedicated? ( aimodules? ( dev-libs/libltdl:0 ) )
60 + !dedicated? (
61 + media-libs/libpng:0
62 + gtk? ( x11-libs/gtk+:2 )
63 + mapimg? ( media-gfx/imagemagick:= )
64 + modpack? ( x11-libs/gtk+:2 )
65 + nls? ( virtual/libintl )
66 + qt5? (
67 + dev-qt/qtcore:5
68 + dev-qt/qtgui:5
69 + dev-qt/qtwidgets:5
70 + )
71 + sdl? (
72 + media-libs/libsdl[video]
73 + media-libs/sdl-gfx
74 + media-libs/sdl-image[png]
75 + media-libs/sdl-ttf
76 + )
77 + server? ( aimodules? ( sys-devel/libtool:2 ) )
78 + sound? (
79 + media-libs/libsdl[sound]
80 + media-libs/sdl-mixer[vorbis]
81 + )
82 + !sdl? ( !gtk? ( x11-libs/gtk+:2 ) )
83 + )
84 + system-lua? ( >=dev-lang/lua-5.2 )"
85 +DEPEND="${RDEPEND}
86 + virtual/pkgconfig
87 + !dedicated? (
88 + x11-proto/xextproto
89 + nls? ( sys-devel/gettext )
90 + )"
91 +
92 +pkg_setup() {
93 + if use !dedicated && use !server ; then
94 + ewarn "Disabling server USE flag will make it impossible"
95 + ewarn "to start local games, but you will still be able to"
96 + ewarn "join multiplayer games."
97 + fi
98 +}
99 +
100 +src_prepare() {
101 + default
102 +
103 + # install the .desktop in /usr/share/applications
104 + # install the icons in /usr/share/pixmaps
105 + sed -i \
106 + -e 's:^.*\(desktopfiledir = \).*:\1/usr/share/applications:' \
107 + -e 's:^\(icon[0-9]*dir = \)$(prefix)\(.*\):\1/usr\2:' \
108 + -e 's:^\(icon[0-9]*dir = \)$(datadir)\(.*\):\1/usr/share\2:' \
109 + client/Makefile.in \
110 + server/Makefile.in \
111 + tools/Makefile.in \
112 + data/icons/Makefile.in || die
113 + sed -i -e 's/=SDL/=X-SDL/' bootstrap/freeciv-sdl.desktop.in || die
114 +}
115 +
116 +src_configure() {
117 + local myclient mydatabase myeconfargs
118 +
119 + if use auth ; then
120 + if ! use mysql && ! use sqlite ; then
121 + einfo "No database backend chosen, defaulting"
122 + einfo "to mysql!"
123 + mydatabase=mysql
124 + else
125 + use mysql && mydatabase+=" mysql"
126 + use sqlite && mydatabase+=" sqlite3"
127 + fi
128 + else
129 + mydatabase=no
130 + fi
131 +
132 + if use dedicated ; then
133 + myclient="no"
134 + myeconfargs+=( --enable-server )
135 + else
136 + if use !sdl && use !gtk && ! use qt5 ; then
137 + einfo "No client backend given, defaulting to"
138 + einfo "gtk2 client!"
139 + myclient="gtk2"
140 + else
141 + use sdl && myclient+=" sdl"
142 + use gtk && myclient+=" gtk2"
143 + if use qt5 ; then
144 + myclient+=" qt"
145 + append-cxxflags -std=c++11
146 + fi
147 + fi
148 + myeconfargs+=( $(use_enable server) --without-ggz-client )
149 + fi
150 +
151 + myeconfargs+=(
152 + --enable-aimodules="$(usex aimodules "yes" "no")"
153 + --enable-client="${myclient}"
154 + --enable-fcdb="${mydatabase}"
155 + --enable-fcmp="$(usex modpack "gtk2" "no")"
156 + # disabling shared libs will break aimodules USE flag
157 + --enable-shared
158 + --localedir=/usr/share/locale
159 + $(use_enable ipv6)
160 + $(use_enable mapimg)
161 + $(use_enable nls)
162 + $(use_enable sound sdl-mixer)
163 + $(use_enable system-lua sys-lua)
164 + $(use_with readline)
165 + )
166 + econf "${myeconfargs[@]}"
167 +}
168 +
169 +src_install() {
170 + default
171 +
172 + if use dedicated ; then
173 + rm -rf "${ED%/}/usr/share/pixmaps"
174 + rm -f "${ED%/}"/usr/share/man/man6/freeciv-{client,gtk2,gtk3,modpack,qt,sdl,xaw}*
175 + else
176 + if use server ; then
177 + # Create and install the html manual. It can't be done for dedicated
178 + # servers, because the 'freeciv-manual' tool is then not built. Also
179 + # delete freeciv-manual from the GAMES_BINDIR, because it's useless.
180 + # Note: to have it localized, it should be ran from _postinst, or
181 + # something like that, but then it's a PITA to avoid orphan files...
182 + ./tools/freeciv-manual || die
183 + docinto html
184 + dodoc manual*.html
185 + fi
186 + if use sdl ; then
187 + make_desktop_entry freeciv-sdl "Freeciv (SDL)" freeciv-client
188 + else
189 + rm -f "${ED%/}"/usr/share/man/man6/freeciv-sdl*
190 + fi
191 + rm -f "${ED%/}"/usr/share/man/man6/freeciv-xaw*
192 + fi
193 + find "${ED}" -name "freeciv-manual*" -delete
194 +
195 + rm -f "${ED%/}/usr/$(get_libdir)"/*.a
196 + prune_libtool_files
197 +}
198 +
199 +pkg_preinst() {
200 + gnome2_icon_savelist
201 +}
202 +
203 +pkg_postinst() {
204 + gnome2_icon_cache_update
205 +}
206 +
207 +pkg_postrm() {
208 + gnome2_icon_cache_update
209 +}