*/*: Bump copyright on files touched this year
[gentoo.git] / games-simulation / crrcsim / crrcsim-0.9.13.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 inherit autotools eutils gnome2-utils
7
8 DESCRIPTION="model-airplane flight simulation program"
9 HOMEPAGE="https://sourceforge.net/projects/crrcsim/"
10 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
11
12 LICENSE="GPL-2"
13 SLOT="0"
14 KEYWORDS="~amd64 ~x86"
15 IUSE="portaudio"
16
17 RDEPEND="media-libs/libsdl[X,sound,joystick,opengl,video]
18         media-libs/plib
19         sci-mathematics/cgal
20         portaudio? ( media-libs/portaudio )"
21 DEPEND="${RDEPEND}"
22
23 PATCHES=(
24         "${FILESDIR}"/${P}-buildsystem.patch
25         "${FILESDIR}"/${P}-gcc6.patch
26 )
27
28 src_prepare() {
29         default
30
31         if has_version "sci-mathematics/cgal[gmp(+)]" ; then
32                 eapply "${FILESDIR}"/${PN}-cgal_gmp.patch
33         fi
34         eautoreconf
35 }
36
37 src_configure() {
38         econf \
39                 --datadir="/usr/share" \
40                 --datarootdir="${EPREFIX}/usr/share" \
41                 --docdir="${EPREFIX}/usr/share/doc/${PF}" \
42                 $(use_with portaudio)
43 }
44
45 src_install() {
46         emake DESTDIR="${D}" install
47         dodoc AUTHORS HISTORY NEWS README
48         doicon -s 32 packages/icons/${PN}.png
49         make_desktop_entry ${PN}
50 }
51
52 pkg_preinst() {
53         gnome2_icon_savelist
54 }
55
56 pkg_postinst() {
57         gnome2_icon_cache_update
58 }
59
60 pkg_postrm() {
61         gnome2_icon_cache_update
62 }