File: freetype2_pkg-config.patch

package info (click to toggle)
dvi2ps 5.1j-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 3,424 kB
  • sloc: ansic: 15,077; sh: 10,365; makefile: 157
file content (80 lines) | stat: -rw-r--r-- 2,533 bytes parent folder | download | duplicates (4)
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
Description: Use pkg-config to detect FreeType 2, since freetype-config is no
 longer available on Debian.
Author: Hugh McMaster <hugh.mcmaster@outlook.com>
Bug-Debian: https://bugs.debian.org/887604
Last-Update: 2019-02-17

--- dvi2ps-5.1j.orig/Makefile.am
+++ dvi2ps-5.1j/Makefile.am
@@ -25,7 +25,7 @@ dvi2ps_SOURCES = \
 	pst1form.c writet1.c \
 	psspecial.c pscolor.c psifont.c psio.c
 
-AM_CPPFLAGS = $(FREETYPE2_INCLUDES)
+AM_CPPFLAGS = $(FREETYPE2_CFLAGS)
 LDADD = -lm
 
 #LIBTOOL_DEPS = @LIBTOOL_DEPS@
--- dvi2ps-5.1j.orig/Makefile.in
+++ dvi2ps-5.1j/Makefile.in
@@ -127,8 +127,6 @@ ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
-FREETYPE2_CONFIG = @FREETYPE2_CONFIG@
-FREETYPE2_INCLUDES = @FREETYPE2_INCLUDES@
 GREP = @GREP@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
@@ -241,7 +239,7 @@ dvi2ps_SOURCES = \
 	pst1form.c writet1.c \
 	psspecial.c pscolor.c psifont.c psio.c
 
-AM_CPPFLAGS = $(FREETYPE2_INCLUDES)
+AM_CPPFLAGS = $(FREETYPE2_CFLAGS)
 LDADD = -lm
 
 #LIBTOOL_DEPS = @LIBTOOL_DEPS@
--- dvi2ps-5.1j.orig/configure.ac
+++ dvi2ps-5.1j/configure.ac
@@ -19,6 +19,7 @@ AC_PROG_CC
 if test "x$ac_cv_prog_cc_c89" != xno; then
 	AC_DEFINE([HAVE_ANSI_C89], [1], [ANSI C89 compiler])
 fi
+PKG_PROG_PKG_CONFIG
 
 # Checks for header files.
 AC_CHECK_HEADERS([fcntl.h sys/file.h sys/time.h sys/types.h unistd.h])
@@ -52,29 +53,13 @@ if test "x$with_kpathsea" = xyes; then
 	AC_CHECK_HEADERS([kpathsea/config.h])
 fi
 
-AC_ARG_WITH([freetype2],
-	AC_HELP_STRING([--with-freetype2@<:@=FTCNF@:>@],
-		       [use FreeType2 [FTCNF=path-to-`freetype-config']]),
-	[with_freetype2=$withval], [with_freetype2=yes])
-if test "x$with_freetype2" = xyes; then
-	AC_PATH_PROG(FREETYPE2_CONFIG, freetype-config)
-	if test -z "$FREETYPE2_CONFIG"; then
-		with_freetype2=no
-	fi
-else
-	AC_MSG_CHECKING([for freetype-config])
-	FREETYPE2_CONFIG=$with_freetype2
-	AC_MSG_RESULT([$FREETYPE2_CONFIG given])
-fi
+PKG_CHECK_MODULES([FREETYPE2], [freetype2], with_freetype2=yes, with_freetype2=no)
+
 if test "x$with_freetype2" != xno; then
-	AC_DEFINE([HAVE_LIBFREETYPE2], [1], [libfreetype (freetype-config)])
+	AC_DEFINE([HAVE_LIBFREETYPE2], [1], [Have libfreetype])
 	#AC_CHECK_LIB([freetype], [FT_Init_FreeType])
-	FREETYPE2_LIBS="`$FREETYPE2_CONFIG --libs`"
 	LIBS="$FREETYPE2_LIBS $LIBS"
 	#AC_CHECK_HEADERS([freetype/freetype.h])
-	FREETYPE2_INCLUDES="`$FREETYPE2_CONFIG --cflags`"
-	AC_SUBST([FREETYPE2_INCLUDES])
-	#AC_MSG_RESULT([$FREETYPE2_LIBS and $FREETYPE2_INCLUDES])
 fi
 
 AC_ARG_WITH([vflib2],