From 308656c10d51fc2fd6421c338bcfa674459a11f8 Mon Sep 17 00:00:00 2001
From: Fabio Di Francesco <fabio.difrancesco@gmail.com>
Date: Tue, 13 Aug 2019 13:39:29 +0000
Subject: [PATCH] check freetype2 fixed

---
 recipes/sdl_ttf/01_redox.patch | 13 +++++++------
 recipes/sdl_ttf/recipe.sh      |  4 ++--
 2 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/recipes/sdl_ttf/01_redox.patch b/recipes/sdl_ttf/01_redox.patch
index 1ed96943b..d2b7ecd79 100644
--- a/recipes/sdl_ttf/01_redox.patch
+++ b/recipes/sdl_ttf/01_redox.patch
@@ -45,17 +45,18 @@ diff -ruw source/configure.in source-new/configure.in
 -if test "$FREETYPE_CONFIG" = "no" ; then
 -    AC_MSG_ERROR([
 -*** Unable to find FreeType2 library (http://www.freetype.org/)
-+PKG_CHECK_MODULES([FT2], [freetype2 >= 7.0.1], [], [dnl
-+    AC_CHECK_FT2(,,[AC_MSG_ERROR([dnl
-+*** Unable to find FreeType2 library (http://www.freetype.org/)])]
-+    )
- ])
++#PKG_CHECK_MODULES([FT2], [freetype2 >= 7.0.1], [], [dnl
++#    AC_CHECK_FT2(,,[AC_MSG_ERROR([dnl
++#*** Unable to find FreeType2 library (http://www.freetype.org/)])]
++#    )
++#])
+-])
 -else
 -    CFLAGS="$CFLAGS `$FREETYPE_CONFIG $freetypeconf_args --cflags`"
 -    LIBS="$LIBS `$FREETYPE_CONFIG $freetypeconf_args --libs`"
 -fi
 +CFLAGS="$CFLAGS $FT2_CFLAGS"
-+LIBS="$LIBS $FT2_LIBS"
++LIBS="$LIBS $FT2_LIBS -lfreetype -lpng -lz"
  
  dnl Check for SDL
  SDL_VERSION=1.2.4
diff --git a/recipes/sdl_ttf/recipe.sh b/recipes/sdl_ttf/recipe.sh
index 44dfbedfb..07cee556a 100644
--- a/recipes/sdl_ttf/recipe.sh
+++ b/recipes/sdl_ttf/recipe.sh
@@ -14,10 +14,10 @@ function recipe_update {
 
 function recipe_build {
     sysroot="$(realpath ../sysroot)"
-    export CFLAGS="-I$sysroot/include"
+    export CFLAGS="-I$sysroot/include -I$sysroot/include/freetype2"
     export LDFLAGS="-L$sysroot/lib"
     ./autogen.sh
-    ./configure --prefix=/ --build=${BUILD} --host=${HOST} --disable-shared --disable-sdltest
+    ./configure --prefix=/ --build=${BUILD} --host=${HOST} --disable-shared
     make -j"$(nproc)"
     skip=1
 }
-- 
GitLab