/[packages]/cauldron/fontconfig/current/SPECS/fontconfig.spec
ViewVC logotype

Contents of /cauldron/fontconfig/current/SPECS/fontconfig.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2044456 - (show annotations) (download)
Mon Feb 26 14:28:01 2024 UTC (8 weeks, 2 days ago) by kekepower
File size: 7540 byte(s)
- Update to version 2.15.0

1 %define fontconfig_major 1
2 %define lib_name %mklibname %{name} %{fontconfig_major}
3 %define develname %mklibname %{name} -d
4
5 %define freetype_version 2.3.5
6
7 %define bootstrap 0
8 %{?_without_bootstrap: %global bootstrap 0}
9 %{?_with_bootstrap: %global bootstrap 1}
10 %define rebuild_doc 0
11 %if %{bootstrap}
12 %define rebuild_doc 0
13 %endif
14
15 Summary: Font configuration library
16 Name: fontconfig
17 Version: 2.15.0
18 Release: %mkrel 1
19 License: MIT and Public Domain and UCD
20 Group: System/X11
21 Source0: https://fontconfig.org/release/fontconfig-%{version}.tar.xz
22 # (fc) 2.3.2-3mdk prefer urw fonts
23 Source1: 30-mdv-urwfonts.conf
24 # (fc) 2.3.2-3mdk disable antialiasing for some fonts
25 Source3: 20-mdv-disable-antialias.conf
26 # (fc) 2.3.2-3mdk Avoid KDE/QT uses some bitmapped fonts (guisseppe)
27 Source5: 30-mdv-avoid-bitmap.conf
28 # (fc) 2.4.2-1mdv disable embedded bitmap for big size (Mdv bug #25924)
29 Source8: 26-mdv-no-embeddedbitmap.conf
30 # (fc) 2.4.92-1mdv enable embeddedbitmap on some CJK fonts (Fedora)
31 Source101: 25-no-bitmap-fedora.conf
32 # (ovitters) 2.13.90-1mga fc-cache per arch bits (32/64) (Fedora)
33 Source102: fc-cache
34 # (ns80) fix PDF rendering in Firefox and Thunderbird (mga bug #32525)
35 Source103: 70-mga-no-bitmaps-firefox-thunderbird.conf
36 # (fc) 2.1-4mdk change order of default fonts
37 Patch50: fontconfig-mdvconfig.patch
38
39 # From Fedora as well as upstream:
40 Patch0: %{name}-sleep-less.patch
41 Patch5: %{name}-disable-network-required-test.patch
42
43 URL: https://fontconfig.org/
44
45 Requires: fonts-filesystem
46 # Register DTD system-wide to make validation work by default
47 # (used by fonts-rpm-macros)
48 Requires(pre): libxml2-utils
49 Requires(postun): libxml2-utils
50
51 Requires(post): %{lib_name} >= %{version}-%{release}
52 Requires(post): grep
53 Requires(post): coreutils
54
55 BuildRequires: pkgconfig(freetype2) >= %{freetype_version}
56 BuildRequires: pkgconfig(uuid)
57
58 BuildRequires: ed
59 %if %{rebuild_doc}
60 BuildRequires: docbook-utils
61 BuildRequires: docbook-utils-pdf
62 BuildRequires: docbook-dtd31-sgml
63 BuildRequires: docbook-dtd41-sgml
64 %endif
65 BuildRequires: lynx
66 BuildRequires: pkgconfig(libxml-2.0)
67 BuildRequires: libxml2-utils
68 BuildRequires: gperf
69 BuildRequires: docbook-utils
70 BuildRequires: docbook-utils-pdf
71
72 # fwang: add conflicts to ease upgrade
73 Conflicts: x11-font-wqy-bitmapfont < 1.0-0.20070901.1
74
75 %description
76 Fontconfig is designed to locate fonts within the
77 system and select them according to requirements specified by
78 applications.
79
80 %package -n %{lib_name}
81 Summary: Font configuration and customization library
82 Group: System/Libraries
83 Requires: %{name} >= %{version}-%{release}
84 Provides: lib%{name} = %{version}-%{release}
85 Provides: %{name}-libs = %{version}-%{release}
86
87 %description -n %{lib_name}
88 Fontconfig is designed to locate fonts within the
89 system and select them according to requirements specified by
90 applications.
91
92 %package -n %{develname}
93 Summary: Font configuration and customization library
94 Group: Development/C
95 Provides: lib%{name}-devel = %{version}-%{release}
96 Provides: %{name}-devel = %{version}-%{release}
97 Requires: %{name} = %{version}-%{release}
98 Requires: %{lib_name} = %{version}-%{release}
99 Requires: freetype2-devel >= %{freetype_version}
100 Obsoletes: %{mklibname -d %{name} 1} <= 2.11.1
101
102 %description -n %{develname}
103 The fontconfig-devel package includes the header files,
104 and developer docs for the fontconfig package.
105
106 Install fontconfig-devel if you want to develop programs which
107 will use fontconfig.
108
109 %prep
110 %autosetup -p1
111
112 %build
113 %if !%{rebuild_doc}
114 # We don't want to rebuild the docs, but we want to install the included ones.
115 export HASDOCBOOK=no
116
117 for i in doc/*.fncs; do
118 touch -r $i ${i//.fncs/.sgml}
119 done
120 %endif
121 autoreconf -fi
122 %configure --localstatedir=/var \
123 --with-add-fonts="/usr/share/fonts,/usr/share/X11/fonts/Type1,/usr/share/X11/fonts/TTF,/usr/local/share/fonts,/usr/lib/X11/fonts,/opt/ttfonts" \
124 --enable-libxml2 \
125 --with-cache-dir=/usr/lib/fontconfig/cache \
126 --disable-static
127
128 %make_build
129
130 %install
131 %make_install
132
133 install -p -m 0644 %{SOURCE1} %{SOURCE3} %{SOURCE5} %{SOURCE8} %{SOURCE101} %{SOURCE103} %{buildroot}%{_sysconfdir}/fonts/conf.d
134
135 # needed in case main config files isn't up to date
136 cat << EOF > %{buildroot}%{_sysconfdir}/fonts/conf.d/00-cache.conf
137 <?xml version="1.0"?>
138 <!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
139 <fontconfig>
140 <!-- Font cache directory list -->
141
142 <cachedir>/usr/lib/fontconfig/cache</cachedir>
143 <cachedir>~/.fontconfig</cachedir>
144
145 </fontconfig>
146 EOF
147
148 ln -s %{_datadir}/fontconfig/conf.avail/25-unhint-nonlatin.conf %{buildroot}%{_sysconfdir}/fonts/conf.d
149
150 # rename fc-cache binary
151 mv $RPM_BUILD_ROOT%{_bindir}/fc-cache $RPM_BUILD_ROOT%{_bindir}/fc-cache-%{__isa_bits}
152
153 # create link to man page
154 echo ".so man1/fc-cache.1" > $RPM_BUILD_ROOT%{_mandir}/man1/fc-cache-%{__isa_bits}.1
155
156 install -p -m 0755 %{SOURCE102} $RPM_BUILD_ROOT%{_bindir}/fc-cache
157
158 # remove unpackaged files
159 rm -rf %{buildroot}%{_datadir}/doc/fontconfig
160
161 # we don't want these
162 find %{buildroot} -name "*.la" -delete
163
164 %find_lang %{name}
165 %find_lang %{name}-conf
166
167 %check
168 # reported and fixed in https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/235
169 # unfortunately the patch does not apply cleanly, plus depends on a few invasive patches, so
170 # annoying to apply it
171 [[ -z "$SOURCE_DATE_EPOCH" ]] && export SOURCE_DATE_EPOCH=0
172 VERBOSE=1 make check
173
174 %post
175 umask 0022
176
177 mkdir -p /usr/lib/fontconfig/cache
178
179 [[ -d %{_localstatedir}/cache/fontconfig ]] && rm -rf %{_localstatedir}/cache/fontconfig/* 2> /dev/null || :
180
181 # Force regeneration of all fontconfig cache files
182 # The check for existance is needed on dual-arch installs (the second
183 # copy of fontconfig might install the binary instead of the first)
184 # The HOME setting is to avoid problems if HOME hasn't been reset
185 if [ -x /usr/bin/fc-cache ] && /usr/bin/fc-cache --version 2>&1 | grep -q %{version} ; then
186 HOME=/root /usr/bin/fc-cache -f
187 fi
188
189
190 %triggerprein -- fontconfig < 2.4.0
191 rm -f %{_var}/cache/fontconfig/*.cache-2
192
193 # rpm filetriggers to update cache
194 %transfiletriggerin -- /usr/share/fonts /usr/share/X11/fonts/Type1 /usr/share/X11/fonts/TTF /usr/local/share/fonts /usr/lib/X11/fonts /opt/ttfonts
195 HOME=/root /usr/bin/fc-cache -s
196
197 %transfiletriggerpostun -- /usr/share/fonts /usr/share/X11/fonts/Type1 /usr/share/X11/fonts/TTF /usr/local/share/fonts /usr/lib/X11/fonts /opt/ttfonts
198 HOME=/root /usr/bin/fc-cache -s
199
200 %posttrans
201 if [ -e %{_sysconfdir}/xml/catalog ]; then
202 %{_bindir}/xmlcatalog --noout --add system \
203 "urn:fontconfig:fonts.dtd" \
204 "file://%{_datadir}/xml/fontconfig/fonts.dtd" \
205 %{_sysconfdir}/xml/catalog
206 fi
207
208 %postun
209 if [ $1 == 0 ] && [ -e %{_sysconfdir}/xml/catalog ]; then
210 %{_bindir}/xmlcatalog --noout --del "urn:fontconfig:fonts.dtd"
211 fi
212
213 %files -f %{name}.lang -f %{name}-conf.lang
214 %doc README.md AUTHORS COPYING doc/fontconfig-user.html doc/fontconfig-user.txt
215 %{_bindir}/*
216 %dir %{_sysconfdir}/fonts
217 %dir %{_sysconfdir}/fonts/conf.d
218 # those files must NOT have noreplace option
219 %config %{_sysconfdir}/fonts/fonts.conf
220 %config %{_sysconfdir}/fonts/conf.d/*.conf
221 %config %{_sysconfdir}/fonts/conf.d/README
222 %{_datadir}/fontconfig/
223 %{_datadir}/gettext/its/*
224 %{_datadir}/xml/fontconfig/fonts.dtd
225 %{_mandir}/man1/*
226 %{_mandir}/man5/*
227 %dir /usr/lib/fontconfig/cache
228
229 %files -n %{lib_name}
230 %{_libdir}/*.so.%{fontconfig_major}
231 %{_libdir}/*.so.%{fontconfig_major}.*
232
233 %files -n %{develname}
234 %doc doc/fontconfig-devel doc/fontconfig-devel.txt
235 %{_libdir}/*.so
236 %{_libdir}/pkgconfig/*
237 %{_includedir}/*
238 %{_mandir}/man3/*

  ViewVC Help
Powered by ViewVC 1.1.30