[arch-commits] Commit in kcalcore/trunk (PKGBUILD kcalcore-libical3.patch)

Antonio Rojas arojas at archlinux.org
Wed Nov 22 16:39:21 UTC 2017


    Date: Wednesday, November 22, 2017 @ 16:39:20
  Author: arojas
Revision: 310665

libical 3.0 rebuild

Added:
  kcalcore/trunk/kcalcore-libical3.patch
Modified:
  kcalcore/trunk/PKGBUILD

-------------------------+
 PKGBUILD                |   11 +++-
 kcalcore-libical3.patch |  108 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 116 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2017-11-22 16:26:44 UTC (rev 310664)
+++ PKGBUILD	2017-11-22 16:39:20 UTC (rev 310665)
@@ -2,7 +2,7 @@
 
 pkgname=kcalcore
 pkgver=17.08.3
-pkgrel=1
+pkgrel=2
 pkgdesc="The KDE calendar access library"
 arch=(x86_64)
 url="https://community.kde.org/KDE_PIM"
@@ -9,14 +9,19 @@
 license=(LGPL)
 depends=(libical kdelibs4support)
 makedepends=(extra-cmake-modules python kdoctools kdesignerplugin)
-source=("https://download.kde.org/stable/applications/$pkgver/src/$pkgname-$pkgver.tar.xz"{,.sig})
+source=("https://download.kde.org/stable/applications/$pkgver/src/$pkgname-$pkgver.tar.xz"{,.sig}
+        kcalcore-libical3.patch)
 sha256sums=('050ee3c9abafef2f668276d9456e9fdbe4be7625572a8f3e93f073963f6fc647'
-            'SKIP')
+            'SKIP'
+            '0b7ac09b4d34c1a7c929af661c93024664def31460514c7e0b489d815d0ecc7d')
 validpgpkeys=(CA262C6C83DE4D2FB28A332A3A6A4DB839EAA6D7  # Albert Astals Cid <aacid at kde.org>
               F23275E4BF10AFC1DF6914A6DBD2CE893E2D1C87) # Christoph Feck <cfeck at kde.org>
 
 prepare() {
   mkdir -p build
+
+  cd $pkgname-$pkgver
+  patch -p1 -i ../kcalcore-libical3.patch # Port to libical 3 API
 }
 
 build() {

Added: kcalcore-libical3.patch
===================================================================
--- kcalcore-libical3.patch	                        (rev 0)
+++ kcalcore-libical3.patch	2017-11-22 16:39:20 UTC (rev 310665)
@@ -0,0 +1,108 @@
+From 27eaa211b23a6bb0bcba5a91cf7cadfc1e888e21 Mon Sep 17 00:00:00 2001
+From: Allen Winter <winter at kde.org>
+Date: Fri, 6 Oct 2017 10:39:20 -0400
+Subject: icalformat_p.cpp, icaltimezones.cpp - follow API changes in libical3
+
+---
+ src/icalformat_p.cpp  | 11 ++++++-----
+ src/icaltimezones.cpp | 10 ++++------
+ 2 files changed, 10 insertions(+), 11 deletions(-)
+
+diff --git a/src/icalformat_p.cpp b/src/icalformat_p.cpp
+index bd1d8a3..c2e4548 100644
+--- a/src/icalformat_p.cpp
++++ b/src/icalformat_p.cpp
+@@ -2355,7 +2355,6 @@ icaltimetype ICalFormatImpl::writeICalDate(const QDate &date)
+     t.second = 0;
+ 
+     t.is_date = 1;
+-    t.is_utc = 0;
+     t.zone = nullptr;
+ 
+     return t;
+@@ -2377,7 +2376,9 @@ icaltimetype ICalFormatImpl::writeICalDateTime(const QDateTime &datetime, bool d
+         t.second = datetime.time().second();
+     }
+     t.zone = nullptr;   // zone is NOT set
+-    t.is_utc = datetime.isUtc() ? 1 : 0;
++    if ( datetime.isUtc() ) {
++        t = icaltime_convert_to_zone(t, icaltimezone_get_utc_timezone());
++    }
+ 
+     // _dumpIcaltime( t );
+ 
+@@ -2450,7 +2452,7 @@ icalproperty *ICalFormatImpl::writeICalDateTimeProperty(const icalproperty_kind
+     }
+ 
+     KTimeZone ktz;
+-    if (!t.is_utc) {
++    if (!icaltime_is_utc(t)) {
+         ktz = dt.timeZone();
+     }
+ 
+@@ -2483,7 +2484,7 @@ QDateTime ICalFormatImpl::readICalDateTime(icalproperty *p, const icaltimetype &
+ //  _dumpIcaltime( t );
+ 
+     KDateTime::Spec timeSpec;
+-    if (t.is_utc  ||  t.zone == icaltimezone_get_utc_timezone()) {
++    if (icaltime_is_utc(t) ||  t.zone == icaltimezone_get_utc_timezone()) {
+         timeSpec = KDateTime::UTC;   // the time zone is UTC
+         utc = false;    // no need to convert to UTC
+     } else {
+diff --git a/src/icaltimezones.cpp b/src/icaltimezones.cpp
+index 2f6d42f..f8f8d5d 100644
+--- a/src/icaltimezones.cpp
++++ b/src/icaltimezones.cpp
+@@ -54,7 +54,7 @@ static QDateTime toQDateTime(const icaltimetype &t)
+ {
+     return QDateTime(QDate(t.year, t.month, t.day),
+                      QTime(t.hour, t.minute, t.second),
+-                     (t.is_utc ? Qt::UTC : Qt::LocalTime));
++                     (icaltime_is_utc(t) ? Qt::UTC : Qt::LocalTime));
+ }
+ 
+ // Maximum date for time zone data.
+@@ -81,7 +81,6 @@ static icaltimetype writeLocalICalDateTime(const QDateTime &utc, int offset)
+     t.second = local.time().second();
+     t.is_date = 0;
+     t.zone = nullptr;
+-    t.is_utc = 0;
+     return t;
+ }
+ 
+@@ -888,7 +887,7 @@
+         }
+         case ICAL_LASTMODIFIED_PROPERTY: {
+             const icaltimetype t = icalproperty_get_lastmodified(p);
+-            if (t.is_utc) {
++            if (icaltime_is_utc(t)) {
+                 data->d->lastModified = toQDateTime(t);
+             } else {
+                 qCDebug(KCALCORE_LOG) << "LAST-MODIFIED not UTC";
+@@ -1261,7 +1260,7 @@ bool ICalTimeZoneParser::parsePhase(icalcomponent *c, ICalTimeZonePhase &phase)
+     // Convert DTSTART to QDateTime, and from local time to UTC
+     const QDateTime localStart = toQDateTime(dtstart);     // local time
+     dtstart.second -= prevOffset;
+-    dtstart.is_utc = 1;
++    dtstart = icaltime_convert_to_zone(dtstart, icaltimezone_get_utc_timezone());
+     const QDateTime utcStart = toQDateTime(icaltime_normalize(dtstart));       // UTC
+ 
+     transitions += utcStart;
+@@ -1286,13 +1285,12 @@ bool ICalTimeZoneParser::parsePhase(icalcomponent *c, ICalTimeZonePhase &phase)
+                     t.minute = dtstart.minute;
+                     t.second = dtstart.second;
+                     t.is_date = 0;
+-                    t.is_utc = 0;    // dtstart is in local time
+                 }
+                 // RFC2445 states that RDATE must be in local time,
+                 // but we support UTC as well to be safe.
+-                if (!t.is_utc) {
++                if (!icaltime_is_utc(t)) {
+                     t.second -= prevOffset;    // convert to UTC
+-                    t.is_utc = 1;
++                    t = icaltime_convert_to_zone(t, icaltimezone_get_utc_timezone());
+                     t = icaltime_normalize(t);
+                 }
+                 transitions += toQDateTime(t);
+-- 
+cgit v0.11.2



More information about the arch-commits mailing list