summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Le Cuirot <chewi@gentoo.org>2016-12-14 23:12:14 +0000
committerJames Le Cuirot <chewi@gentoo.org>2016-12-14 23:12:44 +0000
commitafb75000f39479197a6d1acaa9e21d8107d68547 (patch)
tree2aa0a45c66fdf2160c52b87a33ba66f6a6220563 /games-emulation
parentprofiles: Mask games-emulation/dosbox[glide] on untested arches (diff)
downloadgentoo-afb75000f39479197a6d1acaa9e21d8107d68547.tar.gz
gentoo-afb75000f39479197a6d1acaa9e21d8107d68547.tar.bz2
gentoo-afb75000f39479197a6d1acaa9e21d8107d68547.zip
games-emulation/dosbox: Add Glide emulation, closes bug #593686
Package-Manager: portage-2.3.3
Diffstat (limited to 'games-emulation')
-rw-r--r--games-emulation/dosbox/Manifest1
-rw-r--r--games-emulation/dosbox/dosbox-0.74_p20160629-r1.ebuild70
-rw-r--r--games-emulation/dosbox/dosbox-9999.ebuild24
-rw-r--r--games-emulation/dosbox/metadata.xml3
4 files changed, 95 insertions, 3 deletions
diff --git a/games-emulation/dosbox/Manifest b/games-emulation/dosbox/Manifest
index 539ba17f77d7..311ce6ec43cc 100644
--- a/games-emulation/dosbox/Manifest
+++ b/games-emulation/dosbox/Manifest
@@ -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
diff --git a/games-emulation/dosbox/dosbox-0.74_p20160629-r1.ebuild b/games-emulation/dosbox/dosbox-0.74_p20160629-r1.ebuild
new file mode 100644
index 000000000000..5cb28475a8dd
--- /dev/null
+++ b/games-emulation/dosbox/dosbox-0.74_p20160629-r1.ebuild
@@ -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
+}
diff --git a/games-emulation/dosbox/dosbox-9999.ebuild b/games-emulation/dosbox/dosbox-9999.ebuild
index 4ea5725ce9ad..c27f7cc17685 100644
--- a/games-emulation/dosbox/dosbox-9999.ebuild
+++ b/games-emulation/dosbox/dosbox-9999.ebuild
@@ -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
@@ -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) \
@@ -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
+}
diff --git a/games-emulation/dosbox/metadata.xml b/games-emulation/dosbox/metadata.xml
index a8a2df5a0bcc..ef87777ce4a5 100644
--- a/games-emulation/dosbox/metadata.xml
+++ b/games-emulation/dosbox/metadata.xml
@@ -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>