[gambas2/f17: 1/2] update to 2.24.0
Tom Callaway
spot at fedoraproject.org
Fri May 25 20:33:51 UTC 2012
commit a18dc34722b71456368bb5e4f8bdd9f221354dda
Author: Tom Callaway <spot at fedoraproject.org>
Date: Fri May 25 16:32:09 2012 -0400
update to 2.24.0
gambas2-2.24.0-poppler20.patch | 100 ++++++++++++++++++++++++++++++++++++++++
gambas2.spec | 27 ++++++-----
2 files changed, 114 insertions(+), 13 deletions(-)
---
diff --git a/gambas2-2.24.0-poppler20.patch b/gambas2-2.24.0-poppler20.patch
new file mode 100644
index 0000000..3694f4b
--- /dev/null
+++ b/gambas2-2.24.0-poppler20.patch
@@ -0,0 +1,100 @@
+diff -up gambas2-2.24.0/gb.pdf/configure.ac.poppler20 gambas2-2.24.0/gb.pdf/configure.ac
+--- gambas2-2.24.0/gb.pdf/configure.ac.poppler20 2012-05-25 16:02:27.861966198 -0400
++++ gambas2-2.24.0/gb.pdf/configure.ac 2012-05-25 16:02:45.071826434 -0400
+@@ -25,6 +25,8 @@ if test "$have_poppler" = "yes"; then
+ AC_DEFINE_UNQUOTED(POPPLER_VERSION_0_11_3, $((1-$?)), Poppler version >= 0.11.3)
+ pkg-config --atleast-version=0.17.0 poppler
+ 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)
+ fi
+
+ AC_OUTPUT( \
+diff -up gambas2-2.24.0/gb.pdf/src/CPdfDocument.cpp.poppler20 gambas2-2.24.0/gb.pdf/src/CPdfDocument.cpp
+--- gambas2-2.24.0/gb.pdf/src/CPdfDocument.cpp.poppler20 2012-05-25 16:03:41.876365120 -0400
++++ gambas2-2.24.0/gb.pdf/src/CPdfDocument.cpp 2012-05-25 16:06:49.894838232 -0400
+@@ -406,8 +406,12 @@ int32_t open_document (void *_object, ch
+
+ white[0] = 0xFF; white[1] = 0xFF; white[2] = 0xFF;
+ THIS->dev=new SplashOutputDev(splashModeRGB8, 3, gFalse, white);
+-
++
++ #if POPPLER_VERSION_0_20
++ THIS->dev->startDoc(THIS->doc);
++ #else
+ THIS->dev->startDoc(THIS->doc->getXRef ());
++ #endif
+
+ outline=THIS->doc->getOutline();
+ if (outline) THIS->index=outline->getItems();
+@@ -833,6 +837,14 @@ static uint32_t *get_page_data(CPDFDOCUM
+
+ if ( (w<0) || (h<0) ) return NULL;
+
++ #if POPPLER_VERSION_0_20
++ THIS->page->displaySlice(THIS->dev,72.0*scale,72.0*scale,
++ rotation,
++ gFalse,
++ gTrue,
++ x,y,w,h,
++ gFalse);
++ #else
+ THIS->page->displaySlice(THIS->dev,72.0*scale,72.0*scale,
+ rotation,
+ gFalse,
+@@ -840,6 +852,7 @@ static uint32_t *get_page_data(CPDFDOCUM
+ x,y,w,h,
+ gFalse,
+ THIS->doc->getCatalog ());
++ #endif
+
+ map=THIS->dev->getBitmap();
+
+@@ -929,9 +942,14 @@ BEGIN_METHOD(PDFPAGE_select, GB_INTEGER
+ w = VARGOPT(W, (int32_t)THIS->page->getMediaWidth());
+ h = VARGOPT(H, (int32_t)THIS->page->getMediaHeight());
+
++ #if POPPLER_VERSION_0_20
++ dev = new TextOutputDev (NULL, gTrue, 0, gFalse, gFalse);
++ gfx = THIS->page->createGfx(dev,72.0,72.0,0,gFalse,gTrue,-1, -1, -1, -1, gFalse, NULL, NULL);
++ #else
+ dev = new TextOutputDev (NULL, gTrue, gFalse, gFalse);
+ gfx = THIS->page->createGfx(dev,72.0,72.0,0,gFalse,gTrue,-1, -1, -1, -1, \
+ gFalse,THIS->doc->getCatalog (),NULL, NULL, NULL, NULL);
++ #endif
+
+ THIS->page->display(gfx);
+ dev->endPage();
+@@ -960,7 +978,9 @@ END_METHOD
+
+ void aux_fill_links(void *_object)
+ {
+- #if POPPLER_VERSION_0_17
++ #if POPPLER_VERSION_0_20
++ THIS->links = new Links (THIS->page->getAnnots ());
++ #elif POPPLER_VERSION_0_17
+ THIS->links = new Links (THIS->page->getAnnots (THIS->doc->getCatalog()));
+ #else
+ Object obj;
+@@ -1200,12 +1220,21 @@ BEGIN_METHOD (PDFPAGE_find,GB_STRING Tex
+
+ if (!MISSING(Sensitive)) sensitive=VARG(Sensitive);
+
++ #if POPPLER_VERSION_0_20
++ textdev = new TextOutputDev (NULL, true, 0, false, false);
++ THIS->page->display (textdev, 72, 72, 0, false, false, false);
++ #else
+ textdev = new TextOutputDev (NULL, true, false, false);
+ THIS->page->display (textdev, 72, 72, 0, false, false, false, THIS->doc->getCatalog());
++ #endif
+
+ if (THIS->Found) { GB.FreeArray(POINTER(&THIS->Found)); THIS->Found=NULL; }
+
++ #if POPPLER_VERSION_0_20
++ while (textdev->findText (block,nlen,gFalse,gTrue,gTrue,gFalse,sensitive,gFalse,gFalse,&x0,&y0,&x1,&y1))
++ #else
+ while (textdev->findText (block,nlen,gFalse,gTrue,gTrue,gFalse,sensitive,gFalse,&x0,&y0,&x1,&y1))
++ #endif
+ {
+ if (!THIS->Found) {
+ GB.NewArray(POINTER(&THIS->Found),sizeof(FoundRect),1);
diff --git a/gambas2.spec b/gambas2.spec
index 3982ee2..ec3486f 100644
--- a/gambas2.spec
+++ b/gambas2.spec
@@ -1,7 +1,7 @@
Name: gambas2
Summary: IDE based on a basic interpreter with object extensions
-Version: 2.23.1
-Release: 8%{?dist}
+Version: 2.24.0
+Release: 1%{?dist}
License: GPL+
Group: Development/Tools
URL: http://gambas.sourceforge.net/
@@ -11,7 +11,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: kdelibs3-devel, automake, autoconf, SDL-devel, SDL_mixer-devel
BuildRequires: mysql-devel, postgresql-devel, gtk2-devel
BuildRequires: desktop-file-utils, gettext-devel, curl-devel, librsvg2-devel
-BuildRequires: poppler-devel, bzip2-devel, zlib-devel, pkgconfig
+BuildRequires: poppler-glib-devel, bzip2-devel, zlib-devel, pkgconfig
BuildRequires: unixODBC-devel, libXtst-devel, sqlite-devel, mesa-libGL-devel
BuildRequires: mesa-libGLU-devel, libpng-devel, libjpeg-devel, libxml2-devel
BuildRequires: libxslt-devel, pcre-devel, SDL_image-devel, libICE-devel
@@ -24,13 +24,10 @@ BuildRequires: libv4l-devel
ExclusiveArch: %{ix86} x86_64 %{arm}
Patch1: %{name}-2.0.0-nolintl.patch
Patch2: %{name}-2.0.0-noliconv.patch
-# Patch from Marek Kašík
-# Don't take address of temporary
-Patch3: gambas-2.22.0-firebird-permissive-fix.patch
+# Support poppler 0.20
+Patch3: gambas2-2.24.0-poppler20.patch
# Use libv4l1
Patch4: gambas2-2.23.1-use-libv4l1.patch
-# Compile with poppler-0.17.0
-Patch5: gambas2-2.23.1-links.patch
%description
Gambas2 is a free development environment based on a Basic interpreter
@@ -496,9 +493,8 @@ Requires: %{name}-runtime = %{version}-%{release}
%setup -q
%patch1 -p1 -b .nolintl
%patch2 -p1 -b .noliconv
-%patch3 -p1 -b .temporary
+%patch3 -p1 -b .poppler20
%patch4 -p1 -b .libv4l1
-%patch5 -p1 -b .links
# We used to patch these out, but this is simpler.
for i in `find . |grep acinclude.m4`; do
sed -i 's|$AM_CFLAGS -O3|$AM_CFLAGS|g' $i
@@ -614,7 +610,9 @@ rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/*.a
# Mime types.
mkdir -p $RPM_BUILD_ROOT%{_datadir}/mime/packages/
-install -m 0644 -p app/mime/application-x-gambasscript.xml $RPM_BUILD_ROOT%{_datadir}/mime/packages/
+# We no longer package this file to avoid conflict with gambas3.
+# install -m 0644 -p app/mime/application-x-gambasscript.xml $RPM_BUILD_ROOT%{_datadir}/mime/packages/
+rm -f $RPM_BUILD_ROOT%{_datadir}/%{name}/icons/application-x-gambasscript.png
install -m 0644 -p main/mime/application-x-gambas.xml $RPM_BUILD_ROOT%{_datadir}/mime/packages/
%clean
@@ -667,8 +665,8 @@ update-mime-database %{_datadir}/mime &> /dev/null || :
%{_bindir}/gbs2
%{_bindir}/gbw2
%{_bindir}/gbs2.gambas
-%{_datadir}/%{name}/icons/application-x-gambasscript.png
-%{_datadir}/mime/packages/application-x-gambasscript.xml
+# %%{_datadir}/%{name}/icons/application-x-gambasscript.png
+# %%{_datadir}/mime/packages/application-x-gambasscript.xml
%files ide
%defattr(-, root, root, 0755)
@@ -1610,6 +1608,9 @@ update-mime-database %{_datadir}/mime &> /dev/null || :
%{_datadir}/%{name}/info/gb.xml.xslt.*
%changelog
+* Fri May 25 2012 Tom Callaway <spot at fedoraproject.org> - 2.24.0-1
+- update to 2.24.0
+
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.23.1-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
More information about the scm-commits
mailing list