Diff warzone2100-3.2.3 with a warzone2100-3.3.0

/usr/portage/games-strategy/warzone2100/warzone2100-3.3.0.ebuild 2019-09-02 18:39:00.000000000 +0300
1
# Copyright 1999-2017 Gentoo Foundation
1
# Copyright 1999-2019 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="http://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
		--docdir=/usr/share/doc/${PF}
79
		--localedir=/usr/share/locale
77
		--localedir="${EPREFIX}"/usr/share/locale
80 78
		--with-distributor="Gentoo ${PF}"
81
		--with-icondir=/usr/share/icons/hicolor/128x128/apps
82
		--with-applicationdir=/usr/share/applications
79
		--with-icondir="${EPREFIX}"/usr/share/icons/hicolor/128x128/apps
80
		--with-applicationdir="${EPREFIX}"/usr/share/applications
83 81
		$(use_enable debug debug relaxed)
84 82
		$(use_enable nls)
85
		--with-backend=$(usex sdl "sdl" "qt")
86 83
	)
87 84
	econf "${myeconfargs[@]}"
88 85
}
......
92 89
}
93 90

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

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

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

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