1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit autotools desktop flag-o-matic
11 ESVN_REPO_URI="https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk"
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"
23 SRC_URI="mirror://sourceforge/dosbox/${MY_P}.tar.gz"
27 GLIDE_PATCH=841e1071597b64ead14dd08c25a03206b2d1d1b6
28 SRC_URI+=" glide? ( https://raw.githubusercontent.com/voyageur/openglide/${GLIDE_PATCH}/platform/dosbox/dosbox_glide.diff -> dosbox_glide-${GLIDE_PATCH}.diff )"
30 DESCRIPTION="DOS emulator"
31 HOMEPAGE="https://www.dosbox.com/"
34 KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86"
35 IUSE="alsa +core-inline debug glide hardened opengl X"
37 RDEPEND="alsa? ( media-libs/alsa-lib )
38 glide? ( media-libs/openglide )
39 opengl? ( virtual/glu virtual/opengl )
40 debug? ( sys-libs/ncurses:0= )
41 X? ( x11-libs/libX11 )
43 media-libs/libsdl[joystick,opengl?,video,X?]
50 S="${WORKDIR}/${MY_P}"
53 "${FILESDIR}"/${PN}-0.74-ncurses.patch
57 use glide && eapply "${DISTDIR}"/dosbox_glide-${GLIDE_PATCH}.diff
63 use glide && append-cppflags -I"${EPREFIX}"/usr/include/openglide
65 ac_cv_lib_X11_main=$(usex X yes no) \
67 $(use_enable alsa alsa-midi) \
68 $(use_enable core-inline) \
69 $(use_enable !hardened dynamic-core) \
70 $(use_enable !hardened dynamic-x86) \
77 make_desktop_entry dosbox DOSBox /usr/share/pixmaps/dosbox.ico
83 elog "You have enabled unofficial Glide emulation. To use this, symlink"
84 elog "or copy ${EPREFIX}/usr/share/openglide/glide2x-dosbox.ovl to your game's"
85 elog "directory and add the following to your DOSBox configuration."