summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornia <nia@pkgsrc.org>2019-09-22 09:54:13 +0000
committernia <nia@pkgsrc.org>2019-09-22 09:54:13 +0000
commit8c913545822460ce4b0688be8889ac564f321859 (patch)
tree73fec094317f192bbb08dc6759cac7dc916390a9
parent3f9a3bd60bcf829f524905bfdd47264f3897034f (diff)
downloadpkgsrc-8c913545822460ce4b0688be8889ac564f321859.tar.gz
Add emulators/dosbox-x. Based on work by Yorick Hardy in pkgsrc-wip.
As a fork of DOSBox, DOSBox-X retains compatibility with the wide base of DOS games DOSBox was designed for. It also goes further, with a focus on accurate emulation of the hardware, and many more ways to tweak and configure the DOS virtual machine. The DOSBox-X team believes that a better way to emulate the legacy PC platform is to give the user all the options they need to emulate everything from original IBM PC hardware with 64KB of RAM all the way up to late 90's hardware, whatever it takes to get that game or software package to run.
-rw-r--r--emulators/Makefile3
-rw-r--r--emulators/dosbox-x/DESCR10
-rw-r--r--emulators/dosbox-x/Makefile56
-rw-r--r--emulators/dosbox-x/PLIST7
-rw-r--r--emulators/dosbox-x/distinfo9
-rw-r--r--emulators/dosbox-x/files/dosbox-x.desktop18
-rw-r--r--emulators/dosbox-x/patches/patch-configure.ac96
-rw-r--r--emulators/dosbox-x/patches/patch-include_byteorder.h20
-rw-r--r--emulators/dosbox-x/patches/patch-include_dos__inc.h17
9 files changed, 235 insertions, 1 deletions
diff --git a/emulators/Makefile b/emulators/Makefile
index 2583112fd21..efb25b8c5f6 100644
--- a/emulators/Makefile
+++ b/emulators/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.303 2019/09/13 10:12:07 nia Exp $
+# $NetBSD: Makefile,v 1.304 2019/09/22 09:54:13 nia Exp $
#
COMMENT= Emulators for other operating systems
@@ -53,6 +53,7 @@ SUBDIR+= dega
SUBDIR+= dgen
SUBDIR+= dolphin-emu
SUBDIR+= dosbox
+SUBDIR+= dosbox-x
SUBDIR+= dynagen
SUBDIR+= dynamips
SUBDIR+= e-uae
diff --git a/emulators/dosbox-x/DESCR b/emulators/dosbox-x/DESCR
new file mode 100644
index 00000000000..865e5aacd5c
--- /dev/null
+++ b/emulators/dosbox-x/DESCR
@@ -0,0 +1,10 @@
+As a fork of DOSBox, DOSBox-X retains compatibility with the wide base of
+DOS games DOSBox was designed for.
+
+It also goes further, with a focus on accurate emulation of the hardware,
+and many more ways to tweak and configure the DOS virtual machine.
+
+The DOSBox-X team believes that a better way to emulate the legacy PC platform
+is to give the user all the options they need to emulate everything from
+original IBM PC hardware with 64KB of RAM all the way up to late 90's
+hardware, whatever it takes to get that game or software package to run.
diff --git a/emulators/dosbox-x/Makefile b/emulators/dosbox-x/Makefile
new file mode 100644
index 00000000000..bf6df90cedd
--- /dev/null
+++ b/emulators/dosbox-x/Makefile
@@ -0,0 +1,56 @@
+# $NetBSD: Makefile,v 1.1 2019/09/22 09:54:14 nia Exp $
+
+DISTNAME= dosbox-x-0.82.21
+CATEGORIES= emulators
+MASTER_SITES= ${MASTER_SITE_GITHUB:=joncampbell123/}
+GITHUB_TAG= dosbox-x-v${PKGVERSION_NOREV}
+
+MAINTAINER= pkgsrc-users@NetBSD.org
+HOMEPAGE= https://dosbox-x.com/
+COMMENT= DOSBox fork with enhancements
+LICENSE= gnu-gpl-v2
+
+WRKSRC= ${WRKDIR}/dosbox-x-${GITHUB_TAG}
+GNU_CONFIGURE= yes
+USE_TOOLS+= autoconf automake pkg-config
+USE_LANGUAGES= c gnu++11
+
+# C++11
+GCC_REQD+= 4.7
+
+LIBS.NetBSD+= -lcompat
+
+CONFIGURE_ARGS+= --disable-alsatest
+CONFIGURE_ARGS+= --disable-sdl2test
+CONFIGURE_ARGS+= --disable-sdltest
+CONFIGURE_ARGS+= --disable-sdl
+CONFIGURE_ARGS+= --enable-sdl2
+
+PKGCONFIG_OVERRIDE+= vs2015/libpng/libpng.pc.in
+PKGCONFIG_OVERRIDE+= vs2015/sdl/sdl.pc.in
+PKGCONFIG_OVERRIDE+= vs2015/sdl2/sdl2.pc.in
+PKGCONFIG_OVERRIDE+= vs2015/sdlnet/SDL_net.pc.in
+PKGCONFIG_OVERRIDE+= vs2015/zlib/zlib.pc.in
+
+INSTALLATION_DIRS+= share/applications
+INSTALLATION_DIRS+= share/pixmaps
+
+CHECK_PORTABILITY_SKIP+= vs2015/sdl2/build-scripts/androidbuildlibs.sh
+CHECK_PORTABILITY_SKIP+= vs2015/sdl2/build-scripts/iosbuild.sh
+
+pre-configure:
+ cd ${WRKSRC} && ${SH} autogen.sh
+
+post-install:
+ ${INSTALL_DATA} ${WRKSRC}/src/dosbox.png \
+ ${DESTDIR}${PREFIX}/share/pixmaps/dosbox.png
+ ${INSTALL_DATA} ${FILESDIR}/dosbox-x.desktop \
+ ${DESTDIR}${PREFIX}/share/applications
+
+.include "options.mk"
+.include "../../audio/fluidsynth/buildlink3.mk"
+.include "../../devel/SDL2/buildlink3.mk"
+.include "../../graphics/png/buildlink3.mk"
+.include "../../net/libpcap/buildlink3.mk"
+.include "../../mk/curses.buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/emulators/dosbox-x/PLIST b/emulators/dosbox-x/PLIST
new file mode 100644
index 00000000000..a6d74eafb63
--- /dev/null
+++ b/emulators/dosbox-x/PLIST
@@ -0,0 +1,7 @@
+@comment $NetBSD: PLIST,v 1.1 2019/09/22 09:54:14 nia Exp $
+bin/dosbox-x
+share/applications/dosbox-x.desktop
+share/dosbox-x/CHANGELOG
+share/dosbox-x/FREECG98.BMP
+share/dosbox-x/dosbox.reference.conf
+share/pixmaps/dosbox.png
diff --git a/emulators/dosbox-x/distinfo b/emulators/dosbox-x/distinfo
new file mode 100644
index 00000000000..71657627448
--- /dev/null
+++ b/emulators/dosbox-x/distinfo
@@ -0,0 +1,9 @@
+$NetBSD: distinfo,v 1.1 2019/09/22 09:54:14 nia Exp $
+
+SHA1 (dosbox-x-0.82.21.tar.gz) = 9d772be915a2f39f8fc3f6a184d8837244f1fb0c
+RMD160 (dosbox-x-0.82.21.tar.gz) = 21a77015f91850f3620b6f4ae6951af0c65bbcba
+SHA512 (dosbox-x-0.82.21.tar.gz) = 0e1327334a7c88bc8ea6abdad006fd8d244a0aa35993411be8a85dc9de973c61d93d2d3b071ff4380fe30694ac8f5e3e69351c8ae2be816c2e5e5fb382897179
+Size (dosbox-x-0.82.21.tar.gz) = 36366797 bytes
+SHA1 (patch-configure.ac) = 12028b528aa1f4b4d13a25c144954d9f69755e6b
+SHA1 (patch-include_byteorder.h) = 86eccfbc2318ddc8d71a6de8723947a48d98a126
+SHA1 (patch-include_dos__inc.h) = 26ba2b11dcfa923085f3745b0f8aca542f5dc692
diff --git a/emulators/dosbox-x/files/dosbox-x.desktop b/emulators/dosbox-x/files/dosbox-x.desktop
new file mode 100644
index 00000000000..d04aeef0f80
--- /dev/null
+++ b/emulators/dosbox-x/files/dosbox-x.desktop
@@ -0,0 +1,18 @@
+[Desktop Entry]
+Type=Application
+Encoding=UTF-8
+Name=DOSBox-X
+GenericName=DOS Emulator
+Comment=Run old DOS applications
+Comment[ca]=Executeu antigues aplicacions DOS
+Comment[de]=Ein Emulator für alte DOS Programme
+Comment[es]=Un emulador para ejecutar antiguas aplicaciones DOS
+Comment[nl]=Een simulator om oude DOS-spellen te spelen
+Comment[ru]=Запуск старых DOS-приложений
+Comment[it]=Un emulatore per far girare vecchi giochi DOS
+Comment[ua]=Запуск старих DOS-застосувань
+Icon=dosbox
+Exec=dosbox-x
+Terminal=false
+Categories=Game;Emulator;
+Keywords=DOS Emulator;
diff --git a/emulators/dosbox-x/patches/patch-configure.ac b/emulators/dosbox-x/patches/patch-configure.ac
new file mode 100644
index 00000000000..e5f33d9ab05
--- /dev/null
+++ b/emulators/dosbox-x/patches/patch-configure.ac
@@ -0,0 +1,96 @@
+$NetBSD: patch-configure.ac,v 1.1 2019/09/22 09:54:14 nia Exp $
+
+Fix == test in configure script.
+
+--- configure.ac.orig 2019-06-01 03:37:41.000000000 +0000
++++ configure.ac
+@@ -171,7 +171,7 @@ CFLAGS=["`echo $CFLAGS' ' | sed -e 's/-O
+ CXXFLAGS=["`echo $CXXFLAGS' ' | sed -e 's/-O[^ ]* //g'`"]
+
+ if test x$enable_optimize != xno; then
+- if test x$enable_emscripten == xyes; then
++ if test x$enable_emscripten = xyes; then
+ CFLAGS="$CFLAGS -Os"
+ CXXFLAGS="$CXXFLAGS -Os"
+ else
+@@ -180,21 +180,21 @@ if test x$enable_optimize != xno; then
+ fi
+ fi
+
+-if test x$enable_emscripten == xyes; then
++if test x$enable_emscripten = xyes; then
+ AC_DEFINE(C_EMSCRIPTEN,1,[Targeting Emscripten])
+ fi
+
+ dnl Some stuff for the icon.
+ case "$host" in
+ *-*-cygwin* | *-*-mingw32*)
+- if test x$enable_hx == xyes; then
++ if test x$enable_hx = xyes; then
+ CXXFLAGS="$CXXFLAGS -DHX_DOS"
+ AC_DEFINE(C_HX_DOS,1,[Targeting HX DOS extender])
+ fi
+ ;;
+ esac
+
+-if test x$enable_force_menu_sdldraw == xyes; then
++if test x$enable_force_menu_sdldraw = xyes; then
+ CXXFLAGS="$CXXFLAGS -DFORCE_SDLDRAW"
+ AC_DEFINE(C_FORCE_MENU_SDLDRAW,1,[Force SDL drawn menus])
+ fi
+@@ -297,7 +297,7 @@ case "$host" in
+ ;;
+ esac
+
+-if test x$enable_emscripten == xyes; then
++if test x$enable_emscripten = xyes; then
+ CXXFLAGS="$CXXFLAGS"
+ else
+ dnl Some default CPU flags
+@@ -419,8 +419,8 @@ case "$host" in
+ esac
+ fi
+
+-AM_CONDITIONAL(MACOSX, test x"$macosx" == x"1")
+-AM_CONDITIONAL(EMSCRIPTEN, test x"$enable_emscripten" == x"yes")
++AM_CONDITIONAL(MACOSX, test x"$macosx" = x"1")
++AM_CONDITIONAL(EMSCRIPTEN, test x"$enable_emscripten" = x"yes")
+
+ dnl The target cpu checks for dynamic cores
+ AH_TEMPLATE(C_TARGETCPU,[The type of cpu this target has])
+@@ -611,7 +611,7 @@ fi
+ dnl FEATURE: xBRZ
+ AH_TEMPLATE(C_XBRZ,[Define to 1 to enable XBRZ scaler])
+ AC_ARG_ENABLE(xbrz,AC_HELP_STRING([--enable-xbrz],[compile with xBRZ scaler (default yes)]),enable_xbrz=$enableval,enable_xbrz=yes)
+-AM_CONDITIONAL(C_XBRZ, test "x$enable_xbrz" == "xyes")
++AM_CONDITIONAL(C_XBRZ, test "x$enable_xbrz" = "xyes")
+ if test x$enable_emscripten != xyes; then
+ if test x$enable_xbrz = xyes; then
+ AC_DEFINE(C_XBRZ,1)
+@@ -621,7 +621,7 @@ fi
+ dnl FEATURE: xBRZ
+ AH_TEMPLATE(C_SCALER_FULL_LINE,[Define to 1 to alter the simpler render scalers to operate only on the full scanline instead of detecting differences. This is a performance adjustment for slow or embedded systems])
+ AC_ARG_ENABLE(scaler-full-line,AC_HELP_STRING([--enable-scaler-full-line],[scaler render full line instead of detecting changes, for slower systems]),enable_scaler_full_line=$enableval,enable_scaler_full_line=no)
+-AM_CONDITIONAL(C_SCALER_FULL_LINE, test "x$enable_scaler_full_line" == "xyes")
++AM_CONDITIONAL(C_SCALER_FULL_LINE, test "x$enable_scaler_full_line" = "xyes")
+ if test x$enable_scaler_full_line = xyes; then
+ AC_DEFINE(C_SCALER_FULL_LINE,1)
+ fi
+@@ -663,7 +663,7 @@ else
+ enable_mt32=no
+ AC_MSG_RESULT(no)
+ fi
+-AM_CONDITIONAL(C_MT32, test "x$enable_mt32" == "xyes")
++AM_CONDITIONAL(C_MT32, test "x$enable_mt32" = "xyes")
+
+ dnl NASM (Netwide Assembler)
+ AC_PATH_PROG([NASM], [nasm])
+@@ -993,7 +993,7 @@ else
+ AC_MSG_RESULT(no)
+ fi
+
+-AM_CONDITIONAL(C_DIRECT3D, test x"$do_d3d" == x"1")
++AM_CONDITIONAL(C_DIRECT3D, test x"$do_d3d" = x"1")
+
+ AH_TEMPLATE(C_ICONV,[Define to 1 to use GNU libiconv])
+ if test x$have_iconv_h = xyes; then
diff --git a/emulators/dosbox-x/patches/patch-include_byteorder.h b/emulators/dosbox-x/patches/patch-include_byteorder.h
new file mode 100644
index 00000000000..e1a9a7db23c
--- /dev/null
+++ b/emulators/dosbox-x/patches/patch-include_byteorder.h
@@ -0,0 +1,20 @@
+$NetBSD: patch-include_byteorder.h,v 1.1 2019/09/22 09:54:14 nia Exp $
+
+Include the correct endian.h on NetBSD.
+
+--- include/byteorder.h.orig 2018-11-22 06:17:27.000000000 +0000
++++ include/byteorder.h
+@@ -115,11 +115,11 @@
+ #define _BSD_SOURCE
+ #include <endian.h>
+
+-#elif defined(__OpenBSD__)
++#elif defined(__OpenBSD__) || defined(__NetBSD__)
+
+ #include <sys/endian.h>
+
+-#elif defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__)
++#elif defined(__FreeBSD__) || defined(__DragonFly__)
+
+ #include <sys/endian.h>
+
diff --git a/emulators/dosbox-x/patches/patch-include_dos__inc.h b/emulators/dosbox-x/patches/patch-include_dos__inc.h
new file mode 100644
index 00000000000..215ccc9fd3d
--- /dev/null
+++ b/emulators/dosbox-x/patches/patch-include_dos__inc.h
@@ -0,0 +1,17 @@
+$NetBSD: patch-include_dos__inc.h,v 1.1 2019/09/22 09:54:14 nia Exp $
+
+Use ftello and fseeko on NetBSD.
+
+--- include/dos_inc.h.orig 2019-04-06 04:12:19.000000000 +0000
++++ include/dos_inc.h
+@@ -290,6 +290,10 @@ static INLINE Bit16u DOS_PackDate(Bit16u
+ #define fopen64 fopen
+ #define ftello64 ftello
+ #define fseeko64 fseeko
++#elif defined (__NetBSD__)
++ #define fopen64 fopen
++ #define ftello64 ftello
++ #define fseeko64 fseeko
+ #elif defined (_MSC_VER)
+ #define fopen64 fopen
+ #if (_MSC_VER >= 1400)