Diff warzone2100-3.2.3 with a warzone2100-3.3.0

/usr/portage/games-strategy/warzone2100/warzone2100-3.3.0.ebuild 2020-06-28 00:09:00.000000000 +0300
1 1
# Copyright 1999-2020 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
EAPI=6
5
inherit autotools toolchain-funcs eutils versionator gnome2-utils
4
EAPI=7
5
inherit autotools toolchain-funcs xdg
6 6

  
7
MY_PV=$(get_version_component_range -2)
7
MY_PV="$(ver_cut 1-2)"
8 8
VIDEOS_PV=2.2
9
VIDEOS_P=${PN}-videos-${VIDEOS_PV}.wz
9
VIDEOS_P="${PN}-videos-${VIDEOS_PV}.wz"
10 10
DESCRIPTION="3D real-time strategy game"
11 11
HOMEPAGE="https://wz2100.net/"
12
SRC_URI="mirror://sourceforge/warzone2100/${P}.tar.xz
12
SRC_URI="mirror://sourceforge/warzone2100/${P}_src.tar.xz
13 13
	videos? ( mirror://sourceforge/warzone2100/warzone2100/Videos/${VIDEOS_PV}/high-quality-en/sequences.wz -> ${VIDEOS_P} )"
14 14

  
15
SRC_URI+=" https://github.com/Warzone2100/warzone2100/commit/ef37bca38289f4f79c6533acd93ed326858a3f68.patch -> ${PN}-3.2.3-qt_compile_fix.patch"
16

  
17 15
LICENSE="GPL-2+ CC-BY-SA-3.0 public-domain"
18 16
SLOT="0"
17
[[ "${PV}" == *_beta* ]] || \
19 18
KEYWORDS="~amd64 ~x86"
20 19
# upstream requested debug support
21
IUSE="debug nls sdl videos"
20
IUSE="debug nls videos"
22 21

  
23 22
# TODO: unbundle miniupnpc and quesoglc
24 23
# quesoglc-0.7.2 is buggy: http://developer.wz2100.net/ticket/2828
......
27 26
	dev-libs/openssl:0=
28 27
	dev-qt/qtcore:5
29 28
	dev-qt/qtgui:5
29
	dev-qt/qtopengl:5
30 30
	dev-qt/qtscript:5
31 31
	dev-qt/qtwidgets:5
32
	dev-qt/qtx11extras:5
32 33
	media-libs/freetype:2
33 34
	media-libs/glew:=
34 35
	media-libs/harfbuzz
35 36
	media-libs/libogg
36 37
	media-libs/libpng:0
38
	media-libs/libsdl2[opengl,video,X]
37 39
	media-libs/libtheora
38 40
	media-libs/libvorbis
39 41
	media-libs/openal
......
43 45
	x11-libs/libX11
44 46
	x11-libs/libXrandr
45 47
	nls? ( virtual/libintl )
46
	!sdl? (
47
		dev-qt/qtopengl:5
48
		dev-qt/qtx11extras:5
49
	)
50
	sdl? ( media-libs/libsdl2[opengl,video,X] )
51 48
"
52 49
DEPEND="
53 50
	${CDEPEND}
54
	app-arch/zip
51
	app-text/asciidoc
55 52
	dev-libs/fribidi
56 53
	media-libs/fontconfig
57
	virtual/pkgconfig
58
	nls? ( sys-devel/gettext )
59 54
"
60 55
RDEPEND="
61 56
	${CDEPEND}
62 57
	media-fonts/dejavu
63 58
"
59
BDEPEND="
60
	app-arch/zip
61
	virtual/pkgconfig
62
	nls? ( sys-devel/gettext )
63
"
64

  
65
S="${WORKDIR}/${PN}"
64 66

  
65 67
src_prepare() {
66 68
	default
67 69

  
68
	# https://developer.wz2100.net/ticket/4580
69
	eapply "${DISTDIR}/${P}-qt_compile_fix.patch"
70

  
71 70
	sed -i -e 's/#top_builddir/top_builddir/' po/Makevars || die
72 71
	sed '/appdata\.xml/d' -i icons/Makefile.am || die
73 72
	eautoreconf
......
75 74

  
76 75
src_configure() {
77 76
	local myeconfargs=(
78
		--localedir=/usr/share/locale
77
		--localedir="${EPREFIX}"/usr/share/locale
79 78
		--with-distributor="Gentoo ${PF}"
80
		--with-icondir=/usr/share/icons/hicolor/128x128/apps
81
		--with-applicationdir=/usr/share/applications
79
		--with-icondir="${EPREFIX}"/usr/share/icons/hicolor/128x128/apps
80
		--with-applicationdir="${EPREFIX}"/usr/share/applications
82 81
		$(use_enable debug debug relaxed)
83 82
		$(use_enable nls)
84
		--with-backend=$(usex sdl "sdl" "qt")
85 83
	)
86 84
	econf "${myeconfargs[@]}"
87 85
}
......
91 89
}
92 90

  
93 91
src_install() {
92
	local HTML_DOCS=( doc/quickstartguide.html )
94 93
	default
95
	rm -f "${D}"/usr/share/doc/${PF}/COPYING*
94
	rm "${ED}"/usr/share/doc/${PF}/COPYING* || die
96 95
	if use videos ; then
97 96
		insinto /usr/share/${PN}
98 97
		newins "${DISTDIR}"/${VIDEOS_P} sequences.wz
99 98
	fi
100 99
	doman doc/warzone2100.6
101
	dodoc doc/quickstartguide.pdf
102 100
}
103 101

  
104 102
pkg_preinst() {
105
	gnome2_icon_savelist
103
	xdg_pkg_preinst
106 104
}
107 105

  
108 106
pkg_postinst() {
109
	gnome2_icon_cache_update
107
	xdg_pkg_postinst
110 108
}
111 109

  
112 110
pkg_postrm() {
113
	gnome2_icon_cache_update
111
	xdg_pkg_postrm
114 112
}
Thank you!