[packages/fontconfig] - up to 2.11.1

arekm arekm at pld-linux.org
Mon Mar 24 21:59:55 CET 2014


commit eb6fe805b4b9edeccaa802db04c8caf4fb9bdc82
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Mon Mar 24 21:59:52 2014 +0100

    - up to 2.11.1

 fontconfig-git.patch | 755 ---------------------------------------------------
 fontconfig.spec      |  10 +-
 2 files changed, 4 insertions(+), 761 deletions(-)
---
diff --git a/fontconfig.spec b/fontconfig.spec
index 3ce6315..f51fac1 100644
--- a/fontconfig.spec
+++ b/fontconfig.spec
@@ -8,16 +8,15 @@ Summary:	Font configuration and customization tools
 Summary(pl.UTF-8):	Narzędzia do konfigurowania fontów
 Summary(pt_BR.UTF-8):	Ferramentas para configuração e customização do acesso a fontes
 Name:		fontconfig
-Version:	2.11.0
-Release:	4
+Version:	2.11.1
+Release:	1
 Epoch:		1
 License:	MIT
 Group:		Libraries
 Source0:	http://fontconfig.org/release/%{name}-%{version}.tar.bz2
-# Source0-md5:	000bd4baf7aefa828e03414d0c8c7dc5
+# Source0-md5:	824d000eb737af6e16c826dd3b2d6c90
 Source1:	%{name}-lcd-filter.conf
 Patch0:		%{name}-bitstream-cyberbit.patch
-Patch1:		%{name}-git.patch
 URL:		http://fontconfig.org/
 BuildRequires:	autoconf >= 2.61
 BuildRequires:	automake >= 1:1.11
@@ -128,7 +127,6 @@ Este pacote contém a biblioteca estática do fontconfig
 %prep
 %setup -q
 %patch0 -p1
-%patch1 -p1
 
 %build
 %{__libtoolize}
@@ -143,7 +141,7 @@ export HASDOCBOOK=no
 %configure \
 	--enable-docs%{!?with_doc:=no} \
 	--disable-silent-rules \
-	%{!?with_static_libs:--disable-static}
+	--%{?with_static_libs:en}%{!?with_static_libs:dis}able-static
 %{__make}
 
 %{?with_tests:%{__make} check}
diff --git a/fontconfig-git.patch b/fontconfig-git.patch
deleted file mode 100644
index a8f7aec..0000000
--- a/fontconfig-git.patch
+++ /dev/null
@@ -1,755 +0,0 @@
-diff --git a/conf.d/10-no-sub-pixel.conf b/conf.d/10-no-sub-pixel.conf
-index cf12465..635847c 100644
---- a/conf.d/10-no-sub-pixel.conf
-+++ b/conf.d/10-no-sub-pixel.conf
-@@ -1,7 +1,7 @@
- <?xml version="1.0"?>
- <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
- <fontconfig>
--<!--  Enable sub-pixel rendering --> 
-+<!--  Disable sub-pixel rendering --> 
-   <match target="pattern">
-     <!--
-       This configuration is available on the major desktop environments.
-diff --git a/conf.d/30-metric-aliases.conf b/conf.d/30-metric-aliases.conf
-index d0d9ea2..49a9602 100644
---- a/conf.d/30-metric-aliases.conf
-+++ b/conf.d/30-metric-aliases.conf
-@@ -22,8 +22,11 @@ Microsoft fonts:  Liberation fonts:       Google CrOS core fonts:  StarOffice fo
- ================  ======================  =======================  =================  ==============
- Arial             Liberation Sans         Arimo                    Albany             Albany AMT
- Arial Narrow      Liberation Sans Narrow
--Times New Roman   Liberation Serif        Cousine                  Thorndale          Thorndale AMT
--Courier New       Liberation Mono         Tinos                    Cumberland         Cumberland AMT
-+Times New Roman   Liberation Serif        Tinos                    Thorndale          Thorndale AMT
-+Courier New       Liberation Mono         Cousine                  Cumberland         Cumberland AMT
-+Cambria                                   Caladea
-+Calibri                                   Carlito
-+Symbol                                    SymbolNeu
- 
- Microsoft fonts:  Other fonts:
- ================  ============
-@@ -307,7 +310,26 @@ but in an order preferring similar designs first.  We do this in three steps:
- 	  </default>
- 	</alias>
- 
-+	<alias binding="same">
-+	  <family>Caladea</family>
-+	  <default>
-+	  <family>Cambria</family>
-+	  </default>
-+	</alias>
- 
-+	<alias binding="same">
-+	  <family>Carlito</family>
-+	  <default>
-+	  <family>Calibri</family>
-+	  </default>
-+	</alias>
-+
-+	<alias binding="same">
-+	  <family>SymbolNeu</family>
-+	  <default>
-+	  <family>Symbol</family>
-+	  </default>
-+  </alias>
- 
- <!-- Accept the other group as fallback -->
- 
-@@ -494,4 +516,25 @@ but in an order preferring similar designs first.  We do this in three steps:
- 	  </accept>
- 	</alias>
- 
-+	<alias binding="same">
-+	  <family>Cambria</family>
-+	  <accept>
-+	    <family>Caladea</family>
-+	  </accept>
-+	</alias>
-+
-+	<alias binding="same">
-+	  <family>Calibri</family>
-+	  <accept>
-+	    <family>Carlito</family>
-+	  </accept>
-+  </alias>
-+
-+	<alias binding="same">
-+	  <family>Symbol</family>
-+	  <accept>
-+	    <family>SymbolNeu</family>
-+	  </accept>
-+  </alias>
-+
- </fontconfig>
-diff --git a/configure.ac b/configure.ac
-index c3743f4..728a550 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -148,52 +148,42 @@ AC_TYPE_PID_T
- # Checks for library functions.
- AC_FUNC_VPRINTF
- AC_FUNC_MMAP
--AC_CHECK_FUNCS([link mkstemp mkostemp _mktemp_s getopt getopt_long getprogname getexecname rand random lrand48 random_r rand_r regcomp regerror regexec regfree fstatvfs fstatfs lstat])
-+AC_CHECK_FUNCS([link mkstemp mkostemp _mktemp_s mkdtemp getopt getopt_long getprogname getexecname rand random lrand48 random_r rand_r readlink regcomp regerror regexec regfree fstatvfs fstatfs lstat])
- 
- dnl AC_CHECK_FUNCS doesn't check for header files.
- dnl posix_fadvise() may be not available in older libc.
--fc_saved_CFLAGS="$CFLAGS"
--CFLAGS="$CFLAGS $WARN_CFLAGS -Werror"
--AC_MSG_CHECKING([for posix_fadvise])
--AC_LINK_IFELSE([AC_LANG_SOURCE([[
--	#include <fcntl.h>
--	int main(void) {
--	    return posix_fadvise(0, 0, 0, 0);
--	}
--	]])],[
--		AC_MSG_RESULT([yes])
--		AC_DEFINE([HAVE_POSIX_FADVISE], [1], [Define to 1 if you have the 'posix_fadvise' function.])
--	],[AC_MSG_RESULT([no])])
-+AC_CHECK_SYMBOL([posix_fadvise], [fcntl.h], [fc_func_posix_fadvise=1], [fc_func_posix_fadvise=0])
-+AC_DEFINE_UNQUOTED([HAVE_POSIX_FADVISE], [$fc_func_posix_fadvise], [Define to 1 if you have the 'posix_fadivse' function.])
- if test "$os_win32" = "no"; then
- 	AC_MSG_CHECKING([for scandir])
--	AC_LINK_IFELSE([AC_LANG_SOURCE([[
-+	fc_saved_CFLAGS="$CFLAGS"
-+	CFLAGS="$CFLAGS $WARN_CFLAGS -Werror"
-+	AC_TRY_COMPILE([
- 		#include <dirent.h>
--		int comp(const struct dirent **, const struct dirent **);
--		int comp(const struct dirent **a, const struct dirent **b) { return 0; }
--		int main(void) {
--		    struct dirent **d;
--		    return scandir(".", &d, 0, &comp) >= 0;
--		}
--		]])],[
-+		int main(void);
-+	], [
-+		int (* comp) (const struct dirent **, const struct dirent **) = 0;
-+		struct dirent **d;
-+		return scandir(".", &d, 0, comp) >= 0;
-+	], [
-+		AC_MSG_RESULT([yes])
-+		AC_DEFINE([HAVE_SCANDIR], [1], [Define to 1 if you have the 'scandir' function.])
-+	], [
-+		AC_TRY_COMPILE([
-+			#include <dirent.h>
-+			int main(void);
-+		], [
-+			int (* comp) (const void *, const void *) = 0;
-+			struct dirent **d;
-+			return scandir(".", &d, 0, comp) >= 0;
-+		], [
- 			AC_MSG_RESULT([yes])
--			AC_DEFINE([HAVE_SCANDIR], [1], [Define to 1 if you have the 'scandir' function.])
-+			AC_DEFINE([HAVE_SCANDIR_VOID_P], [1], [Define to 1 if you have the 'scandir' function with int (* compar)(const void *, const void *)])
- 		],[
--			AC_LINK_IFELSE([AC_LANG_SOURCE([[
--				#include <dirent.h>
--				int comp(const void *, const void *);
--				int comp(const void *a, const void *b) { return 0; }
--				int main(void) {
--				    struct dirent **d;
--				    return scandir(".", &d, 0, &comp) >= 0;
--				}
--			]])],[
--				AC_MSG_RESULT([yes])
--				AC_DEFINE([HAVE_SCANDIR_VOID_P], [1], [Define to 1 if you have the 'scandir' function with int (* compar)(const void *, const void *)])
--			],[
--				AC_MSG_ERROR([
-+			AC_MSG_ERROR([
- *** No scandir function available.])
--			])
- 		])
-+	])
- fi
- CFLAGS="$fc_saved_CFLAGS"
- 
-@@ -531,7 +521,7 @@ AC_ARG_WITH(cache-dir,
- case $fc_cachedir in
- no|yes)
- 	if test "$os_win32" = "yes"; then
--		fc_cachedir="WINDOWSTEMPDIR_FONTCONFIG_CACHE"
-+		fc_cachedir="LOCAL_APPDATA_FONTCONFIG_CACHE"
- 	else
- 		fc_cachedir='${localstatedir}/cache/${PACKAGE}'
- 	fi
-diff --git a/fc-cache/fc-cache.c b/fc-cache/fc-cache.c
-index af7ba6d..bf3b6b4 100644
---- a/fc-cache/fc-cache.c
-+++ b/fc-cache/fc-cache.c
-@@ -67,7 +67,7 @@
- const struct option longopts[] = {
-     {"force", 0, 0, 'f'},
-     {"really-force", 0, 0, 'r'},
--    {"sysroot", 0, 0, 'y'},
-+    {"sysroot", required_argument, 0, 'y'},
-     {"system-only", 0, 0, 's'},
-     {"version", 0, 0, 'V'},
-     {"verbose", 0, 0, 'v'},
-@@ -118,7 +118,7 @@ usage (char *program, int error)
- static FcStrSet *processed_dirs;
- 
- static int
--scanDirs (FcStrList *list, FcConfig *config, FcBool force, FcBool really_force, FcBool verbose, FcBool recursive, int *changed)
-+scanDirs (FcStrList *list, FcConfig *config, FcBool force, FcBool really_force, FcBool verbose, FcBool recursive, int *changed, FcStrSet *updateDirs)
- {
-     int		    ret = 0;
-     const FcChar8   *dir;
-@@ -137,7 +137,10 @@ scanDirs (FcStrList *list, FcConfig *config, FcBool force, FcBool really_force,
-     {
- 	if (verbose)
- 	{
--	    printf ("%s: ", dir);
-+	    if (!recursive)
-+		printf ("Re-scanning %s: ", dir);
-+	    else
-+		printf ("%s: ", dir);
- 	    fflush (stdout);
- 	}
- 	
-@@ -226,6 +229,8 @@ scanDirs (FcStrList *list, FcConfig *config, FcBool force, FcBool really_force,
- 	    }
- 	    for (i = 0; i < FcCacheNumSubdir (cache); i++)
- 		FcStrSetAdd (subdirs, FcCacheSubdir (cache, i));
-+	    if (updateDirs && FcCacheNumSubdir (cache) > 0)
-+		FcStrSetAdd (updateDirs, dir);
- 	
- 	    FcDirCacheUnload (cache);
- 	
-@@ -238,7 +243,7 @@ scanDirs (FcStrList *list, FcConfig *config, FcBool force, FcBool really_force,
- 		continue;
- 	    }
- 	    FcStrSetAdd (processed_dirs, dir);
--	    ret += scanDirs (sublist, config, force, really_force, verbose, recursive, changed);
-+	    ret += scanDirs (sublist, config, force, really_force, verbose, recursive, changed, updateDirs);
- 	    FcStrListDone (sublist);
- 	}
- 	else
-@@ -271,7 +276,7 @@ cleanCacheDirectories (FcConfig *config, FcBool verbose)
- int
- main (int argc, char **argv)
- {
--    FcStrSet	*dirs;
-+    FcStrSet	*dirs, *updateDirs;
-     FcStrList	*list;
-     FcBool    	verbose = FcFalse;
-     FcBool	force = FcFalse;
-@@ -369,13 +374,18 @@ main (int argc, char **argv)
- 	fprintf(stderr, "Cannot malloc\n");
- 	return 1;
-     }
--	
-+
-+    updateDirs = FcStrSetCreate ();
-     changed = 0;
--    ret = scanDirs (list, config, force, really_force, verbose, FcTrue, &changed);
-+    ret = scanDirs (list, config, force, really_force, verbose, FcTrue, &changed, updateDirs);
-     /* Update the directory cache again to avoid the race condition as much as possible */
--    FcStrListFirst (list);
--    ret += scanDirs (list, config, FcTrue, really_force, verbose, FcFalse, &changed);
-     FcStrListDone (list);
-+    list = FcStrListCreate (updateDirs);
-+    if (list)
-+    {
-+	ret += scanDirs (list, config, FcTrue, really_force, verbose, FcFalse, &changed, NULL);
-+	FcStrListDone (list);
-+    }
- 
-     /*
-      * Try to create CACHEDIR.TAG anyway.
-diff --git a/fc-glyphname/fc-glyphname.c b/fc-glyphname/fc-glyphname.c
-index 8402781..078490a 100644
---- a/fc-glyphname/fc-glyphname.c
-+++ b/fc-glyphname/fc-glyphname.c
-@@ -233,7 +233,7 @@ dump (FcGlyphName * const *table, const char *name)
- int
- main (int argc FC_UNUSED, char **argv)
- {
--    char	*files[MAX_GLYPHFILE];
-+    char	*files[MAX_GLYPHFILE + 1];
-     char	line[1024];
-     FILE	*f;
-     int		i;
-diff --git a/fc-lang/fc-lang.c b/fc-lang/fc-lang.c
-index 0f4217f..38fc697 100644
---- a/fc-lang/fc-lang.c
-+++ b/fc-lang/fc-lang.c
-@@ -254,7 +254,7 @@ static int compare (const void *a, const void *b)
- int
- main (int argc FC_UNUSED, char **argv)
- {
--    static Entry	entries[MAX_LANG];
-+    static Entry	entries[MAX_LANG + 1];
-     static FcCharSet	*sets[MAX_LANG];
-     static int		duplicate[MAX_LANG];
-     static int		country[MAX_LANG];
-diff --git a/fonts.dtd b/fonts.dtd
-index 4c38e77..479f2c0 100644
---- a/fonts.dtd
-+++ b/fonts.dtd
-@@ -140,7 +140,7 @@
-     if 'target' is 'font', execute the match on the result of a font
-     selection.
- -->
--<!ELEMENT match (test*, edit*)+>
-+<!ELEMENT match (test|edit)+>
- <!ATTLIST match
- 	  target (pattern|font|scan) "pattern">
- 
-diff --git a/m4/ac_check_symbol.m4 b/m4/ac_check_symbol.m4
-new file mode 100644
-index 0000000..41c1528
---- /dev/null
-+++ b/m4/ac_check_symbol.m4
-@@ -0,0 +1,48 @@
-+dnl @synopsis AC_CHECK_SYMBOL(SYMBOL, HEADER... [,ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]])
-+dnl
-+dnl a wrapper around AC_EGREP_HEADER the shellvar $ac_found will hold
-+dnl the HEADER-name that had been containing the symbol. This value is
-+dnl shown to the user.
-+dnl
-+dnl @category C
-+dnl @author Guido U. Draheim <guidod at gmx.de>
-+dnl @version 2006-10-13
-+dnl @license GPLWithACException
-+
-+AC_DEFUN([AC_CHECK_SYMBOL],
-+[AC_MSG_CHECKING([for $1 in $2])
-+AC_CACHE_VAL(ac_cv_func_$1,
-+[AC_REQUIRE_CPP()dnl
-+changequote(, )dnl
-+symbol="[^a-zA-Z_0-9]$1[^a-zA-Z_0-9]"
-+changequote([, ])dnl
-+ac_found=no
-+for ac_header in $2 ; do
-+  ac_safe=`echo "$ac_header" | sed 'y%./+-%__p_%' `
-+  if test $ac_found != "yes" ; then
-+      if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-+            AC_EGREP_HEADER( $symbol, $ac_header, [ac_found="$ac_header"] )
-+      fi
-+  fi
-+done
-+if test "$ac_found" != "no" ; then
-+  AC_MSG_RESULT($ac_found)
-+  ifelse([$3], , :, [$3])
-+else
-+  AC_MSG_RESULT(no)
-+  ifelse([$4], , , [$4
-+])dnl
-+fi
-+])])
-+
-+dnl AC_CHECK_SYMBOLS( symbol..., header... [, action-if-found [, action-if-not-found]])
-+AC_DEFUN([AC_CHECK_SYMBOLS],
-+[for ac_func in $1
-+do
-+P4_CHECK_SYMBOL($ac_func, $2,
-+[changequote(, )dnl
-+  ac_tr_func=HAVE_`echo $ac_func | sed -e 'y:abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:' -e 's:[[^A-Z0-9]]:_:'`
-+changequote([, ])dnl
-+  AC_DEFINE_UNQUOTED($ac_tr_func) $2], $3)dnl
-+done
-+])
-diff --git a/m4/ax_pthread.m4 b/m4/ax_pthread.m4
-index d90de34..e77541c 100644
---- a/m4/ax_pthread.m4
-+++ b/m4/ax_pthread.m4
-@@ -82,7 +82,7 @@
- #   modified version of the Autoconf Macro, you may extend this special
- #   exception to the GPL to apply to your modified version as well.
- 
--#serial 18
-+#serial 21
- 
- AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD])
- AC_DEFUN([AX_PTHREAD], [
-@@ -103,8 +103,8 @@ if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
-         save_LIBS="$LIBS"
-         LIBS="$PTHREAD_LIBS $LIBS"
-         AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
--        AC_TRY_LINK_FUNC(pthread_join, ax_pthread_ok=yes)
--        AC_MSG_RESULT($ax_pthread_ok)
-+        AC_TRY_LINK_FUNC([pthread_join], [ax_pthread_ok=yes])
-+        AC_MSG_RESULT([$ax_pthread_ok])
-         if test x"$ax_pthread_ok" = xno; then
-                 PTHREAD_LIBS=""
-                 PTHREAD_CFLAGS=""
-@@ -162,8 +162,27 @@ case ${host_os} in
-         darwin*)
-         ax_pthread_flags="-pthread $ax_pthread_flags"
-         ;;
-+	netbsd*)
-+	# use libc stubs, don't link against libpthread, to allow
-+	# dynamic loading
-+	ax_pthread_flags=""
-+	;;
- esac
- 
-+# Clang doesn't consider unrecognized options an error unless we specify
-+# -Werror. We throw in some extra Clang-specific options to ensure that
-+# this doesn't happen for GCC, which also accepts -Werror.
-+
-+AC_MSG_CHECKING([if compiler needs -Werror to reject unknown flags])
-+save_CFLAGS="$CFLAGS"
-+ax_pthread_extra_flags="-Werror"
-+CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wunknown-warning-option -Wsizeof-array-argument"
-+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([int foo(void);],[foo()])],
-+                  [AC_MSG_RESULT([yes])],
-+                  [ax_pthread_extra_flags=
-+                   AC_MSG_RESULT([no])])
-+CFLAGS="$save_CFLAGS"
-+
- if test x"$ax_pthread_ok" = xno; then
- for flag in $ax_pthread_flags; do
- 
-@@ -178,7 +197,7 @@ for flag in $ax_pthread_flags; do
-                 ;;
- 
-                 pthread-config)
--                AC_CHECK_PROG(ax_pthread_config, pthread-config, yes, no)
-+                AC_CHECK_PROG([ax_pthread_config], [pthread-config], [yes], [no])
-                 if test x"$ax_pthread_config" = xno; then continue; fi
-                 PTHREAD_CFLAGS="`pthread-config --cflags`"
-                 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
-@@ -193,7 +212,7 @@ for flag in $ax_pthread_flags; do
-         save_LIBS="$LIBS"
-         save_CFLAGS="$CFLAGS"
-         LIBS="$PTHREAD_LIBS $LIBS"
--        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
- 
-         # Check for various functions.  We must include pthread.h,
-         # since some functions may be macros.  (On the Sequent, we
-@@ -219,7 +238,7 @@ for flag in $ax_pthread_flags; do
-         LIBS="$save_LIBS"
-         CFLAGS="$save_CFLAGS"
- 
--        AC_MSG_RESULT($ax_pthread_ok)
-+        AC_MSG_RESULT([$ax_pthread_ok])
-         if test "x$ax_pthread_ok" = xyes; then
-                 break;
-         fi
-@@ -245,9 +264,9 @@ if test "x$ax_pthread_ok" = xyes; then
-                 [attr_name=$attr; break],
-                 [])
-         done
--        AC_MSG_RESULT($attr_name)
-+        AC_MSG_RESULT([$attr_name])
-         if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
--            AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name,
-+            AC_DEFINE_UNQUOTED([PTHREAD_CREATE_JOINABLE], [$attr_name],
-                                [Define to necessary symbol if this constant
-                                 uses a non-standard name on your system.])
-         fi
-@@ -261,45 +280,54 @@ if test "x$ax_pthread_ok" = xyes; then
-             if test "$GCC" = "yes"; then
-                 flag="-D_REENTRANT"
-             else
-+                # TODO: What about Clang on Solaris?
-                 flag="-mt -D_REENTRANT"
-             fi
-             ;;
-         esac
--        AC_MSG_RESULT(${flag})
-+        AC_MSG_RESULT([$flag])
-         if test "x$flag" != xno; then
-             PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
-         fi
- 
-         AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT],
--            ax_cv_PTHREAD_PRIO_INHERIT, [
--                AC_LINK_IFELSE([
--                    AC_LANG_PROGRAM([[#include <pthread.h>]], [[int i = PTHREAD_PRIO_INHERIT;]])],
-+            [ax_cv_PTHREAD_PRIO_INHERIT], [
-+                AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h>]],
-+                                                [[int i = PTHREAD_PRIO_INHERIT;]])],
-                     [ax_cv_PTHREAD_PRIO_INHERIT=yes],
-                     [ax_cv_PTHREAD_PRIO_INHERIT=no])
-             ])
-         AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"],
--            AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], 1, [Have PTHREAD_PRIO_INHERIT.]))
-+            [AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], [1], [Have PTHREAD_PRIO_INHERIT.])])
- 
-         LIBS="$save_LIBS"
-         CFLAGS="$save_CFLAGS"
- 
--        # More AIX lossage: must compile with xlc_r or cc_r
--        if test x"$GCC" != xyes; then
--          AC_CHECK_PROGS(PTHREAD_CC, xlc_r cc_r, ${CC})
--        else
--          PTHREAD_CC=$CC
-+        # More AIX lossage: compile with *_r variant
-+        if test "x$GCC" != xyes; then
-+            case $host_os in
-+                aix*)
-+                AS_CASE(["x/$CC"],
-+                  [x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6],
-+                  [#handle absolute path differently from PATH based program lookup
-+                   AS_CASE(["x$CC"],
-+                     [x/*],
-+                     [AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])],
-+                     [AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])])])
-+                ;;
-+            esac
-         fi
--else
--        PTHREAD_CC="$CC"
- fi
- 
--AC_SUBST(PTHREAD_LIBS)
--AC_SUBST(PTHREAD_CFLAGS)
--AC_SUBST(PTHREAD_CC)
-+test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
-+
-+AC_SUBST([PTHREAD_LIBS])
-+AC_SUBST([PTHREAD_CFLAGS])
-+AC_SUBST([PTHREAD_CC])
- 
- # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
- if test x"$ax_pthread_ok" = xyes; then
--        ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
-+        ifelse([$1],,[AC_DEFINE([HAVE_PTHREAD],[1],[Define if you have POSIX threads libraries and header files.])],[$1])
-         :
- else
-         ax_pthread_ok=no
-diff --git a/src/fccache.c b/src/fccache.c
-index 3568595..10eacff 100644
---- a/src/fccache.c
-+++ b/src/fccache.c
-@@ -28,6 +28,7 @@
- #include <dirent.h>
- #include <string.h>
- #include <sys/types.h>
-+#include <sys/stat.h>
- #include <assert.h>
- #if defined(HAVE_MMAP) || defined(__CYGWIN__)
- #  include <unistd.h>
-@@ -572,7 +573,7 @@ FcDirCacheMapFd (int fd, struct stat *fd_stat, struct stat *dir_stat)
-     {
- #if defined(HAVE_MMAP) || defined(__CYGWIN__)
- 	cache = mmap (0, fd_stat->st_size, PROT_READ, MAP_SHARED, fd, 0);
--#ifdef HAVE_POSIX_FADVISE
-+#if (HAVE_POSIX_FADVISE) && defined(POSIX_FADV_WILLNEED)
- 	posix_fadvise (fd, 0, fd_stat->st_size, POSIX_FADV_WILLNEED);
- #endif
- 	if (cache == MAP_FAILED)
-diff --git a/src/fcdefault.c b/src/fcdefault.c
-index d1b917f..4beda7c 100644
---- a/src/fcdefault.c
-+++ b/src/fcdefault.c
-@@ -149,7 +149,7 @@ retry:
- #else
- # if defined (HAVE_GETEXECNAME)
- 	const char *p = getexecname ();
--# else
-+# elif defined (HAVE_READLINK)
- 	char buf[PATH_MAX + 1];
- 	int len;
- 	char *p = NULL;
-@@ -160,6 +160,8 @@ retry:
- 	    buf[len] = '\0';
- 	    p = buf;
- 	}
-+# else
-+	char *p = NULL;
- # endif
- 	if (p)
- 	{
-@@ -219,7 +221,7 @@ FcDefaultSubstitute (FcPattern *pattern)
-     int	    i;
- 
-     if (FcPatternObjectGet (pattern, FC_WEIGHT_OBJECT, 0, &v) == FcResultNoMatch )
--	FcPatternObjectAddInteger (pattern, FC_WEIGHT_OBJECT, FC_WEIGHT_MEDIUM);
-+	FcPatternObjectAddInteger (pattern, FC_WEIGHT_OBJECT, FC_WEIGHT_NORMAL);
- 
-     if (FcPatternObjectGet (pattern, FC_SLANT_OBJECT, 0, &v) == FcResultNoMatch)
- 	FcPatternObjectAddInteger (pattern, FC_SLANT_OBJECT, FC_SLANT_ROMAN);
-diff --git a/src/fcmatch.c b/src/fcmatch.c
-index 627aa1a..93e013f 100644
---- a/src/fcmatch.c
-+++ b/src/fcmatch.c
-@@ -743,6 +743,7 @@ FcSortWalk (FcSortNode **n, int nnode, FcFontSet *fs, FcCharSet **csp, FcBool tr
- {
-     FcBool ret = FcFalse;
-     FcCharSet *cs;
-+    int i;
- 
-     cs = 0;
-     if (trim || csp)
-@@ -752,7 +753,7 @@ FcSortWalk (FcSortNode **n, int nnode, FcFontSet *fs, FcCharSet **csp, FcBool tr
- 	    goto bail;
-     }
- 
--    while (nnode--)
-+    for (i = 0; i < nnode; i++)
-     {
- 	FcSortNode	*node = *n++;
- 	FcBool		adds_chars = FcFalse;
-@@ -776,7 +777,7 @@ FcSortWalk (FcSortNode **n, int nnode, FcFontSet *fs, FcCharSet **csp, FcBool tr
- 	 * If this font isn't a subset of the previous fonts,
- 	 * add it to the list
- 	 */
--	if (!trim || adds_chars)
-+	if (!i || !trim || adds_chars)
- 	{
- 	    FcPatternReference (node->pattern);
- 	    if (FcDebug () & FC_DBG_MATCHV)
-diff --git a/src/fcname.c b/src/fcname.c
-index 712b2fa..f302948 100644
---- a/src/fcname.c
-+++ b/src/fcname.c
-@@ -420,6 +420,8 @@ FcNameParse (const FcChar8 *name)
- 		if ((c = FcNameGetConstant (save)))
- 		{
- 		    t = FcNameGetObjectType ((char *) c->object);
-+		    if (t == NULL)
-+			goto bail2;
- 		    switch ((int) t->type) {
- 		    case FcTypeInteger:
- 		    case FcTypeDouble:
-diff --git a/src/fcstr.c b/src/fcstr.c
-index 5707172..024dae3 100644
---- a/src/fcstr.c
-+++ b/src/fcstr.c
-@@ -924,12 +924,16 @@ FcStrBuildFilename (const FcChar8 *path,
- 		    ...)
- {
-     va_list ap;
--    FcStrSet *sset = FcStrSetCreate ();
-+    FcStrSet *sset;
-     FcStrList *list;
-     FcChar8 *s, *ret = NULL, *p;
-     size_t len = 0;
- 
--    if (!sset || !path)
-+    if (!path)
-+	return NULL;
-+
-+    sset = FcStrSetCreate ();
-+    if (!sset)
- 	return NULL;
- 
-     if (!FcStrSetAdd (sset, path))
-diff --git a/src/fcxml.c b/src/fcxml.c
-index 8ff10b6..91d166f 100644
---- a/src/fcxml.c
-+++ b/src/fcxml.c
-@@ -610,11 +610,11 @@ FcTypecheckValue (FcConfigParse *parse, FcType value, FcType type)
- 	if ((value == FcTypeLangSet && type == FcTypeString) ||
- 	    (value == FcTypeString && type == FcTypeLangSet))
- 	    return;
--	if (type == (FcType) -1)
-+	if (type ==  FcTypeUnknown)
- 	    return;
- 	/* It's perfectly fine to use user-define elements in expressions,
- 	 * so don't warn in that case. */
--	if (value == (FcType) -1)
-+	if (value == FcTypeUnknown)
- 	    return;
- 	FcConfigMessage (parse, FcSevereWarning, "saw %s, expected %s",
- 			 FcTypeName (value), FcTypeName (type));
-@@ -2566,6 +2566,11 @@ FcParseMatch (FcConfigParse *parse)
- 	}
- 	FcVStackPopAndDestroy (parse);
-     }
-+    if (!rule)
-+    {
-+	FcConfigMessage (parse, FcSevereWarning, "No <test> nor <edit> elements in <match>");
-+	return;
-+    }
-     if (!FcConfigAddRule (parse->config, rule, kind))
- 	FcConfigMessage (parse, FcSevereError, "out of memory");
- }
-diff --git a/test/Makefile.am b/test/Makefile.am
-index 52c63dc..f270b50 100644
---- a/test/Makefile.am
-+++ b/test/Makefile.am
-@@ -16,7 +16,7 @@ TESTDATA=4x6.pcf 8x16.pcf out.expected fonts.conf.in
- 
- AM_CPPFLAGS = -I$(top_srcdir) -I$(top_builddir)
- 
--check_PROGRAMS = test-migration
-+check_PROGRAMS =
- if HAVE_PTHREAD
- check_PROGRAMS += test-pthread
- test_pthread_LDADD = $(top_builddir)/src/libfontconfig.la
-@@ -26,7 +26,10 @@ test_pthread_LDADD = $(top_builddir)/src/libfontconfig.la
- endif
- noinst_PROGRAMS = $(check_PROGRAMS)
- 
-+if !OS_WIN32
-+check_PROGRAMS += test-migration
- test_migration_LDADD = $(top_builddir)/src/libfontconfig.la
-+endif
- 
- EXTRA_DIST=$(check_SCRIPTS) $(TESTDATA)
- 
-diff --git a/test/test-migration.c b/test/test-migration.c
-index a0ab839..f127e27 100644
---- a/test/test-migration.c
-+++ b/test/test-migration.c
-@@ -4,8 +4,26 @@
- #include <unistd.h>
- #include <sys/types.h>
- #include <dirent.h>
-+#ifndef HAVE_STRUCT_DIRENT_D_TYPE
-+#include <sys/types.h>
-+#include <sys/stat.h>
-+#include <unistd.h>
-+#endif
- #include <fontconfig/fontconfig.h>
- 
-+#ifdef HAVE_MKDTEMP
-+#define fc_mkdtemp	mkdtemp
-+#else
-+char *
-+fc_mkdtemp (char *template)
-+{
-+    if (!mktemp (template) || mkdir (template, 0700))
-+	return NULL;
-+
-+    return template;
-+}
-+#endif
-+
- FcBool
- mkdir_p(const char *dir)
- {
-@@ -36,6 +54,9 @@ unlink_dirs(const char *dir)
-     size_t len = strlen (dir);
-     char *n = NULL;
-     FcBool ret = FcTrue;
-+#ifndef HAVE_STRUCT_DIRENT_D_TYPE
-+    struct stat statb;
-+#endif
- 
-     if (!d)
- 	return FcFalse;
-@@ -53,7 +74,17 @@ unlink_dirs(const char *dir)
- 	strcpy (n, dir);
- 	n[len] = '/';
- 	strcpy (&n[len + 1], e->d_name);
-+#ifdef HAVE_STRUCT_DIRENT_D_TYPE
- 	if (e->d_type == DT_DIR)
-+#else
-+	if (stat (n, &statb) == -1)
-+	{
-+		fprintf (stderr, "E: %s\n", n);
-+		ret = FcFalse;
-+		break;
-+	}
-+	if (S_ISDIR (statb.st_mode))
-+#endif
- 	{
- 	    if (!unlink_dirs (n))
- 	    {
-@@ -89,7 +120,7 @@ int
- main(void)
- {
-     char template[32] = "fontconfig-XXXXXXXX";
--    char *tmp = mkdtemp (template);
-+    char *tmp = fc_mkdtemp (template);
-     size_t len = strlen (tmp), xlen, dlen;
-     char xdg[256], confd[256], fn[256], nfn[256], ud[256], nud[256];
-     int ret = -1;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/fontconfig.git/commitdiff/eb6fe805b4b9edeccaa802db04c8caf4fb9bdc82



More information about the pld-cvs-commit mailing list