Package init

This commit is contained in:
overweight 2019-09-30 10:39:00 -04:00
commit c1446ae196
6 changed files with 199 additions and 0 deletions

44
25-no-bitmap-fedora.conf Normal file
View File

@ -0,0 +1,44 @@
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="font">
<test name="family" compare="eq">
<string>Kochi Mincho</string>
</test>
<edit name="embeddedbitmap" mode="assign">
<bool>false</bool>
</edit>
</match>
<match target="font">
<test name="family" compare="eq">
<string>Kochi Gothic</string>
</test>
<edit name="embeddedbitmap" mode="assign">
<bool>false</bool>
</edit>
</match>
<match target="font">
<test name="family" compare="eq">
<string>Sazanami Mincho</string>
</test>
<edit name="embeddedbitmap" mode="assign">
<bool>false</bool>
</edit>
</match>
<match target="font">
<test name="family" compare="eq">
<string>Sazanami Gothic</string>
</test>
<edit name="embeddedbitmap" mode="assign">
<bool>false</bool>
</edit>
</match>
<match target="font">
<test name="family" compare="eq">
<string>AR PL ShanHeiSun Uni</string>
</test>
<edit name="embeddedbitmap" mode="assign">
<bool>true</bool>
</edit>
</match>
</fontconfig>

4
fc-cache Executable file
View File

@ -0,0 +1,4 @@
#! /bin/sh
[ -x /usr/bin/fc-cache-32 ] && /usr/bin/fc-cache-32 "$@" || :
[ -x /usr/bin/fc-cache-64 ] && /usr/bin/fc-cache-64 "$@" || :

BIN
fontconfig-2.13.1.tar.bz2 Normal file

Binary file not shown.

View File

@ -0,0 +1,14 @@
diff -pruN fontconfig-2.12.93.orig/configure.ac fontconfig-2.12.93/configure.ac
--- fontconfig-2.12.93.orig/configure.ac 2018-02-15 22:01:54.000000000 +0900
+++ fontconfig-2.12.93/configure.ac 2018-02-15 22:33:42.353941393 +0900
@@ -308,8 +308,8 @@ AC_DEFINE_UNQUOTED(USE_ICONV,$use_iconv,
# Checks for FreeType
#
dnl See http://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/docs/VERSIONS.TXT for versioning in freetype
-PKG_CHECK_MODULES(FREETYPE, freetype2 >= 21.0.15)
-PKGCONFIG_REQUIRES="$PKGCONFIG_REQUIRES freetype2 >= 21.0.15"
+PKG_CHECK_MODULES(FREETYPE, freetype2 >= 20.0.14)
+PKGCONFIG_REQUIRES="$PKGCONFIG_REQUIRES freetype2 >= 20.0.14"
AC_SUBST(FREETYPE_LIBS)
AC_SUBST(FREETYPE_CFLAGS)

View File

@ -0,0 +1,12 @@
diff -pruN fontconfig-2.12.91.orig/fc-cache/fc-cache.c fontconfig-2.12.91/fc-cache/fc-cache.c
--- fontconfig-2.12.91.orig/fc-cache/fc-cache.c 2017-11-20 21:02:20.000000000 +0900
+++ fontconfig-2.12.91/fc-cache/fc-cache.c 2017-12-14 16:59:19.002003145 +0900
@@ -413,7 +413,7 @@ main (int argc, char **argv)
*/
/* the resolution of mtime on FAT is 2 seconds */
if (changed)
- sleep (2);
+ sleep (1);
if (verbose)
printf ("%s: %s\n", argv[0], ret ? _("failed") : _("succeeded"));
return ret;

125
fontconfig.spec Normal file
View File

@ -0,0 +1,125 @@
%global freetype_version 2.9.1
Name: fontconfig
Version: 2.13.1
Release: 2
Summary: Fontconfig is a library for configuring and customizing font access
License: MIT and Public Domain and UCD
URL: http://fontconfig.org
Source0: http://fontconfig.org/release/%{name}-%{version}.tar.bz2
Source1: 25-no-bitmap-fedora.conf
Source2: fc-cache
#PATCH-FIX-https://bugzilla.redhat.com/show_bug.cgi?id=140335
Patch0: %{name}-sleep-less.patch
Patch1: %{name}-required-freetype-version.patch
BuildRequires: expat-devel freetype-devel >= %{freetype_version} fontpackages-devel libuuid-devel
BuildRequires: autoconf automake libtool gettext itstool gperf
Requires: fontpackages-filesystem freetype >= 2.9.1 grep coreutils glibc font(:lang=en)
Suggests: dejavu-sans-fonts
Provides: %{name}-devel-doc
Obsoletes: %{name}-devel-doc
%description
Fontconfig provide different font according to requirements specified by applications,discover new fonts when installed automatically
be used in concert with the X Render Extension and FreeType to implement high quality, anti-aliased and subpixel rendered text on a display
%package devel
Summary: Font configuration and customization library
Requires: %{name}%{?_isa} = %{version}-%{release} freetype-devel >= %{freetype_version} pkgconfig gettext
%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.
%package help
Summary: Development Documentation files for fontconfig library
Buildarch: noarch
Requires: %{name}-devel = %{version}-%{release}
%description help
The fontconfig-devel-doc package contains the documentation files which is useful for developing
applications that uses fontconfig.
%prep
%autosetup -n %{name}-%{version} -p1
%build
export HASDOCBOOK=no
autoreconf
%configure --with-add-fonts=/usr/share/X11/fonts/Type1,/usr/share/X11/fonts/TTF,/usr/local/share/fonts \
--disable-static --with-cache-dir=/usr/lib/fontconfig/cache
%make_build
%install
%make_install
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
install -p -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d
ln -s %{_fontconfig_templatedir}/25-unhint-nonlatin.conf $RPM_BUILD_ROOT%{_fontconfig_confdir}/
mv $RPM_BUILD_ROOT%{_docdir}/fontconfig/* .
rmdir $RPM_BUILD_ROOT%{_docdir}/fontconfig/
mv $RPM_BUILD_ROOT%{_bindir}/fc-cache $RPM_BUILD_ROOT%{_bindir}/fc-cache-%{__isa_bits}
install -p -m 0755 %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/fc-cache
%find_lang %{name}
%find_lang %{name}-conf
cat %{name}-conf.lang >> %{name}.lang
%check
make check
%post
%{?ldconfig: %ldconfig}
umask 0022
install -d /usr/lib/fontconfig/cache
[[ -d %{_localstatedir}/cache/fontconfig ]] && rm -rf %{_localstatedir}/cache/fontconfig/* 2> /dev/null || :
HOME=/root /usr/bin/fc-cache -f
%ldconfig_postun
%transfiletriggerin -- /usr/share/fonts /usr/share/X11/fonts/Type1 /usr/share/X11/fonts/TTF /usr/local/share/fonts
HOME=/root /usr/bin/fc-cache -s
%transfiletriggerpostun -- /usr/share/fonts /usr/share/X11/fonts/Type1 /usr/share/X11/fonts/TTF /usr/local/share/fonts
HOME=/root /usr/bin/fc-cache -s
%files -f %{name}.lang
%defattr(-,root,root)
%doc README AUTHORS
%doc fontconfig-user.txt fontconfig-user.html
%doc %{_fontconfig_confdir}/README
%license COPYING
%config %{_fontconfig_masterdir}/fonts.conf
%config(noreplace) %{_fontconfig_confdir}/*.conf
%dir /usr/lib/fontconfig/cache
%{_libdir}/libfontconfig.so.*
%{_bindir}/fc-*
%{_fontconfig_templatedir}/*.conf
%{_datadir}/xml/fontconfig
%files devel
%{_libdir}/libfontconfig.so
%{_libdir}/pkgconfig/*
%{_includedir}/fontconfig
%{_datadir}/gettext/its/fontconfig.*
%files help
%doc fontconfig-devel.txt fontconfig-devel
%{_mandir}/man1/*
%{_mandir}/man5/*
%{_mandir}/man3/*
%changelog
* Wed Sep 11 2019 openEuler jimmy<dukaitian@huawei.com> - 2.13.1-2
- Package init jimmy