summaryrefslogtreecommitdiff
path: root/graphics/magicpoint/patches/patch-aa
blob: 43f0ab36dfe808d5d9c68e5d897ade604b98b5d8 (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
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
$NetBSD: patch-aa,v 1.12 2011/02/25 17:02:53 wiz Exp $

--- configure.orig	2007-12-28 20:31:26.000000000 +0000
+++ configure
@@ -1285,7 +1285,7 @@ Optional Features:
   --enable-freetype-charset16         use freetype for chaset16.
   --disable-xft2           DON'T use xft2 libraries.
   --enable-gif            compile gif support in (need libungif).
-  --enable-imlib          use imlib exclusively to load images.
+  --enable-imlib          use imlib2 exclusively to load images.
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
@@ -5090,7 +5090,7 @@ if test "$mgp_use_freetype" = "yes"; the
   # XXX: freetype2 may use freetype-config
  	{ echo "$as_me:$LINENO: checking for freetype1 library/header" >&5
 echo $ECHO_N "checking for freetype1 library/header... $ECHO_C" >&6; }
- 	for dir in $SEARCHPATH /usr/local/freetype /usr/local /opt/freetype /usr/pkg /usr /usr/include/freetype1 /sw; do
+ 	for dir in ${BUILDLINK_DIR}; do
  		ac_cv_ft_lib=no
  		ac_cv_ft_include=no
 		shlib=`echo $dir/lib/libttf.$SHLIBEXT* | head -n 1 | sed -e 's/.*\///'`
@@ -5384,7 +5384,7 @@ echo "${ECHO_T}$mgp_use_vflib" >&6; }
 if test "$mgp_use_vflib" = "yes"; then
 	{ echo "$as_me:$LINENO: checking for VFlib library/header" >&5
 echo $ECHO_N "checking for VFlib library/header... $ECHO_C" >&6; }
-	for dir in $SEARCHPATH /usr/local/VFlib /usr/local/vflib /usr/local /usr/pkg /usr; do
+	for dir in ${BUILDLINK_DIR}; do
 		ac_cv_vf_libname=VFlib
 		ac_cv_vf_libdir=no
 		ac_cv_vf_hdrdir=no
@@ -5562,12 +5562,7 @@ fi
 	if test -f "$with_vfontcap"; then
 		ac_cv_vf_fontcap=$with_vfontcap;
 	else
-		for ac_dir in /usr/local/lib /usr/local/lib/tex \
-		    /usr/local/lib/VFlib /usr/local/lib/fonts/vf \
-		    /usr/local/lib /usr/local/etc /etc \
-		    /usr/local/libdata/vflib /usr/local/share/VFlib \
-		    /usr/local/share/VFlib/* \
-		    ../../VFlib* ../VFlib* VFlib*; do
+		for ac_dir in ${prefix}/share/VFlib/*; do
 			if test -d $ac_dir -a -f $ac_dir/vfontcap; then
 				ac_cv_vf_fontcap=$ac_dir/vfontcap;
 				break
@@ -5609,22 +5604,17 @@ _ACEOF
 	fi
 fi
 
-if type pkg-config > /dev/null 2>&1; then
-  for pnglib in libpng libpng12 libpng10
-  do
-     if pkg-config $pnglib; then
-       LIBS="$LIBS `pkg-config --libs $pnglib`"
-       OPTFLAGS="$OPTFLAGS `pkg-config --cflags $pnglib`"
-       cat >>confdefs.h <<\_ACEOF
+if type pkg-config > /dev/null 2>&1 && pkg-config libpng; then
+  LIBS="$LIBS `pkg-config --libs libpng`"
+  OPTFLAGS="$OPTFLAGS `pkg-config --cflags libpng`"
+  cat >>confdefs.h <<\_ACEOF
 #define USE_PNG 1
 _ACEOF
 
        break
-     fi
-  done
 fi
 if test "$use_libpng" = ""; then
-for i in $SEARCHPATH /usr/pkg /usr/local /usr; do
+for i in ${BUILDLINK_DIR}; do
 	if test -f $i/include/png.h; then
 		if test -f $i/lib/libpng.a ; then
 			DEPLIBS="$DEPLIBS $i/lib/libpng.a"
@@ -5779,7 +5769,7 @@ fi
   done
 fi
 
-for i in /usr/pkg /usr/local /usr; do
+for i in ${BUILDLINK_DIR}; do
 	if test -f $i/include/libmng.h; then
 		if test -f $i/lib/libmng.a ; then
 			DEPLIBS="$DEPLIBS $i/lib/libmng.a"
@@ -6193,23 +6183,19 @@ fi
 { echo "$as_me:$LINENO: result: $mgp_use_xft2" >&5
 echo "${ECHO_T}$mgp_use_xft2" >&6; }
 if test "$mgp_use_xft2" = "yes"; then
-  if type pkg-config > /dev/null 2>&1; then
-     if pkg-config xft; then
-        OPTFLAGS="`pkg-config --cflags xft` $OPTFLAGS"
-        LIBS="$LIBS `pkg-config --libs xft`"
-        cat >>confdefs.h <<\_ACEOF
+  if type pkg-config > /dev/null 2>&1 && pkg-config xft; then
+     OPTFLAGS="`pkg-config --cflags xft` $OPTFLAGS"
+     LIBS="$LIBS `pkg-config --libs xft`"
+     cat >>confdefs.h <<\_ACEOF
 #define USE_XFT2 1
 _ACEOF
 
 		mgp_xft2_found="yes";
-     fi
   fi
   if test "$mgp_xft2_found" != "yes"; then
 	{ echo "$as_me:$LINENO: checking for xft2 and ft2 and fc header.." >&5
 echo $ECHO_N "checking for xft2 and ft2 and fc header..... $ECHO_C" >&6; }
-	for dir in /usr/include /usr/include/Xft2 /usr/X11R6/include \
-			    /usr/X11R6/include/freetype2					\
-				/usr/local/include /usr/include/freetype2; do
+	for dir in ${BUILDLINK_DIR}; do
 		if test -f $dir/X11/Xft/Xft.h; then
 			ac_cv_xft2_hdrdir="$dir"
 		fi
@@ -6984,7 +6970,7 @@ fi
 		echo 'FATAL: You need libungif to use gif images.  pass proper LIBS to configure.'
 		exit 1
 	fi
-	for i in /usr/pkg /usr/local /usr; do
+	for i in ${BUILDLINK_DIR}; do
 		if test -f $i/include/gif_lib.h; then
 			gif_h_ok=yes
 			OPTFLAGS="$OPTFLAGS -I$i/include"
@@ -7146,16 +7132,14 @@ fi
 { echo "$as_me:$LINENO: result: $mgp_imlib" >&5
 echo "${ECHO_T}$mgp_imlib" >&6; }
 if test $mgp_imlib = "yes"; then
-  if type pkg-config > /dev/null 2>&1; then
-     if pkg-config imlib; then
-        LIBS="$LIBS `pkg-config --libs imlib`"
-        OPTFLAGS="$OPTFLAGS `pkg-config --cflags imlib`"
-	cat >>confdefs.h <<\_ACEOF
+  if type pkg-config > /dev/null 2>&1 && pkg-config imlib2; then
+     LIBS="$LIBS `pkg-config --libs imlib2`"
+     OPTFLAGS="$OPTFLAGS `pkg-config --cflags imlib2`"
+     cat >>confdefs.h <<\_ACEOF
 #define USE_IMLIB 1
 _ACEOF
 
 	USE_IMLIB=1
-     fi
   else
 	{ echo "$as_me:$LINENO: checking for Imlib_init in -lImlib" >&5
 echo $ECHO_N "checking for Imlib_init in -lImlib... $ECHO_C" >&6; }
@@ -7163,7 +7147,7 @@ if test "${ac_cv_lib_Imlib_Imlib_init+se
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lImlib -L$x_libraries -lX11 -lXext $LIBS"
+LIBS="-lImlib2 -L$x_libraries -lX11 -lXext $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -7177,11 +7161,11 @@ cat >>conftest.$ac_ext <<_ACEOF
 #ifdef __cplusplus
 extern "C"
 #endif
-char Imlib_init ();
+char imlib_load_image ();
 int
 main ()
 {
-return Imlib_init ();
+return imlib_load_image ();
   ;
   return 0;
 }
@@ -7220,7 +7204,7 @@ fi
 echo "${ECHO_T}$ac_cv_lib_Imlib_Imlib_init" >&6; }
 if test $ac_cv_lib_Imlib_Imlib_init = yes; then
   imlib_ok=yes
-		LIBS="$LIBS -lImlib"
+		LIBS="$LIBS -lImlib2"
 		cat >>confdefs.h <<\_ACEOF
 #define USE_IMLIB 1
 _ACEOF
@@ -7232,14 +7216,14 @@ fi
 		echo 'FATAL: You need libImlib to use Imlib loading.  pass proper LIBS to configure.'
 		exit 1
 	fi
-	for i in /usr/pkg /usr/local; do
-		if test -f $i/include/Imlib.h; then
+	for i in ${BUILDLINK_DIR}; do
+		if test -f $i/include/Imlib2.h; then
 			imlib_h_ok=yes
 			OPTFLAGS="$OPTFLAGS -I$i/include"
 			break
 		fi
 	done
-	if test -f /usr/include/Imlib.h; then
+	if test -f /usr/include/Imlib2.h; then
 		imlib_h_ok=yes
 	fi
 	if test "x$gif_h_ok" != "xyes"; then
@@ -7262,7 +7246,7 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
-#include <Imlib.h>
+#include <Imlib2.h>
 _ACEOF
 rm -f conftest.$ac_objext
 if { (ac_try="$ac_compile"
@@ -7302,7 +7286,7 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <Imlib.h>
+#include <Imlib2.h>
 _ACEOF
 if { (ac_try="$ac_cpp conftest.$ac_ext"
 case "(($ac_try" in