Gentoo Archives: gentoo-commits

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