1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
|
Description: Use the packaged tinyxml2
Author: Stephen Kitt <skitt@debian.org>
Last-Update: 2023-01-28
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/BasiliskII/src/Unix/configure.ac
+++ b/BasiliskII/src/Unix/configure.ac
@@ -1943,6 +1943,13 @@
CFLAGS="$CFLAGS -fwrapv"
CXXFLAGS="$CXXFLAGS -fwrapv"
+dnl Check for tinyxml2
+PKG_CHECK_MODULES([tinyxml2], [tinyxml2], [
+ CFLAGS="$CFLAGS $tinyxml2_CFLAGS"
+ CXXFLAGS="$CXXFLAGS $tinyxml2_CFLAGS"
+ LIBS="$LIBS $tinyxml2_LIBS"
+])
+
dnl Generate Makefile.
AC_SUBST(DEFINES)
AC_SUBST(SYSSRCS)
--- a/BasiliskII/src/Unix/disk_sparsebundle.cpp
+++ b/BasiliskII/src/Unix/disk_sparsebundle.cpp
@@ -19,7 +19,7 @@
*/
#include "disk_unix.h"
-#include "tinyxml2.h"
+#include <tinyxml2.h>
#include <errno.h>
#include <limits.h>
@@ -180,7 +180,7 @@
-using tinyxml2::XML_NO_ERROR;
+using tinyxml2::XML_SUCCESS;
using tinyxml2::XMLElement;
// Simplistic plist parser
@@ -188,7 +188,7 @@
plist() : doc(true, tinyxml2::COLLAPSE_WHITESPACE) { }
bool open(const char *path) {
- if (doc.LoadFile(path) != XML_NO_ERROR)
+ if (doc.LoadFile(path) != XML_SUCCESS)
return false;
tinyxml2::XMLHandle hnd(&doc);
dict = hnd.FirstChildElement("plist").FirstChildElement("dict")
--- a/BasiliskII/src/Unix/Makefile.in
+++ b/BasiliskII/src/Unix/Makefile.in
@@ -58,7 +58,6 @@
timer_unix.cpp ../adb.cpp ../serial.cpp ../ether.cpp \
../sony.cpp ../disk.cpp ../cdrom.cpp ../scsi.cpp ../video.cpp \
../audio.cpp ../extfs.cpp disk_sparsebundle.cpp \
- tinyxml2.cpp \
../user_strings.cpp user_strings_unix.cpp sshpty.c strlcpy.c rpc_unix.cpp \
$(XPLAT_SRCS) $(SYSSRCS) $(CPUSRCS) $(SLIRP_SRCS)
APP_FLAVOR ?=
|