Skip to content

Commit

Permalink
dosbox-x: Don't assume anything that 80-bit long double.
Browse files Browse the repository at this point in the history
Add missing SDL_net dependency.

bump PKGREVISION.
  • Loading branch information
alarixnia committed Jan 5, 2021
1 parent fdd256d commit 3542ced
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 14 deletions.
8 changes: 7 additions & 1 deletion emulators/dosbox-x/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# $NetBSD: Makefile,v 1.26 2020/12/03 14:03:19 nia Exp $
# $NetBSD: Makefile,v 1.27 2021/01/05 11:01:49 nia Exp $

DISTNAME= dosbox-x-0.83.8
PKGREVISION= 1
CATEGORIES= emulators
MASTER_SITES= ${MASTER_SITE_GITHUB:=joncampbell123/}
GITHUB_TAG= dosbox-x-v${PKGVERSION_NOREV}
Expand Down Expand Up @@ -55,6 +56,10 @@ INSTALLATION_DIRS+= share/pixmaps

CHECK_PORTABILITY_SKIP+= vs2015/sdl2/build-scripts/androidbuildlibs.sh
CHECK_PORTABILITY_SKIP+= vs2015/sdl2/build-scripts/iosbuild.sh
CHECK_PORTABILITY_SKIP+= make-flatpak-sdl2.sh
CHECK_PORTABILITY_SKIP+= make-flatpak.sh
# [[ is used in an developer target that isn't useful for us
CHECK_PORTABILITY_SKIP+= Makefile.in Makefile.am

BUILDLINK_TRANSFORM+= rm:-Wno-int-to-void-pointer-cast
BUILDLINK_TRANSFORM+= rm:-Wno-address-of-packed-member
Expand All @@ -78,6 +83,7 @@ do-install:
.include "options.mk"
.include "../../audio/fluidsynth/buildlink3.mk"
.include "../../devel/SDL2/buildlink3.mk"
.include "../../net/SDL2_net/buildlink3.mk"
.include "../../graphics/png/buildlink3.mk"
.include "../../net/libpcap/buildlink3.mk"
.include "../../sysutils/desktop-file-utils/desktopdb.mk"
Expand Down
4 changes: 2 additions & 2 deletions emulators/dosbox-x/distinfo
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
$NetBSD: distinfo,v 1.15 2020/12/03 14:03:19 nia Exp $
$NetBSD: distinfo,v 1.16 2021/01/05 11:01:49 nia Exp $

SHA1 (dosbox-x-0.83.8.tar.gz) = 25084d9903544ffe954bde2d3ad0d649e8f2eaa0
RMD160 (dosbox-x-0.83.8.tar.gz) = 067fb76cefde0e30dd049f04c4a2d0baf4fd54bd
SHA512 (dosbox-x-0.83.8.tar.gz) = 61c75460ac71bb41a654354eb4965dc576c29456db3fd5fa41032e4071f90dce68b4f1b88a314dbb56e9c3850bd6975850d6e20efbdcffc2b14701cfd0127ec0
Size (dosbox-x-0.83.8.tar.gz) = 47950712 bytes
SHA1 (patch-configure.ac) = 915ebe5a4e1f85458e93beeeeb343fcb7ddb89bd
SHA1 (patch-include_dosbox.h) = 69f5fc59e419b46df65991de7469480807ac009d
SHA1 (patch-include_dosbox.h) = 6f7397b4a611511fc1782b1603c9f5cd51b74eb9
SHA1 (patch-src_dos_dos__programs.cpp) = 99e49762c6812b518917daf21d27d1fb8d2b1681
28 changes: 17 additions & 11 deletions emulators/dosbox-x/patches/patch-include_dosbox.h
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
$NetBSD: patch-include_dosbox.h,v 1.1 2020/11/19 17:17:15 nia Exp $
$NetBSD: patch-include_dosbox.h,v 1.2 2021/01/05 11:01:49 nia Exp $

Only attempt to use long double on x86.
GCC having 80-bit long double is far from a safe assumption.

--- include/dosbox.h.orig 2020-11-01 15:36:10.000000000 +0000
--- include/dosbox.h.orig 2020-12-01 02:49:53.000000000 +0000
+++ include/dosbox.h
@@ -72,9 +72,7 @@
// TODO: The autoconf script should test the size of long double
#if defined(_MSC_VER)
// Microsoft C++ sizeof(long double) == sizeof(double)
@@ -69,16 +69,6 @@
# define pref_struct_stat struct stat
#endif

-// TODO: The autoconf script should test the size of long double
-#if defined(_MSC_VER)
-// Microsoft C++ sizeof(long double) == sizeof(double)
-#elif defined(__arm__)
-// ARMv7 (Raspberry Pi) does not have long double, sizeof(long double) == sizeof(double)
-#else
+#elif C_TARGETCPU == X86_64 || C_TARGETCPU == X86
// GCC, other compilers, have sizeof(long double) == 10 80-bit IEEE
# define HAS_LONG_DOUBLE 1
#endif
-// GCC, other compilers, have sizeof(long double) == 10 80-bit IEEE
-# define HAS_LONG_DOUBLE 1
-#endif
-
GCC_ATTRIBUTE(noreturn) void E_Exit(const char * format,...) GCC_ATTRIBUTE( __format__(__printf__, 1, 2));

typedef Bits cpu_cycles_count_t;

0 comments on commit 3542ced

Please sign in to comment.