[cairo-commit] Branch '1.8' - 4 commits - build/aclocal.compare.m4 configure.ac test/extend-reflect-ps2-ref.png test/extend-reflect-ps3-ref.png test/extend-reflect-similar-ps2-ref.png test/extend-reflect-similar-ps3-ref.png test/Makefile.am test/mask-pdf-argb32-ref.png test/mask-pdf-rgb24-ref.png test/push-group-pdf-ref.png test/push-group-pdf-rgb24-ref.png test/README test/smask-image-mask-pdf-ref.png test/smask-mask-pdf-ref.png test/smask-paint-pdf-ref.png test/smask-pdf-ref.png test/smask-ref.png test/smask-text-ref.png test/smask-text-xlib-fallback-ref.png test/smask-text-xlib-ref.png test/smask-xlib-fallback-ref.png test/smask-xlib-ref.png test/user-font-proxy-ps2-ref.png test/user-font-proxy-ps3-ref.png
Chris Wilson
ickle at kemper.freedesktop.org
Wed Jun 3 01:15:38 PDT 2009
build/aclocal.compare.m4 | 162 ++++++++++++++++++++++++++++++++
configure.ac | 18 +--
test/Makefile.am | 4
test/README | 2
test/extend-reflect-ps2-ref.png |binary
test/extend-reflect-ps3-ref.png |binary
test/extend-reflect-similar-ps2-ref.png |binary
test/extend-reflect-similar-ps3-ref.png |binary
test/mask-pdf-argb32-ref.png |binary
test/mask-pdf-rgb24-ref.png |binary
test/push-group-pdf-ref.png |binary
test/push-group-pdf-rgb24-ref.png |binary
test/smask-image-mask-pdf-ref.png |binary
test/smask-mask-pdf-ref.png |binary
test/smask-paint-pdf-ref.png |binary
test/smask-pdf-ref.png |binary
test/smask-ref.png |binary
test/smask-text-ref.png |binary
test/smask-text-xlib-fallback-ref.png |binary
test/smask-text-xlib-ref.png |binary
test/smask-xlib-fallback-ref.png |binary
test/smask-xlib-ref.png |binary
test/user-font-proxy-ps2-ref.png |binary
test/user-font-proxy-ps3-ref.png |binary
24 files changed, 173 insertions(+), 13 deletions(-)
New commits:
commit 7f08a2c241bf2c615317cd6741c3e560a8bef1e6
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Fri Jan 2 15:36:39 2009 +0000
[configure] Replace awk comparator with an aclocal version
As reported in https://bugs.freedesktop.org/show_bug.cgi?id=19283, the
fallback freetype version compare is broken inside the configure script as
the $1-$3 arguments are interpreted as the script is constructed. To avoid
making that awk comparison any more complicated, we import a version compare
from the autoconf archives - such that we have a reusable macro for the
furture.
diff --git a/build/aclocal.compare.m4 b/build/aclocal.compare.m4
new file mode 100644
index 0000000..bd6c51b
--- /dev/null
+++ b/build/aclocal.compare.m4
@@ -0,0 +1,162 @@
+dnl @synopsis AX_COMPARE_VERSION(VERSION_A, OP, VERSION_B, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
+dnl
+dnl This macro compares two version strings. It is used heavily in the
+dnl macro _AX_PATH_BDB for library checking. Due to the various number
+dnl of minor-version numbers that can exist, and the fact that string
+dnl comparisons are not compatible with numeric comparisons, this is
+dnl not necessarily trivial to do in a autoconf script. This macro
+dnl makes doing these comparisons easy.
+dnl
+dnl The six basic comparisons are available, as well as checking
+dnl equality limited to a certain number of minor-version levels.
+dnl
+dnl The operator OP determines what type of comparison to do, and can
+dnl be one of:
+dnl
+dnl eq - equal (test A == B)
+dnl ne - not equal (test A != B)
+dnl le - less than or equal (test A <= B)
+dnl ge - greater than or equal (test A >= B)
+dnl lt - less than (test A < B)
+dnl gt - greater than (test A > B)
+dnl
+dnl Additionally, the eq and ne operator can have a number after it to
+dnl limit the test to that number of minor versions.
+dnl
+dnl eq0 - equal up to the length of the shorter version
+dnl ne0 - not equal up to the length of the shorter version
+dnl eqN - equal up to N sub-version levels
+dnl neN - not equal up to N sub-version levels
+dnl
+dnl When the condition is true, shell commands ACTION-IF-TRUE are run,
+dnl otherwise shell commands ACTION-IF-FALSE are run. The environment
+dnl variable 'ax_compare_version' is always set to either 'true' or
+dnl 'false' as well.
+dnl
+dnl Examples:
+dnl
+dnl AX_COMPARE_VERSION([3.15.7],[lt],[3.15.8])
+dnl AX_COMPARE_VERSION([3.15],[lt],[3.15.8])
+dnl
+dnl would both be true.
+dnl
+dnl AX_COMPARE_VERSION([3.15.7],[eq],[3.15.8])
+dnl AX_COMPARE_VERSION([3.15],[gt],[3.15.8])
+dnl
+dnl would both be false.
+dnl
+dnl AX_COMPARE_VERSION([3.15.7],[eq2],[3.15.8])
+dnl
+dnl would be true because it is only comparing two minor versions.
+dnl
+dnl AX_COMPARE_VERSION([3.15.7],[eq0],[3.15])
+dnl
+dnl would be true because it is only comparing the lesser number of
+dnl minor versions of the two values.
+dnl
+dnl Note: The characters that separate the version numbers do not
+dnl matter. An empty string is the same as version 0. OP is evaluated
+dnl by autoconf, not configure, so must be a string, not a variable.
+dnl
+dnl The author would like to acknowledge Guido Draheim whose advice
+dnl about the m4_case and m4_ifvaln functions make this macro only
+dnl include the portions necessary to perform the specific comparison
+dnl specified by the OP argument in the final configure script.
+dnl
+dnl @category Misc
+dnl @author Tim Toolan <toolan at ele.uri.edu>
+dnl @version 2004-03-01
+dnl @license GPLWithACException
+
+dnl #########################################################################
+AC_DEFUN([AX_COMPARE_VERSION], [
+ # Used to indicate true or false condition
+ ax_compare_version=false
+
+ # Convert the two version strings to be compared into a format that
+ # allows a simple string comparison. The end result is that a version
+ # string of the form 1.12.5-r617 will be converted to the form
+ # 0001001200050617. In other words, each number is zero padded to four
+ # digits, and non digits are removed.
+ AS_VAR_PUSHDEF([A],[ax_compare_version_A])
+ A=`echo "$1" | sed -e 's/\([[0-9]]*\)/Z\1Z/g' \
+ -e 's/Z\([[0-9]]\)Z/Z0\1Z/g' \
+ -e 's/Z\([[0-9]][[0-9]]\)Z/Z0\1Z/g' \
+ -e 's/Z\([[0-9]][[0-9]][[0-9]]\)Z/Z0\1Z/g' \
+ -e 's/[[^0-9]]//g'`
+
+ AS_VAR_PUSHDEF([B],[ax_compare_version_B])
+ B=`echo "$3" | sed -e 's/\([[0-9]]*\)/Z\1Z/g' \
+ -e 's/Z\([[0-9]]\)Z/Z0\1Z/g' \
+ -e 's/Z\([[0-9]][[0-9]]\)Z/Z0\1Z/g' \
+ -e 's/Z\([[0-9]][[0-9]][[0-9]]\)Z/Z0\1Z/g' \
+ -e 's/[[^0-9]]//g'`
+
+ dnl # In the case of le, ge, lt, and gt, the strings are sorted as necessary
+ dnl # then the first line is used to determine if the condition is true.
+ dnl # The sed right after the echo is to remove any indented white space.
+ m4_case(m4_tolower($2),
+ [lt],[
+ ax_compare_version=`echo "x$A
+x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/false/;s/x${B}/true/;1q"`
+ ],
+ [gt],[
+ ax_compare_version=`echo "x$A
+x$B" | sed 's/^ *//' | sort | sed "s/x${A}/false/;s/x${B}/true/;1q"`
+ ],
+ [le],[
+ ax_compare_version=`echo "x$A
+x$B" | sed 's/^ *//' | sort | sed "s/x${A}/true/;s/x${B}/false/;1q"`
+ ],
+ [ge],[
+ ax_compare_version=`echo "x$A
+x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/true/;s/x${B}/false/;1q"`
+ ],[
+ dnl Split the operator from the subversion count if present.
+ m4_bmatch(m4_substr($2,2),
+ [0],[
+ # A count of zero means use the length of the shorter version.
+ # Determine the number of characters in A and B.
+ ax_compare_version_len_A=`echo "$A" | awk '{print(length)}'`
+ ax_compare_version_len_B=`echo "$B" | awk '{print(length)}'`
+
+ # Set A to no more than B's length and B to no more than A's length.
+ A=`echo "$A" | sed "s/\(.\{$ax_compare_version_len_B\}\).*/\1/"`
+ B=`echo "$B" | sed "s/\(.\{$ax_compare_version_len_A\}\).*/\1/"`
+ ],
+ [[0-9]+],[
+ # A count greater than zero means use only that many subversions
+ A=`echo "$A" | sed "s/\(\([[0-9]]\{4\}\)\{m4_substr($2,2)\}\).*/\1/"`
+ B=`echo "$B" | sed "s/\(\([[0-9]]\{4\}\)\{m4_substr($2,2)\}\).*/\1/"`
+ ],
+ [.+],[
+ AC_WARNING(
+ [illegal OP numeric parameter: $2])
+ ],[])
+
+ # Pad zeros at end of numbers to make same length.
+ ax_compare_version_tmp_A="$A`echo $B | sed 's/./0/g'`"
+ B="$B`echo $A | sed 's/./0/g'`"
+ A="$ax_compare_version_tmp_A"
+
+ # Check for equality or inequality as necessary.
+ m4_case(m4_tolower(m4_substr($2,0,2)),
+ [eq],[
+ test "x$A" = "x$B" && ax_compare_version=true
+ ],
+ [ne],[
+ test "x$A" != "x$B" && ax_compare_version=true
+ ],[
+ AC_WARNING([illegal OP parameter: $2])
+ ])
+ ])
+
+ AS_VAR_POPDEF([A])dnl
+ AS_VAR_POPDEF([B])dnl
+
+ dnl # Execute ACTION-IF-TRUE / ACTION-IF-FALSE.
+ if test "$ax_compare_version" = "true" ; then
+ m4_ifvaln([$4],[$4],[:])dnl
+ m4_ifvaln([$5],[else $5])dnl
+ fi
+]) dnl AX_COMPARE_VERSION
diff --git a/configure.ac b/configure.ac
index cbde1b8..8a89f9d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -274,18 +274,12 @@ CAIRO_ENABLE_FONT_BACKEND(ft, FreeType, auto, [
AC_MSG_CHECKING(freetype2 libtool version)
FREETYPE_VERSION=`$FREETYPE_CONFIG --version`
-
- VERSION_DEC=`echo $FREETYPE_VERSION | awk -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'`
- MIN_VERSION_DEC=`echo $FREETYPE_MIN_VERSION | awk -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'`
- if test $VERSION_DEC -lt $MIN_VERSION_DEC; then
- AC_MSG_RESULT($FREETYPE_VERSION - Too old)
- use_ft="no ($FREETYPE_VERSION found; version $FREETYPE_MIN_VERSION from release $FREETYPE_MIN_RELEASE required)"
- else
- AC_MSG_RESULT($FREETYPE_VERSION - OK)
-
- ft_NONPKGCONFIG_CFLAGS=`$FREETYPE_CONFIG --cflags`
- ft_NONPKGCONFIG_LIBS=`$FREETYPE_CONFIG --libs`
- fi
+ AX_COMPARE_VERSION([$FREETYPE_VERSION], [gt], [$FREETYPE_MIN_VERSION],
+ [AC_MSG_RESULT($FREETYPE_VERSION - OK)
+ ft_NONPKGCONFIG_CFLAGS=`$FREETYPE_CONFIG --cflags`
+ ft_NONPKGCONFIG_LIBS=`$FREETYPE_CONFIG --libs`],
+ [AC_MSG_RESULT($FREETYPE_VERSION - Too old)
+ use_ft="no ($FREETYPE_VERSION found; version $FREETYPE_MIN_VERSION from release $FREETYPE_MIN_RELEASE required)"])
fi
fi
fi
commit d32470555c9663ff4f01f1cb4feaa8389dbec05e
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Wed Jun 3 09:10:51 2009 +0100
[test] Refresh ghostscript reference images
A couple of minor differences with 8.64 vs 8.62
diff --git a/test/README b/test/README
index 57abef2..e042679 100644
--- a/test/README
+++ b/test/README
@@ -105,7 +105,7 @@ Here are some of the relevant details:
the fixes you will need to avoid false negatives from the test
suite.
- * To test the ps backend, you will need ghostscript version 8.62.
+ * To test the ps backend, you will need ghostscript version 8.64.
* Testing the xlib backend is problematic since many X server
drivers have bugs that are exercised by the test suite. (Or, if
diff --git a/test/extend-reflect-ps2-ref.png b/test/extend-reflect-ps2-ref.png
index b33b38d..61cc2b0 100644
Binary files a/test/extend-reflect-ps2-ref.png and b/test/extend-reflect-ps2-ref.png differ
diff --git a/test/extend-reflect-ps3-ref.png b/test/extend-reflect-ps3-ref.png
index b33b38d..61cc2b0 100644
Binary files a/test/extend-reflect-ps3-ref.png and b/test/extend-reflect-ps3-ref.png differ
diff --git a/test/extend-reflect-similar-ps2-ref.png b/test/extend-reflect-similar-ps2-ref.png
index b33b38d..61cc2b0 100644
Binary files a/test/extend-reflect-similar-ps2-ref.png and b/test/extend-reflect-similar-ps2-ref.png differ
diff --git a/test/extend-reflect-similar-ps3-ref.png b/test/extend-reflect-similar-ps3-ref.png
index b33b38d..61cc2b0 100644
Binary files a/test/extend-reflect-similar-ps3-ref.png and b/test/extend-reflect-similar-ps3-ref.png differ
diff --git a/test/user-font-proxy-ps2-ref.png b/test/user-font-proxy-ps2-ref.png
index 0d90244..9b29186 100644
Binary files a/test/user-font-proxy-ps2-ref.png and b/test/user-font-proxy-ps2-ref.png differ
diff --git a/test/user-font-proxy-ps3-ref.png b/test/user-font-proxy-ps3-ref.png
index 0d90244..9b29186 100644
Binary files a/test/user-font-proxy-ps3-ref.png and b/test/user-font-proxy-ps3-ref.png differ
commit d45f99330bcb4edc2f2b2825034ca644bf1cbb77
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Wed Jun 3 08:37:08 2009 +0100
[test] Update smask text
Smells like a font change...
diff --git a/test/Makefile.am b/test/Makefile.am
index 887bd73..b417b63 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -819,6 +819,8 @@ REFERENCE_IMAGES = \
smask-ps3-ref.png \
smask-svg12-ref.png \
smask-svg11-ref.png \
+ smask-xlib-ref.png \
+ smask-xlib-fallback-ref.png \
smask-fill-ref.png \
smask-fill-pdf-ref.png \
smask-fill-svg12-ref.png \
@@ -841,6 +843,8 @@ REFERENCE_IMAGES = \
smask-text-ps3-ref.png \
smask-text-svg12-ref.png \
smask-text-svg11-ref.png \
+ smask-text-xlib-ref.png \
+ smask-text-xlib-fallback-ref.png \
stroke-image-ref.png \
stroke-image-pdf-ref.png \
stroke-image-ps2-ref.png \
diff --git a/test/smask-ref.png b/test/smask-ref.png
index 2d98e43..baf1627 100644
Binary files a/test/smask-ref.png and b/test/smask-ref.png differ
diff --git a/test/smask-text-ref.png b/test/smask-text-ref.png
index f001859..87146ab 100644
Binary files a/test/smask-text-ref.png and b/test/smask-text-ref.png differ
diff --git a/test/smask-text-xlib-fallback-ref.png b/test/smask-text-xlib-fallback-ref.png
new file mode 100644
index 0000000..f001859
Binary files /dev/null and b/test/smask-text-xlib-fallback-ref.png differ
diff --git a/test/smask-text-xlib-ref.png b/test/smask-text-xlib-ref.png
new file mode 100644
index 0000000..f001859
Binary files /dev/null and b/test/smask-text-xlib-ref.png differ
diff --git a/test/smask-xlib-fallback-ref.png b/test/smask-xlib-fallback-ref.png
new file mode 100644
index 0000000..aab3e71
Binary files /dev/null and b/test/smask-xlib-fallback-ref.png differ
diff --git a/test/smask-xlib-ref.png b/test/smask-xlib-ref.png
new file mode 100644
index 0000000..aab3e71
Binary files /dev/null and b/test/smask-xlib-ref.png differ
commit 3ecb25d238d45b9bf4a22ca6c7fc189ce898a912
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Wed Jun 3 07:59:41 2009 +0100
[test] Refresh pdf reference images
Update to reflect current poppler rendering misbehaviour.
diff --git a/test/mask-pdf-argb32-ref.png b/test/mask-pdf-argb32-ref.png
index 4570bff..718a706 100644
Binary files a/test/mask-pdf-argb32-ref.png and b/test/mask-pdf-argb32-ref.png differ
diff --git a/test/mask-pdf-rgb24-ref.png b/test/mask-pdf-rgb24-ref.png
index 1231965..898ccfd 100644
Binary files a/test/mask-pdf-rgb24-ref.png and b/test/mask-pdf-rgb24-ref.png differ
diff --git a/test/push-group-pdf-ref.png b/test/push-group-pdf-ref.png
index e016dbd..a6e0a34 100644
Binary files a/test/push-group-pdf-ref.png and b/test/push-group-pdf-ref.png differ
diff --git a/test/push-group-pdf-rgb24-ref.png b/test/push-group-pdf-rgb24-ref.png
index 7e84ec8..11d66b8 100644
Binary files a/test/push-group-pdf-rgb24-ref.png and b/test/push-group-pdf-rgb24-ref.png differ
diff --git a/test/smask-image-mask-pdf-ref.png b/test/smask-image-mask-pdf-ref.png
index 54baefd..488b090 100644
Binary files a/test/smask-image-mask-pdf-ref.png and b/test/smask-image-mask-pdf-ref.png differ
diff --git a/test/smask-mask-pdf-ref.png b/test/smask-mask-pdf-ref.png
index 94dac1d..d191828 100644
Binary files a/test/smask-mask-pdf-ref.png and b/test/smask-mask-pdf-ref.png differ
diff --git a/test/smask-paint-pdf-ref.png b/test/smask-paint-pdf-ref.png
index 7d82db9..2b98f2e 100644
Binary files a/test/smask-paint-pdf-ref.png and b/test/smask-paint-pdf-ref.png differ
diff --git a/test/smask-pdf-ref.png b/test/smask-pdf-ref.png
index 7d82db9..983de72 100644
Binary files a/test/smask-pdf-ref.png and b/test/smask-pdf-ref.png differ
More information about the cairo-commit
mailing list