*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / games-emulation / dosbox / dosbox-0.74.3.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 inherit autotools desktop flag-o-matic
7
8 case "${PV}" in
9 9999)
10         MY_P=${PN}
11         ESVN_REPO_URI="https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk"
12         inherit subversion
13         ;;
14 *_pre*)
15         MY_PV=0-r${PV#*_pre}
16         MY_P=${PN}-code-${MY_PV}-${PN}-trunk
17         SRC_URI="https://sourceforge.net/code-snapshots/svn/d/do/dosbox/code-0/${MY_P}.zip"
18         BDEPEND="app-arch/unzip"
19         ;;
20 *)
21         MY_PV=$(ver_rs 2 -)
22         MY_P=${PN}-${MY_PV}
23         SRC_URI="mirror://sourceforge/dosbox/${MY_P}.tar.gz"
24         ;;
25 esac
26
27 DESCRIPTION="DOS emulator"
28 HOMEPAGE="https://www.dosbox.com/"
29 LICENSE="GPL-2"
30 SLOT="0"
31 KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86"
32 IUSE="alsa +core-inline debug hardened opengl X"
33
34 RDEPEND="alsa? ( media-libs/alsa-lib )
35         opengl? ( virtual/glu virtual/opengl )
36         debug? ( sys-libs/ncurses:0= )
37         X? ( x11-libs/libX11 )
38         media-libs/libpng:0=
39         media-libs/libsdl[joystick,opengl?,video,X?]
40         media-libs/sdl-net
41         media-libs/sdl-sound
42         sys-libs/zlib"
43
44 DEPEND="${RDEPEND}"
45
46 S="${WORKDIR}/${MY_P}"
47
48 PATCHES=(
49         "${FILESDIR}"/${PN}-0.74-ncurses.patch
50 )
51
52 src_prepare() {
53         default
54         eautoreconf
55 }
56
57 src_configure() {
58         ac_cv_lib_X11_main=$(usex X yes no) \
59         econf \
60                 $(use_enable alsa alsa-midi) \
61                 $(use_enable core-inline) \
62                 $(use_enable !hardened dynamic-core) \
63                 $(use_enable !hardened dynamic-x86) \
64                 $(use_enable debug) \
65                 $(use_enable opengl)
66 }
67
68 src_install() {
69         default
70         make_desktop_entry dosbox DOSBox /usr/share/pixmaps/dosbox.ico
71         doicon src/dosbox.ico
72 }