From 6dfb23a4af490908ee1cd4a6acf5363fd4b0c42b Mon Sep 17 00:00:00 2001 From: Than Ngo Date: Mar 28 2008 17:43:11 +0000 Subject: 4.0.3 --- diff --git a/.cvsignore b/.cvsignore index 84e64cf..d89c0c9 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,3 +1,4 @@ kdegraphics-4.0.0.tar.bz2 kdegraphics-4.0.1.tar.bz2 kdegraphics-4.0.2.tar.bz2 +kdegraphics-4.0.3.tar.bz2 diff --git a/kdegraphics-4.0.2-poppler07.patch b/kdegraphics-4.0.2-poppler07.patch deleted file mode 100644 index c421cb8..0000000 --- a/kdegraphics-4.0.2-poppler07.patch +++ /dev/null @@ -1,164 +0,0 @@ -Index: okular/generators/poppler/generator_pdf.cpp -=================================================================== ---- okular/generators/poppler/generator_pdf.cpp (revision 784723) -+++ okular/generators/poppler/generator_pdf.cpp (revision 784736) -@@ -1,5 +1,5 @@ - /*************************************************************************** -- * Copyright (C) 2004-2006 by Albert Astals Cid * -+ * Copyright (C) 2004-2008 by Albert Astals Cid * - * Copyright (C) 2004 by Enrico Ros * - * * - * This program is free software; you can redistribute it and/or modify * -@@ -820,7 +820,11 @@ - userMutex()->unlock(); - if ( genTextPage ) - { -+#ifdef HAVE_POPPLER_0_7 -+ QList textList = p->textList(); -+#else - QList textList = p->textList((Poppler::Page::Rotation)request->page()->orientation()); -+#endif - page->setTextPage( abstractTextPage(textList, page->height(), page->width(), request->page()->orientation()) ); - qDeleteAll(textList); - } -@@ -839,12 +843,21 @@ - // build a TextList... - Poppler::Page *pp = pdfdoc->page( page->number() ); - userMutex()->lock(); -+#ifdef HAVE_POPPLER_0_7 -+ QList textList = pp->textList(); -+#else - QList textList = pp->textList((Poppler::Page::Rotation)page->orientation()); -+#endif - userMutex()->unlock(); - delete pp; - -+#ifdef HAVE_POPPLER_0_7 -+ const double pageWidth = page->width(); -+ const double pageHeight = page->height(); -+#else - const double pageWidth = ( page->rotation() % 2 ? page->height() : page->width() ); - const double pageHeight = ( page->rotation() % 2 ? page->width() : page->height() ); -+#endif - - Okular::TextPage *tp = abstractTextPage(textList, pageHeight, pageWidth, (Poppler::Page::Rotation)page->orientation()); - qDeleteAll(textList); -@@ -875,7 +888,7 @@ - - #ifdef HAVE_POPPLER_0_6 - --#if POPPLER_HAVE_PSCONVERTER_SETOUTPUTDEVICE -+#ifdef HAVE_POPPLER_0_7 - tf.setAutoRemove(false); - #else - tf.close(); -@@ -891,7 +904,7 @@ - - Poppler::PSConverter *psConverter = pdfdoc->psConverter(); - --#if POPPLER_HAVE_PSCONVERTER_SETOUTPUTDEVICE -+#ifdef HAVE_POPPLER_0_7 - psConverter->setOutputDevice(&tf); - #else - psConverter->setOutputFileName(tempfilename); -@@ -1099,6 +1112,38 @@ - int charCount=0; - int j; - QString s; -+#ifdef HAVE_POPPLER_0_7 -+ foreach (Poppler::TextBox *word, text) -+ { -+ charCount=word->text().length(); -+ next=word->nextWord(); -+ for (j = 0; j < charCount; j++) -+ { -+ s = word->text().at(j); -+ QRectF charBBox = word->charBoundingBox(j); -+ append(ktp, (j==charCount-1 && !next ) ? (s + '\n') : s, -+ charBBox.left()/width, -+ charBBox.bottom()/height, -+ charBBox.right()/width, -+ charBBox.top()/height); -+ } -+ -+ if ( word->hasSpaceAfter() && next ) -+ { -+ // TODO Check with a document with vertical text -+ // probably won't work and we will need to do comparisons -+ // between wordBBox and nextWordBBox to see if they are -+ // vertically or horizontally aligned -+ QRectF wordBBox = word->boundingBox(); -+ QRectF nextWordBBox = next->boundingBox(); -+ append(ktp, " ", -+ wordBBox.right()/width, -+ wordBBox.bottom()/height, -+ nextWordBBox.left()/width, -+ wordBBox.top()/height); -+ } -+ } -+#else - Okular::NormalizedRect * wordRect = new Okular::NormalizedRect; - - rot = rot % 4; -@@ -1208,6 +1253,7 @@ - } - } - delete wordRect; -+#endif - return ktp; - } - -@@ -1775,7 +1821,11 @@ - - if ( genTextPage ) - { -+#ifdef HAVE_POPPLER_0_7 -+ d->m_textList = pp->textList(); -+#else - d->m_textList = pp->textList((Poppler::Page::Rotation)d->currentRequest->page()->orientation()); -+#endif - } - delete pp; - -Index: okular/generators/poppler/config-okular-poppler.h.cmake -=================================================================== ---- okular/generators/poppler/config-okular-poppler.h.cmake (revision 784723) -+++ okular/generators/poppler/config-okular-poppler.h.cmake (revision 784736) -@@ -1,5 +1,5 @@ - /* Defined if we have the 0.6 version of the Poppler library */ - #cmakedefine HAVE_POPPLER_0_6 1 - --/* Defined if Poppler::PSConverter has setOutputDevice */ --#define POPPLER_HAVE_PSCONVERTER_SETOUTPUTDEVICE ${_POPPLER_HAVE_PSCONVERTER_SETOUTPUTDEVICE} -+/* Defined if we have the 0.7 version of the Poppler library */ -+#cmakedefine HAVE_POPPLER_0_7 1 -Index: okular/generators/poppler/CMakeLists.txt -=================================================================== ---- okular/generators/poppler/CMakeLists.txt (revision 784723) -+++ okular/generators/poppler/CMakeLists.txt (revision 784736) -@@ -1,20 +1,18 @@ - --# check for Poppler::PSConverter::setOutputDevice() -+# check for Poppler::FormFieldButton as "0.7 check" - set(CMAKE_REQUIRED_INCLUDES ${POPPLER_INCLUDE_DIR} ${QT_INCLUDE_DIR}) - set(CMAKE_REQUIRED_LIBRARIES ${POPPLER_LIBRARY} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTXML_LIBRARY}) - check_cxx_source_compiles(" - #include -+#include - int main() - { -- Poppler::Document * doc = Poppler::Document::load(\"foo\"); -- Poppler::PSConverter * psconv = doc->psConverter(); -- psconv->setOutputDevice( 0 ); -+ Poppler::FormFieldButton * button = 0; -+ button->buttonType(); - return 0; - } --" POPPLER_HAVE_PSCONVERTER_SETOUTPUTDEVICE) --macro_bool_to_01(POPPLER_HAVE_PSCONVERTER_SETOUTPUTDEVICE _POPPLER_HAVE_PSCONVERTER_SETOUTPUTDEVICE) -+" HAVE_POPPLER_0_7) - -- - configure_file( - ${CMAKE_CURRENT_SOURCE_DIR}/config-okular-poppler.h.cmake - ${CMAKE_CURRENT_BINARY_DIR}/config-okular-poppler.h diff --git a/kdegraphics.spec b/kdegraphics.spec index aa9917a..11b395e 100644 --- a/kdegraphics.spec +++ b/kdegraphics.spec @@ -3,8 +3,8 @@ Summary: K Desktop Environment - Graphics Applications Epoch: 7 -Version: 4.0.2 -Release: 4%{?dist} +Version: 4.0.3 +Release: 1%{?dist} Name: kdegraphics Obsoletes: kdegraphics4 < %{version}-%{release} @@ -18,11 +18,6 @@ Source0: ftp://ftp.kde.org/pub/kde/unstable/%{version}/src/kdegraphics-%{ Patch0: kdegraphics-4.0.1-system-libspectre.patch # necessary CMakeLists.txt changes missing in the above commit Patch1: kdegraphics-4.0.1-system-libspectre-cmake.patch -# support for poppler 0.7 backported from the KDE 4.0 branch: -# http://websvn.kde.org/?view=rev&revision=784724 -# http://websvn.kde.org/?view=rev&revision=784736 -# (Older poppler versions are still supported, so no need to apply this conditionally.) -Patch2: kdegraphics-4.0.2-poppler07.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: kde-filesystem >= 4 @@ -96,8 +91,6 @@ rm -rf okular/generators/spectre/libspectre %patch1 -p1 %endif -%patch2 -p0 -b .poppler07 - %build @@ -173,6 +166,10 @@ rm -rf %{buildroot} %changelog +* Fri Mar 28 2008 Than Ngo 4.0.3-1 +- 4.0.3 +- drop kdegraphics-4.0.2-poppler07.patch, it's included in 4.0.3 + * Thu Mar 20 2008 Kevin Kofler 4.0.2-4 - backport patch to support poppler 0.7 from KDE 4.0.3 diff --git a/sources b/sources index 33efbe4..767f90e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9866b7e242f72dc1fddb10aa806bcda9 kdegraphics-4.0.2.tar.bz2 +bb64c0013a8682e84654eeaad1158fa4 kdegraphics-4.0.3.tar.bz2