#! /bin/sh /usr/share/dpatch/dpatch-run ## 02_libwpd0_9.dpatch by ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: No description. @DPATCH@ --- a/configure +++ b/configure @@ -10325,12 +10325,13 @@ if test -n "$LIBWPG_CFLAGS"; then pkg_cv_LIBWPG_CFLAGS="$LIBWPG_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libwpg-0.1 libwpg-stream-0.1\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libwpg-0.1 libwpg-stream-0.1") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libwpg-0.2 libwpd-0.9 libwpd-stream-0.9\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libwpg-0.2 libwpd-0.9 libwpd-stream-0.9") 2>&5 + ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_LIBWPG_CFLAGS=`$PKG_CONFIG --cflags "libwpg-0.1 libwpg-stream-0.1" 2>/dev/null` + pkg_cv_LIBWPG_CFLAGS=`$PKG_CONFIG --cflags "libwpg-0.2 libwpd-0.9 libwpd-stream-0.9" 2>/dev/null` else pkg_failed=yes fi @@ -10341,12 +10342,13 @@ if test -n "$LIBWPG_LIBS"; then pkg_cv_LIBWPG_LIBS="$LIBWPG_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libwpg-0.1 libwpg-stream-0.1\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libwpg-0.1 libwpg-stream-0.1") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libwpg-0.2 libwpd-0.9 libwpd-stream-0.9\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libwpg-0.2 libwpd-0.9 libwpd-stream-0.9") 2>&5 + ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_LIBWPG_LIBS=`$PKG_CONFIG --libs "libwpg-0.1 libwpg-stream-0.1" 2>/dev/null` + pkg_cv_LIBWPG_LIBS=`$PKG_CONFIG --libs "libwpg-0.2 libwpd-0.9 libwpd-stream-0.9" 2>/dev/null` else pkg_failed=yes fi @@ -10366,9 +10368,9 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - LIBWPG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libwpg-0.1 libwpg-stream-0.1" 2>&1` + LIBWPG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libwpg-0.2 libwpd-0.9 libwpd-stream-0.9" 2>&1` else - LIBWPG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libwpg-0.1 libwpg-stream-0.1" 2>&1` + LIBWPG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libwpg-0.2 libwpd-0.9 libwpd-stream-0.9" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBWPG_PKG_ERRORS" >&5 --- a/configure.ac +++ b/configure.ac @@ -699,7 +699,7 @@ dnl ****************************** dnl Check for libwpg for extension dnl ****************************** -PKG_CHECK_MODULES(LIBWPG, libwpg-0.1 libwpg-stream-0.1, with_libwpg=yes, with_libwpg=no) +PKG_CHECK_MODULES(LIBWPG, libwpg-0.2 libwpd-0.9 libwpd-stream-0.9, with_libwpg=yes, with_libwpg=no) if test "x$with_libwpg" = "xyes"; then AC_DEFINE(WITH_LIBWPG,1,[Build in libwpg]) fi --- inkscape-0.48.0~/src/extension/internal/wpg-input.cpp 2010-07-13 05:48:40.000000000 +0200 +++ inkscape-0.48.0/src/extension/internal/wpg-input.cpp 2010-11-24 15:57:38.000000000 +0100 @@ -49,7 +49,7 @@ #include "document.h" #include "libwpg/libwpg.h" -#include "libwpg/WPGStreamImplementation.h" +#include "libwpd-stream/libwpd-stream.h" using namespace libwpg; @@ -61,9 +61,9 @@ SPDocument * WpgInput::open(Inkscape::Extension::Input * mod, const gchar * uri) { - WPXInputStream* input = new libwpg::WPGFileStream(uri); + WPXInputStream* input = new WPXFileStream(uri); if (input->isOLEStream()) { - WPXInputStream* olestream = input->getDocumentOLEStream(); + WPXInputStream* olestream = input->getDocumentOLEStream("PerfectOffice_MAIN"); if (olestream) { delete input; input = olestream; @@ -78,7 +78,7 @@ return NULL; } - libwpg::WPGString output; + WPXString output; if (!libwpg::WPGraphics::generateSVG(input, output)) { delete input; return NULL;