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