Merge branch 'upstream' into tizen
authorYoungbok Shin <youngb.shin@samsung.com>
Tue, 3 Apr 2018 05:42:49 +0000 (14:42 +0900)
committerYoungbok Shin <youngb.shin@samsung.com>
Tue, 3 Apr 2018 05:42:49 +0000 (14:42 +0900)
19 files changed:
autogen.sh [new file with mode: 0755]
fc-cache/Makefile.am
fc-cat/Makefile.am
fc-list/Makefile.am
fc-match/Makefile.am
fc-pattern/Makefile.am
fc-query/Makefile.am
fc-scan/Makefile.am
fc-validate/Makefile.am
git.mk [new file with mode: 0644]
local.conf [new file with mode: 0644]
m4/.gitkeep [new file with mode: 0644]
new-version.sh [new file with mode: 0644]
packaging/baselibs.conf [new file with mode: 0644]
packaging/fontconfig.changes [new file with mode: 0644]
packaging/fontconfig.conf [new file with mode: 0644]
packaging/fontconfig.manifest [new file with mode: 0644]
packaging/fontconfig.spec [new file with mode: 0644]
scripts/500.fontconfig.sh [new file with mode: 0755]

diff --git a/autogen.sh b/autogen.sh
new file mode 100755 (executable)
index 0000000..40751ee
--- /dev/null
@@ -0,0 +1,155 @@
+#!/bin/sh
+# fontconfig/autogen.sh
+#
+# Copyright © 2000 Keith Packard
+#
+# Permission to use, copy, modify, distribute, and sell this software and its
+# documentation for any purpose is hereby granted without fee, provided that
+# the above copyright notice appear in all copies and that both that
+# copyright notice and this permission notice appear in supporting
+# documentation, and that the name of the author(s) not be used in
+# advertising or publicity pertaining to distribution of the software without
+# specific, written prior permission.  The authors make no
+# representations about the suitability of this software for any purpose.  It
+# is provided "as is" without express or implied warranty.
+#
+# THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+# EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+# DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+# PERFORMANCE OF THIS SOFTWARE.
+
+# Run this to generate all the initial makefiles, etc.
+
+set -e
+
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+
+case "$1" in
+--noconf*) 
+       AUTOGEN_SUBDIR_MODE="true"
+       shift
+       ;;
+esac
+
+ORIGDIR=`pwd`
+cd $srcdir
+PROJECT=Fontconfig
+TEST_TYPE=-f
+FILE=fontconfig/fontconfig.h
+ACLOCAL=${ACLOCAL-aclocal}
+ACLOCAL_FLAGS="-I m4"
+LIBTOOLIZE=${LIBTOOLIZE-libtoolize}
+AUTOMAKE=${AUTOMAKE-automake}
+AUTOHEADER=${AUTOHEADER-autoheader}
+AUTOCONF=${AUTOCONF-autoconf}
+GPERF=${GPERF-gperf}
+LIBTOOLIZE_FLAGS="--copy --force"
+
+DIE=0
+
+($GPERF --version) < /dev/null > /dev/null 2>&1 || {
+       echo
+       echo "You must have gperf installed to compile $PROJECT."
+       echo "Install the appropriate package for your distribution."
+       echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
+       DIE=1
+}
+
+have_libtool=false
+if $LIBTOOLIZE --version < /dev/null > /dev/null 2>&1 ; then
+       libtool_version=`$LIBTOOLIZE --version | sed 's/^.* \([0-9][.][0-9.]*\)[^ ]*$/\1/'`
+       case $libtool_version in
+           1.4*|1.5*|1.6*|1.7*|2*)
+               have_libtool=true
+               ;;
+       esac
+fi
+if $have_libtool ; then : ; else
+       echo
+       echo "You must have libtool 1.4 installed to compile $PROJECT."
+       echo "Install the appropriate package for your distribution,"
+       echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
+       DIE=1
+fi
+
+($AUTOCONF --version) < /dev/null > /dev/null 2>&1 || {
+       echo
+       echo "You must have autoconf installed to compile $PROJECT."
+       echo "libtool the appropriate package for your distribution,"
+       echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
+       DIE=1
+}
+
+have_automake=false
+need_libtoolize=true
+if $AUTOMAKE --version < /dev/null > /dev/null 2>&1 ; then
+       automake_version=`$AUTOMAKE --version | grep 'automake (GNU automake)' | sed 's/^[^0-9]*\(.*\)/\1/'`
+       case $automake_version in
+          1.2*|1.3*|1.4) 
+               ;;
+          1.4*)
+               have_automake=true
+               need_libtoolize=false
+               ;;
+          *)
+               have_automake=true
+               ;;
+       esac
+fi
+if $have_automake ; then : ; else
+       echo
+       echo "You must have automake 1.4-p1 installed to compile $PROJECT."
+       echo "Get ftp://ftp.gnu.org/pub/gnu/automake/automake-1.4-p1.tar.gz"
+       echo "(or a newer version if it is available)"
+       DIE=1
+fi
+
+if test "$DIE" -eq 1; then
+       exit 1
+fi
+
+test $TEST_TYPE $FILE || {
+       echo "You must run this script in the top-level $PROJECT directory"
+       exit 1
+}
+
+if test -z "$AUTOGEN_SUBDIR_MODE" -a -z "$NOCONFIGURE"; then
+        if test -z "$*"; then
+                echo "I am going to run ./configure with no arguments - if you wish "
+                echo "to pass any to it, please specify them on the $0 command line."
+        fi
+fi
+
+echo Running $ACLOCAL $ACLOCAL_FLAGS
+$ACLOCAL $ACLOCAL_FLAGS
+
+# optionally run autoheader
+if $AUTOHEADER --version  < /dev/null > /dev/null 2>&1; then
+       echo Running $AUTOHEADER
+       $AUTOHEADER
+fi
+
+case $need_libtoolize in
+   true)
+       echo Running $LIBTOOLIZE $LIBTOOLIZE_FLAGS
+       $LIBTOOLIZE $LIBTOOLIZE_FLAGS
+       ;;
+esac
+
+echo Running $AUTOMAKE -a $am_opt
+$AUTOMAKE -a $am_opt
+echo Running $AUTOCONF
+$AUTOCONF
+cd $ORIGDIR
+
+if test -z "$AUTOGEN_SUBDIR_MODE" -a -z "$NOCONFIGURE"; then
+       echo Running $srcdir/configure "$@"
+        $srcdir/configure "$@"
+
+        echo 
+        echo "Now type 'make' to compile $PROJECT."
+fi
index 0e10786..f0354d4 100644 (file)
@@ -51,6 +51,9 @@ EXTRA_DIST=fc-cache.sgml $(BUILT_MANS)
 CLEANFILES =
 
 fc_cache_LDADD = ${top_builddir}/src/libfontconfig.la
+### TIZEN_ONLY(20170811): Apply ASLR to executable files.
+fc_cache_LDFLAGS = -pie
+fc_cache_CFLAGS = -fPIE
 
 if USEDOCBOOK
 
index 04c1cc4..75540d2 100644 (file)
@@ -42,6 +42,9 @@ EXTRA_DIST=fc-cat.sgml ${BUILT_MANS}
 CLEANFILES =
 
 fc_cat_LDADD = ${top_builddir}/src/libfontconfig.la
+### TIZEN_ONLY(20170811): Apply ASLR to executable files.
+fc_cat_LDFLAGS = -pie
+fc_cat_CFLAGS = -fPIE
 
 if USEDOCBOOK
 
index c58540e..2da76e9 100644 (file)
@@ -42,6 +42,9 @@ EXTRA_DIST=fc-list.sgml $(BUILT_MANS)
 CLEANFILES =
 
 fc_list_LDADD = ${top_builddir}/src/libfontconfig.la
+### TIZEN_ONLY(20170811): Apply ASLR to executable files.
+fc_list_LDFLAGS = -pie
+fc_list_CFLAGS = -fPIE
 
 if USEDOCBOOK
 
index 84afb8b..5e69738 100644 (file)
@@ -42,6 +42,9 @@ EXTRA_DIST=fc-match.sgml $(BUILT_MANS)
 CLEANFILES =
 
 fc_match_LDADD = ${top_builddir}/src/libfontconfig.la
+### TIZEN_ONLY(20170811): Apply ASLR to executable files.
+fc_match_LDFLAGS = -pie
+fc_match_CFLAGS = -fPIE
 
 if USEDOCBOOK
 
index c456247..814df88 100644 (file)
@@ -42,6 +42,9 @@ EXTRA_DIST=fc-pattern.sgml $(BUILT_MANS)
 CLEANFILES =
 
 fc_pattern_LDADD = ${top_builddir}/src/libfontconfig.la
+### TIZEN_ONLY(20170811): Apply ASLR to executable files.
+fc_pattern_LDFLAGS = -pie
+fc_pattern_CFLAGS = -fPIE
 
 if USEDOCBOOK
 
index 73b3f11..44e97f4 100644 (file)
@@ -42,6 +42,9 @@ EXTRA_DIST=fc-query.sgml $(BUILT_MANS)
 CLEANFILES =
 
 fc_query_LDADD = ${top_builddir}/src/libfontconfig.la
+### TIZEN_ONLY(20170811): Apply ASLR to executable files.
+fc_query_LDFLAGS = -pie
+fc_query_CFLAGS = -fPIE
 
 if USEDOCBOOK
 
index 471a42f..b1711fc 100644 (file)
@@ -42,6 +42,9 @@ EXTRA_DIST=fc-scan.sgml $(BUILT_MANS)
 CLEANFILES =
 
 fc_scan_LDADD = ${top_builddir}/src/libfontconfig.la
+### TIZEN_ONLY(20170811): Apply ASLR to executable files.
+fc_scan_LDFLAGS = -pie
+fc_scan_CFLAGS = -fPIE
 
 if USEDOCBOOK
 
index c485aa5..3c3370c 100644 (file)
@@ -42,6 +42,9 @@ EXTRA_DIST=fc-validate.sgml $(BUILT_MANS)
 CLEANFILES =
 
 fc_validate_LDADD = ${top_builddir}/src/libfontconfig.la $(FREETYPE_LIBS)
+### TIZEN_ONLY(20170811): Apply ASLR to executable files.
+fc_validate_LDFLAGS = -pie
+fc_validate_CFLAGS = -fPIE
 
 if USEDOCBOOK
 
diff --git a/git.mk b/git.mk
new file mode 100644 (file)
index 0000000..d5bf7b8
--- /dev/null
+++ b/git.mk
@@ -0,0 +1,227 @@
+# git.mk
+#
+# Copyright 2009, Red Hat, Inc.
+# Copyright 2010,2011 Behdad Esfahbod
+# Written by Behdad Esfahbod
+#
+# Copying and distribution of this file, with or without modification,
+# is permitted in any medium without royalty provided the copyright
+# notice and this notice are preserved.
+#
+# The latest version of this file can be downloaded from:
+#   https://raw.github.com/behdad/git.mk/master/git.mk
+# Bugs, etc, should be reported upstream at:
+#   https://github.com/behdad/git.mk
+#
+# To use in your project, import this file in your git repo's toplevel,
+# then do "make -f git.mk".  This modifies all Makefile.am files in
+# your project to -include git.mk.  Remember to add that line to new
+# Makefile.am files you create in your project, or just rerun the
+# "make -f git.mk".
+#
+# This enables automatic .gitignore generation.  If you need to ignore
+# more files, add them to the GITIGNOREFILES variable in your Makefile.am.
+# But think twice before doing that.  If a file has to be in .gitignore,
+# chances are very high that it's a generated file and should be in one
+# of MOSTLYCLEANFILES, CLEANFILES, DISTCLEANFILES, or MAINTAINERCLEANFILES.
+#
+# The only case that you need to manually add a file to GITIGNOREFILES is
+# when remove files in one of mostlyclean-local, clean-local, distclean-local,
+# or maintainer-clean-local make targets.
+#
+# Note that for files like editor backup, etc, there are better places to
+# ignore them.  See "man gitignore".
+#
+# If "make maintainer-clean" removes the files but they are not recognized
+# by this script (that is, if "git status" shows untracked files still), send
+# me the output of "git status" as well as your Makefile.am and Makefile for
+# the directories involved and I'll diagnose.
+#
+# For a list of toplevel files that should be in MAINTAINERCLEANFILES, see
+# Makefile.am.sample in the git.mk git repo.
+#
+# Don't EXTRA_DIST this file.  It is supposed to only live in git clones,
+# not tarballs.  It serves no useful purpose in tarballs and clutters the
+# build dir.
+#
+# This file knows how to handle autoconf, automake, libtool, gtk-doc,
+# gnome-doc-utils, yelp.m4, mallard, intltool, gsettings, dejagnu.
+#
+# This makefile provides the following targets:
+#
+# - all: "make all" will build all gitignore files.
+# - gitignore: makes all gitignore files in the current dir and subdirs.
+# - .gitignore: make gitignore file for the current dir.
+# - gitignore-recurse: makes all gitignore files in the subdirs.
+#
+# KNOWN ISSUES:
+#
+# - Recursive configure doesn't work as $(top_srcdir)/git.mk inside the
+#   submodule doesn't find us.  If you have configure.{in,ac} files in
+#   subdirs, add a proxy git.mk file in those dirs that simply does:
+#   "include $(top_srcdir)/../git.mk".  Add more ..'s to your taste.
+#   And add those files to git.  See vte/gnome-pty-helper/git.mk for
+#   example.
+#
+
+git-all: git-mk-install
+
+git-mk-install:
+       @echo Installing git makefile
+       @any_failed=; \
+               find "`test -z "$(top_srcdir)" && echo . || echo "$(top_srcdir)"`" -name Makefile.am | while read x; do \
+               if grep 'include .*/git.mk' $$x >/dev/null; then \
+                       echo $$x already includes git.mk; \
+               else \
+                       failed=; \
+                       echo "Updating $$x"; \
+                       { cat $$x; \
+                         echo ''; \
+                         echo '-include $$(top_srcdir)/git.mk'; \
+                       } > $$x.tmp || failed=1; \
+                       if test x$$failed = x; then \
+                               mv $$x.tmp $$x || failed=1; \
+                       fi; \
+                       if test x$$failed = x; then : else \
+                               echo Failed updating $$x; >&2 \
+                               any_failed=1; \
+                       fi; \
+       fi; done; test -z "$$any_failed"
+
+.PHONY: git-all git-mk-install
+
+
+### .gitignore generation
+
+$(srcdir)/.gitignore: Makefile.am $(top_srcdir)/git.mk
+       $(AM_V_GEN) \
+       { \
+               if test "x$(DOC_MODULE)" = x -o "x$(DOC_MAIN_SGML_FILE)" = x; then :; else \
+                       for x in \
+                               $(DOC_MODULE)-decl-list.txt \
+                               $(DOC_MODULE)-decl.txt \
+                               tmpl/$(DOC_MODULE)-unused.sgml \
+                               "tmpl/*.bak" \
+                               xml html \
+                       ; do echo /$$x; done; \
+               fi; \
+               if test "x$(DOC_MODULE)$(DOC_ID)" = x -o "x$(DOC_LINGUAS)" = x; then :; else \
+                       for lc in $(DOC_LINGUAS); do \
+                               for x in \
+                                       $(if $(DOC_MODULE),$(DOC_MODULE).xml) \
+                                       $(DOC_PAGES) \
+                                       $(DOC_INCLUDES) \
+                               ; do echo /$$lc/$$x; done; \
+                       done; \
+                       for x in \
+                               $(_DOC_OMF_ALL) \
+                               $(_DOC_DSK_ALL) \
+                               $(_DOC_HTML_ALL) \
+                               $(_DOC_MOFILES) \
+                               $(DOC_H_FILE) \
+                               "*/.xml2po.mo" \
+                               "*/*.omf.out" \
+                       ; do echo /$$x; done; \
+               fi; \
+               if test "x$(HELP_ID)" = x -o "x$(HELP_LINGUAS)" = x; then :; else \
+                       for lc in $(HELP_LINGUAS); do \
+                               for x in \
+                                       $(HELP_FILES) \
+                                       "$$lc.stamp" \
+                                       "$$lc.mo" \
+                               ; do echo /$$lc/$$x; done; \
+                       done; \
+               fi; \
+               if test "x$(gsettings_SCHEMAS)" = x; then :; else \
+                       for x in \
+                               $(gsettings_SCHEMAS:.xml=.valid) \
+                               $(gsettings__enum_file) \
+                       ; do echo /$$x; done; \
+               fi; \
+               if test -f $(srcdir)/po/Makefile.in.in; then \
+                       for x in \
+                               po/Makefile.in.in \
+                               po/Makefile.in \
+                               po/Makefile \
+                               po/POTFILES \
+                               po/stamp-it \
+                               po/.intltool-merge-cache \
+                               "po/*.gmo" \
+                               "po/*.mo" \
+                               po/$(GETTEXT_PACKAGE).pot \
+                               intltool-extract.in \
+                               intltool-merge.in \
+                               intltool-update.in \
+                       ; do echo /$$x; done; \
+               fi; \
+               if test -f $(srcdir)/configure; then \
+                       for x in \
+                               autom4te.cache \
+                               configure \
+                               config.h \
+                               stamp-h1 \
+                               libtool \
+                               config.lt \
+                       ; do echo /$$x; done; \
+               fi; \
+               if test "x$(DEJATOOL)" = x; then :; else \
+                       for x in \
+                               $(DEJATOOL) \
+                       ; do echo /$$x.sum; echo /$$x.log; done; \
+                       echo /site.exp; \
+               fi; \
+               for x in \
+                       .gitignore \
+                       $(GITIGNOREFILES) \
+                       $(CLEANFILES) \
+                       $(PROGRAMS) $(check_PROGRAMS) $(EXTRA_PROGRAMS) \
+                       $(LIBRARIES) $(check_LIBRARIES) $(EXTRA_LIBRARIES) \
+                       $(LTLIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LTLIBRARIES) \
+                       so_locations \
+                       .libs _libs \
+                       $(MOSTLYCLEANFILES) \
+                       "*.$(OBJEXT)" \
+                       "*.lo" \
+                       $(DISTCLEANFILES) \
+                       $(am__CONFIG_DISTCLEAN_FILES) \
+                       $(CONFIG_CLEAN_FILES) \
+                       TAGS ID GTAGS GRTAGS GSYMS GPATH tags \
+                       "*.tab.c" \
+                       $(MAINTAINERCLEANFILES) \
+                       $(BUILT_SOURCES) \
+                       $(DEPDIR) \
+                       Makefile \
+                       Makefile.in \
+                       "*.orig" \
+                       "*.rej" \
+                       "*.bak" \
+                       "*~" \
+                       ".*.sw[nop]" \
+                       ".dirstamp" \
+               ; do echo /$$x; done; \
+       } | \
+       sed "s@^/`echo "$(srcdir)" | sed 's/\(.\)/[\1]/g'`/@/@" | \
+       sed 's@/[.]/@/@g' | \
+       LC_ALL=C sort | uniq > $@.tmp && \
+       mv $@.tmp $@;
+
+all: $(srcdir)/.gitignore gitignore-recurse-maybe
+gitignore: $(srcdir)/.gitignore gitignore-recurse
+
+gitignore-recurse-maybe:
+       @for subdir in $(DIST_SUBDIRS); do \
+         case " $(SUBDIRS) " in \
+           *" $$subdir "*) :;; \
+           *) test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) .gitignore gitignore-recurse-maybe || echo "Skipping $$subdir");; \
+         esac; \
+       done
+gitignore-recurse:
+       @for subdir in $(DIST_SUBDIRS); do \
+           test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) .gitignore gitignore-recurse || echo "Skipping $$subdir"); \
+       done
+
+maintainer-clean: gitignore-clean
+gitignore-clean:
+       -rm -f $(srcdir)/.gitignore
+
+.PHONY: gitignore-clean gitignore gitignore-recurse gitignore-recurse-maybe
diff --git a/local.conf b/local.conf
new file mode 100644 (file)
index 0000000..9f8beee
--- /dev/null
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
+<!-- /etc/fonts/local.conf file for local customizations -->
+<fontconfig>
+<!--
+  Enable sub-pixel rendering
+       <match target="font">
+               <test qual="all" name="rgba">
+                       <const>unknown</const>
+               </test>
+               <edit name="rgba" mode="assign"><const>rgb</const></edit>
+       </match>
+-->
+<!-- 
+  Reject bitmap fonts
+ -->
+
+ <selectfont>
+  <rejectfont>
+   <pattern>
+     <patelt name="scalable"><bool>false</bool></patelt>
+   </pattern>
+  </rejectfont>
+ </selectfont>
+<!--
+  Accept bitmap fonts.  This overrides any rejectfont which matches 
+  
+ <selectfont>
+  <acceptfont>
+   <pattern>
+     <patelt name="scalable"><bool>false</bool></patelt>
+   </pattern>
+  </acceptfont>
+ </selectfont>
+ -->
+</fontconfig>
diff --git a/m4/.gitkeep b/m4/.gitkeep
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/new-version.sh b/new-version.sh
new file mode 100644 (file)
index 0000000..eecfd81
--- /dev/null
@@ -0,0 +1,139 @@
+#!/bin/sh
+# fontconfig/new-version.sh
+#
+# Copyright © 2000 Keith Packard
+#
+# Permission to use, copy, modify, distribute, and sell this software and its
+# documentation for any purpose is hereby granted without fee, provided that
+# the above copyright notice appear in all copies and that both that
+# copyright notice and this permission notice appear in supporting
+# documentation, and that the name of the author(s) not be used in
+# advertising or publicity pertaining to distribution of the software without
+# specific, written prior permission.  The authors make no
+# representations about the suitability of this software for any purpose.  It
+# is provided "as is" without express or implied warranty.
+#
+# THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+# EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+# DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+# PERFORMANCE OF THIS SOFTWARE.
+
+if [ "x`git status -s -uno`" != "x" ]; then
+       echo 'Uncommited changes in repository' 1>&2
+       exit 1
+fi
+
+version="$1"
+case "$version" in
+2.[0-9.]*)
+       ;;
+*)
+       echo 'Invalid version number:' "$version" 1>&2
+       exit 1
+       ;;
+esac
+
+eval `echo $version | 
+       awk -F. '{ printf ("major=%d\nminor=%d\nrevision=%d\n",
+                          $1, $2, $3); }'`
+                          
+# Update the version numbers
+
+sed -i configure.ac -e "/^AC_INIT(/s/2\.[0-9.]*/$version/"
+
+sed -i fontconfig/fontconfig.h \
+       -e "/^#define FC_MAJOR/s/[0-9][0-9]*/$major/" \
+       -e "/^#define FC_MINOR/s/[0-9][0-9]*/$minor/" \
+       -e "/^#define FC_REVISION/s/[0-9][0-9]*/$revision/"
+
+#
+# Compute pretty form of new version number
+#
+version_note=`echo $version | awk -F. '{ 
+       if ($3 > 90) 
+               printf ("%d.%d.%d (%d.%d RC%d)\n",
+                       $1, $2, $3, $1, $2 + 1, $3 - 90);
+       else if ($3 == 0)
+               printf ("%d.%d\n", $1, $2);
+       else
+               printf ("%d.%d.%d\n", $1, $2, $3); }'`
+               
+#
+# Find previous version in README
+#
+last_note=`grep '^2\.[0-9.]*' README |
+       head -1 |
+       sed 's/ (2\.[0-9]* RC[0-9]*)//'`
+case $last_note in
+2.*.*)
+       last=$last_note
+       ;;
+2.*)
+       last="$last_note.0"
+       ;;
+*)
+       echo 'cannot find previous changelog' 1>&2
+       exit 1
+esac
+
+#
+# Format the current date for the README header
+#
+date=`date '+%Y-%m-%d'`
+
+#
+# Update the readme file
+# 
+if [ $version != $last ]; then
+       #
+       # header
+       #
+       (sed '/^2\.[0-9.]*/,$d' README | 
+               sed -r -e "s/Version.*/Version $version_note/" \
+                   -e "s/[0-9]{4}\-[0-9]{2}\-[0-9]{2}$/$date/" | awk '
+                   /^[ \t]/ {
+                               gsub ("^[ \t]*", "");
+                               gsub ("[ \t]*$", "");
+                               space=(70 - length) / 2;
+                               for (i = 0; i < space; i++)
+                                       printf (" ");
+                               print 
+                               next
+                             } 
+                             { 
+                               print 
+                             }'
+       
+       #
+       # changelog
+       #
+       
+       echo $version_note
+       echo
+       git log --pretty=short $last.. | git shortlog | cat
+       
+       #
+       # previous changelogs
+       #
+       
+       sed -n '/^2\.[0-9.]*/,$p' README) > README.tmp ||
+               (echo "README update failed"; exit 1)
+       
+       mv README.tmp README
+fi
+
+$test git commit -m"Bump version to $version" \
+       configure.ac \
+       fontconfig/fontconfig.h \
+       README
+
+# tag the tree
+$test git tag -s -m "Version $version" $version
+
+# Make distributed change log
+
+git log --stat $last.. > ChangeLog-$version
+
diff --git a/packaging/baselibs.conf b/packaging/baselibs.conf
new file mode 100644 (file)
index 0000000..ce12525
--- /dev/null
@@ -0,0 +1,6 @@
+fontconfig
+  +/usr/bin/fc-cache -> /usr/bin/fc-cache<extension>
+  +/usr/bin/fc-cat -> /usr/bin/fc-cat<extension>
+  +/usr/bin/fc-list -> /usr/bin/fc-list<extension>
+  +/usr/bin/fc-match -> /usr/bin/fc-match<extension>
+fontconfig-devel
diff --git a/packaging/fontconfig.changes b/packaging/fontconfig.changes
new file mode 100644 (file)
index 0000000..168fc0d
--- /dev/null
@@ -0,0 +1,6 @@
+* Tue Mar 19 2013 Anas Nashif <anas.nashif@intel.com> submit/trunk/20130129.151905@e5146b6
+- Fixed package groups
+
+* Tue Jan 29 2013 Anas Nashif <anas.nashif@intel.com> upstream/2.10.91@8457e13
+- Update to 2.10.91
+
diff --git a/packaging/fontconfig.conf b/packaging/fontconfig.conf
new file mode 100644 (file)
index 0000000..dbec49d
--- /dev/null
@@ -0,0 +1,3 @@
+d      /opt/share/fonts        0755    app_fw  users
+t      /opt/share/fonts        -       -       -       -       security.SMACK64="User::App::Shared"
+t      /opt/share/fonts        -       -       -       -       security.SMACK64TRANSMUTE="TRUE"
diff --git a/packaging/fontconfig.manifest b/packaging/fontconfig.manifest
new file mode 100644 (file)
index 0000000..017d22d
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+ <request>
+    <domain name="_"/>
+ </request>
+</manifest>
diff --git a/packaging/fontconfig.spec b/packaging/fontconfig.spec
new file mode 100644 (file)
index 0000000..13fba0a
--- /dev/null
@@ -0,0 +1,155 @@
+%global freetype_version 2.5.0
+
+Name:           fontconfig
+Summary:        Font configuration and customization library
+Version:        2.12.1
+Release:        1
+Group:          Graphics & UI Framework/Fonts
+License:        MIT
+URL:            http://fontconfig.org
+Source0:        http://fontconfig.org/release/fontconfig-%{version}.tar.gz
+Source100:      fontconfig.conf
+Source1001:     fontconfig.manifest
+BuildRequires:  pkgconfig(freetype2) >= %{freetype_version}
+BuildRequires:  gawk
+BuildRequires:  expat-devel
+BuildRequires:  perl
+BuildRequires:  gperf
+BuildRequires:  python
+BuildRequires:  systemd-devel
+BuildRequires:  pkgconfig(libtzplatform-config)
+Requires(pre):  %{TZ_SYS_BIN}/fc-cache, %{TZ_SYS_BIN}/mkdir %{TZ_SYS_BIN}/rm, %{TZ_SYS_BIN}/grep, %{TZ_SYS_BIN}/chsmack
+Requires(post): /sbin/ldconfig
+Requires(postun): /sbin/ldconfig
+
+%define upgrade_script_path /usr/share/upgrade/scripts
+
+%description
+Fontconfig is designed to locate fonts within the
+system and select them according to requirements specified by
+applications.
+
+%package devel
+Summary:        Font configuration and customization library
+Group:          Graphics & UI Framework/Fonts
+Requires:       %{name} = %{version}
+Requires:       fontconfig = %{version}
+Requires:       freetype-devel >= %{freetype_version}
+Requires:       pkg-config
+
+%description devel
+The fontconfig-devel package includes the header files,
+and developer docs for the fontconfig package.
+
+Install fontconfig-devel if you want to develop programs which
+will use fontconfig.
+
+%prep
+%setup -q
+cp %{SOURCE1001} .
+
+%build
+# We don't want to rebuild the docs, but we want to install the included ones.
+export HASDOCBOOK=no
+
+%reconfigure --disable-static \
+    --with-expat=%{_prefix} \
+    --with-expat-include=%{_includedir} \
+    --with-expat-lib=%{_libdir} \
+    --with-freetype-config=%{TZ_SYS_BIN}/freetype-config \
+    --with-add-fonts=%{TZ_SYS_RO_SHARE}/fonts,%{TZ_SYS_RO_SHARE}/app_fonts,%{TZ_SYS_RO_SHARE}/fallback_fonts,%{TZ_SYS_SHARE}/fonts \
+    --with-cache-dir=%{TZ_SYS_VAR}/cache/fontconfig \
+    --with-baseconfigdir=%{TZ_SYS_RO_ETC}/fonts \
+    --with-configdir=%{TZ_SYS_RO_ETC}/fonts/conf.d \
+    --with-templatedir=%{TZ_SYS_RO_ETC}/fonts/conf.avail \
+    --with-xmldir=%{TZ_SYS_RO_ETC}/fonts \
+    --disable-docs
+
+make %{?jobs:-j%jobs}
+
+#make check
+%install
+rm -rf %{buildroot}
+mkdir -p %{buildroot}%{upgrade_script_path}
+cp -f scripts/500.fontconfig.sh %{buildroot}%{upgrade_script_path}
+
+%make_install
+
+mkdir -p %{buildroot}%{_tmpfilesdir}
+install -m 0644 %SOURCE100 %{buildroot}%{_tmpfilesdir}/fontconfig.conf
+
+# All font packages depend on this package, so we create
+# and own /usr/share/fonts
+mydir=$RPM_BUILD_ROOT%{TZ_SYS_RO_SHARE}/fonts
+mkdir -p $RPM_BUILD_ROOT%{TZ_SYS_RO_SHARE}/fonts
+
+# Remove unpackaged files. no need when configure --disable-static
+#rm $RPM_BUILD_ROOT%{_libdir}/*.la
+#rm $RPM_BUILD_ROOT%{_libdir}/*.a
+
+%post
+/sbin/ldconfig
+
+umask 0022
+
+mkdir -p %{TZ_SYS_RO_SHARE}/fonts
+mkdir -p %{TZ_SYS_RO_SHARE}/fallback_fonts
+mkdir -p %{TZ_SYS_RO_SHARE}/app_fonts
+
+mkdir -p %{TZ_SYS_VAR}/cache/fontconfig
+chown root:root %{TZ_SYS_VAR}/cache/fontconfig
+chmod 755 %{TZ_SYS_VAR}/cache/fontconfig
+chsmack -t %{TZ_SYS_VAR}/cache/fontconfig
+chsmack -a User::App::Shared %{TZ_SYS_VAR}/cache/fontconfig
+
+# Skip making fontconfig cache folder for users. (/opt/home/app/.cache)
+# The path will be changed according to a name of user.
+#rm -rf %{TZ_USER_CACHE}/fontconfig
+#mkdir -p %{TZ_USER_CACHE}/fontconfig
+#chmod 755 %{TZ_USER_CACHE}
+#chown app:app %{TZ_USER_CACHE}
+#chsmack -t %{TZ_USER_CACHE}
+#chsmack -a System::Shared %{TZ_USER_CACHE}
+#chmod 755 %{TZ_USER_CACHE}/fontconfig
+#chown app:app %{TZ_USER_CACHE}/fontconfig
+#chsmack -t %{TZ_USER_CACHE}/fontconfig
+#chsmack -a System::Shared %{TZ_USER_CACHE}/fontconfig
+
+# remove 49-sansserif.conf to fix bmc #9024
+#rm -rf /usr/%{_sysconfdir}/fonts/conf.d/49-sansserif.conf
+
+# Force regeneration of all fontconfig cache files
+# The check for existance is needed on dual-arch installs (the second
+#  copy of fontconfig might install the binary instead of the first)
+# The HOME setting is to avoid problems if HOME hasn't been reset
+#if [ -x %{TZ_SYS_BIN}/fc-cache ] && %{TZ_SYS_BIN}/fc-cache --version 2>&1 | grep -q %{version} ; then
+#fc-cache -rf --system-only
+#fi
+
+%postun -p /sbin/ldconfig
+
+%files
+%manifest fontconfig.manifest
+%defattr(-,root,root,-)
+%defattr(-, root, root)
+%doc README AUTHORS COPYING
+%{_libdir}/libfontconfig.so.*
+%{TZ_SYS_BIN}/fc-*
+%{TZ_SYS_RO_ETC}/fonts/*
+%dir %{TZ_SYS_RO_ETC}/fonts/conf.avail
+%dir %{TZ_SYS_RO_SHARE}/fonts
+%doc %{TZ_SYS_RO_ETC}/fonts/conf.d/README
+%config %{TZ_SYS_RO_ETC}/fonts/conf.avail/*.conf
+%config(noreplace) %{TZ_SYS_RO_ETC}/fonts/conf.d/*.conf
+%{_tmpfilesdir}/fontconfig.conf
+%{upgrade_script_path}/500.fontconfig.sh
+%license COPYING
+
+%files devel
+%manifest fontconfig.manifest
+%defattr(-,root,root,-)
+%defattr(-, root, root)
+%{_libdir}/libfontconfig.so
+%{_libdir}/pkgconfig/*
+%{_includedir}/fontconfig
+
diff --git a/scripts/500.fontconfig.sh b/scripts/500.fontconfig.sh
new file mode 100755 (executable)
index 0000000..2b9a6d9
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+#------------------------------------------#
+# efl-misc upgrade (2.4 -> 3.0)            #
+#------------------------------------------#
+
+# Macro
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+
+# Set under the /opt
+mkdir -p /opt/var/cache/fontconfig
+chmod -R 775 /opt/var/cache/fontconfig
+chown -R :users /opt/var/cache/fontconfig
+chsmack -a 'User::App::Shared' /opt/var/cache/fontconfig
+chsmack -t /opt/var/cache/fontconfig