This is an automated email from the git hooks/post-receive script.

skitt pushed a commit to branch master
in repository scummvm.

commit 91f10d13cb372a523318308f7ee2fd5901418d52
Author: Stephen Kitt <sk...@debian.org>
Date:   Sat Mar 10 21:44:19 2018 +0100

    Use pkg-config to find FreeType 2
---
 debian/changelog                          |   1 +
 debian/control                            |   1 +
 debian/patches/freetype2-pkg-config.patch | 124 ++++++++++++++++++++++++++++++
 debian/patches/series                     |   1 +
 4 files changed, 127 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index cca4b30..adba45a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ scummvm (2.0.0+dfsg-1) UNRELEASED; urgency=medium
 
   * Team upload.
   * New upstream release, merging all patches. Closes: #886317.
+  * Use pkg-config to find FreeType 2. Closes: #892447.
 
  -- Stephen Kitt <sk...@debian.org>  Sat, 10 Mar 2018 20:42:59 +0100
 
diff --git a/debian/control b/debian/control
index a1ffa15..aac6f55 100644
--- a/debian/control
+++ b/debian/control
@@ -21,6 +21,7 @@ Build-Depends: debhelper (>= 9), autotools-dev
               ,libvorbis-dev
               ,libz-dev
               ,nasm [i386]
+              ,pkg-config
               ,python
               ,zip
 # Cloud integration:
diff --git a/debian/patches/freetype2-pkg-config.patch 
b/debian/patches/freetype2-pkg-config.patch
new file mode 100644
index 0000000..1c75532
--- /dev/null
+++ b/debian/patches/freetype2-pkg-config.patch
@@ -0,0 +1,124 @@
+Description: Use pkg-config to find freetype2
+Author: Stephen Kitt <sk...@debian.org>
+
+--- a/configure
++++ b/configure
+@@ -201,7 +201,6 @@
+ _sparklepath=
+ _sdlconfig=sdl2-config
+ _libcurlconfig=curl-config
+-_freetypeconfig=freetype-config
+ _sdlpath="$PATH"
+ _freetypepath="$PATH"
+ _libcurlpath="$PATH"
+@@ -417,40 +416,6 @@
+ }
+ 
+ #
+-# Determine freetype-config
+-#
+-find_freetypeconfig() {
+-      echo_n "Looking for freetype-config... "
+-      freetypeconfigs="$_freetypeconfig"
+-      _freetypeconfig=
+-
+-      IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="$SEPARATOR"
+-      for path_dir in $_freetypepath; do
+-              #reset separator to parse freetypeconfigs
+-              IFS=":"
+-              for freetypeconfig in $freetypeconfigs; do
+-                      if test -f "$path_dir/$freetypeconfig" ; then
+-                              _freetypeconfig="$path_dir/$freetypeconfig"
+-                              echo $_freetypeconfig
+-                              # Save the prefix
+-                              _freetypepath=$path_dir
+-                              if test `basename $path_dir` = bin ; then
+-                                      _freetypepath=`dirname $path_dir`
+-                              fi
+-                              # break at first freetype-config found in path
+-                              break 2
+-                      fi
+-              done
+-      done
+-
+-      IFS="$ac_save_ifs"
+-
+-      if test -z "$_freetypeconfig"; then
+-              echo "none found!"
+-      fi
+-}
+-
+-#
+ # Determine curl-config
+ #
+ find_libcurlconfig() {
+@@ -4602,30 +4567,13 @@
+ #
+ if test "$_freetype2" != "no"; then
+ 
+-      # Look for the freetype-config script
+-      find_freetypeconfig
++      FREETYPE2_LIBS=`pkg-config --libs freetype2`
++      FREETYPE2_CFLAGS=`pkg-config --cflags freetype2`
+ 
+-      if test -z "$_freetypeconfig"; then
++      if test "$_freetype2" = "auto"; then
+               _freetype2=no
+-      else
+-              # Since 2.3.12, freetype-config prepends $SYSROOT to everything.
+-              # This means we can't pass it a --prefix that includes $SYSROOT.
+-              freetypeprefix="$_freetypepath"
+-              if test -n "$SYSROOT" -a "$SYSROOT" != "/"; then
+-                      teststring=VeryImplausibleSysrootX1Y2Z3
+-                      if ( env SYSROOT=/$teststring "$_freetypeconfig" 
--cflags | grep $teststring 2> /dev/null > /dev/null ); then
+-                              echo "Adapting FreeType prefix to SYSROOT" >> 
"$TMPLOG"
+-                              freetypeprefix="${freetypeprefix##$SYSROOT}"
+-                      fi
+-              fi
+-
+-              FREETYPE2_LIBS=`$_freetypeconfig --prefix="$freetypeprefix" 
--libs`
+-              FREETYPE2_CFLAGS=`$_freetypeconfig --prefix="$freetypeprefix" 
--cflags`
+-
+-              if test "$_freetype2" = "auto"; then
+-                      _freetype2=no
+ 
+-                      cat > $TMPC << EOF
++              cat > $TMPC << EOF
+ #include <ft2build.h>
+ #include FT_FREETYPE_H
+ 
+@@ -4636,23 +4584,21 @@
+ }
+ EOF
+ 
++              cc_check_no_clean $FREETYPE2_CFLAGS $FREETYPE2_LIBS && 
_freetype2=yes
++              # Modern freetype-config scripts accept --static to get all
++              # required flags for static linking. We abuse this to detect
++              # FreeType2 builds which are static themselves.
++              if test "$_freetype2" != "yes"; then
++                      FREETYPE2_LIBS=`pkg-config --static --libs freetype2 
2>/dev/null`
+                       cc_check_no_clean $FREETYPE2_CFLAGS $FREETYPE2_LIBS && 
_freetype2=yes
+-                      # Modern freetype-config scripts accept --static to get 
all
+-                      # required flags for static linking. We abuse this to 
detect
+-                      # FreeType2 builds which are static themselves.
+-                      if test "$_freetype2" != "yes"; then
+-                              FREETYPE2_LIBS=`$_freetypeconfig 
--prefix="$_freetypepath" --static --libs 2>/dev/null`
+-                              cc_check_no_clean $FREETYPE2_CFLAGS 
$FREETYPE2_LIBS && _freetype2=yes
+-                      fi
+-                      cc_check_clean
+-              fi
+-
+-              if test "$_freetype2" = "yes"; then
+-                      append_var LIBS "$FREETYPE2_LIBS"
+-                      append_var INCLUDES "$FREETYPE2_CFLAGS"
+               fi
++              cc_check_clean
+       fi
+ 
++      if test "$_freetype2" = "yes"; then
++              append_var LIBS "$FREETYPE2_LIBS"
++              append_var INCLUDES "$FREETYPE2_CFLAGS"
++      fi
+ fi
+ 
+ echocheck "FreeType2"
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..58e9da5
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+freetype2-pkg-config.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/scummvm.git

_______________________________________________
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

Reply via email to