diff options
author | Wulf Krueger <philantrop@gentoo.org> | 2007-10-04 20:36:46 +0000 |
---|---|---|
committer | Wulf Krueger <philantrop@gentoo.org> | 2007-10-04 20:36:46 +0000 |
commit | 58fe469509fb0717ce26ea60c8071a5570a2c79f (patch) | |
tree | 1e20afb8b6243901555d624c4dd53e85fc6d640b /kde-base | |
parent | fix inherit wrt to bug #194616 (diff) | |
download | gentoo-2-58fe469509fb0717ce26ea60c8071a5570a2c79f.tar.gz gentoo-2-58fe469509fb0717ce26ea60c8071a5570a2c79f.tar.bz2 gentoo-2-58fe469509fb0717ce26ea60c8071a5570a2c79f.zip |
Added an upstream patch for libkcal to fix problems with recurring events. Fixes bug 194371.
(Portage version: 2.1.3.11)
Diffstat (limited to 'kde-base')
-rw-r--r-- | kde-base/kdepim/ChangeLog | 9 | ||||
-rw-r--r-- | kde-base/kdepim/files/digest-kdepim-3.5.7-r5 | 6 | ||||
-rw-r--r-- | kde-base/kdepim/files/libkcal-3.5.7-recurring_194371.patch | 256 | ||||
-rw-r--r-- | kde-base/kdepim/kdepim-3.5.7-r5.ebuild | 73 |
4 files changed, 343 insertions, 1 deletions
diff --git a/kde-base/kdepim/ChangeLog b/kde-base/kdepim/ChangeLog index 2d2cb58c05c3..81e62e52014d 100644 --- a/kde-base/kdepim/ChangeLog +++ b/kde-base/kdepim/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for kde-base/kdepim # Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/kde-base/kdepim/ChangeLog,v 1.290 2007/09/25 05:21:59 philantrop Exp $ +# $Header: /var/cvsroot/gentoo-x86/kde-base/kdepim/ChangeLog,v 1.291 2007/10/04 20:36:46 philantrop Exp $ + +*kdepim-3.5.7-r5 (04 Oct 2007) + + 04 Oct 2007; Wulf C. Krueger <philantrop@gentoo.org> + +files/libkcal-3.5.7-recurring_194371.patch, +kdepim-3.5.7-r5.ebuild: + Added an upstream patch for libkcal to fix problems with recurring events. + Fixes bug 194371. 25 Sep 2007; Wulf C. Krueger <philantrop@gentoo.org> kdepim-3.5.7-r4.ebuild: diff --git a/kde-base/kdepim/files/digest-kdepim-3.5.7-r5 b/kde-base/kdepim/files/digest-kdepim-3.5.7-r5 new file mode 100644 index 000000000000..c779ca922394 --- /dev/null +++ b/kde-base/kdepim/files/digest-kdepim-3.5.7-r5 @@ -0,0 +1,6 @@ +MD5 bf6b46337388fa6a93c9084d3d2c4509 kdepim-3.5-patchset-04.tar.bz2 133990 +RMD160 9d9fd1e7b04512f1f28bba78d5eeadfc3e3280ba kdepim-3.5-patchset-04.tar.bz2 133990 +SHA256 8b1968a7bef8ab2efdb2d87e96943ce636775b76365bc1bc99e1e377f9abfc61 kdepim-3.5-patchset-04.tar.bz2 133990 +MD5 8571db6dcf4168614c96bb72c493f931 kdepim-3.5.7.tar.bz2 14166061 +RMD160 14c05d4620abf1eb5421ad434dc63f037069e930 kdepim-3.5.7.tar.bz2 14166061 +SHA256 9d981d372f1822662e102b6f84f046e4df771641fc4d041aae81b8fafd47b32e kdepim-3.5.7.tar.bz2 14166061 diff --git a/kde-base/kdepim/files/libkcal-3.5.7-recurring_194371.patch b/kde-base/kdepim/files/libkcal-3.5.7-recurring_194371.patch new file mode 100644 index 000000000000..990b09408d89 --- /dev/null +++ b/kde-base/kdepim/files/libkcal-3.5.7-recurring_194371.patch @@ -0,0 +1,256 @@ +--- branches/KDE/3.5/kdepim/libkcal/calendarlocal.cpp 2007/10/01 17:04:23 719674 ++++ branches/KDE/3.5/kdepim/libkcal/calendarlocal.cpp 2007/10/01 17:04:57 719675 +@@ -401,62 +401,75 @@ + bool inclusive ) + { + Event::List eventList; ++ QDate yesterStart = start.addDays(-1); + + // Get non-recurring events + EventDictIterator it( mEvents ); + for( ; it.current(); ++it ) { + Event *event = *it; +- if ( event->doesRecur() ) { +- QDate rStart = event->dtStart().date(); +- bool found = false; +- if ( inclusive ) { +- if ( rStart >= start && rStart <= end ) { +- // Start date of event is in range. Now check for end date. +- // if duration is negative, event recurs forever, so do not include it. +- if ( event->recurrence()->duration() == 0 ) { // End date set +- QDate rEnd = event->recurrence()->endDate(); +- if ( rEnd >= start && rEnd <= end ) { // End date within range +- found = true; +- } +- } else if ( event->recurrence()->duration() > 0 ) { // Duration set +- // TODO: Calculate end date from duration. Should be done in Event +- // For now exclude all events with a duration. ++ ++ QDate rStart = event->dtStart().date(); ++ if (end < rStart) { ++ kdDebug(5800) << "Skipping event starting after TOI" << endl; ++ continue; ++ } ++ if ( inclusive && rStart < start) { ++ kdDebug(5800) << "Skipping event starting before TOI while inclusive" << endl; ++ continue; ++ } ++ ++ if ( ! event->doesRecur() ) { // non-recurring events ++ QDate rEnd = event->dtEnd().date(); ++ if (rEnd < start) { ++ kdDebug(5800) << "Skipping event ending before TOI" << endl; ++ continue; ++ } ++ if ( inclusive && end < rEnd ) { ++ kdDebug(5800) << "Skipping event ending after TOI while inclusive" << endl; ++ continue; ++ } ++ } else { // recurring events ++ switch ( event->recurrence()->duration() ) { ++ case -1: // infinite ++ if ( inclusive ) { ++ kdDebug(5800) << "Skipping infinite event because inclusive" << endl; ++ continue; + } +- } +- } else { +- if ( rStart <= end ) { // Start date not after range +- if ( rStart >= start ) { // Start date within range +- found = true; +- } else if ( event->recurrence()->duration() == -1 ) { // Recurs forever +- found = true; +- } else if ( event->recurrence()->duration() == 0 ) { // End date set +- QDate rEnd = event->recurrence()->endDate(); +- if ( rEnd >= start && rEnd <= end ) { // End date within range +- found = true; +- } +- } else { // Duration set +- // TODO: Calculate end date from duration. Should be done in Event +- // For now include all events with a duration. +- found = true; ++ break; ++ case 0: // end date given ++ default: // count given ++ QDate rEnd = event->recurrence()->endDate(); ++ if ( ! rEnd.isValid() ) { ++ kdDebug(5800) << "Skipping recurring event without occurences" << endl; ++ continue; + } +- } +- } ++ if ( rEnd < start ) { ++ kdDebug(5800) << "Skipping recurring event ending before TOI" << endl; ++ continue; ++ } ++ if ( inclusive && end < rEnd ) { ++ kdDebug(5800) << "Skipping recurring event ending after TOI while inclusive" << endl; ++ continue; ++ } ++ /* FIXME: too much conversion between QDate and QDateTime makes this useless: ++ * freebusy(end=QDateTime(day, "00:00:00")) -> ++ * rawEvents(end=QDate(day)) -> ++ * durationTo(QDateTime(day, "23:59:59")) ++ * so events repeating at the end day match and are included. ++ */ ++#if 0 ++ int durationBeforeStart = event->recurrence()->durationTo(yesterStart); ++ int durationUntilEnd = event->recurrence()->durationTo(end); ++ if (durationBeforeStart == durationUntilEnd) { ++ kdDebug(5800) << "Skipping recurring event without occurences in TOI" << endl; ++ continue; ++ } ++#endif ++ break; ++ } // switch(duration) ++ } // if(doesRecur) + +- if ( found ) eventList.append( event ); +- } else { +- QDate s = event->dtStart().date(); +- QDate e = event->dtEnd().date(); +- +- if ( inclusive ) { +- if ( s >= start && e <= end ) { +- eventList.append( event ); +- } +- } else { +- if ( s <= end && e >= start ) { +- eventList.append( event ); +- } +- } +- } ++ eventList.append( event ); + } + + return eventList; +--- branches/KDE/3.5/kdepim/libkcal/recurrencerule.cpp 2007/10/01 17:04:23 719674 ++++ branches/KDE/3.5/kdepim/libkcal/recurrencerule.cpp 2007/10/01 17:04:57 719675 +@@ -558,28 +558,22 @@ + setDirty(); + } + +- + QDateTime RecurrenceRule::endDt( bool *result ) const + { + if ( result ) *result = false; + if ( mPeriod == rNone ) return QDateTime(); +- if ( mDuration < 0 ) { +- if ( result ) result = false; +- return QDateTime(); +- } else if ( mDuration == 0 ) { ++ if ( mDuration < 0 ) return QDateTime(); ++ if ( mDuration == 0 ) { ++ if ( result ) *result = true; + return mDateEnd; +- } else { +- // N occurrences. Check if we have a full cache. If so, return the cached end date. +- if ( ! mCached ) { +- // If not enough occurrences can be found (i.e. inconsistent constraints) +- if ( !buildCache() ) { +- if ( result ) result = false; +- return QDateTime(); +- } +- } +- return mCachedDateEnd; + } +- return QDateTime(); ++ // N occurrences. Check if we have a full cache. If so, return the cached end date. ++ if ( ! mCached ) { ++ // If not enough occurrences can be found (i.e. inconsistent constraints) ++ if ( !buildCache() ) return QDateTime(); ++ } ++ if ( result ) *result = true; ++ return mCachedDateEnd; + } + + void RecurrenceRule::setEndDt( const QDateTime &dateTime ) +--- branches/KDE/3.5/kdepim/libkcal/tests/Makefile.am 2007/10/01 17:04:23 719674 ++++ branches/KDE/3.5/kdepim/libkcal/tests/Makefile.am 2007/10/01 17:04:57 719675 +@@ -4,6 +4,7 @@ + check_PROGRAMS = testtostring \ + testincidence \ + testcalendar \ ++ fbrecurring \ + readandwrite \ + testresource \ + testfields \ +@@ -28,6 +29,10 @@ + testtostring_LDFLAGS = $(all_libraries) $(KDE_RPATH) + testtostring_LDADD = ../libkcal.la + ++fbrecurring_SOURCES = fbrecurring.cpp ++fbrecurring_LDFLAGS = $(all_libraries) $(KDE_RPATH) ++fbrecurring_LDADD = ../libkcal.la ++ + readandwrite_SOURCES = readandwrite.cpp + readandwrite_LDFLAGS = $(all_libraries) $(KDE_RPATH) + readandwrite_LDADD = ../libkcal.la +@@ -78,10 +83,10 @@ + perl $(srcdir)/runtestcase.pl readandwrite "ical" $$i; \ + done; \ + for i in `find $(srcdir)/data/vCalendar/ -name "*.ics"`; do \ +- perl $(srcdir)/runtestcase.pl testvcalexport "vcal" $$i; \ ++ perl $(srcdir)/runtestcase.pl testvcalexport "vcal" $$i; \ + done; + for i in `find $(srcdir)/data/vCalendar/ -name "*.vcs"`; do \ +- perl $(srcdir)/runtestcase.pl readandwrite "ical" $$i; \ ++ perl $(srcdir)/runtestcase.pl readandwrite "ical" $$i; \ + done; + [ ! -e FAILED ] + +--- branches/KDE/3.5/kdepim/libkcal/tests.orig/fbrecurring.cpp 2007-08-31 20:52:15.220373203 +0200 ++++ branches/KDE/3.5/kdepim/libkcal/tests/fbrecurring.cpp 2007-10-04 19:53:52.000000000 +0200 +@@ -0,0 +1,52 @@ ++ ++#include "icalformat.h" ++#include "event.h" ++#include "calendarlocal.h" ++ ++#include <libkcal/freebusy.h> ++#include <iostream> ++ ++using namespace KCal; ++using namespace std; ++ ++int main() ++{ ++ ICalFormat f; ++ ++ CalendarLocal cal( QString::fromLatin1("UTC") ); ++ ++ Event *event1 = new Event; ++ event1->setSummary("A"); ++ event1->setDtStart( QDateTime(QDate(2006,1,1), QTime(12,0,0)) ); ++ //event1->setDuration(60*60); ++ event1->setDtEnd( QDateTime(QDate(2006,1,1), QTime(13,0,0)) ); ++ event1->setFloats(FALSE); ++ event1->recurrence()->setDaily( 1 ); ++ //event1->recurrence()->setDuration( 2 ); ++ event1->recurrence()->setEndDateTime( QDateTime(QDate(2006,1,3), QTime(13,0,0)) ); ++ cout << f.toICalString(event1).latin1() << endl; ++ cal.addEvent(event1); ++ ++ Event *event2 = new Event; ++ event2->setSummary("B"); ++ event2->setDtStart( QDateTime(QDate(2006,1,1), QTime(13,0,0)) ); ++ //event2->setDuration(60*60); ++ event2->setDtEnd( QDateTime(QDate(2006,1,1), QTime(14,0,0)) ); ++ event2->setFloats(FALSE); ++ event2->recurrence()->setDaily( 1 ); ++ //event2->recurrence()->setDuration( 3 ); ++ event2->recurrence()->setEndDateTime( QDateTime(QDate(2006,1,4), QTime(13,0,0)) ); ++ cout << f.toICalString(event2).latin1() << endl; ++ cal.addEvent(event2); ++ ++ Calendar *c = &cal; ++ ++ QDateTime start = QDateTime(QDate(2006,1,2), QTime(0,0,0)); ++ QDateTime end = QDateTime(QDate(2006,1,3), QTime(0,0,0)); ++ ++ FreeBusy *freebusy = new FreeBusy( c, start, end ); ++ QString result = f.createScheduleMessage( freebusy, Scheduler::Publish ); ++ cout << result.latin1() << endl; ++ ++ return 0; ++} diff --git a/kde-base/kdepim/kdepim-3.5.7-r5.ebuild b/kde-base/kdepim/kdepim-3.5.7-r5.ebuild new file mode 100644 index 000000000000..d91fa7c5cae9 --- /dev/null +++ b/kde-base/kdepim/kdepim-3.5.7-r5.ebuild @@ -0,0 +1,73 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/kde-base/kdepim/kdepim-3.5.7-r5.ebuild,v 1.1 2007/10/04 20:36:46 philantrop Exp $ + +inherit kde-dist + +SRC_URI="${SRC_URI} + mirror://gentoo/kdepim-3.5-patchset-04.tar.bz2" + +DESCRIPTION="KDE PIM (Personal Information Management) applications: KOrganizer, KMail, KNode,..." + +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" +IUSE="pda gnokii" + +RESTRICT="test" + +# We use GnuPG 1.4.x for OpenPGP and 1.9 (via gpgme) for s/mime as upstream advises. +DEPEND="~kde-base/kdebase-${PV} + >=dev-libs/cyrus-sasl-2 + gnokii? ( app-mobilephone/gnokii ) + >=app-crypt/gpgme-1.1.2-r1 + || ( >=app-crypt/gnupg-2.0.1-r1 <app-crypt/gnupg-1.9 ) + x11-libs/libXScrnSaver + app-pda/libopensync + pda? ( >=app-pda/pilot-link-0.12.0 >=dev-libs/libmal-0.44 )" + +RDEPEND="${DEPEND} + app-crypt/pinentry" + +DEPEND="${DEPEND} + x11-proto/scrnsaverproto + x11-apps/xhost" + +PATCHES="${FILESDIR}/libkcal-3.5.7-recurring_194371.patch" + +src_unpack() { + kde_src_unpack + # Call Qt 3 designer + sed -i -e "s:\"designer\":\"${QTDIR}/bin/designer\":g" "${S}"/libkdepim/kcmdesignerfields.cpp || die "sed failed" + + # disabling tests, see bug #164038 and bug #164097 + sed -e "s:SUBDIRS = libical versit tests:SUBDIRS = libical versit:" \ + -i libkcal/Makefile.am || die "sed failed" || die "sed failed" +# sed -e "s:SUBDIRS = . plugins test:SUBDIRS = . plugins:" \ +# -i kitchensync/libkonnector2/Makefile.am || die "sed failed" +# sed -e "s:SUBDIRS = . tests test:SUBDIRS = .:" \ +# -i kitchensync/libksync/Makefile.am || die "sed failed" + + sed -e "s:check_PROGRAMS = testalarmdlg:check_PROGRAMS =:" \ + -i korganizer/korgac/Makefile.am || die "sed failed" + + if ! [[ $(xhost >> /dev/null 2>/dev/null) ]] ; then + einfo "User ${USER} has no X access, disabling some tests." + sed -e "s:tests::" -i libkdepim/Makefile.am || die "sed failed" + fi +} + +src_compile() { + local myconf="--with-sasl $(use_with gnokii)" + myconf="${myconf} --with-gpg=/usr/bin/gpg" + + use pda || DO_NOT_COMPILE="${DO_NOT_COMPILE} kpilot" + # DO_NOT_COMPILE="${DO_NOT_COMPILE} kpilot" + + kde_src_compile +} + +pkg_postinst() { + kde_pkg_postinst + + ewarn "If you're using x11-misc/basket, please re-emerge it now to avoid crashes with Kontact." + ewarn "cf. https://bugs.gentoo.org/show_bug.cgi?id=174872 for details." +} |