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