Patchwork [05/33] imagemagick: explicitly disable c++ support if no c++ compiler available

login
register
mail settings
Submitter Samuel Martin
Date Nov. 22, 2012, 12:17 a.m.
Message ID <1353543503-8952-6-git-send-email-s.martin49@gmail.com>
Download mbox | patch
Permalink /patch/200896/
State Deferred
Headers show

Comments

Samuel Martin - Nov. 22, 2012, 12:17 a.m.
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
 package/imagemagick/imagemagick.mk | 6 ++++++
 1 file changed, 6 insertions(+)
Peter Korsgaard - Nov. 23, 2012, 9:09 a.m.
>>>>> "Samuel" == Samuel Martin <s.martin49@gmail.com> writes:

 Samuel> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
 Samuel> ---
 Samuel>  package/imagemagick/imagemagick.mk | 6 ++++++
 Samuel>  1 file changed, 6 insertions(+)

 Samuel> diff --git a/package/imagemagick/imagemagick.mk b/package/imagemagick/imagemagick.mk
 Samuel> index 61a379d..365a073 100644
 Samuel> --- a/package/imagemagick/imagemagick.mk
 Samuel> +++ b/package/imagemagick/imagemagick.mk
 Samuel> @@ -35,6 +35,12 @@ IMAGEMAGICK_CONF_OPT = --program-transform-name='s,,,' \
 
 Samuel>  IMAGEMAGICK_DEPENDENCIES = host-pkgconf
 
 Samuel> +ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
 Samuel> +IMAGEMAGICK_CONF_OPT = --with-magick-plus-plus
 Samuel> +else
 Samuel> +IMAGEMAGICK_CONF_OPT = --without-magick-plus-plus
 Samuel> +endif

Why? We set TARGET_CXX to 'false' if we don't have C++ support, and the
configure script seems to handle it OK. I just did a quick test build
with a minimal config:

BR2_arm=y
BR2_arm926t=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
BR2_TOOLCHAIN_EXTERNAL_PATH="/opt/br/arm926t/usr"
# BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG is not set
BR2_PACKAGE_IMAGEMAGICK=y

And I see the imagemagick configure script saying:

Magick++          --with-magick-plus-plus=yes	no (failed tests)

(and the build doesn't fail)

Patch

diff --git a/package/imagemagick/imagemagick.mk b/package/imagemagick/imagemagick.mk
index 61a379d..365a073 100644
--- a/package/imagemagick/imagemagick.mk
+++ b/package/imagemagick/imagemagick.mk
@@ -35,6 +35,12 @@  IMAGEMAGICK_CONF_OPT = --program-transform-name='s,,,' \
 
 IMAGEMAGICK_DEPENDENCIES = host-pkgconf
 
+ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
+IMAGEMAGICK_CONF_OPT = --with-magick-plus-plus
+else
+IMAGEMAGICK_CONF_OPT = --without-magick-plus-plus
+endif
+
 ifeq ($(BR2_PACKAGE_FONTCONFIG),y)
 IMAGEMAGICK_CONF_OPT += --with-fontconfig
 IMAGEMAGICK_DEPENDENCIES += fontconfig