From c7da3e532ccfc3a530df74efb236e30a1b104c5e Mon Sep 17 00:00:00 2001 From: Javier Viguera Date: Tue, 21 Mar 2017 11:58:43 +0100 Subject: [PATCH] meta-digi-dey: disable ICU support for ccimx6ul ICU support was not included in the rootfs in previous DEY versions but it's included now through runtime dependences of 'harfbuzz' and 'libical'. The support is not strictly needed, as ICU is a library for Unicode support for applications: http://site.icu-project.org/home This commit disables ICU support directly for 'harfbuzz' and adds a patch for 'libical' that allows to disable it. Notice that it's only disabled for the CC6UL, as the CC6 has no rootfs space problems. Only the 'libicudata' library is 25MB: 25M /usr/lib/libicudata.so.57.1 https://jira.digi.com/browse/DEL-3854 Signed-off-by: Javier Viguera --- .../harfbuzz/harfbuzz_%.bbappend | 11 +++++++ ...-option-to-build-without-ICU-support.patch | 31 +++++++++++++++++++ .../libical/libical_%.bbappend | 21 +++++++++++++ 3 files changed, 63 insertions(+) create mode 100644 meta-digi-dey/recipes-graphics/harfbuzz/harfbuzz_%.bbappend create mode 100644 meta-digi-dey/recipes-support/libical/libical/0001-CMakeList-add-option-to-build-without-ICU-support.patch create mode 100644 meta-digi-dey/recipes-support/libical/libical_%.bbappend diff --git a/meta-digi-dey/recipes-graphics/harfbuzz/harfbuzz_%.bbappend b/meta-digi-dey/recipes-graphics/harfbuzz/harfbuzz_%.bbappend new file mode 100644 index 000000000..7428c759f --- /dev/null +++ b/meta-digi-dey/recipes-graphics/harfbuzz/harfbuzz_%.bbappend @@ -0,0 +1,11 @@ +# Copyright (C) 2017 Digi International Inc. + +# +# Remove ICU support for 'ccimx6ul' to save space in the rootfs. +# +# Only 'libicudata' could weight up to 25MB: +# +# 25M /usr/lib/libicudata.so.57.1 +PACKAGECONFIG_remove_ccimx6ul = "icu" + +PACKAGE_ARCH = "${MACHINE_ARCH}" diff --git a/meta-digi-dey/recipes-support/libical/libical/0001-CMakeList-add-option-to-build-without-ICU-support.patch b/meta-digi-dey/recipes-support/libical/libical/0001-CMakeList-add-option-to-build-without-ICU-support.patch new file mode 100644 index 000000000..1e3f484b8 --- /dev/null +++ b/meta-digi-dey/recipes-support/libical/libical/0001-CMakeList-add-option-to-build-without-ICU-support.patch @@ -0,0 +1,31 @@ +From: Javier Viguera +Date: Mon, 20 Mar 2017 20:14:09 +0100 +Subject: [PATCH] CMakeLists: add option to build without ICU support + +Signed-off-by: Javier Viguera + +--- + CMakeLists.txt | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 366c285edd1a..ab7eac96e70d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -126,6 +126,8 @@ endif() + # libicu is highly recommended for RSCALE support + # libicu can be found at http://www.icu-project.org + # RSCALE info at http://tools.ietf.org/html/rfc7529 ++option(WITH_LIBICU "Build with ICU support. Libicu is highly recommended for RSCALE support") ++if(WITH_LIBICU) + find_package(ICU) + if(ICU_FOUND) + set(ICUUC_LIBS "-licuuc") #for libical.pc +@@ -140,6 +142,7 @@ if(ICU_I18N_FOUND) + set(HAVE_LIBICU_I18N 1) + set(ICUI18N_LIBS "-licui18n") #for libical.pc + endif() ++endif() + + # MSVC specific definitions + if(WIN32) diff --git a/meta-digi-dey/recipes-support/libical/libical_%.bbappend b/meta-digi-dey/recipes-support/libical/libical_%.bbappend new file mode 100644 index 000000000..2bff50c9d --- /dev/null +++ b/meta-digi-dey/recipes-support/libical/libical_%.bbappend @@ -0,0 +1,21 @@ +# Copyright (C) 2017 Digi International Inc. + +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI += "file://0001-CMakeList-add-option-to-build-without-ICU-support.patch" + +# Remove inconditional 'icu' dependence if not set through PACKAGECONFIG +DEPENDS_remove = "${@bb.utils.contains('PACKAGECONFIG', 'icu', '', 'icu', d)}" + +PACKAGECONFIG ?= "icu" +PACKAGECONFIG[icu] = "-DWITH_LIBICU=1,-DWITH_LIBICU=0" + +# +# Remove ICU support for 'ccimx6ul' to save space in the rootfs. +# +# Only 'libicudata' could weight up to 25MB: +# +# 25M /usr/lib/libicudata.so.57.1 +PACKAGECONFIG_remove_ccimx6ul = "icu" + +PACKAGE_ARCH = "${MACHINE_ARCH}"