From patchwork Tue Feb 19 13:15:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 1044666 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=orange.com Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 443h7W4xtsz9rxp for ; Wed, 20 Feb 2019 00:15:51 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 4DA5D8560B; Tue, 19 Feb 2019 13:15:48 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qjFiQ8bSovUp; Tue, 19 Feb 2019 13:15:46 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 9612E85535; Tue, 19 Feb 2019 13:15:46 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 97ED81BF2EA for ; Tue, 19 Feb 2019 13:15:44 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 9136886100 for ; Tue, 19 Feb 2019 13:15:44 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id w1kWI5aISq0p for ; Tue, 19 Feb 2019 13:15:44 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from orange.com (mta136.mail.business.static.orange.com [80.12.70.36]) by whitealder.osuosl.org (Postfix) with ESMTPS id A418C860D6 for ; Tue, 19 Feb 2019 13:15:43 +0000 (UTC) Received: from opfednr05.francetelecom.fr (unknown [xx.xx.xx.69]) by opfednr20.francetelecom.fr (ESMTP service) with ESMTP id 443h7K56mJz1ytH for ; Tue, 19 Feb 2019 14:15:41 +0100 (CET) Received: from Exchangemail-eme6.itn.ftgroup (unknown [xx.xx.13.51]) by opfednr05.francetelecom.fr (ESMTP service) with ESMTP id 443h7K4T3BzyQ5 for ; Tue, 19 Feb 2019 14:15:41 +0100 (CET) Received: from OPEXCLILMA1.corporate.adroot.infra.ftgroup (10.114.31.66) by OPEXCAUBM22.corporate.adroot.infra.ftgroup (10.114.13.51) with Microsoft SMTP Server (TLS) id 14.3.435.0; Tue, 19 Feb 2019 14:15:41 +0100 Received: from r-lnx-nyma7486-2.rd.francetelecom.fr (10.168.234.2) by OPEXCLILMA1.corporate.adroot.infra.ftgroup (10.114.31.66) with Microsoft SMTP Server id 14.3.435.0; Tue, 19 Feb 2019 14:15:39 +0100 From: To: Date: Tue, 19 Feb 2019 14:15:29 +0100 X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190219131530.16364-1-yann.morin@orange.com> References: <20190219131530.16364-1-yann.morin@orange.com> MIME-Version: 1.0 X-Originating-IP: [10.168.234.2] Message-ID: <3833_1550582141_5C6C017D_3833_428_1_8b3762a4-694a-45cd-8cac-301fd3ba7526@OPEXCLILMA1.corporate.adroot.infra.ftgroup> Subject: [Buildroot] [PATCH 2/3] package/imagemagick: add prompt for host variant X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Yann E. MORIN" Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: "Yann E. MORIN" Sometimes, it is required to call imagemagick from a posr-build script or the likes, so we have to allow the user to enable the host variant for imagemagick. Update the linux package to select the host variant now. Signed-off-by: "Yann E. MORIN" --- linux/Config.in | 1 + package/Config.in.host | 1 + package/imagemagick/Config.in.host | 13 +++++++++++++ 3 files changed, 15 insertions(+) create mode 100644 package/imagemagick/Config.in.host diff --git a/linux/Config.in b/linux/Config.in index 323ba38d72..8466332dfe 100644 --- a/linux/Config.in +++ b/linux/Config.in @@ -2,6 +2,7 @@ menu "Kernel" config BR2_LINUX_KERNEL bool "Linux Kernel" + select BR2_PACKAGE_HOST_IMAGEMAGICK if BR2_LINUX_KERNEL_CUSTOM_LOGO_PATH != "" help Enable this option if you want to build a Linux kernel for your embedded device diff --git a/package/Config.in.host b/package/Config.in.host index b4c501a33b..48f4f7e61d 100644 --- a/package/Config.in.host +++ b/package/Config.in.host @@ -27,6 +27,7 @@ menu "Host utilities" source "package/go-bootstrap/Config.in.host" source "package/google-breakpad/Config.in.host" source "package/gptfdisk/Config.in.host" + source "package/imagemagick/Config.in.host" source "package/imx-mkimage/Config.in.host" source "package/imx-usb-loader/Config.in.host" source "package/jq/Config.in.host" diff --git a/package/imagemagick/Config.in.host b/package/imagemagick/Config.in.host new file mode 100644 index 0000000000..b6d2a379f8 --- /dev/null +++ b/package/imagemagick/Config.in.host @@ -0,0 +1,13 @@ +config BR2_PACKAGE_HOST_IMAGEMAGICK + bool "host-imagemagick" + help + ImageMagick(R) is a software suite to create, edit, and + compose bitmap images. It can read, convert and write images + in a variety of formats (about 100) including DPX, EXR, GIF, + JPEG, JPEG-2000, PDF, PhotoCD, PNG, Postscript, SVG, and TIFF. + Use ImageMagick to translate, flip, mirror, rotate, scale, + shear and transform images, adjust image colors, apply various + special effects, or draw text, lines, polygons, ellipses and + Bézier curves. + + http://www.imagemagick.org/ From patchwork Tue Feb 19 13:15:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 1044667 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=orange.com Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 443h7Y1k5Sz9s5c for ; Wed, 20 Feb 2019 00:15:52 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 0C3E986BFB; Tue, 19 Feb 2019 13:15:50 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RAUJIiq8JYEy; Tue, 19 Feb 2019 13:15:49 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 5DF5686C0A; Tue, 19 Feb 2019 13:15:49 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 60CAC1BF2EA for ; Tue, 19 Feb 2019 13:15:46 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 5E33B86C0A for ; Tue, 19 Feb 2019 13:15:46 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wG8NwK6HoBDy for ; Tue, 19 Feb 2019 13:15:44 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from orange.com (mta239.mail.business.static.orange.com [80.12.66.39]) by hemlock.osuosl.org (Postfix) with ESMTPS id 08B1486BFB for ; Tue, 19 Feb 2019 13:15:44 +0000 (UTC) Received: from opfedar06.francetelecom.fr (unknown [xx.xx.xx.8]) by opfedar24.francetelecom.fr (ESMTP service) with ESMTP id 443h7K64Gsz5vkc for ; Tue, 19 Feb 2019 14:15:41 +0100 (CET) Received: from Exchangemail-eme6.itn.ftgroup (unknown [xx.xx.13.51]) by opfedar06.francetelecom.fr (ESMTP service) with ESMTP id 443h7K5H45z3wb4 for ; Tue, 19 Feb 2019 14:15:41 +0100 (CET) Received: from OPEXCLILMA1.corporate.adroot.infra.ftgroup (10.114.31.66) by OPEXCAUBM22.corporate.adroot.infra.ftgroup (10.114.13.51) with Microsoft SMTP Server (TLS) id 14.3.435.0; Tue, 19 Feb 2019 14:15:41 +0100 Received: from r-lnx-nyma7486-2.rd.francetelecom.fr (10.168.234.2) by OPEXCLILMA1.corporate.adroot.infra.ftgroup (10.114.31.66) with Microsoft SMTP Server id 14.3.435.0; Tue, 19 Feb 2019 14:15:39 +0100 From: To: Date: Tue, 19 Feb 2019 14:15:30 +0100 X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190219131530.16364-1-yann.morin@orange.com> References: <20190219131530.16364-1-yann.morin@orange.com> MIME-Version: 1.0 X-Originating-IP: [10.168.234.2] Message-ID: <10113_1550582141_5C6C017D_10113_121_1_7e3ed6b6-813f-4db4-a9e2-21152669dd30@OPEXCLILMA1.corporate.adroot.infra.ftgroup> Subject: [Buildroot] [PATCH 3/3] package/imagemagick: add optional SVG support to host variant X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Yann E. MORIN" Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: "Yann E. MORIN" SVG can be regarded as the "source code" for assets, like logos or other graphical elements. However, SVG needs to be rendered, which requires an XML parser and an SVG "parser/rendered". As such, it has various runtime impacts, like bad performance or security. As such, SVG are often pre-rendered to the required sizes/depths/resolutions into other format, such as PNG, at build time. While rsvg-convert (from host-librsvg) would allow the rendering, it does not allow more complex tasks taht ImageMagick allows for: compositing more than one image, 2D transforamtions (rotation, skew...). Yet, SVG support in ImageMagick relies on librsvg, which adds quite a feq dependencies, and thus has a noticeable impact on the build time. Add an option to allow concerned users to enable/disable SVG suppot in ImageMagick. Enabling SVG support relies on librsvg, which in turns relies on a few additional packages that ImageMagick can also optionally use. So, autoamtically enable the corresponding support as well. Signed-off-by: "Yann E. MORIN" --- package/imagemagick/Config.in.host | 13 +++++++++++++ package/imagemagick/imagemagick.mk | 28 +++++++++++++++++++++++----- 2 files changed, 36 insertions(+), 5 deletions(-) diff --git a/package/imagemagick/Config.in.host b/package/imagemagick/Config.in.host index b6d2a379f8..bcb7e0d703 100644 --- a/package/imagemagick/Config.in.host +++ b/package/imagemagick/Config.in.host @@ -11,3 +11,16 @@ config BR2_PACKAGE_HOST_IMAGEMAGICK Bézier curves. http://www.imagemagick.org/ + +if BR2_PACKAGE_HOST_IMAGEMAGICK + +config BR2_PACKAGE_HOST_IMAGEMAGICK_SVG + bool "SVG support" + help + Say 'y' here is you need ImageMagick tools (like convert) + to support SVG. + + This is not enabled by default, as it brings quite a few + extra dependencies, and thus extra build time. + +endif diff --git a/package/imagemagick/imagemagick.mk b/package/imagemagick/imagemagick.mk index 7678980582..0fbf479523 100644 --- a/package/imagemagick/imagemagick.mk +++ b/package/imagemagick/imagemagick.mk @@ -160,15 +160,10 @@ HOST_IMAGEMAGICK_CONF_OPTS = \ --without-x \ --without-bzlib \ --without-fftw \ - --without-fontconfig \ - --without-freetype \ --without-lcms \ --without-lzma \ - --without-pango \ - --without-rsvg \ --without-tiff \ --without-webp \ - --without-xml \ --with-jpeg \ --with-png \ --with-zlib @@ -179,5 +174,28 @@ HOST_IMAGEMAGICK_DEPENDENCIES = \ host-pkgconf \ host-zlib +ifeq ($(BR2_PACKAGE_HOST_IMAGEMAGICK_SVG),y) +HOST_IMAGEMAGICK_DEPENDENCIES += \ + host-fontconfig \ + host-freetype \ + host-librsvg \ + host-libxml2 \ + host-pango +HOST_IMAGEMAGICK_CONF_ENV += ac_cv_path_xml2_config=$(HOST_DIR)/bin/xml2-config +HOST_IMAGEMAGICK_CONF_OPTS += \ + --with-fontconfig \ + --with-freetype \ + --with-pango \ + --with-rsvg \ + --with-xml +else +HOST_IMAGEMAGICK_CONF_OPTS += \ + --without-fontconfig \ + --without-freetype \ + --without-pango \ + --without-rsvg \ + --without-xml +endif + $(eval $(autotools-package)) $(eval $(host-autotools-package))