From 9629ef3f969e31dfd19efa27e62487fc46610416 Mon Sep 17 00:00:00 2001 From: Stefan Radomski Date: Tue, 7 Jan 2014 13:56:46 +0100 Subject: Fixes for the Prolog datamodel --- CMakeLists.txt | 6 +++++- contrib/build-scripts/build-swi-macosx.sh | 14 +++++++++++--- contrib/build-scripts/pidgin-configure | 1 + contrib/cmake/FindSWI.cmake | 2 +- src/uscxml/Message.cpp | 2 +- src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.cpp | 4 ++-- test/samples/uscxml/test-prolog.scxml | 7 +++---- 7 files changed, 24 insertions(+), 12 deletions(-) create mode 100644 contrib/build-scripts/pidgin-configure diff --git a/CMakeLists.txt b/CMakeLists.txt index da50553..8d0f671 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -339,6 +339,10 @@ if(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") add_definitions(-Wno-narrowing) endif() + if(GCC_VERSION VERSION_EQUAL 4.8 OR GCC_VERSION VERSION_GREATER 4.8) + add_definitions(-Wno-unused-local-typedefs) + endif() + # swig will throw a warning with optimization otherwise add_definitions(-fno-strict-aliasing) add_definitions("-Wno-unused-value -Wno-sign-compare") @@ -515,7 +519,7 @@ if (NOT WIN32) # message("CMAKE_FIND_ROOT_PATH: ${CMAKE_FIND_ROOT_PATH}") # MacOSX Mavericks moved libxml2 into SDK - if (APPLE AND ${MACOSX_VERSION} VERSION_LESS "10.9.0") + if (APPLE AND "${MACOSX_VERSION}" VERSION_LESS "10.9.0") set(PC_LIBXML_INCLUDEDIR "/usr/include/libxml2/") endif() diff --git a/contrib/build-scripts/build-swi-macosx.sh b/contrib/build-scripts/build-swi-macosx.sh index b2618cc..42e0a51 100755 --- a/contrib/build-scripts/build-swi-macosx.sh +++ b/contrib/build-scripts/build-swi-macosx.sh @@ -29,13 +29,21 @@ if [ -f Makefile ]; then make clean fi +if [ ${MACOSX_COMP[1]} -lt 9 ]; then + export CXXFLAGS="-mmacosx-version-min=10.6 -stdlib=libstdc++ -arch x86_64 -arch i386" + export CFLAGS="-mmacosx-version-min=10.6 -arch x86_64 -arch i386" + export LDFLAGS="-stdlib=libstdc++" +else + export CXXFLAGS="-mmacosx-version-min=10.7 -stdlib=libc++ -arch x86_64 -arch i386" + export CFLAGS="-mmacosx-version-min=10.7 -stdlib=libc++ -arch x86_64 -arch i386" + export LDFLAGS="-stdlib=libc++" +fi + #CPPFLAGS="-DHAVE_CURSES_H=0 -DHAVE_TGETENT=0 -DHAVE_TCSETATTR=0 -DHAVE_TERM_H=0 -DHAVE_LIBNCURSES=0" \ ./configure \ -CFLAGS="-mmacosx-version-min=10.6 -arch x86_64 -arch i386" \ -CXXFLAGS="-mmacosx-version-min=10.6 -arch x86_64 -arch i386" \ -LDFLAGS="-mmacosx-version-min=10.6 -arch x86_64 -arch i386" \ --disable-gmp --disable-readline \ +--without-jpl \ --prefix=${DEST_DIR} sed -ie 's/define HAVE_CURSES_H 1/undef HAVE_CURSES_H/' config.h diff --git a/contrib/build-scripts/pidgin-configure b/contrib/build-scripts/pidgin-configure new file mode 100644 index 0000000..34a9ffe --- /dev/null +++ b/contrib/build-scripts/pidgin-configure @@ -0,0 +1 @@ +./configure --disable-nls --disable-gtkui --disable-consoleui --disable-gstreamer --disable-vv --disable-meanwhile --disable-avahi --disable-dbus --disable-gnome-keyring --disable-kwallet --disable-nss --disable-gnutls --disable-tcl --disable-perl --disable-tk --enable-static --with-pic \ No newline at end of file diff --git a/contrib/cmake/FindSWI.cmake b/contrib/cmake/FindSWI.cmake index acea32c..cb4d8b3 100644 --- a/contrib/cmake/FindSWI.cmake +++ b/contrib/cmake/FindSWI.cmake @@ -8,7 +8,7 @@ if (UNIX) if (APPLE AND 64BIT_HOST) set(SWI_PLATFORM_ID "x86_64-${CMAKE_SYSTEM_NAME}${CMAKE_SYSTEM_VERSION}") else() - set(SWI_PLATFORM_ID "${CMAKE_SYSTEM_PROCESSOR}-${CMAKE_SYSTEM_NAME}${CMAKE_SYSTEM_VERSION}") + set(SWI_PLATFORM_ID "${CMAKE_SYSTEM_PROCESSOR}-${CMAKE_SYSTEM_NAME}") endif() else() set(SWI_PLATFORM_ID "${CMAKE_SYSTEM_PROCESSOR}-windows") diff --git a/src/uscxml/Message.cpp b/src/uscxml/Message.cpp index 26cf640..4591484 100644 --- a/src/uscxml/Message.cpp +++ b/src/uscxml/Message.cpp @@ -62,7 +62,7 @@ Blob::Blob(void* _data, size_t _size, const std::string& _mimeType, bool adopt) } #if 0 -// there used to work base64 encoded images in a browser - can't check extensively just now +// this used to work base64 encoded images in a browser - can't check extensively just now static const std::string base64_chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "abcdefghijklmnopqrstuvwxyz" diff --git a/src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.cpp b/src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.cpp index 9a0a831..4786903 100644 --- a/src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.cpp +++ b/src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.cpp @@ -471,9 +471,9 @@ void SWIDataModel::assign(const Element& assignElem, std::stringstream dataInitStr; std::stringstream xmlDoc; Node child = node; - while(node) { + while(child) { xmlDoc << child; - child = node.getNextSibling(); + child = child.getNextSibling(); } domUrl = URL::toLocalFile(xmlDoc.str(), ".pl"); if (iequals(type, "retract")) diff --git a/test/samples/uscxml/test-prolog.scxml b/test/samples/uscxml/test-prolog.scxml index dd299a0..a0a79cb 100644 --- a/test/samples/uscxml/test-prolog.scxml +++ b/test/samples/uscxml/test-prolog.scxml @@ -23,7 +23,7 @@ - + @@ -65,8 +65,7 @@ - -- cgit v0.12