sortix-mirror/ports/bochs/bochs.patch

250 lines
11 KiB
Diff

diff --no-dereference -Naur -- bochs.normalized/config.sub bochs.srctix/config.sub
--- bochs.normalized/config.sub 2012-09-02 13:30:15.000000000 +0200
+++ bochs.srctix/config.sub 2013-02-12 22:03:01.826871690 +0100
@@ -1297,7 +1297,7 @@
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
| -sym* | -kopensolaris* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* | -aros* \
+ | -aos* | -aros* | -sortix* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
diff --no-dereference -Naur -- bochs.normalized/configure bochs.srctix/configure
--- bochs.normalized/configure 2012-09-02 13:30:15.000000000 +0200
+++ bochs.srctix/configure 2013-11-23 01:39:10.809388604 +0100
@@ -23755,7 +23755,7 @@
if test "$with_sdl" = yes; then
SOUNDLOW_OBJS="$SOUNDLOW_OBJS soundsdl.o"
if test "$bx_plugins" = 1; then
- SOUND_LINK_OPTS="$SOUND_LINK_OPTS `sdl-config --libs`"
+ SOUND_LINK_OPTS="$SOUND_LINK_OPTS `${PKG_CONFIG:-pkg-config} sdl --libs`"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: sdl" >&5
$as_echo "sdl" >&6; }
@@ -24199,7 +24199,7 @@
SPECIFIC_GUI_OBJS="$SPECIFIC_GUI_OBJS \$(GUI_OBJS_SDL)"
# GUI_*FLAGS are added to the compilation of every bochs file, not just
# the files in gui/*.cc.
- SDL_CFLAGS=`sdl-config --cflags`
+ SDL_CFLAGS=`${PKG_CONFIG:-pkg-config} sdl --cflags`
GUI_CFLAGS="$GUI_CFLAGS $SDL_CFLAGS"
GUI_CXXFLAGS="$GUI_CXXFLAGS $SDL_CFLAGS"
GUI_LINK_OPTS="$GUI_LINK_OPTS \$(GUI_LINK_OPTS_SDL)"
diff --no-dereference -Naur -- bochs.normalized/configure.in bochs.srctix/configure.in
--- bochs.normalized/configure.in 2012-09-02 13:30:15.000000000 +0200
+++ bochs.srctix/configure.in 2013-11-23 01:39:10.817388604 +0100
@@ -1805,7 +1805,7 @@
if test "$with_sdl" = yes; then
SOUNDLOW_OBJS="$SOUNDLOW_OBJS soundsdl.o"
if test "$bx_plugins" = 1; then
- SOUND_LINK_OPTS="$SOUND_LINK_OPTS `sdl-config --libs`"
+ SOUND_LINK_OPTS="$SOUND_LINK_OPTS `${PKG_CONFIG:-pkg-config} sdl --libs`"
fi
AC_MSG_RESULT(sdl)
else
@@ -2102,7 +2102,7 @@
SPECIFIC_GUI_OBJS="$SPECIFIC_GUI_OBJS \$(GUI_OBJS_SDL)"
# GUI_*FLAGS are added to the compilation of every bochs file, not just
# the files in gui/*.cc.
- SDL_CFLAGS=`sdl-config --cflags`
+ SDL_CFLAGS=`${PKG_CONFIG:-pkg-config} sdl --cflags`
GUI_CFLAGS="$GUI_CFLAGS $SDL_CFLAGS"
GUI_CXXFLAGS="$GUI_CXXFLAGS $SDL_CFLAGS"
GUI_LINK_OPTS="$GUI_LINK_OPTS \$(GUI_LINK_OPTS_SDL)"
diff --no-dereference -Naur -- bochs.normalized/cpu/debugstuff.cc bochs.srctix/cpu/debugstuff.cc
--- bochs.normalized/cpu/debugstuff.cc 2012-09-02 13:29:47.000000000 +0200
+++ bochs.srctix/cpu/debugstuff.cc 2015-02-07 16:38:47.621281077 +0100
@@ -256,8 +256,8 @@
(unsigned) BX_CPU_THIS_PTR cr0.get32(),
(unsigned) BX_CPU_THIS_PTR cr2, (unsigned) BX_CPU_THIS_PTR cr3));
#else
- BX_INFO(("| CR0=0x%08x CR2=0x%08x",
- BX_CPU_THIS_PTR cr0.get32(), BX_CPU_THIS_PTR cr2));
+ BX_INFO(("| CR0=0x%08x CR2=0x%08jx",
+ BX_CPU_THIS_PTR cr0.get32(), (uintmax_t)BX_CPU_THIS_PTR cr2));
BX_INFO(("| CR3=0x%08x CR4=0x%08x",
(unsigned) BX_CPU_THIS_PTR cr3,
(unsigned) BX_CPU_THIS_PTR cr4.get32()));
diff --no-dereference -Naur -- bochs.normalized/cpu/fetchdecode.cc bochs.srctix/cpu/fetchdecode.cc
--- bochs.normalized/cpu/fetchdecode.cc 2012-09-02 13:29:47.000000000 +0200
+++ bochs.srctix/cpu/fetchdecode.cc 2015-02-07 16:38:47.625281077 +0100
@@ -2010,8 +2010,8 @@
#endif
}
else {
- BX_DEBUG(("%s: instruction not supported - signalling #UD (features bitmask: 0x%08x)",
- get_bx_opcode_name(ia_opcode), BX_CPU_THIS_PTR isa_extensions_bitmask));
+ BX_DEBUG(("%s: instruction not supported - signalling #UD (features bitmask: 0x%08jx)",
+ get_bx_opcode_name(ia_opcode), (uintmax_t)BX_CPU_THIS_PTR isa_extensions_bitmask));
}
exception(BX_UD_EXCEPTION, 0);
diff --no-dereference -Naur -- bochs.normalized/doc/docbook/Makefile.in bochs.srctix/doc/docbook/Makefile.in
--- bochs.normalized/doc/docbook/Makefile.in 2012-09-02 13:29:51.000000000 +0200
+++ bochs.srctix/doc/docbook/Makefile.in 2014-06-22 22:30:19.322670941 +0200
@@ -15,7 +15,7 @@
TARGZ = bochsdoc.tar.gz
RENDERED_DOC_URL = http://bochs.sf.net/doc/docbook/$(TARGZ)
-DESTDIR=
+DESTDIR?=
# name of the major documentation sections
SECTIONS=user documentation development
diff --no-dereference -Naur -- bochs.normalized/fpu/fpu.cc bochs.srctix/fpu/fpu.cc
--- bochs.normalized/fpu/fpu.cc 2012-09-02 13:30:08.000000000 +0200
+++ bochs.srctix/fpu/fpu.cc 2015-02-07 16:38:47.625281077 +0100
@@ -582,7 +582,7 @@
f *= fp.fraction*scale_factor;
#endif
float_class_t f_class = floatx80_class(fp);
- fprintf(stderr, "%sFP%d ST%d(%c): raw 0x%04x:%08lx%08lx (%.10f) (%s)\n",
+ fprintf(stderr, "%sFP%d ST%d(%c): raw 0x%04x:%08x%08x (%.10f) (%s)\n",
i==tos?"=>":" ", i, (i-tos)&7,
"v0se"[tag],
fp.exp & 0xffff, GET32H(fp.fraction), GET32L(fp.fraction),
diff --no-dereference -Naur -- bochs.normalized/gui/Makefile.in bochs.srctix/gui/Makefile.in
--- bochs.normalized/gui/Makefile.in 2012-09-02 13:29:57.000000000 +0200
+++ bochs.srctix/gui/Makefile.in 2013-11-23 01:39:10.833388605 +0100
@@ -69,7 +69,7 @@
X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
GUI_LINK_OPTS_X = $(X_LIBS) $(X_PRE_LIBS)
-GUI_LINK_OPTS_SDL = `sdl-config --cflags --libs`
+GUI_LINK_OPTS_SDL = `$${PKG_CONFIG:-pkg-config} sdl --cflags --libs`
GUI_LINK_OPTS_SVGA = -lvga -lvgagl
GUI_LINK_OPTS_RFB = @RFB_LIBS@
GUI_LINK_OPTS_AMIGAOS =
diff --no-dereference -Naur -- bochs.normalized/iodev/serial.cc bochs.srctix/iodev/serial.cc
--- bochs.normalized/iodev/serial.cc 2012-09-02 13:30:13.000000000 +0200
+++ bochs.srctix/iodev/serial.cc 2014-12-27 14:52:01.203450041 +0100
@@ -39,6 +39,18 @@
typedef int SOCKET;
#endif
+#if defined(__sortix__)
+struct hostent
+{
+ char *h_name;
+ char **h_aliases;
+ int h_addrtype;
+ int h_length;
+ char **h_addr_list;
+};
+#define gethostbyname(a) ((void) a, (struct hostent*) NULL)
+#endif
+
#include "iodev.h"
#include "serial.h"
@@ -462,9 +474,9 @@
memset ((char*) &sin, 0, sizeof (sin));
#if BX_HAVE_SOCKADDR_IN_SIN_LEN
- sin.sin_len = sizeof sin;
+ sin.sin_len = sizeof sin;
#endif
- memcpy ((char*) &(sin.sin_addr), hp->h_addr, hp->h_length);
+ memcpy ((char*) &(sin.sin_addr), hp->h_addr_list[0], hp->h_length);
sin.sin_family = hp->h_addrtype;
sin.sin_port = htons (port);
diff --no-dereference -Naur -- bochs.normalized/iodev/vgacore.cc bochs.srctix/iodev/vgacore.cc
--- bochs.normalized/iodev/vgacore.cc 2012-09-02 13:30:13.000000000 +0200
+++ bochs.srctix/iodev/vgacore.cc 2013-03-30 15:31:57.906642341 +0100
@@ -387,9 +387,9 @@
void bx_vgacore_c::determine_screen_dimensions(unsigned *piHeight, unsigned *piWidth)
{
- int ai[0x20];
+ int ai[20];
int i,h,v;
- for (i = 0 ; i < 0x20 ; i++)
+ for (i = 0 ; i < 20 ; i++)
ai[i] = BX_VGA_THIS s.CRTC.reg[i];
h = (ai[1] + 1) * 8;
diff --no-dereference -Naur -- bochs.normalized/Makefile.in bochs.srctix/Makefile.in
--- bochs.normalized/Makefile.in 2012-09-02 13:30:15.000000000 +0200
+++ bochs.srctix/Makefile.in 2013-11-23 01:39:10.837388604 +0100
@@ -35,7 +35,7 @@
top_builddir = .
top_srcdir = $(srcdir)
-DESTDIR =
+DESTDIR ?=
VERSION=@VERSION@
VER_STRING=@VER_STRING@
@@ -96,7 +96,7 @@
X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
GUI_LINK_OPTS_X = $(X_LIBS) $(X_PRE_LIBS)
-GUI_LINK_OPTS_SDL = `sdl-config --cflags --libs`
+GUI_LINK_OPTS_SDL = `$${PKG_CONFIG:-pkg-config} sdl --cflags --libs`
GUI_LINK_OPTS_SVGA = -lvga -lvgagl
GUI_LINK_OPTS_RFB = @RFB_LIBS@
GUI_LINK_OPTS_AMIGAOS =
@@ -623,6 +623,8 @@
@CD_UP_THREE@
@RMCOMMAND@ Makefile
+distclean: dist-clean
+
###########################################
# Build app on MacOS X
###########################################
diff --no-dereference -Naur -- bochs.normalized/memory/misc_mem.cc bochs.srctix/memory/misc_mem.cc
--- bochs.normalized/memory/misc_mem.cc 2012-09-02 13:29:51.000000000 +0200
+++ bochs.srctix/memory/misc_mem.cc 2016-01-26 17:03:48.524277893 +0100
@@ -158,12 +158,12 @@
const Bit64u block_address = ((Bit64u)block)*BX_MEM_BLOCK_LEN;
if (fseeko64(BX_MEM_THIS overflow_file, block_address, SEEK_SET))
- BX_PANIC(("FATAL ERROR: Could not seek to 0x%lx in memory overflow file!", block_address));
+ BX_PANIC(("FATAL ERROR: Could not seek to 0x%llx in memory overflow file!", (unsigned long long) block_address));
// We could legitimately get an EOF condition if we are reading the last bit of memory.ram
if ((fread(BX_MEM_THIS blocks[block], BX_MEM_BLOCK_LEN, 1, BX_MEM_THIS overflow_file) != 1) &&
(!feof(BX_MEM_THIS overflow_file)))
- BX_PANIC(("FATAL ERROR: Could not read from 0x%lx in memory overflow file!", block_address));
+ BX_PANIC(("FATAL ERROR: Could not read from 0x%llx in memory overflow file!", (unsigned long long) block_address));
}
#endif
@@ -208,9 +208,9 @@
}
// Write swapped out block
if (fseeko64(BX_MEM_THIS overflow_file, address, SEEK_SET))
- BX_PANIC(("FATAL ERROR: Could not seek to 0x%llx in overflow file!", address));
+ BX_PANIC(("FATAL ERROR: Could not seek to 0x%llx in overflow file!", (unsigned long long)address));
if (1 != fwrite (BX_MEM_THIS blocks[BX_MEM_THIS next_swapout_idx], BX_MEM_BLOCK_LEN, 1, BX_MEM_THIS overflow_file))
- BX_PANIC(("FATAL ERROR: Could not write at 0x%llx in overflow file!", address));
+ BX_PANIC(("FATAL ERROR: Could not write at 0x%llx in overflow file!", (unsigned long long)address));
// Mark swapped out block
BX_MEM_THIS blocks[BX_MEM_THIS next_swapout_idx] = BX_MEM_C::swapped_out;
BX_MEM_THIS blocks[block] = buffer;
@@ -245,9 +245,9 @@
{
bx_phy_address address = ((bx_phy_address)idx)*BX_MEM_BLOCK_LEN;
if (fseeko64(fp, address, SEEK_SET))
- BX_PANIC(("FATAL ERROR: Could not seek to 0x%llx in overflow file!", address));
+ BX_PANIC(("FATAL ERROR: Could not seek to 0x%llx in overflow file!", (unsigned long long)address));
if (1 != fwrite (BX_MEM(0)->blocks[idx], BX_MEM_BLOCK_LEN, 1, fp))
- BX_PANIC(("FATAL ERROR: Could not write at 0x%llx in overflow file!", address));
+ BX_PANIC(("FATAL ERROR: Could not write at 0x%llx in overflow file!", (unsigned long long)address));
}
}
}
diff --no-dereference -Naur -- bochs.normalized/tixbuildinfo bochs.srctix/tixbuildinfo
--- bochs.normalized/tixbuildinfo 1970-01-01 01:00:00.000000000 +0100
+++ bochs.srctix/tixbuildinfo 2013-11-23 01:39:10.849388605 +0100
@@ -0,0 +1,6 @@
+tix.version=1
+tix.class=srctix
+pkg.name=bochs
+pkg.build-libraries=libstdc++ libiconv libSDL
+pkg.build-system=configure
+pkg.configure.args=--with-sdl --enable-x86-64