Bug#892340: dvdauthor: Please use 'pkg-config' to find FreeType 2

2018-11-20 Thread Marc Leeman
Thanks,

I was planning to combine this with an update from upstream.

On Tue, Nov 20, 2018, 15:57 Reiner Herrmann  wrote:

> Control: tags -1 + patch
>
> With the attached patch pkg-config is used for locating freetype2
> instead of the deprecated freetype-config.
>
> Regards,
>   Reiner
>


Bug#892340: dvdauthor: Please use 'pkg-config' to find FreeType 2

2018-11-20 Thread Reiner Herrmann
Control: tags -1 + patch

With the attached patch pkg-config is used for locating freetype2
instead of the deprecated freetype-config.

Regards,
  Reiner
diff --git a/debian/control b/debian/control
index 0077b31..813c284 100644
--- a/debian/control
+++ b/debian/control
@@ -14,6 +14,7 @@ Build-Depends: debhelper (>= 10),
 libmagick++-dev,
 libpng-dev,
 libxml2-dev,
+pkg-config,
 quilt
 Standards-Version: 3.9.8
 
diff --git a/debian/patches/freetype-config.patch b/debian/patches/freetype-config.patch
new file mode 100644
index 000..e62bf41
--- /dev/null
+++ b/debian/patches/freetype-config.patch
@@ -0,0 +1,26 @@
+Author: Reiner Herrmann 
+Description: Use pkg-config for finding freetype2
+Bug-Debian: https://bugs.debian.org/892340
+
+--- a/configure.ac
 b/configure.ac
+@@ -86,18 +86,7 @@
+ AC_SUBST(FRIBIDI_CFLAGS)
+ AC_SUBST(FRIBIDI_LIBS)
+ 
+-AC_CHECK_PROGS(FREETYPECONFIG, [freetype-config])
+-if test -n "$FREETYPECONFIG"; then
+-FREETYPE_CPPFLAGS="`$FREETYPECONFIG --cflags`"
+-FREETYPE_LIBS="`$FREETYPECONFIG --libs`"
+-AC_DEFINE(HAVE_FREETYPE, 1, [Whether FreeType is available])
+-
+-ac_save_CPPFLAGS="$CPPFLAGS"
+-CPPFLAGS="$CPPFLAGS $FREETYPE_CPPFLAGS"
+-AC_CHECK_HEADERS(ft2build.h)
+-CPPFLAGS="$ac_save_CPPFLAGS"
+-fi
+-
++PKG_CHECK_MODULES([FREETYPE], [freetype2], [AC_DEFINE(HAVE_FREETYPE, 1, [Whether FreeType is available])], [:])
+ AC_SUBST(FREETYPE_CPPFLAGS)
+ AC_SUBST(FREETYPE_LIBS)
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 28d4391..57ac137 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,4 @@ dvdauthor.manpage.diff
 link_libm.patch
 807657.patch
 libpng16.patch
+freetype-config.patch


signature.asc
Description: PGP signature