Hello community, here is the log from the commit of package gambas3 for openSUSE:Factory checked in at 2017-09-20 17:13:38 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/gambas3 (Old) and /work/SRC/openSUSE:Factory/.gambas3.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gambas3" Wed Sep 20 17:13:38 2017 rev:4 rq:527446 version:3.10.0 Changes: -------- --- /work/SRC/openSUSE:Factory/gambas3/gambas3.changes 2017-08-29 11:47:28.251650333 +0200 +++ /work/SRC/openSUSE:Factory/.gambas3.new/gambas3.changes 2017-09-20 17:13:39.817339967 +0200 @@ -1,0 +2,7 @@ +Tue Sep 19 21:27:26 UTC 2017 - [email protected] + +- Add gambas3-adapt-to-poppler-058.patch: Adapt to poppler 0.58 api + changes. +- Drop obsolete and unused pkgconfig(webkit-1.0) BuildRequires. + +------------------------------------------------------------------- New: ---- gambas3-adapt-to-poppler-058.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ gambas3.spec ++++++ --- /var/tmp/diff_new_pack.mosoiH/_old 2017-09-20 17:13:41.009172193 +0200 +++ /var/tmp/diff_new_pack.mosoiH/_new 2017-09-20 17:13:41.017171068 +0200 @@ -38,6 +38,8 @@ Patch0: gambas3-mime_translation.patch # PATCH-FIX-OPENSUSE llvm.patch [email protected] -- Change the location for an header files Patch1: gambas3-3.10.0-llvm.patch +# PATCH-FIX-UPSTREAM gambas3-adapt-to-poppler-058.patch [email protected] -- Adapt to poppler 0.58 api changes +Patch2: gambas3-adapt-to-poppler-058.patch BuildRequires: SDL_image BuildRequires: aalib-devel BuildRequires: atk-devel @@ -102,7 +104,6 @@ BuildRequires: pkgconfig(sdl2) BuildRequires: pkgconfig(sqlite3) BuildRequires: pkgconfig(vorbis) -BuildRequires: pkgconfig(webkit-1.0) BuildRequires: pkgconfig(xtst) BuildRequires: pkgconfig(zlib) %if !%{with qt4} @@ -1124,6 +1125,7 @@ %setup -q %patch0 -p1 %patch1 -p1 +%patch2 -p1 # don't compile in DATE and TIME BUILDTIME=$(LC_ALL=C date -ur %{_sourcedir}/%{name}.changes +'%H:%M') ++++++ gambas3-adapt-to-poppler-058.patch ++++++ >From 6a4adabfd7e02e6fef99049e8e2373b12b559e69 Mon Sep 17 00:00:00 2001 From: David Tardon <[email protected]> Date: Wed, 6 Sep 2017 12:58:12 +0200 Subject: [PATCH] adapt to poppler 0.58 --- gb.pdf/configure.ac | 2 ++ gb.pdf/src/CPdfDocument.cpp | 24 ++++++++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/gb.pdf/configure.ac b/gb.pdf/configure.ac index 25b344a9a..be4bf9557 100644 --- a/gb.pdf/configure.ac +++ b/gb.pdf/configure.ac @@ -29,6 +29,8 @@ if test "$have_poppler" = "yes"; then AC_DEFINE_UNQUOTED(POPPLER_VERSION_0_17, $((1-$?)), Poppler version >= 0.17) pkg-config --atleast-version=0.20.0 poppler AC_DEFINE_UNQUOTED(POPPLER_VERSION_0_20, $((1-$?)), Poppler version >= 0.20) + pkg-config --atleast-version=0.58.0 poppler + AC_DEFINE_UNQUOTED(POPPLER_VERSION_0_58, $((1-$?)), Poppler version >= 0.58) fi AC_OUTPUT( \ diff --git a/gb.pdf/src/CPdfDocument.cpp b/gb.pdf/src/CPdfDocument.cpp index 43802c77b..80d2d97c5 100644 --- a/gb.pdf/src/CPdfDocument.cpp +++ b/gb.pdf/src/CPdfDocument.cpp @@ -132,11 +132,19 @@ static void aux_return_string_info(void *_object, const char *key) Dict *info_dict; char *tmpstr; + #if POPPLER_VERSION_0_58 + obj = THIS->doc->getDocInfo (); + #else THIS->doc->getDocInfo (&obj); + #endif if (!obj.isDict()) { GB.ReturnNewZeroString(""); return; } info_dict=obj.getDict(); + #if POPPLER_VERSION_0_58 + dst = info_dict->lookup ((char *)key); + #else info_dict->lookup ((char *)key, &dst); + #endif if (!dst.isString ()) { GB.ReturnNewZeroString(""); } else { goo_value = dst.getString(); @@ -149,8 +157,10 @@ static void aux_return_string_info(void *_object, const char *key) else GB.ReturnNewString(goo_value->getCString(),goo_value->getLength()); } + #if ! POPPLER_VERSION_0_58 dst.free(); obj.free(); + #endif } static void aux_return_date_info(void *_object, const char *key) @@ -167,11 +177,19 @@ static void aux_return_date_info(void *_object, const char *key) GB.ReturnDate(NULL); + #if POPPLER_VERSION_0_58 + obj = THIS->doc->getDocInfo (); + #else THIS->doc->getDocInfo (&obj); + #endif if (!obj.isDict()) return; info_dict=obj.getDict(); + #if POPPLER_VERSION_0_58 + dst = info_dict->lookup ((char *)key); + #else info_dict->lookup ((char *)key, &dst); + #endif if (dst.isString ()) { goo = dst.getString(); @@ -197,8 +215,10 @@ static void aux_return_date_info(void *_object, const char *key) } if (tofree) GB.FreeString(&tofree); + #if ! POPPLER_VERSION_0_58 dst.free(); obj.free(); + #endif } static LinkDest *get_dest(LinkAction *act) @@ -426,8 +446,12 @@ int32_t open_document (void *_object, char *sfile, int32_t lfile) if ( GB.LoadFile(sfile,lfile,&buf,&len) ) return -1; + #if POPPLER_VERSION_0_58 + stream=new MemStream(buf,0,(Guint)len,std::move(obj)); + #else obj.initNull(); stream=new MemStream(buf,0,(Guint)len,&obj); + #endif test=new PDFDoc (stream,0,0); if (!test->isOk()) -- 2.13.5
