diff --git a/djvulibre-gcc47.patch b/djvulibre-gcc47.patch new file mode 100644 index 0000000..c32f89a --- /dev/null +++ b/djvulibre-gcc47.patch @@ -0,0 +1,35 @@ +Index: djvulibre-3.5.24/gui/indep/utils/execdir.cpp +=================================================================== +--- djvulibre-3.5.24.orig/gui/indep/utils/execdir.cpp ++++ djvulibre-3.5.24/gui/indep/utils/execdir.cpp +@@ -141,13 +141,13 @@ getDjViewDataFile(const char *fname) + { + GURL url = GURL(file, paths[pos]); + GUTF8String urls = (const char*)url; +- int pos = urls.search(osi); +- if (pos >= 0) ++ int pos2 = urls.search(osi); ++ if (pos2 >= 0) + { + GUTF8String urlx; +- urlx += urls.substr(0, pos); ++ urlx += urls.substr(0, pos2); + urlx += djview3; +- urlx += urls.substr(pos+strlen(osi), -1); ++ urlx += urls.substr(pos2+strlen(osi), -1); + GURL url = GURL::UTF8(urlx); + if (url.is_file()) + return url; +Index: djvulibre-3.5.24/libdjvu/GContainer.h +=================================================================== +--- djvulibre-3.5.24.orig/libdjvu/GContainer.h ++++ djvulibre-3.5.24/libdjvu/GContainer.h +@@ -962,7 +962,7 @@ public: + /** Inserts an element before the first element of the list. + The new element is initialized with a copy of argument #elt#. */ + void prepend(const TYPE &elt) +- { GListImpl::prepend(newnode((const TI&)elt)); } ++ { GListImpl::prepend(this->newnode((const TI&)elt)); } + /** Inserts a new element after the list element at position #pos#. When + position #pos# is null the element is inserted at the beginning of the + list. The new element is initialized with a copy of #elt#. */ diff --git a/djvulibre.changes b/djvulibre.changes index 9322e13..792f87e 100644 --- a/djvulibre.changes +++ b/djvulibre.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Mar 15 19:59:47 UTC 2012 - dimstar@opensuse.org + +- Add djvulibre-gcc47.patch: Fix build with gcc 4.7. + ------------------------------------------------------------------- Tue Mar 13 15:21:34 UTC 2012 - pgajdos@suse.com diff --git a/djvulibre.spec b/djvulibre.spec index ecc4063..3923739 100644 --- a/djvulibre.spec +++ b/djvulibre.spec @@ -16,20 +16,28 @@ # - Name: djvulibre -BuildRequires: fdupes libdrm-devel libjpeg-devel libtiff-devel qt3-devel qt3-devel-tools update-desktop-files xorg-x11-devel -License: GPL-2.0+ -Group: Productivity/Graphics/Other +BuildRequires: fdupes +BuildRequires: libdrm-devel +BuildRequires: libjpeg-devel +BuildRequires: libtiff-devel +BuildRequires: qt3-devel +BuildRequires: qt3-devel-tools +BuildRequires: update-desktop-files +BuildRequires: xorg-x11-devel Version: 3.5.24 -Release: 5 +Release: 0 Url: http://djvu.sourceforge.net Summary: An Open Source Implementation of DjVu +License: GPL-2.0+ +Group: Productivity/Graphics/Other Source: %{name}-%{version}.tar.bz2 Patch1: %{name}-%{version}-nsdejavu.patch Patch2: %{name}-%{version}-filepath.patch # PATCH-FIX-UPSTREAM djvulibre-3.5.23-gcc46.patch idoenmez@suse.de -- Fix gcc 4.6 compilation, upstream bug #3256513 Patch3: djvulibre-3.5.23-gcc46.patch +# PATCH-FIX-UPSTREAM djvulibre-gcc47.patch sf#3505479 dimstar@opensuse.org -- Fix build with gcc 4.7. +Patch4: djvulibre-gcc47.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -46,7 +54,6 @@ by hundreds of academic, commercial, governmental, and noncommercial Web sites around the world. %package djview3 -License: GPL-2.0+ Summary: DjView3 is a portable DjVu Qt3 based viewer and browser plugin Group: Productivity/Graphics/Other Requires: djvulibre = %{version} @@ -57,7 +64,6 @@ DjView3 is a viewer and browser plugin for DjVu documents, based on the DjVuLibre-3.5 library and the Qt3 toolkit. %package -n libdjvulibre21 -License: GPL-2.0+ Summary: Libraries of Open Source Implementation of DjVu - djvulibre Group: Productivity/Graphics/Other @@ -65,16 +71,15 @@ Group: Productivity/Graphics/Other Libraries of Open Source Implementation of DjVu - djvulibre. %package -n libdjvulibre-devel -License: GPL-2.0+ Summary: Libraries of Open Source Implementation of DjVu - djvulibre Group: Development/Libraries/Other -Requires: libdjvulibre21 = %{version}, libjpeg-devel +Requires: libdjvulibre21 = %{version} +Requires: libjpeg-devel %description -n libdjvulibre-devel Libraries of Open Source Implementation of DjVu - djvulibre. %package doc -License: GPL-2.0+ Summary: Documentation for the the DjVu - djvulibre Group: Productivity/Graphics/Other @@ -86,6 +91,7 @@ This package contains the documentation for the DjVu - djvulibre %patch1 %patch2 %patch3 -p1 +%patch4 -p1 # removing cvsignore files in version 3.5.19 rm -rf doc/minilisp/.cvsignore