Contents of /trunk/qt/patches/qt-3.3.8b-freetype251.patch
Parent Directory | Revision Log
Revision 2420 -
(show annotations)
(download)
Mon Mar 10 10:15:21 2014 UTC (10 years, 6 months ago) by niro
File size: 2243 byte(s)
Mon Mar 10 10:15:21 2014 UTC (10 years, 6 months ago) by niro
File size: 2243 byte(s)
-fix build against >=freetype-2.5.1
1 | diff -ur qt-x11-free-3.3.8b/config.tests/x11/xfreetype.test qt-x11-free-3.3.8b-freetype251/config.tests/x11/xfreetype.test |
2 | --- qt-x11-free-3.3.8b/config.tests/x11/xfreetype.test 2008-01-15 20:09:15.000000000 +0100 |
3 | +++ qt-x11-free-3.3.8b-freetype251/config.tests/x11/xfreetype.test 2014-02-23 19:22:02.000000000 +0100 |
4 | @@ -116,33 +116,14 @@ |
5 | # check for freetype2 headers |
6 | FREETYPE2_INCDIR= |
7 | if [ "$XFT" = "yes" ]; then |
8 | - INC="freetype2/freetype/freetype.h" |
9 | - XDIRS=`sed -n -e '/^QMAKE_INCDIR_X11[ ]*=/ { s/[^=]*=[ ]*//; s/-I/ /g; p; }' $XCONFIG` |
10 | - LDIRS=`sed -n -e '/^QMAKE_INCDIR[ ]*=/ { s/[^=]*=[ ]*//; s/-I/ /g; p; }' $XCONFIG` |
11 | - INCDIRS="$IN_INCDIRS $XDIRS $LDIRS /usr/include /include" |
12 | - F= |
13 | - for INCDIR in $INCDIRS; do |
14 | - if [ -f $INCDIR/$INC ]; then |
15 | - # detect major version of freetype2 |
16 | - FREETYPE_MAJOR=`grep "#define FREETYPE_MAJOR" $INCDIR/$INC | head -n 1 | awk '{ print \$3 }'` |
17 | - FREETYPE_MINOR=`grep "#define FREETYPE_MINOR" $INCDIR/$INC | head -n 1 | awk '{ print \$3 }'` |
18 | - FREETYPE_PATCH=`grep "#define FREETYPE_PATCH" $INCDIR/$INC | head -n 1 | awk '{ print \$3 }'` |
19 | - test -z "$FREETYPE_PATCH" && FREETYPE_PATCH="0" |
20 | - [ "$VERBOSE" = "yes" ] && \ |
21 | - echo " Found Freetype version $FREETYPE_MAJOR.$FREETYPE_MINOR.$FREETYPE_PATCH" |
22 | - if [ "$FREETYPE_MAJOR" -eq "2" ] \ |
23 | - && [ "$FREETYPE_MINOR" -ge "0" -a "$FREETYPE_PATCH" -ge "9" ] \ |
24 | - || [ "$FREETYPE_MINOR" -ge "1" ]; then |
25 | - F=yes |
26 | - FREETYPE2_INCDIR=$INCDIR/freetype2 |
27 | - [ "$VERBOSE" = "yes" ] && echo " Found $INC in $INCDIR" |
28 | - break |
29 | - fi |
30 | - fi |
31 | - done |
32 | - if [ -z "$F" ]; then |
33 | - XFT=no |
34 | - [ "$VERBOSE" = "yes" ] && echo " Could not find $INC anywhere in $INCDIRS" |
35 | + # minimum is freetype 2.0.9, which had libtool version 6.3.0 |
36 | + if pkg-config --atleast-version=6.3.0 freetype2; then |
37 | + [ "$VERBOSE" = "yes" ] && echo " Found Freetype >= 2.0.9 using pkg-config" |
38 | + FREETYPE2_INCDIR=`pkg-config --cflags-only-I freetype2 | sed -e 's/^-I//g' -e 's/ -I/ /g'` |
39 | + [ "$VERBOSE" = "yes" ] && echo " Freetype headers in $FREETYPE2_INCDIR" |
40 | + else |
41 | + XFT=no |
42 | + [ "$VERBOSE" = "yes" ] && echo " Could not find Freetype >= 2.0.9 using pkg-config" |
43 | fi |
44 | fi |
45 |