[arch-commits] Commit in gambas3/trunk (0001-adapt-to-poppler-0.58.patch PKGBUILD)
Laurent Carlier
lcarlier at archlinux.org
Fri Sep 15 20:26:35 UTC 2017
Date: Friday, September 15, 2017 @ 20:26:34
Author: lcarlier
Revision: 257727
upgpkg: gambas3 3.10.0-1
upstream update 3.10.0
Added:
gambas3/trunk/0001-adapt-to-poppler-0.58.patch
Modified:
gambas3/trunk/PKGBUILD
----------------------------------+
0001-adapt-to-poppler-0.58.patch | 105 +++++++++++++++++++++++++++++++++++++
PKGBUILD | 45 ++++++++++-----
2 files changed, 136 insertions(+), 14 deletions(-)
Added: 0001-adapt-to-poppler-0.58.patch
===================================================================
--- 0001-adapt-to-poppler-0.58.patch (rev 0)
+++ 0001-adapt-to-poppler-0.58.patch 2017-09-15 20:26:34 UTC (rev 257727)
@@ -0,0 +1,105 @@
+From 6a4adabfd7e02e6fef99049e8e2373b12b559e69 Mon Sep 17 00:00:00 2001
+From: David Tardon <dtardon at redhat.com>
+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
+
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2017-09-15 20:16:24 UTC (rev 257726)
+++ PKGBUILD 2017-09-15 20:26:34 UTC (rev 257727)
@@ -14,9 +14,9 @@
'gambas3-gb-qt5-opengl' 'gambas3-gb-qt5-webkit' 'gambas3-gb-qt5' 'gambas3-gb-openssl' 'gambas3-gb-report' 'gambas3-gb-scanner'
'gambas3-gb-sdl2-audio' 'gambas3-gb-sdl2' 'gambas3-gb-sdl-sound' 'gambas3-gb-sdl' 'gambas3-gb-settings' 'gambas3-gb-signal'
'gambas3-gb-util-web' 'gambas3-gb-util' 'gambas3-gb-v4l' 'gambas3-gb-vb' 'gambas3-gb-xml-html' 'gambas3-gb-xml-rpc' 'gambas3-gb-xml-xslt' 'gambas3-gb-xml'
- 'gambas3-gb-web-form' 'gambas3-gb-web' 'gambas3-runtime' 'gambas3-devel' 'gambas3-ide' 'gambas3-script')
-pkgver=3.9.2
-pkgrel=9
+ 'gambas3-gb-web-feed' 'gambas3-gb-web-form' 'gambas3-gb-web' 'gambas3-runtime' 'gambas3-devel' 'gambas3-ide' 'gambas3-script')
+pkgver=3.10.0
+pkgrel=1
pkgdesc="A free development environment based on a Basic interpreter."
arch=('i686' 'x86_64')
url="http://gambas.sourceforge.net/"
@@ -30,11 +30,12 @@
'libxslt' 'libgnome-keyring' 'gsl' 'gst-plugins-base-libs' 'alure' 'gtkglext' 'ncurses'
'gmime')
options=('!emptydirs' 'libtool')
-source=("http://downloads.sourceforge.net/gambas/${pkgbase}-${pkgver}.tar.bz2"
- 'prefer-qt5.patch' 'gambas3-gcc7.patch')
-md5sums=('e7775977ed25f944468904553d67b8f1'
+source=("${pkgbase}-${pkgver}::https://gitlab.com/gambas/gambas/repository/v${pkgver}/archive.tar.bz2"
+ 'prefer-qt5.patch' 'gambas3-gcc7.patch' '0001-adapt-to-poppler-0.58.patch')
+md5sums=('ca2bd77b4a6b0b5f2b36de335e2d4384'
'71131eb16bbdf27bf6d329f089602cf7'
- '97c31d0589c1fe0c5d35af11038f8362')
+ '97c31d0589c1fe0c5d35af11038f8362'
+ 'f82c6633e79a07e2b6542ec1ceccfbff')
create_dirs() {
install -dm755 ${pkgdir}/usr/lib/gambas3
@@ -42,18 +43,22 @@
}
prepare() {
- cd ${srcdir}/${pkgbase}-${pkgver}
+ cd ${srcdir}/gambas-v${pkgver}-*
# Fix build with GCC 7
- patch -p3 -i ../gambas3-gcc7.patch
+ #patch -p3 -i ../gambas3-gcc7.patch
# Prefer Qt5 over Qt4 for the IDE (Qt4 will not work due to the QtWebkit removal)
patch -Np1 -i ../prefer-qt5.patch
+
+ # poppler 0.58 buildfix
+ patch -Np1 -i ../0001-adapt-to-poppler-0.58.patch
+
./reconf-all
}
build() {
- cd ${srcdir}/${pkgbase}-${pkgver}
+ cd ${srcdir}/gambas-v${pkgver}-*
./configure --prefix=/usr
@@ -997,6 +1002,18 @@
mv -v usr/share/gambas3/info/gb.vb.* ${pkgdir}/usr/share/gambas3/info/
}
+package_gambas3-gb-web-feed() {
+ depends=('gambas3-gb-xml')
+ pkgdesc="Web feed parser and generator component"
+
+ cd ${srcdir}/fakeinstall
+
+ create_dirs
+
+ mv -v usr/lib/gambas3/gb.web.feed.* ${pkgdir}/usr/lib/gambas3/
+ mv -v usr/share/gambas3/info/gb.web.feed.* ${pkgdir}/usr/share/gambas3/info/
+}
+
package_gambas3-gb-web-form() {
depends=('gambas3-gb-web' 'gambas3-gb-util-web')
pkgdesc="web form component"
@@ -1086,7 +1103,7 @@
mv -v usr/bin/gb{r,x}3 ${pkgdir}/usr/bin
mv -v usr/lib/gambas3/* ${pkgdir}/usr/lib/gambas3/
mv -v usr/share/gambas3/info/* ${pkgdir}/usr/share/gambas3/info/
- install -m644 ${srcdir}/${pkgbase}-${pkgver}/main/mime/* ${pkgdir}/usr/share/gambas3/mime/
+ install -m644 ${srcdir}/gambas-v${pkgver}-*/main/mime/* ${pkgdir}/usr/share/gambas3/mime/
install -m644 ${pkgdir}/usr/share/gambas3/mime/application-x-gambas3.png ${pkgdir}/usr/share/gambas3/icons/
}
@@ -1118,8 +1135,8 @@
mv -v usr/share/appdata ${pkgdir}/usr/share/
mv -v usr/share/gambas3/template ${pkgdir}/usr/share/gambas3/
- install -m644 ${srcdir}/${pkgbase}-${pkgver}/app/desktop/gambas3.desktop ${pkgdir}/usr/share/applications/
- install -m644 ${srcdir}/${pkgbase}-${pkgver}/app/desktop/gambas3.png ${pkgdir}/usr/share/pixmaps/
+ install -m644 ${srcdir}/gambas-v${pkgver}-*/app/desktop/gambas3.desktop ${pkgdir}/usr/share/applications/
+ install -m644 ${srcdir}/gambas-v${pkgver}-*/app/desktop/gambas3.png ${pkgdir}/usr/share/pixmaps/
}
package_gambas3-script() {
@@ -1132,5 +1149,5 @@
install -dm755 ${pkgdir}/usr/share/gambas3/mime
mv -v usr/bin/gb{s,w}3* ${pkgdir}/usr/bin/
- install -m644 ${srcdir}/${pkgbase}-${pkgver}/app/mime/* ${pkgdir}/usr/share/gambas3/mime/
+ install -m644 ${srcdir}/gambas-v${pkgver}-*/app/mime/* ${pkgdir}/usr/share/gambas3/mime/
}
More information about the arch-commits
mailing list