1 |
commit: 5058404d036dc91d732e31ca951b905615ec346c |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Aug 16 16:12:28 2020 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Aug 16 16:24:10 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/kde-sunset.git/commit/?id=5058404d |
7 |
|
8 |
kde-apps/kdepimlibs: Allow building with libical3 |
9 |
|
10 |
Thanks-to: Tommy Yu <y <AT> metatoaster.com> |
11 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
12 |
|
13 |
.../kdepimlibs/files/fix-build-with-ical-3.0.diff | 188 +++++++++++++++++++++ |
14 |
.../kdepimlibs-4.14.11_pre20160611.ebuild | 2 + |
15 |
2 files changed, 190 insertions(+) |
16 |
|
17 |
diff --git a/kde-apps/kdepimlibs/files/fix-build-with-ical-3.0.diff b/kde-apps/kdepimlibs/files/fix-build-with-ical-3.0.diff |
18 |
new file mode 100644 |
19 |
index 00000000..98755f6b |
20 |
--- /dev/null |
21 |
+++ b/kde-apps/kdepimlibs/files/fix-build-with-ical-3.0.diff |
22 |
@@ -0,0 +1,188 @@ |
23 |
+diff -up kdepimlibs-4.14.10/kcalcore/icalformat_p.cpp.libical-3.0 kdepimlibs-4.14.10/kcalcore/icalformat_p.cpp |
24 |
+--- kdepimlibs-4.14.10/kcalcore/icalformat_p.cpp.libical-3.0 2017-11-12 14:10:59.070922105 +0100 |
25 |
++++ kdepimlibs-4.14.10/kcalcore/icalformat_p.cpp 2017-11-12 14:11:16.499921863 +0100 |
26 |
+@@ -2301,7 +2301,6 @@ icaltimetype ICalFormatImpl::writeICalDa |
27 |
+ t.second = 0; |
28 |
+ |
29 |
+ t.is_date = 1; |
30 |
+- t.is_utc = 0; |
31 |
+ t.zone = 0; |
32 |
+ |
33 |
+ return t; |
34 |
+@@ -2322,8 +2321,7 @@ icaltimetype ICalFormatImpl::writeICalDa |
35 |
+ t.minute = datetime.time().minute(); |
36 |
+ t.second = datetime.time().second(); |
37 |
+ } |
38 |
+- t.zone = 0; // zone is NOT set |
39 |
+- t.is_utc = datetime.isUtc() ? 1 : 0; |
40 |
++ t.zone = datetime.isUtc() ? icaltimezone_get_utc_timezone() : 0; // zone is NOT set |
41 |
+ |
42 |
+ // _dumpIcaltime( t ); |
43 |
+ |
44 |
+@@ -2398,7 +2396,7 @@ icalproperty *ICalFormatImpl::writeICalD |
45 |
+ } |
46 |
+ |
47 |
+ KTimeZone ktz; |
48 |
+- if (!t.is_utc) { |
49 |
++ if (!icaltime_is_utc( t )) { |
50 |
+ ktz = dt.timeZone(); |
51 |
+ } |
52 |
+ |
53 |
+@@ -2431,7 +2429,7 @@ KDateTime ICalFormatImpl::readICalDateTi |
54 |
+ // _dumpIcaltime( t ); |
55 |
+ |
56 |
+ KDateTime::Spec timeSpec; |
57 |
+- if (t.is_utc || t.zone == icaltimezone_get_utc_timezone()) { |
58 |
++ if (icaltime_is_utc( t ) || t.zone == icaltimezone_get_utc_timezone()) { |
59 |
+ timeSpec = KDateTime::UTC; // the time zone is UTC |
60 |
+ utc = false; // no need to convert to UTC |
61 |
+ } else { |
62 |
+diff -up kdepimlibs-4.14.10/kcalcore/icaltimezones.cpp.libical-3.0 kdepimlibs-4.14.10/kcalcore/icaltimezones.cpp |
63 |
+--- kdepimlibs-4.14.10/kcalcore/icaltimezones.cpp.libical-3.0 2017-11-12 14:11:03.603922042 +0100 |
64 |
++++ kdepimlibs-4.14.10/kcalcore/icaltimezones.cpp 2017-11-12 14:11:15.029921884 +0100 |
65 |
+@@ -54,7 +54,7 @@ static QDateTime toQDateTime(const icalt |
66 |
+ { |
67 |
+ return QDateTime(QDate(t.year, t.month, t.day), |
68 |
+ QTime(t.hour, t.minute, t.second), |
69 |
+- (t.is_utc ? Qt::UTC : Qt::LocalTime)); |
70 |
++ (icaltime_is_utc( t ) ? Qt::UTC : Qt::LocalTime)); |
71 |
+ } |
72 |
+ |
73 |
+ // Maximum date for time zone data. |
74 |
+@@ -81,7 +81,6 @@ static icaltimetype writeLocalICalDateTi |
75 |
+ t.second = local.time().second(); |
76 |
+ t.is_date = 0; |
77 |
+ t.zone = 0; |
78 |
+- t.is_utc = 0; |
79 |
+ return t; |
80 |
+ } |
81 |
+ |
82 |
+@@ -886,7 +885,7 @@ ICalTimeZone ICalTimeZoneSource::parse(i |
83 |
+ case ICAL_LASTMODIFIED_PROPERTY: |
84 |
+ { |
85 |
+ const icaltimetype t = icalproperty_get_lastmodified(p); |
86 |
+- if (t.is_utc) { |
87 |
++ if (icaltime_is_utc( t )) { |
88 |
+ data->d->lastModified = toQDateTime(t); |
89 |
+ } else { |
90 |
+ kDebug() << "LAST-MODIFIED not UTC"; |
91 |
+@@ -1259,7 +1258,7 @@ QList<QDateTime> ICalTimeZoneSourcePriva |
92 |
+ // Convert DTSTART to QDateTime, and from local time to UTC |
93 |
+ const QDateTime localStart = toQDateTime(dtstart); // local time |
94 |
+ dtstart.second -= prevOffset; |
95 |
+- dtstart.is_utc = 1; |
96 |
++ dtstart.zone = icaltimezone_get_utc_timezone(); |
97 |
+ const QDateTime utcStart = toQDateTime(icaltime_normalize(dtstart)); // UTC |
98 |
+ |
99 |
+ transitions += utcStart; |
100 |
+@@ -1286,13 +1285,13 @@ QList<QDateTime> ICalTimeZoneSourcePriva |
101 |
+ t.minute = dtstart.minute; |
102 |
+ t.second = dtstart.second; |
103 |
+ t.is_date = 0; |
104 |
+- t.is_utc = 0; // dtstart is in local time |
105 |
++ t.zone = 0; // dtstart is in local time |
106 |
+ } |
107 |
+ // RFC2445 states that RDATE must be in local time, |
108 |
+ // but we support UTC as well to be safe. |
109 |
+- if (!t.is_utc) { |
110 |
++ if (!icaltime_is_utc( t )) { |
111 |
+ t.second -= prevOffset; // convert to UTC |
112 |
+- t.is_utc = 1; |
113 |
++ t.zone = icaltimezone_get_utc_timezone(); |
114 |
+ t = icaltime_normalize(t); |
115 |
+ } |
116 |
+ transitions += toQDateTime(t); |
117 |
+diff -up kdepimlibs-4.14.10/kcal/icalformat_p.cpp.libical-3.0 kdepimlibs-4.14.10/kcal/icalformat_p.cpp |
118 |
+--- kdepimlibs-4.14.10/kcal/icalformat_p.cpp.libical-3.0 2017-11-12 14:10:50.692922220 +0100 |
119 |
++++ kdepimlibs-4.14.10/kcal/icalformat_p.cpp 2017-11-12 14:11:08.915921968 +0100 |
120 |
+@@ -2087,7 +2087,6 @@ icaltimetype ICalFormatImpl::writeICalDa |
121 |
+ t.second = 0; |
122 |
+ |
123 |
+ t.is_date = 1; |
124 |
+- t.is_utc = 0; |
125 |
+ t.zone = 0; |
126 |
+ |
127 |
+ return t; |
128 |
+@@ -2106,8 +2105,7 @@ icaltimetype ICalFormatImpl::writeICalDa |
129 |
+ t.second = datetime.time().second(); |
130 |
+ |
131 |
+ t.is_date = 0; |
132 |
+- t.zone = 0; // zone is NOT set |
133 |
+- t.is_utc = datetime.isUtc() ? 1 : 0; |
134 |
++ t.zone = datetime.isUtc() ? icaltimezone_get_utc_timezone() : 0; |
135 |
+ |
136 |
+ // _dumpIcaltime( t ); |
137 |
+ |
138 |
+@@ -2174,7 +2172,7 @@ icalproperty *ICalFormatImpl::writeICalD |
139 |
+ } |
140 |
+ |
141 |
+ KTimeZone ktz; |
142 |
+- if ( !t.is_utc ) { |
143 |
++ if ( !icaltime_is_utc( t ) ) { |
144 |
+ ktz = dt.timeZone(); |
145 |
+ } |
146 |
+ |
147 |
+@@ -2207,7 +2205,7 @@ KDateTime ICalFormatImpl::readICalDateTi |
148 |
+ // _dumpIcaltime( t ); |
149 |
+ |
150 |
+ KDateTime::Spec timeSpec; |
151 |
+- if ( t.is_utc || t.zone == icaltimezone_get_utc_timezone() ) { |
152 |
++ if ( icaltime_is_utc( t ) || t.zone == icaltimezone_get_utc_timezone() ) { |
153 |
+ timeSpec = KDateTime::UTC; // the time zone is UTC |
154 |
+ utc = false; // no need to convert to UTC |
155 |
+ } else { |
156 |
+diff -up kdepimlibs-4.14.10/kcal/icaltimezones.cpp.libical-3.0 kdepimlibs-4.14.10/kcal/icaltimezones.cpp |
157 |
+--- kdepimlibs-4.14.10/kcal/icaltimezones.cpp.libical-3.0 2017-11-12 14:10:54.277922171 +0100 |
158 |
++++ kdepimlibs-4.14.10/kcal/icaltimezones.cpp 2017-11-12 14:11:13.407921906 +0100 |
159 |
+@@ -50,7 +50,7 @@ static QDateTime toQDateTime( const ical |
160 |
+ { |
161 |
+ return QDateTime( QDate( t.year, t.month, t.day ), |
162 |
+ QTime( t.hour, t.minute, t.second ), |
163 |
+- ( t.is_utc ? Qt::UTC : Qt::LocalTime ) ); |
164 |
++ ( icaltime_is_utc( t ) ? Qt::UTC : Qt::LocalTime ) ); |
165 |
+ } |
166 |
+ |
167 |
+ // Maximum date for time zone data. |
168 |
+@@ -77,7 +77,6 @@ static icaltimetype writeLocalICalDateTi |
169 |
+ t.second = local.time().second(); |
170 |
+ t.is_date = 0; |
171 |
+ t.zone = 0; |
172 |
+- t.is_utc = 0; |
173 |
+ return t; |
174 |
+ } |
175 |
+ |
176 |
+@@ -787,7 +786,7 @@ ICalTimeZone ICalTimeZoneSource::parse( |
177 |
+ case ICAL_LASTMODIFIED_PROPERTY: |
178 |
+ { |
179 |
+ icaltimetype t = icalproperty_get_lastmodified(p); |
180 |
+- if ( t.is_utc ) { |
181 |
++ if ( icaltime_is_utc( t ) ) { |
182 |
+ data->d->lastModified = toQDateTime( t ); |
183 |
+ } else { |
184 |
+ kDebug() << "LAST-MODIFIED not UTC"; |
185 |
+@@ -972,7 +971,7 @@ QList<QDateTime> ICalTimeZoneSourcePriva |
186 |
+ // Convert DTSTART to QDateTime, and from local time to UTC |
187 |
+ QDateTime localStart = toQDateTime( dtstart ); // local time |
188 |
+ dtstart.second -= prevOffset; |
189 |
+- dtstart.is_utc = 1; |
190 |
++ dtstart.zone = icaltimezone_get_utc_timezone(); |
191 |
+ QDateTime utcStart = toQDateTime( icaltime_normalize( dtstart ) ); // UTC |
192 |
+ |
193 |
+ transitions += utcStart; |
194 |
+@@ -999,13 +998,13 @@ QList<QDateTime> ICalTimeZoneSourcePriva |
195 |
+ t.minute = dtstart.minute; |
196 |
+ t.second = dtstart.second; |
197 |
+ t.is_date = 0; |
198 |
+- t.is_utc = 0; // dtstart is in local time |
199 |
++ t.zone = 0; // dtstart is in local time |
200 |
+ } |
201 |
+ // RFC2445 states that RDATE must be in local time, |
202 |
+ // but we support UTC as well to be safe. |
203 |
+- if ( !t.is_utc ) { |
204 |
++ if ( !icaltime_is_utc( t ) ) { |
205 |
+ t.second -= prevOffset; // convert to UTC |
206 |
+- t.is_utc = 1; |
207 |
++ t.zone = icaltimezone_get_utc_timezone(); |
208 |
+ t = icaltime_normalize( t ); |
209 |
+ } |
210 |
+ transitions += toQDateTime( t ); |
211 |
|
212 |
diff --git a/kde-apps/kdepimlibs/kdepimlibs-4.14.11_pre20160611.ebuild b/kde-apps/kdepimlibs/kdepimlibs-4.14.11_pre20160611.ebuild |
213 |
index a7b125eb..828d6218 100644 |
214 |
--- a/kde-apps/kdepimlibs/kdepimlibs-4.14.11_pre20160611.ebuild |
215 |
+++ b/kde-apps/kdepimlibs/kdepimlibs-4.14.11_pre20160611.ebuild |
216 |
@@ -32,6 +32,8 @@ DEPEND=" |
217 |
# bug #418071 |
218 |
RDEPEND="${DEPEND}" |
219 |
|
220 |
+PATCHES=( "${FILESDIR}/fix-build-with-ical-3.0.diff" ) |
221 |
+ |
222 |
src_configure() { |
223 |
local mycmakeargs=( |
224 |
-DBUILD_TOOLS=OFF |