blob: 040d23b69d088b4256de2c7826b46306c62762c3 [file] [log] [blame]
Patrick Williamsac13d5f2023-11-24 18:59:46 -06001SUMMARY = "iCal and scheduling (RFC 2445, 2446, 2447) library"
2DESCRIPTION = "An Open Source implementation of the iCalendar protocols \
3and protocol data units. The iCalendar specification describes how \
4calendar clients can communicate with calendar servers so users can store \
5their calendar data and arrange meetings with other users. "
6HOMEPAGE = "https://github.com/libical/libical"
7BUGTRACKER = "https://github.com/libical/libical/issues"
8LICENSE = "LGPL-2.1-only | MPL-2.0"
9LIC_FILES_CHKSUM = "file://LICENSE;md5=1910a2a76ddf6a9ba369182494170d87 \
Patrick Williams44b3caf2024-04-12 16:51:14 -050010 file://LICENSE.LGPL21.txt;md5=8f690bb538f4b301d931374a6eb864d0 \
Patrick Williamsac13d5f2023-11-24 18:59:46 -060011 file://LICENSE.MPL2.txt;md5=f75d2927d3c1ed2414ef72048f5ad640 \
12 "
13SECTION = "libs"
14
15SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/${BP}.tar.gz \
16 file://0001-cmake-Do-not-export-CC-into-gir-compiler.patch \
17 "
Patrick Williams44b3caf2024-04-12 16:51:14 -050018SRC_URI[sha256sum] = "72b7dc1a5937533aee5a2baefc990983b66b141dd80d43b51f80aced4aae219c"
Patrick Williamsac13d5f2023-11-24 18:59:46 -060019
20inherit cmake pkgconfig gobject-introspection vala github-releases
21
22DEPENDS += "libical-native"
23
24PACKAGECONFIG ??= "icu glib"
25PACKAGECONFIG[bdb] = ",-DCMAKE_DISABLE_FIND_PACKAGE_BDB=True,db"
26PACKAGECONFIG[glib] = "-DICAL_GLIB=True,-DICAL_GLIB=False,glib-2.0-native libxml2-native glib-2.0 libxml2"
27# ICU is used for RSCALE (RFC7529) support
28PACKAGECONFIG[icu] = ",-DCMAKE_DISABLE_FIND_PACKAGE_ICU=True,icu"
29
30# No need to use perl-native, the host perl is sufficient.
31EXTRA_OECMAKE += "-DPERL_EXECUTABLE=${HOSTTOOLS_DIR}/perl"
32# Disable the test suite as we can't install it
33EXTRA_OECMAKE += "-DLIBICAL_BUILD_TESTING=false"
34# doc build fails with linker error (??) for libical-glib so disable it
35EXTRA_OECMAKE += "-DICAL_BUILD_DOCS=false"
36# gobject-introspection
37EXTRA_OECMAKE:append:class-target = " -DGObjectIntrospection_COMPILER=${STAGING_BINDIR}/g-ir-compiler-wrapper"
38EXTRA_OECMAKE:append:class-target = " -DGObjectIntrospection_SCANNER=${STAGING_BINDIR}/g-ir-scanner-wrapper"
39EXTRA_OECMAKE += "-DVAPIGEN=${STAGING_BINDIR_NATIVE}/vapigen"
40EXTRA_OECMAKE += "${@bb.utils.contains('GI_DATA_ENABLED', 'True', '-DGOBJECT_INTROSPECTION=ON -DICAL_GLIB_VAPI=ON', '-DGOBJECT_INTROSPECTION=OFF', d)}"
41
42# Tell the cross-libical where the tool it needs to build is
43EXTRA_OECMAKE:append:class-target = " -DIMPORT_ICAL_GLIB_SRC_GENERATOR=${STAGING_LIBDIR_NATIVE}/cmake/LibIcal/IcalGlibSrcGenerator.cmake"
44
45do_install:append () {
46 # Remove build host references (https://github.com/libical/libical/issues/532)
47 sed -i \
48 -e 's,${STAGING_LIBDIR},${libdir},g' \
49 -e 's,${STAGING_INCDIR},${includedir},g' \
50 ${D}${libdir}/cmake/LibIcal/LibIcal*.cmake \
51 ${D}${libdir}/cmake/LibIcal/Ical*.cmake
52}
53
54BBCLASSEXTEND = "native"