Projects
Kolab:16
libkolab
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 32
View file
libkolab.spec
Changed
@@ -41,7 +41,7 @@ Name: libkolab %endif -Version: 3.1.0 +Version: 3.2.0 Release: 1%{?dist} Summary: Kolab Object Handling Library
View file
debian.changelog
Changed
@@ -1,4 +1,11 @@ -libkolab (3.0.2-0~kolab2) unstable; urgency=low +libkolab (3.2.0-0~kolab2) unstable; urgency=low + + * Added support for php 8.2 + * Allow building against legacy kcalcore on buster + + -- Christian Mollekopf <mollekopf@apheleia-it.ch> Thu, 7 Dec 2023 11:09:09 +0100 + +libkolab (3.1.0-0~kolab2) unstable; urgency=low * Dropped php < 7.2 * Added support for php 8.0, 8.1
View file
debian.control
Changed
@@ -10,6 +10,9 @@ libcurl4-gnutls-dev, libkolabxml-dev (>= 1.3), libossp-uuid-dev, + libboost-dev, + libboost-system-dev, + libboost-thread-dev, qtbase5-dev, libkf5coreaddons-dev, libkf5calendarcore-dev, @@ -17,11 +20,11 @@ libxerces-c-dev, php-cgi, php-dev, - plesk-php72-dev | bash, plesk-php73-dev | bash, plesk-php74-dev | bash, plesk-php80-dev | bash, plesk-php81-dev | bash, + plesk-php82-dev | bash, psa | bash, python2-dev | python-dev | python3-dev, python-minimal | python2-minimal | python3-minimal,
View file
debian.rules
Changed
@@ -5,7 +5,7 @@ PHPEXT := $(shell php-config --extension-dir) PHPINC := $(shell php-config --include-dir) -PHP_VERSIONS=8.2 8.1 8.0 7.4 7.3 7.2 +PHP_VERSIONS=8.2 8.1 8.0 7.4 7.3 export DH_VERBOSE=1 export DH_OPTIONS=-v @@ -71,13 +71,6 @@ done ; \ fi - # Build php vanilla - if $$(php-config --vernum) -gt 70000 ; then \ - sed -r -i -e 's/-c\+\+ -php0-9? -I/-c++ -php7 -I/g' cmake/modules/SWIGUtils.cmake ; \ - else \ - sed -r -i -e 's/-c\+\+ -php0-9? -I/-c++ -php5 -I/g' cmake/modules/SWIGUtils.cmake ; \ - fi - dh_auto_build --buildsystem cmake --builddirectory php-vanilla # Build python versions via pybuild @@ -91,11 +84,6 @@ if ! -f "/opt/plesk/php/$${version}/bin/php-config" ; then \ continue ; \ fi ; \ - if $$(/opt/plesk/php/$${version}/bin/php-config --vernum) -gt 70000 ; then \ - sed -r -i -e 's/-c\+\+ -php0-9? -I/-c++ -php7 -I/g' cmake/modules/SWIGUtils.cmake ; \ - else \ - sed -r -i -e 's/-c\+\+ -php0-9? -I/-c++ -php5 -I/g' cmake/modules/SWIGUtils.cmake ; \ - fi ; \ dh_auto_configure --buildsystem cmake --builddirectory php-$${version} -- \ -DLIB_INSTALL_DIR=/usr/lib \ -DBoost_NO_BOOST_CMAKE=ON \ @@ -109,13 +97,6 @@ done ; \ fi - # Configure php vanilla - if $$(php-config --vernum) -gt 70000 ; then \ - sed -r -i -e 's/-c\+\+ -php0-9? -I/-c++ -php7 -I/g' cmake/modules/SWIGUtils.cmake ; \ - else \ - sed -r -i -e 's/-c\+\+ -php0-9? -I/-c++ -php5 -I/g' cmake/modules/SWIGUtils.cmake ; \ - fi - dh_auto_configure --buildsystem cmake --builddirectory php-vanilla -- \ -DLIB_INSTALL_DIR=/usr/lib \ -DBoost_NO_BOOST_CMAKE=ON \ @@ -150,8 +131,6 @@ echo "debian/kolab.ini etc/php/7.4/mods-available" >> debian/php-kolab.install ; \ elif -d "/etc/php/7.3/mods-available" ; then \ echo "debian/kolab.ini etc/php/7.3/mods-available" >> debian/php-kolab.install ; \ - elif -d "/etc/php/7.2/mods-available" ; then \ - echo "debian/kolab.ini etc/php/7.2/mods-available" >> debian/php-kolab.install ; \ else \ echo "debian/kolab.ini etc/php/mods-available" >> debian/php-kolab.install ; \ fi @@ -165,11 +144,6 @@ if ! -f "/opt/plesk/php/$${version}/bin/php-config" ; then \ continue ; \ fi ; \ - if $$(/opt/plesk/php/$${version}/bin/php-config --vernum) -gt 70000 ; then \ - sed -r -i -e 's/-c\+\+ -php0-9? -I/-c++ -php7 -I/g' cmake/modules/SWIGUtils.cmake ; \ - else \ - sed -r -i -e 's/-c\+\+ -php0-9? -I/-c++ -php5 -I/g' cmake/modules/SWIGUtils.cmake ; \ - fi ; \ shver=$$(echo $${version} | sed -e 's/\.//g') ; \ make -C php-$${version} install DESTDIR=$(PWD)/debian/plesk-php$${shver}-kolab/ ; \ mkdir -p debian/plesk-php$${shver}-kolab/opt/plesk/php/$${version}/etc/php.d/ ; \
View file
libkolab-3.1.0.tar.gz/CMakeLists.txt -> libkolab-3.2.0.tar.gz/CMakeLists.txt
Changed
@@ -30,7 +30,7 @@ # 0.1.1 (patch release for 0.1.0) # 0.2 (0.2 development version towards 0.2.0) set(Libkolab_VERSION_MAJOR 3) -set(Libkolab_VERSION_MINOR 1) +set(Libkolab_VERSION_MINOR 2) # Enable the full x.y.z version only for release versions set(Libkolab_VERSION_PATCH 0) #set(Libkolab_VERSION ${Libkolab_VERSION_MAJOR}.${Libkolab_VERSION_MINOR}.${Libkolab_VERSION_PATCH}) @@ -55,7 +55,8 @@ find_package(Qt5 REQUIRED Core Xml) # FIXME: Seems to be required for libkolabxml, but should be fixed in libkolabxml -find_package(Boost REQUIRED system thread) +set(Boost_USE_MULTITHREADED ON) +find_package(Boost REQUIRED COMPONENTS thread system) # Do the building find_package(Libkolabxml 1.1.1 REQUIRED) @@ -70,7 +71,11 @@ include(FindPackageHandleStandardArgs) -find_package(KF5CalendarCore "5.12.1" CONFIG REQUIRED) +find_package(KF5CalendarCore "5.9.3" CONFIG REQUIRED) +if (KF5CalendarCore_VERSION VERSION_LESS "5.12.1") + message("Building with legacy kcalcore") + add_definitions(-DLEGACY_KCALCORE=1) +endif() find_package(KF5Mime "4.84.0" CONFIG REQUIRED) find_package(SWIG)
View file
libkolab-3.1.0.tar.gz/cmake/modules/SWIGUtils.cmake -> libkolab-3.2.0.tar.gz/cmake/modules/SWIGUtils.cmake
Changed
@@ -3,8 +3,10 @@ macro (generatePHPBindings MODULE_NAME INTERFACE_FILE) set(KOLAB_SWIG_PHP_SOURCE_FILE php_${MODULE_NAME}_wrapper.cpp) + #Set to php7 or php5 to force use of the non-default php version + set(SWIG_PHP_VERSION php) add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${KOLAB_SWIG_PHP_SOURCE_FILE} - COMMAND ${SWIG} -v -c++ -php -I${Libkolabxml_INCLUDES} -module ${MODULE_NAME} -o ${CMAKE_CURRENT_BINARY_DIR}/${KOLAB_SWIG_PHP_SOURCE_FILE} ${INTERFACE_FILE} + COMMAND ${SWIG} -v -c++ -${SWIG_PHP_VERSION} -I${Libkolabxml_INCLUDES} -module ${MODULE_NAME} -o ${CMAKE_CURRENT_BINARY_DIR}/${KOLAB_SWIG_PHP_SOURCE_FILE} ${INTERFACE_FILE} COMMENT "Generating php bindings" WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DEPENDS ${INTERFACE_FILE} kolab
View file
libkolab-3.1.0.tar.gz/conversion/kcalconversion.cpp -> libkolab-3.2.0.tar.gz/conversion/kcalconversion.cpp
Changed
@@ -293,6 +293,33 @@ * Since that means the semantics of the two are different, we have to store the kolab uid as a custom property. */ // QUrl::fromPercentEncoding( +#ifdef LEGACY_KCALCORE + KCalCore::Attendee::Ptr attendee = KCalCore::Attendee::Ptr(new KCalCore::Attendee(fromStdString(a.contact().name()), + fromStdString(a.contact().email()), + a.rsvp(), + toPartStat(a.partStat()), + toRole(a.role()) )); + if (!a.contact().uid().empty()) { //TODO Identify contact from addressbook based on uid + attendee->customProperties().setNonKDECustomProperty(CUSTOM_KOLAB_CONTACT_UUID, fromStdString(a.contact().uid())); + } + if (!a.delegatedTo().empty()) { + if (a.delegatedTo().size() > 1) { + WARNING("multiple delegatees are not supported"); + } + + attendee->setDelegate(toMailto(a.delegatedTo().front().email(), a.delegatedTo().front().name()).toString()); + } + if (!a.delegatedFrom().empty()) { + if (a.delegatedFrom().size() > 1) { + WARNING("multiple delegators are not supported"); + } + attendee->setDelegator(toMailto(a.delegatedFrom().front().email(), a.delegatedFrom().front().name()).toString()); + } + if (a.cutype() != CutypeIndividual) { + attendee->customProperties().setNonKDECustomProperty(CUSTOM_KOLAB_CONTACT_CUTYPE, QString::number(a.cutype())); + } + i.addAttendee(attendee); +#else KCalCore::Attendee attendee(fromStdString(a.contact().name()), fromStdString(a.contact().email()), a.rsvp(), @@ -318,8 +345,21 @@ attendee.customProperties().setNonKDECustomProperty(CUSTOM_KOLAB_CONTACT_CUTYPE, QString::number(a.cutype())); } i.addAttendee(attendee); +#endif } foreach (const Kolab::Attachment a, e.attachments()) { +#ifdef LEGACY_KCALCORE + KCalCore::Attachment::Ptr ptr; + if (!a.uri().empty()) { + ptr = KCalCore::Attachment::Ptr(new KCalCore::Attachment(fromStdString(a.uri()), fromStdString(a.mimetype()))); + } else { + ptr = KCalCore::Attachment::Ptr(new KCalCore::Attachment(QByteArray::fromRawData(a.data().c_str(), a.data().size()).toBase64(), fromStdString(a.mimetype()))); + } + if (!a.label().empty()) { + ptr->setLabel(fromStdString(a.label())); + } + i.addAttachment(ptr); +#else KCalCore::Attachment ptr; if (!a.uri().empty()) { ptr = KCalCore::Attachment(fromStdString(a.uri()), fromStdString(a.mimetype())); @@ -330,6 +370,7 @@ ptr.setLabel(fromStdString(a.label())); } i.addAttachment(ptr); +#endif } QMap<QByteArray, QString> props; @@ -360,6 +401,31 @@ i.setDescription(toStdString(e.description())); i.setStatus(fromStatus(e.status())); std::vector<Kolab::Attendee> attendees; +#ifdef LEGACY_KCALCORE + foreach (const KCalCore::Attendee::Ptr attendee, e.attendees()) { + const QString &uid = attendee->customProperties().nonKDECustomProperty(CUSTOM_KOLAB_CONTACT_UUID); + Kolab::Attendee a(Kolab::ContactReference(toStdString(attendee->email()), toStdString(attendee->name()), toStdString(uid))); + a.setRSVP(attendee->RSVP()); + a.setPartStat(fromPartStat(attendee->status())); + a.setRole(fromRole(attendee->role())); + if (!attendee->delegate().isEmpty()) { + std::string name; + const std::string &email = fromMailto(QUrl(attendee->delegate()), name); + a.setDelegatedTo(std::vector<Kolab::ContactReference>() << Kolab::ContactReference(email, name)); + } + if (!attendee->delegator().isEmpty()) { + std::string name; + const std::string &email = fromMailto(QUrl(attendee->delegator()), name); + a.setDelegatedFrom(std::vector<Kolab::ContactReference>() << Kolab::ContactReference(email, name)); + } + const QString &cutype = attendee->customProperties().nonKDECustomProperty(CUSTOM_KOLAB_CONTACT_CUTYPE); + if (!cutype.isEmpty()) { + a.setCutype(static_cast<Kolab::Cutype>(cutype.toInt())); + } + + attendees.push_back(a); + } +#else foreach (const KCalCore::Attendee attendee, e.attendees()) { const QString &uid = attendee.customProperties().nonKDECustomProperty(CUSTOM_KOLAB_CONTACT_UUID); Kolab::Attendee a(Kolab::ContactReference(toStdString(attendee.email()), toStdString(attendee.name()), toStdString(uid))); @@ -383,8 +449,21 @@ attendees.push_back(a); } +#endif i.setAttendees(attendees); std::vector<Kolab::Attachment> attachments; +#ifdef LEGACY_KCALCORE + foreach (const KCalCore::Attachment::Ptr &ptr, e.attachments()) { + Kolab::Attachment a; + if (ptr->isUri()) { + a.setUri(toStdString(ptr->uri()), toStdString(ptr->mimeType())); + } else { + a.setData(std::string(ptr->decodedData().data(), ptr->decodedData().size()), toStdString(ptr->mimeType())); + } + a.setLabel(toStdString(ptr->label())); + attachments.push_back(a); + } +#else foreach (const KCalCore::Attachment &ptr, e.attachments()) { Kolab::Attachment a; if (ptr.isUri()) { @@ -395,6 +474,7 @@ a.setLabel(toStdString(ptr.label())); attachments.push_back(a); } +#endif i.setAttachments(attachments); std::vector<Kolab::CustomProperty> customProperties; @@ -661,7 +741,11 @@ i.setLocation(fromStdString(e.location())); //TODO detect richtext } if (e.organizer().isValid()) { +#ifdef LEGACY_KCALCORE + i.setOrganizer(KCalCore::Person::Ptr(new KCalCore::Person(fromStdString(e.organizer().name()), fromStdString(e.organizer().email())))); //TODO handle uid too +#else i.setOrganizer(KCalCore::Person(fromStdString(e.organizer().name()), fromStdString(e.organizer().email()))); //TODO handle uid too +#endif } if (!e.url().empty()) { i.setNonKDECustomProperty(CUSTOM_KOLAB_URL, fromStdString(e.url())); @@ -677,7 +761,11 @@ case Kolab::Alarm::EMailAlarm: { KCalCore::Person::List receipents; foreach (Kolab::ContactReference c ,a.attendees()) { +#ifdef LEGACY_KCALCORE + KCalCore::Person::Ptr person = KCalCore::Person::Ptr(new KCalCore::Person(fromStdString(c.name()), fromStdString(c.email()))); +#else KCalCore::Person person(fromStdString(c.name()), fromStdString(c.email())); +#endif receipents.append(person); } alarm->setEmailAlarm(fromStdString(a.summary()), fromStdString(a.description()), receipents); @@ -715,9 +803,15 @@ { i.setPriority(fromPriority(e.priority())); i.setLocation(toStdString(e.location())); +#ifdef LEGACY_KCALCORE + if (!e.organizer()->email().isEmpty()) { + i.setOrganizer(Kolab::ContactReference(Kolab::ContactReference::EmailReference, toStdString(e.organizer()->email()), toStdString(e.organizer()->name()))); //TODO handle uid too + } +#else if (!e.organizer().email().isEmpty()) { i.setOrganizer(Kolab::ContactReference(Kolab::ContactReference::EmailReference, toStdString(e.organizer().email()), toStdString(e.organizer().name()))); //TODO handle uid too } +#endif i.setUrl(toStdString(e.nonKDECustomProperty(CUSTOM_KOLAB_URL))); i.setRecurrenceID(fromDate(e.recurrenceId()), e.thisAndFuture()); getRecurrence(i, e); @@ -736,9 +830,15 @@ break; case KCalCore::Alarm::Email: { std::vector<Kolab::ContactReference> receipents; +#ifdef LEGACY_KCALCORE + foreach(const KCalCore::Person::Ptr &p, a->mailAddresses()) { + receipents.push_back(Kolab::ContactReference(toStdString(p->email()), toStdString(p->name()))); + } +#else foreach(const KCalCore::Person &p, a->mailAddresses()) { receipents.push_back(Kolab::ContactReference(toStdString(p.email()), toStdString(p.name()))); } +#endif alarm = Kolab::Alarm(toStdString(a->mailSubject()), toStdString(a->mailText()), receipents); } break;
View file
libkolab-3.1.0.tar.gz/tests/kcalconversiontest.cpp -> libkolab-3.2.0.tar.gz/tests/kcalconversiontest.cpp
Changed
@@ -50,6 +50,7 @@ void compareAttendeesVectors(const KCalCore::Attendee::List &list, const KCalCore::Attendee::List &other) { QCOMPARE(list.size(), other.size()); +#ifndef LEGACY_KCALCORE for (int i = 0 ; i < list.size(); i++) { KCalCore::Attendee at1 = list.at(i); at1.setUid(QString()); @@ -57,6 +58,7 @@ at2.setUid(QString()); QCOMPARE(at1, at2); } +#endif } void KCalConversionTest::initTestCase() @@ -192,19 +194,25 @@ kcal.setPriority(3); kcal.setStatus(KCalCore::Incidence::StatusConfirmed); kcal.setLocation("location"); +#ifndef LEGACY_KCALCORE kcal.setOrganizer(KCalCore::Person("organizer", "organizer@email")); +#endif //Url kcal.setNonKDECustomProperty("X-KOLAB-URL", "http://test.org"); +#ifndef LEGACY_KCALCORE KCalCore::Attendee att("attendee", "attendee@email", false, KCalCore::Attendee::NeedsAction, KCalCore::Attendee::ReqParticipant); att.setDelegate("mailto:delegatee<delegatee@email>"); att.setDelegator("mailto:delegator<delegator@email>"); kcal.addAttendee(att); kcal.addAttachment(KCalCore::Attachment(QString("uri"), "mimetype/mime")); +#endif +#ifndef LEGACY_KCALCORE KCalCore::Alarm::Ptr alarm = KCalCore::Alarm::Ptr(new KCalCore::Alarm(&kcal)); KCalCore::Person::List addressees; addressees.append(KCalCore::Person("name", "email@email")); alarm->setEmailAlarm("subject", "text", addressees, QStringList()); //No support for attachments kcal.addAlarm(alarm); +#endif //TODO alarms kcal.setNonKDECustomProperty("X-KOLAB-key1", "value1"); @@ -388,8 +396,10 @@ QCOMPARE(e->priority(), kcal.priority()); QCOMPARE(e->status(), kcal.status()); QCOMPARE(e->location(), kcal.location()); +#ifndef LEGACY_KCALCORE QCOMPARE(e->organizer().name(), kcal.organizer().name()); QCOMPARE(e->organizer().email(), kcal.organizer().email()); +#endif QCOMPARE(e->nonKDECustomProperty("X-KOLAB-URL"), kcal.nonKDECustomProperty("X-KOLAB-URL")); //otherwise we'd break the customProperties comparison e->removeNonKDECustomProperty("X-KOLAB-URL");
View file
libkolab.dsc
Changed
@@ -2,7 +2,7 @@ Source: libkolab Binary: libkolab3, php-kolab, python-kolab, libkolab-dev Architecture: any -Version: 3.0.2-0~kolab2 +Version: 3.2.0-0~kolab2 Maintainer: Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> Uploaders: Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> Homepage: http://git.kolab.org/libkolab @@ -42,5 +42,5 @@ php-kolab deb libs optional python-kolab deb python optional Files: - 00000000000000000000000000000000 0 libkolab-3.0.2.tar.gz + 00000000000000000000000000000000 0 libkolab-3.2.0.tar.gz 00000000000000000000000000000000 0 debian.tar.gz
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.