From 6dec40393d8c187d15e94f23c49ef1c70498931ee32542da329297ec0acba937 Mon Sep 17 00:00:00 2001 From: Petr Gajdos Date: Wed, 21 Mar 2012 15:00:33 +0000 Subject: [PATCH 01/11] - updated to 2.9.0 OBS-URL: https://build.opensuse.org/package/show/M17N/fontconfig?expand=0&rev=52 --- 10-lcdfilter-lcddefault.conf | 9 -- AppleRoman-DynaFont.patch | 18 --- ...5-make-FcInitReinitialize-work-again.patch | 20 --- ...-179457-fix-font-file-names-for-wine.patch | 98 ------------- ...en-config-files-contain-broken-stuff.patch | 14 -- conf.patch | 39 +++--- fontconfig-2.8.0.tar.bz2 | 3 - fontconfig-2.9.0-doc.tar.bz2 | 3 + fontconfig-2.9.0.tar.bz2 | 3 + ....0.tar.bz2 => fontconfig-doc-2.9.0.tar.bz2 | 0 fontconfig-ocloexec.patch | 60 -------- fontconfig-visibility.patch | 132 ------------------ fontconfig.changes | 5 + fontconfig.spec | 58 ++------ suse-font-dirs.conf | 23 --- suse-generic-names.conf | 1 + suse-hinting.conf | 30 +++- suse-post-user.conf | 1 + suse-pre-user.conf | 6 + urw-aliases-whitespaces.patch | 44 ------ 20 files changed, 79 insertions(+), 488 deletions(-) delete mode 100644 10-lcdfilter-lcddefault.conf delete mode 100644 AppleRoman-DynaFont.patch delete mode 100644 bnc438855-make-FcInitReinitialize-work-again.patch delete mode 100644 bugzilla-179457-fix-font-file-names-for-wine.patch delete mode 100644 bugzilla-246783-do-not-crash-when-config-files-contain-broken-stuff.patch delete mode 100644 fontconfig-2.8.0.tar.bz2 create mode 100644 fontconfig-2.9.0-doc.tar.bz2 create mode 100644 fontconfig-2.9.0.tar.bz2 rename fontconfig-doc-2.8.0.tar.bz2 => fontconfig-doc-2.9.0.tar.bz2 (100%) delete mode 100644 fontconfig-ocloexec.patch delete mode 100644 fontconfig-visibility.patch delete mode 100644 suse-font-dirs.conf delete mode 100644 urw-aliases-whitespaces.patch diff --git a/10-lcdfilter-lcddefault.conf b/10-lcdfilter-lcddefault.conf deleted file mode 100644 index ebec6df..0000000 --- a/10-lcdfilter-lcddefault.conf +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - lcddefault - - - diff --git a/AppleRoman-DynaFont.patch b/AppleRoman-DynaFont.patch deleted file mode 100644 index bfb4647..0000000 --- a/AppleRoman-DynaFont.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- src/fcfreetype.c~ 2004-03-02 23:54:42.000000000 +0800 -+++ src/fcfreetype.c 2004-04-01 18:06:44.154517544 +0800 -@@ -1204,6 +1204,7 @@ - { 0x007C, 0x7C }, /* VERTICAL LINE */ - { 0x007D, 0x7D }, /* RIGHT CURLY BRACKET */ - { 0x007E, 0x7E }, /* TILDE */ -+#if 0 - { 0x00A0, 0xCA }, /* NO-BREAK SPACE */ - { 0x00A1, 0xC1 }, /* INVERTED EXCLAMATION MARK */ - { 0x00A2, 0xA2 }, /* CENT SIGN */ -@@ -1332,6 +1333,7 @@ - { 0xF8FF, 0xF0 }, /* Apple logo */ - { 0xFB01, 0xDE }, /* LATIN SMALL LIGATURE FI */ - { 0xFB02, 0xDF }, /* LATIN SMALL LIGATURE FL */ -+#endif - }; - - static const FcCharMap AppleRoman = { diff --git a/bnc438855-make-FcInitReinitialize-work-again.patch b/bnc438855-make-FcInitReinitialize-work-again.patch deleted file mode 100644 index 66e51b5..0000000 --- a/bnc438855-make-FcInitReinitialize-work-again.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff -rup fontconfig-2.6.0.orig//src/fccache.c fontconfig-2.6.0/src/fccache.c ---- fontconfig-2.6.0.orig//src/fccache.c 2007-11-14 01:36:41.000000000 +0100 -+++ fontconfig-2.6.0/src/fccache.c 2008-11-07 17:08:46.000000000 +0100 -@@ -254,6 +254,7 @@ FcDirCacheProcess (FcConfig *config, con - break; - fd = FcDirCacheOpenFile (cache_hashed, &file_stat); - if (fd >= 0) { -+ if (dir_stat.st_mtime <= file_stat.st_mtime) { - ret = (*callback) (fd, &file_stat, &dir_stat, closure); - close (fd); - if (ret) -@@ -264,6 +265,8 @@ FcDirCacheProcess (FcConfig *config, con - FcStrFree (cache_hashed); - break; - } -+ } else -+ close (fd); - } - FcStrFree (cache_hashed); - } diff --git a/bugzilla-179457-fix-font-file-names-for-wine.patch b/bugzilla-179457-fix-font-file-names-for-wine.patch deleted file mode 100644 index 636c019..0000000 --- a/bugzilla-179457-fix-font-file-names-for-wine.patch +++ /dev/null @@ -1,98 +0,0 @@ -diff -ru fontconfig-2.3.94.orig/src/fcpat.c fontconfig-2.3.94/src/fcpat.c ---- fontconfig-2.3.94.orig/src/fcpat.c 2006-03-10 16:00:36.000000000 +0100 -+++ fontconfig-2.3.94/src/fcpat.c 2006-06-02 13:27:57.000000000 +0200 -@@ -1098,6 +1112,39 @@ - return FcPatternAdd (p, object, v, FcTrue); - } - -+static FcResult -+FcPatternGetFile (const FcPattern *p, const char *object, int id, FcChar8 ** s) -+{ -+ const char *fn, *fpath; -+ FcChar8 *fname; -+ int size; -+ -+ fn = FcPatternFindFullFname(p); -+ if (fn) -+ { -+ *s = (FcChar8 *) fn; -+ return FcResultMatch; -+ } -+ -+ if (!p->bank) -+ return FcResultMatch; -+ -+ fpath = FcCacheFindBankDir (p->bank); -+ size = strlen((char *)fpath) + 1 + strlen ((char *)*s) + 1; -+ fname = malloc (size); -+ if (!fname) -+ return FcResultOutOfMemory; -+ -+ FcMemAlloc (FC_MEM_STRING, size); -+ strcpy ((char *)fname, (char *)fpath); -+ strcat ((char *)fname, "/"); -+ strcat ((char *)fname, (char *)*s); -+ -+ FcPatternAddFullFname (p, (const char *)fname); -+ *s = (FcChar8 *)fname; -+ return FcResultMatch; -+} -+ - FcResult - FcPatternGet (const FcPattern *p, const char *object, int id, FcValue *v) - { -@@ -1112,6 +1159,12 @@ - if (!id) - { - *v = FcValueCanonicalize(&FcValueListPtrU(l)->value); -+ -+ /* Pull the FC_FILE trick here too. */ -+ if (v->type == FcTypeString && -+ FcObjectToPtr(object) == FcObjectToPtr(FC_FILE)) -+ return FcPatternGetFile (p, object, id, (FcChar8 **)&(v->u.s)); -+ - return FcResultMatch; - } - id--; -@@ -1175,41 +1228,6 @@ - if (v.type != FcTypeString) - return FcResultTypeMismatch; - -- if (FcObjectToPtr(object) == FcObjectToPtr(FC_FILE)) -- { -- const char *fn, *fpath; -- FcChar8 *fname; -- int size; -- -- fn = FcPatternFindFullFname(p); -- if (fn) -- { -- *s = (FcChar8 *) fn; -- return FcResultMatch; -- } -- -- if (!p->bank) -- { -- *s = (FcChar8 *) v.u.s; -- return FcResultMatch; -- } -- -- fpath = FcCacheFindBankDir (p->bank); -- size = strlen((char*)fpath) + 1 + strlen ((char *)v.u.s) + 1; -- fname = malloc (size); -- if (!fname) -- return FcResultOutOfMemory; -- -- FcMemAlloc (FC_MEM_STRING, size); -- strcpy ((char *)fname, (char *)fpath); -- strcat ((char *)fname, "/"); -- strcat ((char *)fname, (char *)v.u.s); -- -- FcPatternAddFullFname (p, (const char *)fname); -- *s = (FcChar8 *)fname; -- return FcResultMatch; -- } -- - *s = (FcChar8 *) v.u.s; - return FcResultMatch; - } diff --git a/bugzilla-246783-do-not-crash-when-config-files-contain-broken-stuff.patch b/bugzilla-246783-do-not-crash-when-config-files-contain-broken-stuff.patch deleted file mode 100644 index 8c60d6f..0000000 --- a/bugzilla-246783-do-not-crash-when-config-files-contain-broken-stuff.patch +++ /dev/null @@ -1,14 +0,0 @@ -Index: fontconfig-2.7.0/src/fcxml.c -=================================================================== ---- fontconfig-2.7.0.orig/src/fcxml.c -+++ fontconfig-2.7.0/src/fcxml.c -@@ -539,6 +539,9 @@ FcTypecheckExpr (FcConfigParse *parse, F - { - const FcObjectType *o; - const FcConstant *c; -+ -+ if (!expr) -+ return; - - /* If parsing the expression failed, some nodes may be NULL */ - if (!expr) diff --git a/conf.patch b/conf.patch index 8cf9596..393603b 100644 --- a/conf.patch +++ b/conf.patch @@ -1,19 +1,26 @@ -diff -ru fontconfig-2.6.0.orig//conf.d/40-nonlatin.conf fontconfig-2.6.0/conf.d/40-nonlatin.conf ---- fontconfig-2.6.0.orig//conf.d/40-nonlatin.conf 2008-05-25 00:45:51.000000000 +0200 -+++ fontconfig-2.6.0/conf.d/40-nonlatin.conf 2008-09-10 17:20:32.000000000 +0200 -@@ -24,6 +24,7 @@ - MS 明朝 - UnBatang - Baekmuk Batang +Index: fontconfig-2.9.0/conf.d/40-nonlatin.conf +=================================================================== +--- fontconfig-2.9.0.orig/conf.d/40-nonlatin.conf ++++ fontconfig-2.9.0/conf.d/40-nonlatin.conf +@@ -89,6 +89,10 @@ + FreeSerif + serif + ++ + SimSun - MgOpen Canonica - Sazanami Mincho - AR PL ZenKai Uni -@@ -49,7 +50,6 @@ - MS ゴシック - UnDotum - Baekmuk Dotum ++ sans ++ + +@@ -153,10 +157,6 @@ + sans-serif + + - SimSun +- sans-serif +- +- MgOpen Modata - Sazanami Gothic - AR PL ShanHeiSun Uni + sans-serif + diff --git a/fontconfig-2.8.0.tar.bz2 b/fontconfig-2.8.0.tar.bz2 deleted file mode 100644 index aa555e5..0000000 --- a/fontconfig-2.8.0.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fd7477f7ae1fbbca3e653ba3d294263b62f3019497c4d2df8dc960558f3636c2 -size 1255996 diff --git a/fontconfig-2.9.0-doc.tar.bz2 b/fontconfig-2.9.0-doc.tar.bz2 new file mode 100644 index 0000000..1f7007f --- /dev/null +++ b/fontconfig-2.9.0-doc.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0b84f9ec432e74a0192c4aaef6130a8302af29d0cb72fbbd8098f11d8b902d7b +size 85466 diff --git a/fontconfig-2.9.0.tar.bz2 b/fontconfig-2.9.0.tar.bz2 new file mode 100644 index 0000000..bbf2a45 --- /dev/null +++ b/fontconfig-2.9.0.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9b39e193758e0ade4a93b2e576b1f2e0432f19bfa98d088b8429f9e31534cbe2 +size 1399568 diff --git a/fontconfig-doc-2.8.0.tar.bz2 b/fontconfig-doc-2.9.0.tar.bz2 similarity index 100% rename from fontconfig-doc-2.8.0.tar.bz2 rename to fontconfig-doc-2.9.0.tar.bz2 diff --git a/fontconfig-ocloexec.patch b/fontconfig-ocloexec.patch deleted file mode 100644 index 051ba62..0000000 --- a/fontconfig-ocloexec.patch +++ /dev/null @@ -1,60 +0,0 @@ ---- configure.in.orig -+++ configure.in -@@ -58,7 +58,9 @@ dnl ==================================== - - AM_CONFIG_HEADER(config.h) - --AC_PROG_CC -+AC_PROG_CC_STDC -+AC_USE_SYSTEM_EXTENSIONS -+AC_SYS_LARGEFILE - AC_PROG_INSTALL - AC_PROG_LN_S - AC_LIBTOOL_WIN32_DLL -@@ -168,7 +170,7 @@ AC_TYPE_PID_T - # Checks for library functions. - AC_FUNC_VPRINTF - AC_FUNC_MMAP --AC_CHECK_FUNCS([geteuid getuid link memmove memset mkstemp strchr strrchr strtol getopt getopt_long sysconf ftruncate chsize rand random lrand48]) -+AC_CHECK_FUNCS([geteuid getuid link memmove memset mkstemp mkostemp strchr strrchr strtol getopt getopt_long sysconf ftruncate chsize rand random lrand48]) - - # - # Checks for iconv ---- src/fcatomic.c.orig -+++ src/fcatomic.c -@@ -107,10 +107,14 @@ FcAtomicLock (FcAtomic *atomic) - #ifdef HAVE_LINK - strcpy ((char *) atomic->tmp, (char *) atomic->file); - strcat ((char *) atomic->tmp, TMP_NAME); -+#ifdef HAVE_MKOSTEMP -+ fd = mkostemp ((char *) atomic->tmp, O_CLOEXEC); -+#else - fd = mkstemp ((char *) atomic->tmp); -+#endif - if (fd < 0) - return FcFalse; -- f = fdopen (fd, "w"); -+ f = fdopen (fd, "we"); - if (!f) - { - close (fd); ---- src/fccache.c.orig -+++ src/fccache.c -@@ -202,7 +202,7 @@ FcDirCacheOpenFile (const FcChar8 *cache - if (FcStat (cache_file, file_stat) < 0) - return -1; - #endif -- fd = open((char *) cache_file, O_RDONLY | O_BINARY); -+ fd = open((char *) cache_file, O_RDONLY | O_BINARY | O_CLOEXEC); - if (fd < 0) - return fd; - #ifndef _WIN32 -@@ -909,7 +909,7 @@ FcDirCacheWrite (FcCache *cache, FcConfi - if (!FcAtomicLock (atomic)) - goto bail3; - -- fd = open((char *)FcAtomicNewFile (atomic), O_RDWR | O_CREAT | O_BINARY, 0666); -+ fd = open((char *)FcAtomicNewFile (atomic), O_RDWR | O_CREAT | O_BINARY | O_CLOEXEC, 0666); - if (fd == -1) - goto bail4; - diff --git a/fontconfig-visibility.patch b/fontconfig-visibility.patch deleted file mode 100644 index 1401ff9..0000000 --- a/fontconfig-visibility.patch +++ /dev/null @@ -1,132 +0,0 @@ ---- configure.in.orig -+++ configure.in -@@ -36,7 +36,7 @@ dnl not possible to extract the version - AM_INIT_AUTOMAKE(fontconfig, 2.8.0) - m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) - AM_MAINTAINER_MODE -- -+AC_CONFIG_MACRO_DIR([m4]) - dnl libtool versioning - - dnl bump revision when fixing bugs -@@ -67,7 +67,7 @@ AC_LIBTOOL_WIN32_DLL - AM_PROG_LIBTOOL - DOLT - AC_PROG_MAKE_SET -- -+gl_VISIBILITY - dnl ========================================================================== - - case "$host" in ---- /dev/null -+++ m4/visibility.m4 -@@ -0,0 +1,78 @@ -+# visibility.m4 serial 4 (gettext-0.18.2) -+dnl Copyright (C) 2005, 2008, 2010-2011 Free Software Foundation, Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. -+ -+dnl From Bruno Haible. -+ -+dnl Tests whether the compiler supports the command-line option -+dnl -fvisibility=hidden and the function and variable attributes -+dnl __attribute__((__visibility__("hidden"))) and -+dnl __attribute__((__visibility__("default"))). -+dnl Does *not* test for __visibility__("protected") - which has tricky -+dnl semantics (see the 'vismain' test in glibc) and does not exist e.g. on -+dnl MacOS X. -+dnl Does *not* test for __visibility__("internal") - which has processor -+dnl dependent semantics. -+dnl Does *not* test for #pragma GCC visibility push(hidden) - which is -+dnl "really only recommended for legacy code". -+dnl Set the variable CFLAG_VISIBILITY. -+dnl Defines and sets the variable HAVE_VISIBILITY. -+ -+AC_DEFUN([gl_VISIBILITY], -+[ -+ AC_REQUIRE([AC_PROG_CC]) -+ CFLAG_VISIBILITY= -+ HAVE_VISIBILITY=0 -+ if test -n "$GCC"; then -+ dnl First, check whether -Werror can be added to the command line, or -+ dnl whether it leads to an error because of some other option that the -+ dnl user has put into $CC $CFLAGS $CPPFLAGS. -+ AC_MSG_CHECKING([whether the -Werror option is usable]) -+ AC_CACHE_VAL([gl_cv_cc_vis_werror], [ -+ gl_save_CFLAGS="$CFLAGS" -+ CFLAGS="$CFLAGS -Werror" -+ AC_COMPILE_IFELSE( -+ [AC_LANG_PROGRAM([[]], [[]])], -+ [gl_cv_cc_vis_werror=yes], -+ [gl_cv_cc_vis_werror=no]) -+ CFLAGS="$gl_save_CFLAGS"]) -+ AC_MSG_RESULT([$gl_cv_cc_vis_werror]) -+ dnl Now check whether visibility declarations are supported. -+ AC_MSG_CHECKING([for simple visibility declarations]) -+ AC_CACHE_VAL([gl_cv_cc_visibility], [ -+ gl_save_CFLAGS="$CFLAGS" -+ CFLAGS="$CFLAGS -fvisibility=hidden" -+ dnl We use the option -Werror and a function dummyfunc, because on some -+ dnl platforms (Cygwin 1.7) the use of -fvisibility triggers a warning -+ dnl "visibility attribute not supported in this configuration; ignored" -+ dnl at the first function definition in every compilation unit, and we -+ dnl don't want to use the option in this case. -+ if test $gl_cv_cc_vis_werror = yes; then -+ CFLAGS="$CFLAGS -Werror" -+ fi -+ AC_COMPILE_IFELSE( -+ [AC_LANG_PROGRAM( -+ [[extern __attribute__((__visibility__("hidden"))) int hiddenvar; -+ extern __attribute__((__visibility__("default"))) int exportedvar; -+ extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void); -+ extern __attribute__((__visibility__("default"))) int exportedfunc (void); -+ void dummyfunc (void) {} -+ ]], -+ [[]])], -+ [gl_cv_cc_visibility=yes], -+ [gl_cv_cc_visibility=no]) -+ CFLAGS="$gl_save_CFLAGS"]) -+ AC_MSG_RESULT([$gl_cv_cc_visibility]) -+ if test $gl_cv_cc_visibility = yes; then -+ CFLAG_VISIBILITY="-fvisibility=hidden" -+ HAVE_VISIBILITY=1 -+ AC_DEFINE([FcPublic], [__attribute__((__visibility__("default")))], [Makes symbol visible]) -+ fi -+ fi -+ AC_SUBST([CFLAG_VISIBILITY]) -+ AC_SUBST([HAVE_VISIBILITY]) -+ AC_DEFINE_UNQUOTED([HAVE_VISIBILITY], [$HAVE_VISIBILITY], -+ [Define to 1 or 0, depending whether the compiler supports simple visibility declarations.]) -+]) ---- src/Makefile.am.orig -+++ src/Makefile.am -@@ -125,6 +125,7 @@ libfontconfig_la_SOURCES = \ - - lib_LTLIBRARIES = libfontconfig.la - -+libfontconfig_la_CFLAGS = $(CFLAG_VISIBILITY) - libfontconfig_la_LDFLAGS = \ - -version-info @LIBT_VERSION_INFO@ -no-undefined $(export_symbols) - ---- Makefile.am.orig -+++ Makefile.am -@@ -21,6 +21,7 @@ - # TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - # PERFORMANCE OF THIS SOFTWARE. - -+ACLOCAL_AMFLAGS = -I m4 - DOCSRC=@DOCSRC@ - SUBDIRS=fontconfig fc-case fc-lang fc-glyphname fc-arch src \ - fc-cache fc-cat fc-list fc-match fc-query fc-scan conf.d $(DOCSRC) test ---- src/fcxml.c.orig -+++ src/fcxml.c -@@ -2485,7 +2485,7 @@ FcConfigParseAndLoad (FcConfig *conf - if (FcDebug () & FC_DBG_CONFIG) - printf ("\tLoading config file %s\n", filename); - -- fd = open ((char *) filename, O_RDONLY); -+ fd = open ((char *) filename, O_RDONLY|O_CLOEXEC); - if (fd == -1) { - FcStrFree (filename); - goto bail0; diff --git a/fontconfig.changes b/fontconfig.changes index e109ef0..27e32af 100644 --- a/fontconfig.changes +++ b/fontconfig.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Mar 21 14:59:41 UTC 2012 - pgajdos@suse.com + +- updated to 2.9.0 + ------------------------------------------------------------------- Sun Jan 1 23:42:27 UTC 2012 - crrodriguez@opensuse.org diff --git a/fontconfig.spec b/fontconfig.spec index 8fa5d8d..35e7b45 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -47,19 +47,12 @@ Url: http://fontconfig.org/ Obsoletes: fontconfig-64bit %endif Requires: bash -Version: 2.8.0 +Version: 2.9.0 Release: 0 Summary: Library for Font Configuration License: MIT Group: System/Libraries -# CVS can be found here: (CVS is gone, fontconfig uses git now). -# $ cvs -d :pserver:anoncvs@pdx.freedesktop.org:/cvs/fontconfig login -# CVS password: -# $ cvs -d :pserver:anoncvs@pdx.freedesktop.org:/cvs/fontconfig co fontconfig -# Source0: http://fontconfig.org/release/%name-%version.tar.bz2 -# oldneededforbuild expat freetype2 freetype2-devel pkgconfig -# # After building with "build_docs" defined to "1" generate the doc tarball with: # tar jcf fontconfig-doc.tar.bz2 fc-*/*.[0-9] doc/*.[0-9] doc/*.html doc/*/*.html doc/*.txt Source1: %name-doc-%version.tar.bz2 @@ -71,23 +64,12 @@ Source11: suse-pre-user.conf Source12: suse-post-user.conf Source13: suse-hinting.conf Source14: suse-bitmaps.conf -Source15: suse-font-dirs.conf Source16: local.conf Source20: local.conf.instsys Source30: 29-liberation-aliases.conf -Source31: 10-lcdfilter-lcddefault.conf -# http://www.kde.gr.jp/~akito/patch/ -# http://www.kde.gr.jp/~akito/patch/fontconfig/fontconfig-2.2.1/fontconfig-2.2.1-AppleRoman-DynaFont.patch -Patch5: AppleRoman-DynaFont.patch -Patch10: conf.patch -Patch16: make-check.patch -Patch30: bugzilla-179457-fix-font-file-names-for-wine.patch -Patch31: bugzilla-246783-do-not-crash-when-config-files-contain-broken-stuff.patch -Patch32: usr-share-doc-packages.patch -Patch33: bnc438855-make-FcInitReinitialize-work-again.patch -Patch34: urw-aliases-whitespaces.patch -Patch35: fontconfig-ocloexec.patch -Patch36: fontconfig-visibility.patch +Patch0: conf.patch +Patch1: make-check.patch +Patch2: usr-share-doc-packages.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -126,34 +108,24 @@ accepts font patterns and returns the nearest matching font. %if %{build_docs} < 1 tar -xvf %{SOURCE1} %endif -%patch5 -p0 -b .dynafont -%patch10 -p1 -b .fonts.conf -%patch16 -p1 -#%patch30 -p1 -%patch31 -p1 -%patch32 -p1 -%patch33 -p1 -%patch34 -p1 -%patch35 -%patch36 +%patch0 -p1 -b .fonts.conf +%patch1 -p1 +%patch2 -p1 %build autoreconf -fiv %configure --with-pic --with-arch=%_host_cpu \ -%if %suse_version > 1100 --disable-static \ -%endif --with-freetype-lib=%_libdir \ --with-x \ --enable-libxml2=no \ --with-confdir=/etc/fonts \ --with-docdir=%{_defaultdocdir}/%{name} \ --with-add-fonts=/usr/X11R6/lib/X11/fonts,/opt/kde3/share/fonts,/usr/local/share/fonts \ - %if %{build_docs} < 1 + %if %{build_docs} == 0 --disable-docs - %else - # -%endif + %endif +# make %{?_smp_mflags} V=1 %check @@ -167,7 +139,6 @@ mkdir -p $RPM_BUILD_ROOT/%{_defaultdocdir}/fontconfig mkdir -p $RPM_BUILD_ROOT/%{_defaultdocdir}/fontconfig-devel install -m 644 AUTHORS COPYING ChangeLog README $RPM_SOURCE_DIR/iso639-? \ $RPM_BUILD_ROOT/%{_defaultdocdir}/%{name} -#install -m 644 fc-lang/iso639-{1,2} $RPM_BUILD_ROOT/%{_defaultdocdir}/%{name} install -m 644 doc/*.html $RPM_BUILD_ROOT/%{_defaultdocdir}/fontconfig install -m 644 doc/fontconfig-user.txt $RPM_BUILD_ROOT/%{_defaultdocdir}/fontconfig install -m 644 doc/fontconfig-devel/* $RPM_BUILD_ROOT/%{_defaultdocdir}/fontconfig-devel @@ -187,12 +158,9 @@ install -m 644 $RPM_SOURCE_DIR/suse*.conf $RPM_BUILD_ROOT/etc/fonts/ install -m 644 $RPM_SOURCE_DIR/local.conf $RPM_BUILD_ROOT/etc/fonts install -m 644 $RPM_SOURCE_DIR/local.conf.instsys $RPM_BUILD_ROOT/etc/fonts/ install -m 644 $RPM_SOURCE_DIR/29-liberation-aliases.conf $RPM_BUILD_ROOT/etc/fonts/conf.avail -install -m 644 $RPM_SOURCE_DIR/10-lcdfilter-lcddefault.conf $RPM_BUILD_ROOT/etc/fonts/conf.avail # tune links in conf.d: pushd $RPM_BUILD_ROOT/etc/fonts/conf.d - ln -s ../suse-font-dirs.conf 05-suse-font-dirs.conf ln -s ../conf.avail/29-liberation-aliases.conf 29-liberation-aliases.conf - ln -s ../conf.avail/10-lcdfilter-lcddefault.conf 10-lcdfilter-lcddefault.conf rm -f 50-user.conf rm -f 51-local.conf ln -s ../suse-pre-user.conf 50-suse-pre-user.conf @@ -202,9 +170,7 @@ pushd $RPM_BUILD_ROOT/etc/fonts/conf.d popd # don't package any files in the cache directory, only the directory itself: rm -f $RPM_BUILD_ROOT/var/cache/fontconfig/* -%if %suse_version > 1100 rm -f %{buildroot}%{_libdir}/*.la -%endif %post -p /sbin/ldconfig @@ -218,7 +184,6 @@ rm -f %{buildroot}%{_libdir}/*.la %config /etc/fonts/fonts.dtd %config /etc/fonts/fonts.conf %config /etc/fonts/suse-generic-names.conf -%config /etc/fonts/suse-font-dirs.conf %config /etc/fonts/suse-pre-user.conf %config /etc/fonts/suse-post-user.conf %config %verify(not md5 size mtime) /etc/fonts/suse-hinting.conf @@ -240,9 +205,6 @@ rm -f %{buildroot}%{_libdir}/*.la %doc %{_defaultdocdir}/%{name}-devel %{_libdir}/pkgconfig/fontconfig.pc %{_libdir}/libfontconfig.so -%if %suse_version <= 1100 -%{_libdir}/libfontconfig.*a -%endif %{_mandir}/man3/Fc* %{_includedir}/fontconfig/ diff --git a/suse-font-dirs.conf b/suse-font-dirs.conf deleted file mode 100644 index 0bb27e0..0000000 --- a/suse-font-dirs.conf +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - /usr/share/fonts - /usr/X11R6/lib/X11/fonts - /opt/kde3/share/fonts - /usr/lib/ooo-2.0/share/fonts - /usr/X11R6/lib/Acrobat7/Resource/Font - /usr/local/share/fonts - - diff --git a/suse-generic-names.conf b/suse-generic-names.conf index db86bf8..e44cc8d 100644 --- a/suse-generic-names.conf +++ b/suse-generic-names.conf @@ -27,6 +27,7 @@ IPAMincho IPAPMincho Sazanami Mincho + STIXGeneral serif + + + false + + + hintfull + + + + + + true + + + hintslight + + + + + + diff --git a/suse-post-user.conf b/suse-post-user.conf index 2b784da..de0d48e 100644 --- a/suse-post-user.conf +++ b/suse-post-user.conf @@ -52,6 +52,7 @@ SimSun HanyiSong ZYSong18030 + STIXGeneral diff --git a/suse-pre-user.conf b/suse-pre-user.conf index a77abd9..854a661 100644 --- a/suse-pre-user.conf +++ b/suse-pre-user.conf @@ -328,5 +328,11 @@ /etc/fonts/suse-bitmaps.conf + + + + + /etc/fonts/suse-generic-names.conf + diff --git a/urw-aliases-whitespaces.patch b/urw-aliases-whitespaces.patch deleted file mode 100644 index 81fdc6a..0000000 --- a/urw-aliases-whitespaces.patch +++ /dev/null @@ -1,44 +0,0 @@ -Index: fontconfig-2.8.0/conf.d/30-urw-aliases.conf -=================================================================== ---- fontconfig-2.8.0.orig/conf.d/30-urw-aliases.conf -+++ fontconfig-2.8.0/conf.d/30-urw-aliases.conf -@@ -9,6 +9,10 @@ - Avant Garde - URW Gothic L - -+ -+ AvantGarde -+ URW Gothic L -+ - - Bookman - URW Bookman L -@@ -17,6 +21,10 @@ - New Century Schoolbook - Century Schoolbook L - -+ -+ NewCenturySchoolbook -+ Century Schoolbook L -+ - - Palatino - URW Palladio L -@@ -26,9 +34,17 @@ - URW Chancery L - - -+ ZapfChancery -+ URW Chancery L -+ -+ - Zapf Dingbats - Dingbats - -+ -+ ZapfDingbats -+ Dingbats -+ - - - Symbol From 18005cbd6a9d0cd9ab96144a27553cae486beabadb747f1070da12b45fae4020 Mon Sep 17 00:00:00 2001 From: Petr Gajdos Date: Thu, 22 Mar 2012 09:43:28 +0000 Subject: [PATCH 02/11] OBS-URL: https://build.opensuse.org/package/show/M17N/fontconfig?expand=0&rev=53 --- cloexec.patch | 66 +++++++++++++++++++++++++++++++++ fontconfig-2.9.0-doc.tar.bz2 | 3 -- fontconfig-doc-2.9.0.tar.bz2 | 4 +- fontconfig.spec | 4 +- conf.patch => simsun-conf.patch | 0 5 files changed, 71 insertions(+), 6 deletions(-) create mode 100644 cloexec.patch delete mode 100644 fontconfig-2.9.0-doc.tar.bz2 rename conf.patch => simsun-conf.patch (100%) diff --git a/cloexec.patch b/cloexec.patch new file mode 100644 index 0000000..30a40ff --- /dev/null +++ b/cloexec.patch @@ -0,0 +1,66 @@ +Index: configure.in +=================================================================== +--- configure.in.orig ++++ configure.in +@@ -57,7 +57,9 @@ dnl ==================================== + + AC_CONFIG_HEADERS(config.h) + +-AC_PROG_CC ++AC_PROG_CC_STDC ++AC_USE_SYSTEM_EXTENSIONS ++AC_SYS_LARGEFILE + AC_PROG_INSTALL + AC_PROG_LN_S + AC_LIBTOOL_WIN32_DLL +@@ -119,7 +121,7 @@ AC_TYPE_PID_T + # Checks for library functions. + AC_FUNC_VPRINTF + AC_FUNC_MMAP +-AC_CHECK_FUNCS([geteuid getuid link memmove memset mkstemp strchr strrchr strtol getopt getopt_long sysconf ftruncate chsize rand random lrand48 random_r rand_r]) ++AC_CHECK_FUNCS([geteuid getuid link memmove memset mkstemp mkostemp strchr strrchr strtol getopt getopt_long sysconf ftruncate chsize rand random lrand48 random_r rand_r]) + + # + # Checks for iconv +Index: src/fcatomic.c +=================================================================== +--- src/fcatomic.c.orig ++++ src/fcatomic.c +@@ -107,10 +107,14 @@ FcAtomicLock (FcAtomic *atomic) + #ifdef HAVE_LINK + strcpy ((char *) atomic->tmp, (char *) atomic->file); + strcat ((char *) atomic->tmp, TMP_NAME); ++#ifdef HAVE_MKOSTEMP ++ fd = mkostemp ((char *) atomic->tmp, O_CLOEXEC); ++#else + fd = mkstemp ((char *) atomic->tmp); ++#endif + if (fd < 0) + return FcFalse; +- f = fdopen (fd, "w"); ++ f = fdopen (fd, "we"); + if (!f) + { + close (fd); +Index: src/fccache.c +=================================================================== +--- src/fccache.c.orig ++++ src/fccache.c +@@ -216,7 +216,7 @@ FcDirCacheOpenFile (const FcChar8 *cache + if (FcStat (cache_file, file_stat) < 0) + return -1; + #endif +- fd = open((char *) cache_file, O_RDONLY | O_BINARY); ++ fd = open((char *) cache_file, O_RDONLY | O_BINARY | O_CLOEXEC); + if (fd < 0) + return fd; + #ifndef _WIN32 +@@ -963,7 +963,7 @@ FcDirCacheWrite (FcCache *cache, FcConfi + if (!FcAtomicLock (atomic)) + goto bail3; + +- fd = open((char *)FcAtomicNewFile (atomic), O_RDWR | O_CREAT | O_BINARY, 0666); ++ fd = open((char *)FcAtomicNewFile (atomic), O_RDWR | O_CREAT | O_BINARY | O_CLOEXEC, 0666); + if (fd == -1) + goto bail4; + diff --git a/fontconfig-2.9.0-doc.tar.bz2 b/fontconfig-2.9.0-doc.tar.bz2 deleted file mode 100644 index 1f7007f..0000000 --- a/fontconfig-2.9.0-doc.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0b84f9ec432e74a0192c4aaef6130a8302af29d0cb72fbbd8098f11d8b902d7b -size 85466 diff --git a/fontconfig-doc-2.9.0.tar.bz2 b/fontconfig-doc-2.9.0.tar.bz2 index 17a104d..1f7007f 100644 --- a/fontconfig-doc-2.9.0.tar.bz2 +++ b/fontconfig-doc-2.9.0.tar.bz2 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1dd089cb6b8c4ed487f8a7c5cfae5b2a81e771128eceab746858fd46da6ed333 -size 82793 +oid sha256:0b84f9ec432e74a0192c4aaef6130a8302af29d0cb72fbbd8098f11d8b902d7b +size 85466 diff --git a/fontconfig.spec b/fontconfig.spec index 35e7b45..cbdabf2 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -67,9 +67,10 @@ Source14: suse-bitmaps.conf Source16: local.conf Source20: local.conf.instsys Source30: 29-liberation-aliases.conf -Patch0: conf.patch +Patch0: simsun-conf.patch Patch1: make-check.patch Patch2: usr-share-doc-packages.patch +Patch3: cloexec.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -111,6 +112,7 @@ accepts font patterns and returns the nearest matching font. %patch0 -p1 -b .fonts.conf %patch1 -p1 %patch2 -p1 +%patch3 %build autoreconf -fiv diff --git a/conf.patch b/simsun-conf.patch similarity index 100% rename from conf.patch rename to simsun-conf.patch From 0c0f6d29913dc1c05700d6b77efa0f4ff2af231c5cc9c1194495eb6ca59d3299 Mon Sep 17 00:00:00 2001 From: Petr Gajdos Date: Thu, 22 Mar 2012 10:37:42 +0000 Subject: [PATCH 03/11] OBS-URL: https://build.opensuse.org/package/show/M17N/fontconfig?expand=0&rev=54 --- simsun-conf.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simsun-conf.patch b/simsun-conf.patch index 393603b..8a9d30e 100644 --- a/simsun-conf.patch +++ b/simsun-conf.patch @@ -8,7 +8,7 @@ Index: fontconfig-2.9.0/conf.d/40-nonlatin.conf + + SimSun -+ sans ++ serif + From 0067a006a8e7b1db0fde5ff5afd6185ccc45ef7524570182a367dc8465705788 Mon Sep 17 00:00:00 2001 From: Petr Gajdos Date: Fri, 23 Mar 2012 10:43:56 +0000 Subject: [PATCH 10/11] hintfull only for BCI [bnc#722427] OBS-URL: https://build.opensuse.org/package/show/M17N/fontconfig?expand=0&rev=61 --- fontconfig.changes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fontconfig.changes b/fontconfig.changes index 1e88ee4..1470b44 100644 --- a/fontconfig.changes +++ b/fontconfig.changes @@ -5,7 +5,7 @@ Wed Mar 21 14:59:41 UTC 2012 - pgajdos@suse.com * many bugfixes, see NEWS * removed suse-font-dirs.conf * changed suse-hinting.conf: use hintslight with autohinter, - hintfull only for BCI + hintfull only for BCI [bnc#722427] * include suse-generic-names.conf again * added Cantarell into suse-generic-names.conf and suse-post-user.conf (sans-serif font) From 9aa23fee9dc305149331d2dfbe1b3585ec79295d1609bc5984b02a3cb5c05c49 Mon Sep 17 00:00:00 2001 From: Petr Gajdos Date: Mon, 26 Mar 2012 08:58:45 +0000 Subject: [PATCH 11/11] * turn autohinter on for Liberation Sans (BCI off) OBS-URL: https://build.opensuse.org/package/show/M17N/fontconfig?expand=0&rev=62 --- fontconfig.changes | 1 + suse-hinting.conf | 1 + 2 files changed, 2 insertions(+) diff --git a/fontconfig.changes b/fontconfig.changes index 1470b44..c61cbc7 100644 --- a/fontconfig.changes +++ b/fontconfig.changes @@ -11,6 +11,7 @@ Wed Mar 21 14:59:41 UTC 2012 - pgajdos@suse.com (sans-serif font) * added STIXGeneral into suse-generic-names.conf and suse-post-user.conf (serif font) + * turn autohinter on for Liberation Sans (BCI off) * dropped upstreamed urw-aliases-whitespaces.patch * dropped upstreamed bugzilla-246783-do-not-crash-when-config-files-contain-broken-stuff.patch * dropped upstreamed bugzilla-179457-fix-font-file-names-for-wine.patch diff --git a/suse-hinting.conf b/suse-hinting.conf index 90b10df..7b0ba99 100644 --- a/suse-hinting.conf +++ b/suse-hinting.conf @@ -106,6 +106,7 @@ TrueType + Liberation Sans MS Gothic MS PGothic MS UI Gothic