}
-/* TODO: temporary copy from libical, apply this patch to libical... */
-int webcit_icaltime_compare(const struct icaltimetype a_in, const struct icaltimetype b_in)
-{
- struct icaltimetype a, b;
-
- a = icaltime_convert_to_zone(a_in, icaltimezone_get_utc_timezone());
- b = icaltime_convert_to_zone(b_in, icaltimezone_get_utc_timezone());
-
- if (a.year > b.year)
- return 1;
- else if (a.year < b.year)
- return -1;
-
- else if (a.month > b.month)
- return 1;
- else if (a.month < b.month)
- return -1;
-
- else if (a.day > b.day)
- return 1;
- else if (a.day < b.day)
- return -1;
-
- /* if both are dates, we are done */
- if (a.is_date && b.is_date)
- return 0;
-
- /* else, if only one is a date (and we already know the date part is equal),
- then the other is greater */
- else if (b.is_date)
- return 1;
- else if (a.is_date)
- return -1;
-
- else if (a.hour > b.hour)
- return 1;
- else if (a.hour < b.hour)
- return -1;
-
- else if (a.minute > b.minute)
- return 1;
- else if (a.minute < b.minute)
- return -1;
-
- else if (a.second > b.second)
- return 1;
- else if (a.second < b.second)
- return -1;
-
- return 0;
-}
-
-
/**
* \brief Check if dates are overlapping
* Check to see if two events overlap.
if (icaltime_is_null_time(t2end)) return(0);
/** If event 1 ends before event 2 starts, we're in the clear. */
- if (webcit_icaltime_compare(t1end, t2start) <= 0) return(0);
+ if (icaltime_compare(t1end, t2start) <= 0) return(0);
// lprintf(9, "first passed\n");
/** If event 2 ends before event 1 starts, we're also ok. */
- if (webcit_icaltime_compare(t2end, t1start) <= 0) return(0);
+ if (icaltime_compare(t2end, t1start) <= 0) return(0);
// lprintf(9, "second passed\n");
/** Otherwise, they overlap. */
sscanf(ICAL_VERSION, "%d.%d", &major, &minor);
v = 100*major + minor;
printf("libical version: %i\n", v);
- if (v >= 24) {
+ if (v >= 30) {
printf("This version is ok.\n");
return(0);
}
- printf("libical 0.24 or newer required.\n");
+ printf("libical 0.30 or newer required.\n");
printf("Citadel will be built without calendar support.\n");
return(1);
}
Section: web
Priority: optional
Maintainer: Wilfried Goesgens <w.goesgens@outgesourced.org>
-Build-Depends: debhelper (>= 4), po-debconf, libical-dev, gettext, locales,
+Build-Depends: debhelper (>= 4), po-debconf, libical-dev (>=0.30), gettext, locales,
libcitadel-dev
Standards-Version: 3.7.2