Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 1 | SUMMARY = "iCal and scheduling (RFC 2445, 2446, 2447) library" |
| 2 | HOMEPAGE = "https://github.com/libical/libical" |
| 3 | BUGTRACKER = "https://github.com/libical/libical/issues" |
| 4 | LICENSE = "LGPLv2.1 | MPL-2.0" |
| 5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=1910a2a76ddf6a9ba369182494170d87 \ |
| 6 | file://LICENSE.LGPL21.txt;md5=933adb561f159e7c3da079536f0ed871 \ |
| 7 | file://LICENSE.MPL2.txt;md5=9741c346eef56131163e13b9db1241b3" |
| 8 | SECTION = "libs" |
| 9 | |
Brad Bishop | 64c979e | 2019-11-04 13:55:29 -0500 | [diff] [blame] | 10 | SRC_URI = " \ |
| 11 | https://github.com/${BPN}/${BPN}/releases/download/v${PV}/${BP}.tar.gz \ |
| 12 | file://0001-Use-our-hand-build-native-src-generator.patch \ |
| 13 | " |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame] | 14 | SRC_URI[md5sum] = "463a59244c6767b8e67b29379405e297" |
| 15 | SRC_URI[sha256sum] = "5c8a21c2b732ece4a33e5c862970b4f35a8548bbcda50de5695f6fc211ac4d97" |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 16 | UPSTREAM_CHECK_URI = "https://github.com/libical/libical/releases" |
| 17 | |
| 18 | inherit cmake pkgconfig |
| 19 | |
Brad Bishop | 64c979e | 2019-11-04 13:55:29 -0500 | [diff] [blame] | 20 | do_compile_prepend() { |
| 21 | # As long as https://github.com/libical/libical/issues/394 is open build native src-generator manually |
| 22 | NATIVE_CFLAGS="${BUILD_CFLAGS} `pkg-config-native --cflags glib-2.0` `pkg-config-native --cflags libxml-2.0`" |
| 23 | NATIVE_LDFLAGS="${BUILD_LDFLAGS} `pkg-config-native --libs glib-2.0` `pkg-config-native --libs libxml-2.0`" |
| 24 | ${BUILD_CC} $NATIVE_CFLAGS ${S}/src/libical-glib/tools/generator.c ${S}/src/libical-glib/tools/xml-parser.c -o ${B}/src-generator $NATIVE_LDFLAGS |
| 25 | } |
| 26 | |
| 27 | PACKAGECONFIG ??= "icu glib" |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 28 | PACKAGECONFIG[bdb] = ",-DCMAKE_DISABLE_FIND_PACKAGE_BDB=True,db" |
Brad Bishop | 64c979e | 2019-11-04 13:55:29 -0500 | [diff] [blame] | 29 | PACKAGECONFIG[glib] = "-DICAL_GLIB=True,-DICAL_GLIB=False,glib-2.0-native libxml2-native glib-2.0 libxml2" |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 30 | # ICU is used for RSCALE (RFC7529) support |
| 31 | PACKAGECONFIG[icu] = ",-DCMAKE_DISABLE_FIND_PACKAGE_ICU=True,icu" |
| 32 | |
| 33 | # No need to use perl-native, the host perl is sufficient. |
| 34 | EXTRA_OECMAKE += "-DPERL_EXECUTABLE=${HOSTTOOLS_DIR}/perl" |
Brad Bishop | 64c979e | 2019-11-04 13:55:29 -0500 | [diff] [blame] | 35 | # doc build fails with linker error (??) for libical-glib so disable it |
| 36 | EXTRA_OECMAKE += "-DICAL_BUILD_DOCS=false" |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 37 | |
Brad Bishop | 64c979e | 2019-11-04 13:55:29 -0500 | [diff] [blame] | 38 | do_install_append () { |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 39 | # Remove build host references |
| 40 | sed -i \ |
| 41 | -e 's,${STAGING_LIBDIR},${libdir},g' \ |
| 42 | ${D}${libdir}/cmake/LibIcal/LibIcal*.cmake |
| 43 | } |