3 |
3 |
|
4 |
4 |
EAPI=7
|
5 |
5 |
|
6 |
|
inherit autotools desktop
|
|
6 |
inherit autotools desktop flag-o-matic
|
7 |
7 |
|
8 |
8 |
case ${PV} in
|
9 |
9 |
9999)
|
... | ... | |
24 |
24 |
;;
|
25 |
25 |
esac
|
26 |
26 |
|
|
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 )"
|
|
29 |
|
27 |
30 |
DESCRIPTION="DOS emulator"
|
28 |
31 |
HOMEPAGE="https://www.dosbox.com/"
|
29 |
32 |
S="${WORKDIR}/${MY_P}"
|
... | ... | |
31 |
34 |
LICENSE="GPL-2"
|
32 |
35 |
SLOT="0"
|
33 |
36 |
KEYWORDS="amd64 ~arm ~ppc ppc64 x86"
|
34 |
|
IUSE="alsa +core-inline debug hardened opengl X"
|
|
37 |
IUSE="alsa +core-inline debug glide hardened opengl X"
|
35 |
38 |
|
36 |
39 |
RDEPEND="alsa? ( media-libs/alsa-lib )
|
|
40 |
glide? ( media-libs/openglide )
|
37 |
41 |
opengl? ( virtual/glu virtual/opengl )
|
38 |
42 |
debug? ( sys-libs/ncurses:0= )
|
39 |
43 |
X? ( x11-libs/libX11 )
|
... | ... | |
46 |
50 |
|
47 |
51 |
PATCHES=(
|
48 |
52 |
"${FILESDIR}"/${PN}-0.74-ncurses.patch
|
|
53 |
"${FILESDIR}"/${PN}-0.75-detect-AR.patch
|
49 |
54 |
)
|
50 |
55 |
|
51 |
56 |
src_prepare() {
|
|
57 |
use glide && eapply "${DISTDIR}"/dosbox_glide-${GLIDE_PATCH}.diff "${FILESDIR}"/${PN}-0.75-glide-libdl.patch
|
52 |
58 |
default
|
53 |
59 |
eautoreconf
|
54 |
60 |
}
|
55 |
61 |
|
56 |
62 |
src_configure() {
|
|
63 |
# -Werror=strict-aliasing, -Weror=odr
|
|
64 |
# https://bugs.gentoo.org/858638
|
|
65 |
#
|
|
66 |
# Upstream is kinda dead. Just use dosbox-staging... where I reported
|
|
67 |
# similar issues and they were fixed. ;)
|
|
68 |
append-flags -fno-strict-aliasing
|
|
69 |
filter-lto
|
|
70 |
|
|
71 |
use glide && append-cppflags -I"${EPREFIX}"/usr/include/openglide
|
|
72 |
|
57 |
73 |
ac_cv_lib_X11_main=$(usex X yes no) \
|
58 |
74 |
econf \
|
59 |
75 |
$(use_enable alsa alsa-midi) \
|
... | ... | |
69 |
85 |
make_desktop_entry dosbox DOSBox /usr/share/pixmaps/dosbox.ico
|
70 |
86 |
doicon src/dosbox.ico
|
71 |
87 |
}
|
|
88 |
|
|
89 |
pkg_postinst() {
|
|
90 |
if use glide; then
|
|
91 |
elog "You have enabled unofficial Glide emulation. To use this, symlink"
|
|
92 |
elog "or copy ${EPREFIX}/usr/share/openglide/glide2x-dosbox.ovl to your game's"
|
|
93 |
elog "directory and add the following to your DOSBox configuration."
|
|
94 |
elog ""
|
|
95 |
elog "[glide]"
|
|
96 |
elog "glide=true"
|
|
97 |
fi
|
|
98 |
}
|