Fix build with libical >= 3.0.0.

This commit is contained in:
ajacoutot 2017-11-08 05:37:16 +00:00
parent f229999da4
commit 393b73bae3
5 changed files with 93 additions and 2 deletions

View File

@ -1,11 +1,11 @@
# $OpenBSD: Makefile,v 1.3 2017/11/04 16:54:24 naddy Exp $
# $OpenBSD: Makefile,v 1.4 2017/11/08 05:37:16 ajacoutot Exp $
COMMENT-main= MS Exchange groupware suite replacement
COMMENT-mapi= kopano MAPI extensions for PHP
PKGNAME-main= kopano-core-${V}.${BUILD}
PKGNAME-mapi= kopano-mapi-${V}.${BUILD}
REVISION= 0
REVISION= 1
CATEGORIES= mail www productivity

View File

@ -0,0 +1,25 @@
$OpenBSD: patch-libicalmapi_icalrecurrence_cpp,v 1.1 2017/11/08 05:37:16 ajacoutot Exp $
Fix build with libical >= 3.0.0
Index: libicalmapi/icalrecurrence.cpp
--- libicalmapi/icalrecurrence.cpp.orig
+++ libicalmapi/icalrecurrence.cpp
@@ -776,7 +776,7 @@ HRESULT ICalRecurrence::HrCreateICalRecurrence(TIMEZON
else
ittExDate = icaltime_from_timet_with_zone(LocalToUTC(exc, sTimeZone), 0, nullptr);
- ittExDate.is_utc = 1;
+ ittExDate.zone = icaltimezone_get_utc_timezone();
icalcomponent_add_property(lpicEvent, icalproperty_new_exdate(ittExDate));
}
@@ -888,7 +888,7 @@ HRESULT ICalRecurrence::HrCreateICalRecurrenceType(TIM
icRec.count = 0;
// if untiltime is saved as UTC it breaks last occurrence.
icRec.until = icaltime_from_timet_with_zone(lpRecurrence->getEndDate() + lpRecurrence->getStartTimeOffset(), bIsAllday, nullptr);
- icRec.until.is_utc = 0;
+ icRec.until.zone = NULL;
break;
case recurrence::NUMBER:
icRec.count = lpRecurrence->getCount();

View File

@ -0,0 +1,16 @@
$OpenBSD: patch-libicalmapi_valarm_cpp,v 1.1 2017/11/08 05:37:16 ajacoutot Exp $
Fix build with libical >= 3.0.0
Index: libicalmapi/valarm.cpp
--- libicalmapi/valarm.cpp.orig
+++ libicalmapi/valarm.cpp
@@ -58,7 +58,7 @@ HRESULT HrParseReminder(LONG lRemindBefore, time_t ttR
if (ttReminderTime && bTask) {
sittTrigger.time = icaltime_from_timet_with_zone(ttReminderTime, false, nullptr); // given in UTC
- sittTrigger.time.is_utc = 1;
+ sittTrigger.time.zone = icaltimezone_get_utc_timezone();
} else
sittTrigger.duration = icaldurationtype_from_int(-1 * lRemindBefore * 60); // set seconds

View File

@ -0,0 +1,25 @@
$OpenBSD: patch-libicalmapi_vconverter_cpp,v 1.1 2017/11/08 05:37:16 ajacoutot Exp $
Fix build with libical >= 3.0.0
Index: libicalmapi/vconverter.cpp
--- libicalmapi/vconverter.cpp.orig
+++ libicalmapi/vconverter.cpp
@@ -1998,7 +1998,7 @@ HRESULT VConverter::HrSetTimeProperties(LPSPropValue l
auto lpPropVal = PCpropFindProp(lpMsgProps, ulMsgProps, PR_CREATION_TIME);
if (lpPropVal) {
ittICalTime = icaltime_from_timet_with_zone(FileTimeToUnixTime(lpPropVal->Value.ft.dwHighDateTime, lpPropVal->Value.ft.dwLowDateTime), 0, nullptr);
- ittICalTime.is_utc = 1;
+ ittICalTime.zone = icaltimezone_get_utc_timezone();
lpProp = icalproperty_new_created(ittICalTime);
icalcomponent_add_property(lpEvent, lpProp);
@@ -2019,7 +2019,7 @@ HRESULT VConverter::HrSetTimeProperties(LPSPropValue l
lpPropVal = PCpropFindProp(lpMsgProps, ulMsgProps, PR_LAST_MODIFICATION_TIME);
if (lpPropVal) {
ittICalTime = icaltime_from_timet_with_zone(FileTimeToUnixTime(lpPropVal->Value.ft.dwHighDateTime, lpPropVal->Value.ft.dwLowDateTime), 0, nullptr);
- ittICalTime.is_utc = 1;
+ ittICalTime.zone = icaltimezone_get_utc_timezone();
lpProp = icalproperty_new_lastmodified(ittICalTime);
icalcomponent_add_property(lpEvent,lpProp);

View File

@ -0,0 +1,25 @@
$OpenBSD: patch-libicalmapi_vtimezone_cpp,v 1.1 2017/11/08 05:37:16 ajacoutot Exp $
Fix build with libical >= 3.0.0
Index: libicalmapi/vtimezone.cpp
--- libicalmapi/vtimezone.cpp.orig
+++ libicalmapi/vtimezone.cpp
@@ -176,7 +176,7 @@ static HRESULT HrZoneToStruct(icalcomponent_kind kind,
iterComp = icalcomponent_get_first_component(lpVTZ, kind);
while (iterComp != NULL) {
icTime = icalcomponent_get_dtstart(iterComp);
- icTime.is_utc = 1;
+ icTime.zone = icaltimezone_get_utc_timezone();
struct tm start = UTC_ICalTime2UnixTime(icTime);
if (time(NULL) < mktime(&start) && icComp != nullptr)
break;
@@ -197,7 +197,7 @@ static HRESULT HrZoneToStruct(icalcomponent_kind kind,
return MAPI_E_NOT_FOUND;
icTime = icalcomponent_get_dtstart(icComp);
- icTime.is_utc = 1;
+ icTime.zone = icaltimezone_get_utc_timezone();
if (kind == ICAL_XSTANDARD_COMPONENT) {
// this is set when we request the STD timezone part.