summaryrefslogtreecommitdiff
blob: c0cb5957fae81d09b34775d808ab51c59c84c22e (plain)
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
From cf17a44bd5b8aac1c73f3bb00ca872cd8f08df4a Mon Sep 17 00:00:00 2001
From: Alexandre Rostovtsev <tetromino@gentoo.org>
Date: Mon, 17 Mar 2014 00:01:10 -0400
Subject: [PATCH] Update freetype includes to work with >=freetype-2.5.1

---
 configure.in                    | 22 +++-------------------
 libgnomeprint/gnome-font-face.c |  2 +-
 libgnomeprint/gnome-print-gdi.c |  2 +-
 libgnomeprint/gnome-rfont.c     |  4 ++--
 4 files changed, 7 insertions(+), 23 deletions(-)

diff --git a/configure.in b/configure.in
index c15bb69..aebe591 100644
--- a/configure.in
+++ b/configure.in
@@ -162,25 +162,9 @@ LDFLAGS="$LDFLAGS $LIBM"
 dnl =================================
 dnl Checking for freetype2
 dnl =================================
-FREETYPE_LIBS=
-FREETYPE_CFLAGS=
-AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no)
-if test "x$FREETYPE_CONFIG" = "xno" ; then
-	AC_MSG_ERROR(You need FreeType2 (freetype-devel v 2.x package) for this version of libgnomeprint)
-else
-	FREETYPE_CFLAGS=`$FREETYPE_CONFIG --cflags`
-	FREETYPE_LIBS=`$FREETYPE_CONFIG --libs`
-fi
-
-libgnomeprint_save_ldflags=$LDFLAGS
-LDFLAGS="$LDFLAGS $FREETYPE_LIBS"
-
-freetype_version=false
-AC_MSG_NOTICE([checking for sufficiently new FreeType (at least 2.0.5)])
-AC_CHECK_LIB(freetype, FT_Get_Postscript_Name,:,[
-    AC_MSG_ERROR(You need FreeType2 (freetype-devel 2.0.5 or greater package) for this version of libgnomeprint)])
-
-LDFLAGS=$libgnomeprint_save_ldflags
+dnl "freetype2 >= 17" means freetype-2.5.1
+PKG_CHECK_MODULES(FREETYPE, freetype2 >= 17, ,
+	[PKG_CHECK_MODULES(FREETYPE, freetype2, [FREETYPE_CFLAGS="$FREETYPE_CFLAGS -I`$PKG_CONFIG --variable=includedir freetype2`/freetype2/freetype"])])
 
 dnl =================================
 dnl END: Checking for freetype2
diff --git a/libgnomeprint/gnome-font-face.c b/libgnomeprint/gnome-font-face.c
index 0447377..f9f8f3e 100644
--- a/libgnomeprint/gnome-font-face.c
+++ b/libgnomeprint/gnome-font-face.c
@@ -36,7 +36,7 @@
 #include <stdarg.h>
 #include <locale.h>
 
-#include <freetype/ftoutln.h>
+#include <ftoutln.h>
 
 #include <libgnomeprint/gnome-print-private.h>
 #include <libgnomeprint/gnome-font-private.h>
diff --git a/libgnomeprint/gnome-print-gdi.c b/libgnomeprint/gnome-print-gdi.c
index f89a8e8..7755673 100755
--- a/libgnomeprint/gnome-print-gdi.c
+++ b/libgnomeprint/gnome-print-gdi.c
@@ -36,7 +36,7 @@
 #include <libgnomeprint/gp-gc-private.h>
 
 #include <ft2build.h>
-#include <freetype/freetype.h>
+#include FT_FREETYPE_H
 
 #define WIN32_LEAN_AND_MEAN
 #include <windows.h>
diff --git a/libgnomeprint/gnome-rfont.c b/libgnomeprint/gnome-rfont.c
index 55ec261..09e5a6e 100644
--- a/libgnomeprint/gnome-rfont.c
+++ b/libgnomeprint/gnome-rfont.c
@@ -28,8 +28,8 @@
 
 #include <ft2build.h>
 #include FT_FREETYPE_H
-#include <freetype/ftglyph.h>
-#include <freetype/ftbbox.h>
+#include <ftglyph.h>
+#include <ftbbox.h>
 #include <libart_lgpl/art_misc.h>
 #include <libart_lgpl/art_affine.h>
 #include <libart_lgpl/art_vpath.h>
-- 
1.9.0