rev 4411 - in trunk/packages/kdepim/debian: . patches

Christopher Martin chrsmrtn at costa.debian.org
Sat Aug 26 18:15:06 UTC 2006


Author: chrsmrtn
Date: 2006-08-26 18:15:05 +0000 (Sat, 26 Aug 2006)
New Revision: 4411

Modified:
   trunk/packages/kdepim/debian/changelog
   trunk/packages/kdepim/debian/patches/01_kdepim_branch_r577416.diff
Log:
Let's see if kdepim builds now.

!!! Note that yanking a change out of the branch pull
means that for the next upload, assuming things are fixed,
we'll need a fresh branch pull to replace this one, rather
than a new one added on.


Modified: trunk/packages/kdepim/debian/changelog
===================================================================
--- trunk/packages/kdepim/debian/changelog	2006-08-26 17:32:00 UTC (rev 4410)
+++ trunk/packages/kdepim/debian/changelog	2006-08-26 18:15:05 UTC (rev 4411)
@@ -4,7 +4,8 @@
 
    +++ Changes by Fathi Boudra:
 
-  * Branch pull to revision 577416.
+  * Branch pull to revision 577416, minus the akregator feeddetector
+    changes which don't build.
 
   * Added kdepim extra debug information from KDE bug #104956. Users of
     d-imap will have to put up with extra dialogs, but this is hopefully

Modified: trunk/packages/kdepim/debian/patches/01_kdepim_branch_r577416.diff
===================================================================
--- trunk/packages/kdepim/debian/patches/01_kdepim_branch_r577416.diff	2006-08-26 17:32:00 UTC (rev 4410)
+++ trunk/packages/kdepim/debian/patches/01_kdepim_branch_r577416.diff	2006-08-26 18:15:05 UTC (rev 4411)
@@ -78,391 +78,6 @@
      nodeModified();
  }
  
---- akregator/src/librss/feeddetector.h	(.../tags/KDE/3.5.4/kdepim)	(revision 0)
-+++ akregator/src/librss/feeddetector.h	(.../branches/KDE/3.5/kdepim)	(revision 577416)
-@@ -0,0 +1,80 @@
-+/*
-+    This file is part of Akregator.
-+
-+    Copyright (C) 2004 Teemu Rytilahti <tpr at d5k.net>
-+
-+    This program is free software; you can redistribute it and/or modify
-+    it under the terms of the GNU General Public License as published by
-+    the Free Software Foundation; either version 2 of the License, or
-+    (at your option) any later version.
-+
-+    This program is distributed in the hope that it will be useful,
-+    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+    GNU General Public License for more details.
-+
-+    You should have received a copy of the GNU General Public License
-+    along with this program; if not, write to the Free Software
-+    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-+
-+    As a special exception, permission is given to link this program
-+    with any edition of Qt, and distribute the resulting executable,
-+    without including the source code for Qt in the source distribution.
-+*/
-+ 
-+#ifndef LIBRSS_FEEDDETECTOR_H
-+#define LIBRSS_FEEDDETECTOR_H
-+
-+#include <qstring.h>
-+#include <qvaluelist.h>
-+
-+class QStringList;
-+class KURL;
-+
-+namespace RSS
-+{
-+
-+    class FeedDetectorEntry
-+    {
-+        public:
-+            FeedDetectorEntry() {}
-+            FeedDetectorEntry(const QString& url, const QString& title) 
-+                : m_url(url), m_title(title) {}
-+
-+            const QString& url() const { return m_url; } 
-+            const QString& title() const { return m_title; }
-+
-+        private:	
-+            const QString m_url;
-+            const QString m_title;
-+    };	
-+
-+    typedef QValueList<FeedDetectorEntry> FeedDetectorEntryList; 
-+
-+    /** a class providing functions to detect linked feeds in HTML sources */
-+    class FeedDetector
-+    {
-+        public:
-+            /** \brief searches an HTML page for feeds listed in @c <link> tags
-+            @c <link> tags with @c rel attribute values @c alternate or 
-+            @c service.feed are considered as feeds 
-+            @param s the html source to scan (the actual source, no URI)
-+            @return a list containing the detected feeds
-+            */
-+            static FeedDetectorEntryList extractFromLinkTags(const QString& s);
-+
-+            /** \brief searches an HTML page for slightly feed-like looking links and catches everything not running away quickly enough. 
-+            Extracts links from @c <a @c href> tags which end with @c xml, @c rss or @c rdf
-+            @param s the html source to scan (the actual source, no URI)
-+            @return a list containing the detected feeds
-+            */
-+            static QStringList extractBruteForce(const QString& s);
-+
-+            static QString fixRelativeURL(const QString &s, const KURL &baseurl);
-+            
-+        private:
-+            FeedDetector() {}
-+    };
-+}
-+
-+#endif //LIBRSS_FEEDDETECTOR_H
---- akregator/src/librss/loader.cpp	(.../tags/KDE/3.5.4/kdepim)	(revision 577416)
-+++ akregator/src/librss/loader.cpp	(.../branches/KDE/3.5/kdepim)	(revision 577416)
-@@ -10,6 +10,7 @@
-  */
- #include "loader.h"
- #include "document.h"
-+#include "feeddetector.h"
- 
- #include <kio/job.h>
- #include <kprocess.h>
-@@ -377,74 +378,35 @@
- void Loader::discoverFeeds(const QByteArray &data)
- {
-     QString str = QString(data).simplifyWhiteSpace();
--    QString s2;
--    //QTextStream ts( &str, IO_WriteOnly );
--    //ts << data.data();
--
--    // "<[\\s]link[^>]*rel[\\s]=[\\s]\\\"[\\s]alternate[\\s]\\\"[^>]*>"
--    // "type[\\s]=[\\s]\\\"application/rss+xml\\\""
--    // "href[\\s]=[\\s]\\\"application/rss+xml\\\""
--    QRegExp rx( "(?:REL)[^=]*=[^sAa]*(?:service.feed|ALTERNATE)[\\s]*[^s][^s](?:[^>]*)(?:HREF)[^=]*=[^A-Z0-9-_~,./$]*([^'\">\\s]*)", false);
--    if (rx.search(str)!=-1)
--        s2=rx.cap(1);
--    else{
--    // does not support Atom/RSS autodiscovery.. try finding feeds by brute force....
--        int pos=0;
--        QStringList feeds;
--        QString host=d->url.host();
--        rx.setPattern("(?:<A )[^H]*(?:HREF)[^=]*=[^A-Z0-9-_~,./]*([^'\">\\s]*)");
--        while ( pos >= 0 ) {
--            pos = rx.search( str, pos );
--            s2=rx.cap(1);
--            if (s2.endsWith(".rdf") || s2.endsWith(".rss") || s2.endsWith(".xml"))
--                    feeds.append(s2);
--            if ( pos >= 0 ) {
--                pos += rx.matchedLength();
--            }
--        }
--
--        s2=feeds.first();
--        KURL testURL;
--        // loop through, prefer feeds on same host
--        QStringList::Iterator end( feeds.end() );
--        for ( QStringList::Iterator it = feeds.begin(); it != end; ++it ) {
--            testURL=*it;
--            if (testURL.host()==host)
--            {
--                s2=*it;
--                break;
--            }
--        }
--    }
--
--    if (s2.isNull()) {
--        //kdDebug() << "No feed found for a site" << endl;
--        return;
--    }
--
--    if (KURL::isRelativeURL(s2))
-+    
-+    QStringList feeds; 
-+    
-+    FeedDetectorEntryList list = FeedDetector::extractFromLinkTags(str); 
-+    
-+    for (FeedDetectorEntryList::ConstIterator it = list.begin(); it != list.end(); ++it)
-     {
--        if (s2.startsWith("//"))
-+        feeds += (*it).url();
-+    }  
-+    
-+    if (list.isEmpty())
-+        feeds = FeedDetector::extractBruteForce(str);
-+        
-+    QString feed = feeds.first();
-+    QString host = d->url.host();
-+    KURL testURL;
-+    // loop through, prefer feeds on same host
-+    QStringList::Iterator end( feeds.end() );
-+    for ( QStringList::Iterator it = feeds.begin(); it != end; ++it) 
-+    {
-+        testURL=*it;
-+        if (testURL.host() == host)
-         {
--            s2=s2.prepend(d->url.protocol()+":");
--            d->discoveredFeedURL=s2;
-+            feed = *it;
-+            break;
-         }
--        else if (s2.startsWith("/"))
--        {
--            d->discoveredFeedURL=d->url;
--            d->discoveredFeedURL.setPath(s2);
--        }
--        else
--        {
--            d->discoveredFeedURL=d->url;
--            d->discoveredFeedURL.addPath(s2);
--        }
--        d->discoveredFeedURL.cleanPath();
-     }
--    else
--        d->discoveredFeedURL=s2;
- 
--    d->discoveredFeedURL.cleanPath();
-+    d->discoveredFeedURL = feed.isNull() ? QString() : FeedDetector::fixRelativeURL(feed, d->url); 
- }
- 
- #include "loader.moc"
---- akregator/src/librss/Makefile.am	(.../tags/KDE/3.5.4/kdepim)	(revision 577416)
-+++ akregator/src/librss/Makefile.am	(.../branches/KDE/3.5/kdepim)	(revision 577416)
-@@ -9,7 +9,7 @@
-   loader.h librss.h enclosure.h
- 
- librsslocal_la_SOURCES = article.cpp document.cpp image.cpp textinput.cpp \
--  tools_p.cpp loader.cpp enclosure.cpp category.cpp
-+  tools_p.cpp loader.cpp enclosure.cpp category.cpp feeddetector.cpp
- 
- librsslocal_la_METASOURCES = AUTO
- 
---- akregator/src/librss/feeddetector.cpp	(.../tags/KDE/3.5.4/kdepim)	(revision 0)
-+++ akregator/src/librss/feeddetector.cpp	(.../branches/KDE/3.5/kdepim)	(revision 577416)
-@@ -0,0 +1,179 @@
-+/*
-+    This file is part of Akregator.
-+
-+    Copyright (C) 2004 Teemu Rytilahti <tpr at d5k.net>
-+
-+    This program is free software; you can redistribute it and/or modify
-+    it under the terms of the GNU General Public License as published by
-+    the Free Software Foundation; either version 2 of the License, or
-+    (at your option) any later version.
-+
-+    This program is distributed in the hope that it will be useful,
-+    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+    GNU General Public License for more details.
-+
-+    You should have received a copy of the GNU General Public License
-+    along with this program; if not, write to the Free Software
-+    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-+
-+    As a special exception, permission is given to link this program
-+    with any edition of Qt, and distribute the resulting executable,
-+    without including the source code for Qt in the source distribution.
-+*/
-+ 
-+#include <qregexp.h>
-+#include <qstring.h>
-+#include <qstringlist.h>
-+#include <qvaluelist.h>
-+#include <kcharsets.h>
-+#include <kurl.h>
-+
-+#include "feeddetector.h"
-+
-+
-+using namespace RSS;
-+
-+FeedDetectorEntryList FeedDetector::extractFromLinkTags(const QString& s)	
-+{
-+    //reduce all sequences of spaces, newlines etc. to one space:
-+    QString str = s.simplifyWhiteSpace();
-+
-+    // extracts <link> tags
-+    QRegExp reLinkTag("<[\\s]?LINK[^>]*REL[\\s]?=[\\s]?\\\"[\\s]?(ALTERNATE|SERVICE\\.FEED)[\\s]?\\\"[^>]*>", false);
-+
-+    // extracts the URL (href="url")
-+    QRegExp reHref("HREF[\\s]?=[\\s]?\\\"([^\\\"]*)\\\"", false);
-+    // extracts type attribute
-+    QRegExp reType("TYPE[\\s]?=[\\s]?\\\"([^\\\"]*)\\\"", false);
-+    // extracts the title (title="title")
-+    QRegExp reTitle("TITLE[\\s]?=[\\s]?\\\"([^\\\"]*)\\\"", false);
-+
-+    int pos = 0;
-+    int matchpos = 0;
-+
-+    // get all <link> tags
-+    QStringList linkTags;
-+    //int strlength = str.length();
-+    while ( matchpos != -1 )
-+    {
-+        matchpos = reLinkTag.search(str, pos);
-+        if (matchpos != -1)
-+        {
-+            linkTags.append( str.mid(matchpos, reLinkTag.matchedLength()) );
-+            pos = matchpos + reLinkTag.matchedLength();
-+        }
-+    }
-+
-+    FeedDetectorEntryList list;
-+
-+    for ( QStringList::Iterator it = linkTags.begin(); it != linkTags.end(); ++it )
-+    {
-+        QString type;
-+        int pos = reType.search(*it, 0);
-+        if (pos != -1)
-+            type = reType.cap(1).lower();
-+
-+        // we accept only type attributes indicating a feed
-+        if ( type != "application/rss+xml" && type != "application/rdf+xml"
-+	      && type != "application/atom+xml" && type != "text/xml" )
-+            continue;
-+                
-+        QString title;
-+        pos = reTitle.search(*it, 0);
-+        if (pos != -1)
-+        title = reTitle.cap(1);
-+
-+        title = KCharsets::resolveEntities(title);
-+
-+        QString url;
-+        pos = reHref.search(*it, 0);
-+        if (pos != -1)
-+            url = reHref.cap(1);
-+
-+        url = KCharsets::resolveEntities(url);
-+
-+        // if feed has no title, use the url as preliminary title (until feed is parsed)
-+        if ( title.isEmpty() )
-+            title = url;
-+
-+        if ( !url.isEmpty() )
-+            list.append(FeedDetectorEntry(url, title) );		
-+    }
-+
-+
-+    return list;
-+}
-+
-+QStringList FeedDetector::extractBruteForce(const QString& s)
-+{
-+    QString str = s.simplifyWhiteSpace();
-+    
-+    QRegExp reAhrefTag("<[\\s]?A[^>]?HREF=[\\s]?\\\"[^\\\"]*\\\"[^>]*>", false);
-+    
-+    // extracts the URL (href="url")
-+    QRegExp reHref("HREF[\\s]?=[\\s]?\\\"([^\\\"]*)\\\"", false);
-+
-+    QRegExp rssrdfxml(".*(RSS|RDF|XML)", false);
-+
-+    int pos = 0;
-+    int matchpos = 0;
-+    
-+    // get all <a href> tags and capture url
-+    QStringList list;
-+    //int strlength = str.length();
-+    while ( matchpos != -1 )
-+    {
-+        matchpos = reAhrefTag.search(str, pos);
-+        if ( matchpos != -1 )
-+        {
-+            QString ahref = str.mid(matchpos, reAhrefTag.matchedLength());
-+            int hrefpos = reHref.search(ahref, 0);
-+            if ( hrefpos != -1 )
-+            {
-+                QString url = reHref.cap(1);
-+
-+                url = KCharsets::resolveEntities(url);
-+
-+                if ( rssrdfxml.exactMatch(url) )
-+                    list.append(url);
-+            }
-+
-+            pos = matchpos + reAhrefTag.matchedLength();
-+        }
-+    }
-+    
-+    return list;
-+}
-+
-+QString FeedDetector::fixRelativeURL(const QString &s, const KURL &baseurl)
-+{
-+    QString s2=s;
-+    KURL u;
-+    if (KURL::isRelativeURL(s2))
-+    {
-+        if (s2.startsWith("//"))
-+        {
-+            s2=s2.prepend(baseurl.protocol()+":");
-+            u=s2;
-+        }
-+        else if (s2.startsWith("/"))
-+        {
-+            KURL b2(baseurl);
-+            b2.setPath(QString()); // delete path and query, so that only protocol://host remains
-+            b2.setQuery(QString());
-+            u = KURL(b2, s2.remove(0,1)); // remove leading "/" 
-+        }
-+        else
-+        {
-+            u = KURL(baseurl, s2);
-+        }
-+    }
-+    else
-+        u=s2;
-+
-+    u.cleanPath();
-+    //kdDebug() << "AKREGATOR_PLUGIN_FIXURL: " << "url=" << s << " baseurl=" << baseurl.url() << " fixed=" << u.url() << 
-+    endl;
-+    return u.url();
-+}
 --- akregator/src/pageviewer.cpp	(.../tags/KDE/3.5.4/kdepim)	(revision 577416)
 +++ akregator/src/pageviewer.cpp	(.../branches/KDE/3.5/kdepim)	(revision 577416)
 @@ -175,7 +175,7 @@




More information about the pkg-kde-commits mailing list