summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustus Piater2017-12-16 12:57:06 +0100
committerJustus Piater2017-12-16 12:57:06 +0100
commit7d9e80fb6640001bc16eb4ea656ff9ad23d8f39f (patch)
tree78061558c019d0616f2481bea4edae21d4035905
parent57e960a24f3fadbdaa9f75f6c0e433d21e0fb299 (diff)
downloadaur-7d9e80fb6640001bc16eb4ea656ff9ad23d8f39f.tar.gz
build with libical3 instead of the obsolete libical2
Patch taken verbatim from https://lists.syncevolution.org/pipermail/syncevolution/2017-November/005580.html; many thanks to Milan Crha of RedHat.
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD9
-rw-r--r--syncevolution-1.5.2-libical3.patch125
3 files changed, 135 insertions, 3 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d153227998e3..d3f5bf95f888 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = syncevolution
pkgdesc = Synchronize PIM data via various protocols
pkgver = 1.5.2
- pkgrel = 3
+ pkgrel = 4
url = https://syncevolution.org/
arch = i686
arch = x86_64
@@ -15,8 +15,10 @@ pkgbase = syncevolution
depends = python2
depends = libunique
source = https://download.01.org/syncevolution/syncevolution/sources/syncevolution-1.5.2.tar.gz
+ source = syncevolution-1.5.2-libical3.patch
source = syncevolution-1.5.2-python2.patch
sha256sums = 8b692bd549a63d2259ed7519afb74fc9cab5be10c7a6f51868b66fc98fb48128
+ sha256sums = 36165fd651a2edc088dbf868214bace3d7f52f61dce051af4657ab1eafbe2ac9
sha256sums = f3cf917615d82512a7720d52c2486a1abd90bbf671debb92c70127b4ee28ce69
pkgname = syncevolution
diff --git a/PKGBUILD b/PKGBUILD
index 6a18360544d8..4bac57c8f44a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: Justus Piater <Justus-dev at Piater dot name>
pkgname=('syncevolution' 'syncevolution-http')
pkgver=1.5.2
-pkgrel=3
+pkgrel=4
pkgdesc="Synchronize PIM data via various protocols"
arch=('i686' 'x86_64')
url="https://syncevolution.org/"
@@ -10,15 +10,20 @@ depends=('evolution-data-server' 'libgnome-keyring' 'neon' 'openobex' 'python2'
makedepends=('intltool' 'boost')
#changelog=
source=("https://download.01.org/syncevolution/syncevolution/sources/syncevolution-$pkgver.tar.gz"
+ "$pkgname-$pkgver-libical3.patch"
"$pkgname-$pkgver-python2.patch")
sha256sums=('8b692bd549a63d2259ed7519afb74fc9cab5be10c7a6f51868b66fc98fb48128'
+ '36165fd651a2edc088dbf868214bace3d7f52f61dce051af4657ab1eafbe2ac9'
'f3cf917615d82512a7720d52c2486a1abd90bbf671debb92c70127b4ee28ce69')
prepare() {
cd "$pkgname-$pkgver"
- for patch in python2; do
+ for patch in libical3 python2; do
patch -p1 -i "$srcdir/$pkgname-$pkgver-$patch.patch"
done
+ autoreconf -fiv
+ cd src/synthesis
+ autoreconf -fiv
}
build() {
diff --git a/syncevolution-1.5.2-libical3.patch b/syncevolution-1.5.2-libical3.patch
new file mode 100644
index 000000000000..d2de4801dafc
--- /dev/null
+++ b/syncevolution-1.5.2-libical3.patch
@@ -0,0 +1,125 @@
+diff -aur syncevolution-1.5.2.pristine/src/backends/webdav/CalDAVSource.cpp syncevolution-1.5.2.new/src/backends/webdav/CalDAVSource.cpp
+--- syncevolution-1.5.2.pristine/src/backends/webdav/CalDAVSource.cpp 2014-07-14 13:42:44.000000000 +0200
++++ syncevolution-1.5.2.new/src/backends/webdav/CalDAVSource.cpp 2017-12-16 10:45:51.611051290 +0100
+@@ -721,8 +721,8 @@
+ eptr<icalcomponent> fullcal = event.m_calendar;
+ loadItem(event);
+ event.m_sequence++;
+- lastmodtime = icaltime_from_timet(event.m_lastmodtime, false);
+- lastmodtime.is_utc = 1;
++ lastmodtime = icaltime_from_timet_with_zone(event.m_lastmodtime, false, NULL);
++ lastmodtime.zone = icaltimezone_get_utc_timezone();
+ event.m_calendar = fullcal;
+ for (icalcomponent *comp = icalcomponent_get_first_component(event.m_calendar, ICAL_VEVENT_COMPONENT);
+ comp;
+diff -aur syncevolution-1.5.2.pristine/src/syncevo/icaltz-util.c syncevolution-1.5.2.new/src/syncevo/icaltz-util.c
+--- syncevolution-1.5.2.pristine/src/syncevo/icaltz-util.c 2016-09-26 13:20:05.000000000 +0200
++++ syncevolution-1.5.2.new/src/syncevo/icaltz-util.c 2017-12-16 10:45:51.611051290 +0100
+@@ -224,7 +224,7 @@
+ struct icaltimetype itime;
+
+ now = time (NULL);
+- itime = icaltime_from_timet (now, 0);
++ itime = icaltime_from_timet_with_zone (now, 0, NULL);
+ itime.month = itime.day = 1;
+ itime.hour = itime.minute = itime.second = 0;
+ year_start = icaltime_as_timet(itime);
+@@ -304,13 +304,13 @@
+ icalrecur_iterator *iter;
+
+ now = time (NULL);
+- itime = icaltime_from_timet (now, 0);
++ itime = icaltime_from_timet_with_zone (now, 0, NULL);
+ itime.month = itime.day = 1;
+ itime.hour = itime.minute = itime.second = 0;
+ year_start = icaltime_as_timet(itime);
+
+ comp_start = icalcomponent_get_dtstart (comp);
+- start = icaltime_from_timet (year_start, 0);
++ start = icaltime_from_timet_with_zone (year_start, 0, NULL);
+
+ iter = icalrecur_iterator_new (rule, start);
+ iter_start = icalrecur_iterator_next (iter);
+@@ -478,7 +478,7 @@
+ trans = transitions [stdidx] + types [zp_idx].gmtoff;
+ else
+ trans = types [zp_idx].gmtoff;
+- icaltime = icaltime_from_timet (trans, 0);
++ icaltime = icaltime_from_timet_with_zone (trans, 0, NULL);
+ dtstart = icaltime;
+ dtstart.year = 1970;
+ dtstart.minute = dtstart.second = 0;
+@@ -520,7 +520,7 @@
+ trans = transitions [dstidx] + types [zp_idx].gmtoff;
+ else
+ trans = types [zp_idx].gmtoff;
+- icaltime = icaltime_from_timet (trans, 0);
++ icaltime = icaltime_from_timet_with_zone (trans, 0, NULL);
+ dtstart = icaltime;
+ dtstart.year = 1970;
+ dtstart.minute = dtstart.second = 0;
+diff -aur syncevolution-1.5.2.pristine/src/synthesis/configure.in syncevolution-1.5.2.new/src/synthesis/configure.in
+--- syncevolution-1.5.2.pristine/src/synthesis/configure.in 2016-10-06 16:40:43.000000000 +0200
++++ syncevolution-1.5.2.new/src/synthesis/configure.in 2017-12-16 10:45:51.611051290 +0100
+@@ -101,9 +101,14 @@
+ if test "$enable_libical" == "yes"; then
+ PKG_CHECK_MODULES(LIBICAL, libical,
+ [AC_DEFINE(HAVE_LIBICAL, 1, "libical available")
+- PKG_CHECK_MODULES(LIBICAL2, libical >= 2,
+- [AC_DEFINE(USE_ICALTZUTIL_SET_EXACT_VTIMEZONES_SUPPORT, 1, "Use icaltzutil_set_exact_vtimezones_support() to enable interoperable timezone definitions.")],
+- [true])],
++ PKG_CHECK_MODULES(LIBICAL3, libical >= 3,
++ [have_libical3="yes"],
++ [have_libical3="no"])
++ if test "$have_libical3" == "no"; then
++ PKG_CHECK_MODULES(LIBICAL2, libical >= 2,
++ [AC_DEFINE(USE_ICALTZUTIL_SET_EXACT_VTIMEZONES_SUPPORT, 1, "Use icaltzutil_set_exact_vtimezones_support() to enable interoperable timezone definitions.")],
++ [true])
++ fi],
+ [AC_ERROR([libical not found, required for --enable-libical])])
+ fi
+
+diff -aur syncevolution-1.5.2.pristine/src/synthesis/src/platform_adapters/linux/platform_timezones.cpp syncevolution-1.5.2.new/src/synthesis/src/platform_adapters/linux/platform_timezones.cpp
+--- syncevolution-1.5.2.pristine/src/synthesis/src/platform_adapters/linux/platform_timezones.cpp 2016-10-06 16:40:43.000000000 +0200
++++ syncevolution-1.5.2.new/src/synthesis/src/platform_adapters/linux/platform_timezones.cpp 2017-12-16 10:45:51.611051290 +0100
+@@ -59,6 +59,7 @@
+ icalcomponent *(* icaltimezone_get_component_p)(icaltimezone *zone);
+ char *(* icalcomponent_as_ical_string_p)(icalcomponent *comp);
+ void (* icaltzutil_set_exact_vtimezones_support)(int on);
++ int (* icalrecur_iterator_set_start)(icalrecur_iterator *impl, struct icaltimetype start);
+ bool must_free_strings;
+ } icalcontext;
+
+@@ -89,6 +90,8 @@
+ }
+ icalcontext.icaltzutil_set_exact_vtimezones_support =
+ (typeof(icalcontext.icaltzutil_set_exact_vtimezones_support))dlsym(RTLD_DEFAULT, "icaltzutil_set_exact_vtimezones_support");
++ icalcontext.icalrecur_iterator_set_start =
++ (typeof(icalcontext.icalrecur_iterator_set_start))dlsym(RTLD_DEFAULT, "icalrecur_iterator_set_start");
+
+ return icalcontext.icaltimezone_get_builtin_timezones_p ?
+ icalcontext.icaltimezone_get_builtin_timezones_p() :
+@@ -121,8 +124,8 @@
+ };
+ // distinguish between v2 and older based on
+ // icaltzutil_set_exact_vtimezones_support, which was introduced in
+- // v2
+- return icalcontext.icaltzutil_set_exact_vtimezones_support ?
++ // v2, or icalrecur_iterator_set_start, which was introduced in v3
++ return (icalcontext.icaltzutil_set_exact_vtimezones_support || icalcontext.icalrecur_iterator_set_start) ?
+ reinterpret_cast<icalarray_v2 *>(array)->num_elements :
+ reinterpret_cast<icalarray_traditional *>(array)->num_elements;
+ }
+@@ -193,9 +196,10 @@
+ icalarray *builtin = ICALTIMEZONE_GET_BUILTIN_TIMEZONES();
+ #ifdef ICAL_COMPATIBILITY
+ PLOGDEBUGPRINTFX(aGZones->getDbgLogger, DBG_PARSE+DBG_EXOTIC,
+- ("runtime check: libical %s, %s icaltzutil_set_exact_vtimezones_support",
++ ("runtime check: libical %s, %s icaltzutil_set_exact_vtimezones_support, %s icalrecur_iterator_set_start",
+ icalcontext.icaltimezone_get_builtin_timezones_p ? "available" : "unavailable",
+- icalcontext.icaltzutil_set_exact_vtimezones_support ? "with" : "without"));
++ icalcontext.icaltzutil_set_exact_vtimezones_support ? "with" : "without",
++ icalcontext.icalrecur_iterator_set_start ? "with" : "without"));
+ // If we end up using the libical code (and not some replacement
+ // provided by SyncEvolution, which is the solution for distros with
+ // a libical that doesn't have the API), then enable timezones in the