all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob 38c311bee501bb9d50c670f7f9250b587c0021d8 4112 bytes (raw)
name: gnu/packages/patches/m17n-lib-1.8.0-use-pkg-config-for-freetype.patch 	 # note: path name is non-authoritative(*)

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
 
backport from upstream.

From b468fc95150b7ca0e766e7c385a60879e65322d4 Mon Sep 17 00:00:00 2001
From: "K. Handa" <handa@gnu.org>
Date: Tue, 23 Oct 2018 00:05:46 +0900
Subject: Use pkg-config for freetype, use %p to print a pointer

---
 ChangeLog     |  5 +++++
 configure.ac  | 48 +++++++++++++++++++-----------------------------
 src/ChangeLog |  5 +++++
 src/chartab.c |  4 ++--
 4 files changed, 31 insertions(+), 31 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b069d89..9dfc0b0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2018-10-22  K. Handa  <handa@gnu.org>
+
+	* configure.ac: Do not use the program freetype-config, use
+	PKG_CHECK_MODULES for checking freetype2.
+
 2018-02-08  K. Handa  <handa@gnu.org>
 
 	Version 1.8.0 released.
diff --git a/configure.ac b/configure.ac
index 7f8b08e..3516bad 100644
--- a/configure.ac
+++ b/configure.ac
@@ -204,36 +204,26 @@ fi
 AC_SUBST(OTF_LD_FLAGS)
 
 dnl Check for Freetype2 usability.
-AC_CHECK_PROG(HAVE_FREETYPE_CONFIG, freetype-config, yes)
-if test "x$HAVE_FREETYPE_CONFIG" = "xyes"; then
-  FREETYPE_INC=`freetype-config --cflags`
-  save_CPPFLAGS="$CPPFLAGS"
-  CPPFLAGS="$CPPFLAGS $FREETYPE_INC"
-  AC_CHECK_HEADER(ft2build.h, HAVE_FREETYPE=yes,
-  			      HAVE_FREETYPE=no CPPFLAGS="$save_CPPFLAGS")
-  if test "x$HAVE_FREETYPE" = "xyes" ; then
-    save_LIBS="$LIBS"
-    LIBS="$LIBS `freetype-config --libs`"
-    AC_CHECK_LIB(freetype, FT_Init_FreeType, HAVE_FREETYPE=yes,
-    			   		     HAVE_FREETYPE=no)
-    LIBS="$save_LIBS"
-    if test "x$HAVE_FREETYPE" = "xyes"; then
-      FREETYPE_LD_FLAGS=`freetype-config --libs`
-      AC_DEFINE(HAVE_FREETYPE, 1, 
-		[Define to 1 if you have FreeType library and header file.])
-      M17N_EXT_LIBS="$M17N_EXT_LIBS freetype"
-      AC_CHECK_HEADER(freetype/ftbdf.h, HAVE_FTBDF_H=yes, HAVE_FTBDF_H=no,
-		      [#include <ft2build.h>
+PKG_CHECK_MODULES([FREETYPE], [freetype2], [HAVE_FREETYPE=yes],
+                                           [HAVE_FREETYPE=no])
+AS_IF([test "x$HAVE_FREETYPE" = "xyes"],
+  [CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS";
+   FREETYPE_LD_FLAGS=FREETYPE_LIBS;
+   AC_DEFINE([HAVE_FREETYPE], [1],
+             [Define to 1 if you have FreeType library and header file.])
+   M17N_EXT_LIBS="$M17N_EXT_LIBS freetype";
+   AC_CHECK_HEADER([freetype/ftbdf.h], [HAVE_FTBDF_H=yes], [HAVE_FTBDF_H=no],
+                   [#include <ft2build.h>
 #include FT_FREETYPE_H])
-      if test "x$HAVE_FTBDF_H" = "xyes"; then
-        AC_DEFINE(HAVE_FTBDF_H, 1,
-		  [Define to 1 if you have freetype/ftbdf.h.])
-      fi
-      CONFIG_FLAGS="$CONFIG_FLAGS -DHAVE_FREETYPE"
-    fi
-  fi
-fi
-AC_SUBST(FREETYPE_LD_FLAGS)
+   AS_IF([test "x$HAVE_FTBDF_H" = "xyes"],
+     [AC_DEFINE([HAVE_FTBDF_H], [1],
+                [Define to 1 if you have freetype/ftbdf.h.])],
+     [])
+   CONFIG_FLAGS="$CONFIG_FLAGS -DHAVE_FREETYPE"
+  ],
+  []
+  )
+AC_SUBST([FREETYPE_LD_FLAGS])
 
 dnl Check for Xft2 usability.
 save_CPPFLAGS="$CPPFLAGS"
diff --git a/src/ChangeLog b/src/ChangeLog
index ee28ea6..8cb91c1 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2018-10-22  K. Handa  <handa@gnu.org>
+
+	* chartab.c (dump_sub_chartab): Use %p directive to print a
+	pointer value.
+
 2018-02-08  K. Handa  <handa@gnu.org>
 
 	Version 1.8.0 released.
diff --git a/src/chartab.c b/src/chartab.c
index d58aa65..8aeb6d7 100644
--- a/src/chartab.c
+++ b/src/chartab.c
@@ -558,7 +558,7 @@ dump_sub_chartab (MSubCharTable *table, void *default_value,
 	fprintf (mdebug__output, "(default nil)");
     }
   else
-    fprintf (mdebug__output, "(default #x%X)", (unsigned) table->default_value);
+    fprintf (mdebug__output, "(default #x%p)", table->default_value);
 
   default_value = table->default_value;
   if (table->contents.tables)
@@ -589,7 +589,7 @@ dump_sub_chartab (MSubCharTable *table, void *default_value,
 		  fprintf (mdebug__output, "nil)");
 	      }
 	    else
-	      fprintf (mdebug__output, " #xx%X)", (unsigned) default_value);
+	      fprintf (mdebug__output, " #x%p)", default_value);
 	  }
     }
   fprintf (mdebug__output, ")");
-- 
cgit v1.1


debug log:

solving 38c311bee5 ...
found 38c311bee5 in https://git.savannah.gnu.org/cgit/guix.git

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.