Package: jmagick
Severity: important
x-debbugs-cc: Emmanuel Bourg <ebo...@apache.org>
x-debbugs-cc: sylves...@debian.org

hi,

We plan to made a transition for imagemagick as soon as possible.

Could you please include this patch in order to avoid FTBFS ?

Thanks 

Bastien
>From c4e99452076369fd852147a1e6f6fe573ac55fe3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bastien=20ROUCARI=C3=88S?= <roucaries.bast...@gmail.com>
Date: Mon, 12 May 2014 11:59:56 +0200
Subject: [PATCH] Use pkgconfig for flags

---
 configure.in | 21 +++++++++++++++++++++
 debian/rules |  1 +
 2 files changed, 22 insertions(+)

diff --git a/configure.in b/configure.in
index 93de0f7..58da3d4 100644
--- a/configure.in
+++ b/configure.in
@@ -241,6 +241,15 @@ AC_ARG_ENABLE(diagnostic,
               C_DEBUG=-DDIAGNOSTIC,C_DEBUG=)
 AC_SUBST(C_DEBUG)
 
+AC_PATH_PROG(PKGCONFIG, pkg-config, not_found)
+USE_PKGCONFIG='no'
+if (test PKGCONFIG != 'not_found') ; then
+    if pkg-config MagickCore > /dev/null 2>/dev/null; then
+	USE_PKGCONFIG='yes'
+    fi
+fi
+
+if (test USE_PKGCONFIG == 'no') ; then
 dnl Check if ImageMagick home specified
 AC_ARG_WITH(magick-home, --with-magick-home=path home directory of ImageMagick,
             MAGICK_HOME=${withval})
@@ -289,6 +298,13 @@ AC_ARG_WITH(magick-inc-dir,
 if ( test -f ${MAGICK_INCLUDE_PATH}/magick/api.h ) ; then
 	MAGICK_INCLUDES=-I${MAGICK_INCLUDE_PATH}
 fi
+# pkgconfig
+else
+    MAGICK_LIBS=`pkg-config --libs-only-l MagickCore`
+    MAGICK_LDFLAGS=`pkg-config --libs-only-L --libs-only-other MagickCore`
+    MAGICK_CFLAGS=`pkg-config --cflags-only-other MagickCore`
+    MAGICK_INCLUDES=`pkg-config --cflags-only-I MagickCore`
+fi
 
 dnl Check for the ImageMagick header file magick/api.h
 OLD_CPPFLAGS=${CPPFLAGS}
@@ -306,12 +322,17 @@ OLD_LDFLAGS=${LDFLAGS}
 if test -n "${MAGICK_LIBS}"; then
 	LDFLAGS="${MAGICK_LIBS} ${LDFLAGS}"
 fi
+if (test USE_PKGCONFIG=='no'); then
 AC_CHECK_LIB(Magick, ConstituteImage,
              HAVE_MAGICK_LIB=yes, HAVE_MAGICK_LIB=no)
 if test ${HAVE_ImageMagick-6.2.4MAGICK_LIB} = no; then
 	AC_MSG_ERROR('Unable to find ImageMagick library')
 fi
+else
+    HAVE_MAGICK_LIB='yes';
+fi
 LDFLAGS=${OLD_LDFLAGS}
+CFLAGS="${CFLAGS} ${MAGICK_CFLAGS}"
 
 
 
diff --git a/debian/rules b/debian/rules
index 53ff56e..b82583e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -18,6 +18,7 @@ DEB_MAKE_CHECK_TARGET   =
 DEB_DH_INSTALL_SOURCEDIR = debian/tmp
 DEB_COMPRESS_EXCLUDE = .java
 DEB_INSTALL_CHANGELOGS_ALL := Changelog.txt
+DEB_AUTO_UPDATE_AUTOCONF := yes
 VERSION=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^~-]+).*,\1,p')
 
 export JFLAGS = -source 1.6 -target 1.6 -g
-- 
2.0.0.rc0

__
This is the maintainer address of Debian's Java team
<http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-maintainers>. 
Please use
debian-j...@lists.debian.org for discussions and questions.

Reply via email to