Skip to content

Commit

Permalink
games-emulation/dosbox: Add Glide emulation, closes bug #593686
Browse files Browse the repository at this point in the history
Package-Manager: portage-2.3.3
  • Loading branch information
chewi committed Dec 14, 2016
1 parent 147fda4 commit afb7500
Show file tree
Hide file tree
Showing 4 changed files with 95 additions and 3 deletions.
1 change: 1 addition & 0 deletions games-emulation/dosbox/Manifest
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
DIST dosbox-0.74.tar.gz 1265711 SHA256 13f74916e2d4002bad1978e55727f302ff6df3d9be2f9b0e271501bd0a938e05 SHA512 4a6ff4c658997a495119d200ec6ad37649da940814a4b14fca0dd29a99142026e324695b7aa9d2946efc2abf9067a819d911e43778efe905ed10ddf9b9f2dd3d WHIRLPOOL abc94770c732f8b73bedffbcca778f249c2fdc09353c3f484e2fc23f910602cc60b3abfcc22a9dbf3d3c4e77535fc488cd476217fe6498cab786a8024a257ff3
DIST dosbox-code-0-3989-dosbox-trunk.zip 1327592 SHA256 32f2cfff1be9f9bd2b0e246f9c0486f050714fdaba0bc47b66f3983eb7f55965 SHA512 625eacc1a1190d87d56713f7af54e6a7886e7666ba9f7f0b1d553c96a2eb02ec7810ac2da73d014d5ea3b69f2a7658bdd445532abe030e7f6ef85a3c20bdd3c7 WHIRLPOOL 1272c5a8d8480fa0dede2e78941a1cc78938407ab86d3720e18762fe2c749de89eea3db2811426f43eb57efa762a4ff55aa44d8e624c05bcb82b2404dad86f49
DIST dosbox_glide-3722fc563b737d2d7933df6a771651c2154e6f7b.diff 96346 SHA256 b51b86ca81b1642f50b8c0b0d74e4e230c858dbaf0c193afe15a040481e6d70b SHA512 d2be6ee8bd1f13058c76ccae595b67f15ab87e0e36dab0d938ebbd7fc5d379f6f054d30c32ef4723b9fcdbbcea7bf0e1aa2c8b1aab1737f1d0e4d2a2df0f7714 WHIRLPOOL 2bf74a6a6d7afccbd1d6002b48ab04c00672342829607c99ef4efd9ad8e3186c08aff971b52c6e4357c2e94e85cf08e049eb593d0a9f2253935f7e3cbe8b2a8a
70 changes: 70 additions & 0 deletions games-emulation/dosbox/dosbox-0.74_p20160629-r1.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=6
inherit autotools eutils flag-o-matic

PATCH=3989
GLIDE_PATCH=3722fc563b737d2d7933df6a771651c2154e6f7b

DESCRIPTION="DOS emulator"
HOMEPAGE="http://dosbox.sourceforge.net/"
SRC_URI="mirror://gentoo/dosbox-code-0-${PATCH}-dosbox-trunk.zip
glide? ( https://raw.githubusercontent.com/voyageur/openglide/${GLIDE_PATCH}/platform/dosbox/dosbox_glide.diff -> dosbox_glide-${GLIDE_PATCH}.diff )"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86"
IUSE="alsa debug glide hardened opengl"

RDEPEND="alsa? ( media-libs/alsa-lib )
glide? ( media-libs/openglide )
opengl? ( virtual/glu virtual/opengl )
debug? ( sys-libs/ncurses:0 )
media-libs/libpng:0
media-libs/libsdl[joystick,video,X]
media-libs/sdl-net
media-libs/sdl-sound"
DEPEND="${RDEPEND}
app-arch/unzip"

S=${WORKDIR}/${PN}-code-0-${PATCH}-dosbox-trunk

PATCHES=(
"${FILESDIR}"/dosbox-0.74-gcc46.patch
)

src_prepare() {
use glide && eapply "${DISTDIR}"/dosbox_glide-${GLIDE_PATCH}.diff
default
eautoreconf
}

src_configure() {
use glide && append-cppflags -I"${EPREFIX}"/usr/include/openglide

econf \
$(use_enable alsa alsa-midi) \
$(use_enable !hardened dynamic-core) \
$(use_enable !hardened dynamic-x86) \
$(use_enable debug) \
$(use_enable opengl)
}

src_install() {
default
make_desktop_entry dosbox DOSBox /usr/share/pixmaps/dosbox.ico
doicon src/dosbox.ico
}

pkg_postinst() {
if use glide; then
elog "You have enabled unofficial Glide emulation. To use this, symlink"
elog "or copy ${EPREFIX}/usr/share/openglide/glide2x-dosbox.ovl to your game's"
elog "directory and add the following to your DOSBox configuration."
elog ""
elog "[glide]"
elog "glide=true"
fi
}
24 changes: 21 additions & 3 deletions games-emulation/dosbox/dosbox-9999.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,28 @@

EAPI=6

GLIDE_PATCH=3722fc563b737d2d7933df6a771651c2154e6f7b
SRC_URI="glide? ( https://raw.githubusercontent.com/voyageur/openglide/${GLIDE_PATCH}/platform/dosbox/dosbox_glide.diff -> dosbox_glide-${GLIDE_PATCH}.diff )"

if [[ ${PV} = 9999 ]]; then
ESVN_REPO_URI="https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk"
inherit subversion
else
SRC_URI="mirror://sourceforge/dosbox/${P}.tar.gz"
SRC_URI+=" mirror://sourceforge/dosbox/${P}.tar.gz"
KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86"
fi

inherit autotools eutils
inherit autotools eutils flag-o-matic

DESCRIPTION="DOS emulator"
HOMEPAGE="http://dosbox.sourceforge.net/"

LICENSE="GPL-2"
SLOT="0"
IUSE="alsa debug hardened opengl"
IUSE="alsa debug glide hardened opengl"

DEPEND="alsa? ( media-libs/alsa-lib )
glide? ( media-libs/openglide )
opengl? ( virtual/glu virtual/opengl )
debug? ( sys-libs/ncurses:0 )
media-libs/libpng:0
Expand All @@ -37,11 +41,14 @@ fi
PATCHES=( "${FILESDIR}/${PN}-0.74-gcc46.patch" )

src_prepare() {
use glide && eapply "${DISTDIR}"/dosbox_glide-${GLIDE_PATCH}.diff
default
eautoreconf
}

src_configure() {
use glide && append-cppflags -I"${EPREFIX}"/usr/include/openglide

econf \
$(use_enable alsa alsa-midi) \
$(use_enable !hardened dynamic-core) \
Expand All @@ -55,3 +62,14 @@ src_install() {
make_desktop_entry dosbox DOSBox /usr/share/pixmaps/dosbox.ico
doicon src/dosbox.ico
}

pkg_postinst() {
if use glide; then
elog "You have enabled unofficial Glide emulation. To use this, symlink"
elog "or copy ${EPREFIX}/usr/share/openglide/glide2x-dosbox.ovl to your game's"
elog "directory and add the following to your DOSBox configuration."
elog ""
elog "[glide]"
elog "glide=true"
fi
}
3 changes: 3 additions & 0 deletions games-emulation/dosbox/metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,7 @@
<upstream>
<remote-id type="sourceforge">dosbox</remote-id>
</upstream>
<use>
<flag name="glide">Enable unofficial Glide emulation via media-libs/openglide</flag>
</use>
</pkgmetadata>

0 comments on commit afb7500

Please sign in to comment.