fontconfig-vl.spec 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343
  1. %define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0}
  2. %define _unpackaged_files_terminate_build 1
  3. %define freetype_version 2.10.1
  4. Summary: Font configuration and customization library
  5. Summary(ja): フォント設定/カスタマイズライブラリ
  6. Name: fontconfig
  7. Version: 2.16.0
  8. Release: 1%{?_dist_release}
  9. Group: system
  10. Vendor: Project Vine
  11. Distribution: Vine Linux
  12. License: MIT
  13. URL: https://fontconfig.org/
  14. Source: https://fontconfig.org/release/fontconfig-%{version}.tar.xz
  15. Source10: 70-prefer-ja-font.conf
  16. Source11: 59-morisawa-font-alias.conf
  17. Source100: ChangeLog.fedora
  18. # from fedora
  19. # https://bugzilla.redhat.com/show_bug.cgi?id=140335
  20. Patch0: %{name}-sleep-less.patch
  21. Patch4: %{name}-drop-lang-from-pkgkit-format.patch
  22. Patch5: %{name}-disable-network-required-test.patch
  23. #Patch6: %{name}-lower-nonlatin-conf.patch
  24. Patch7: %{name}-meson-cachedir.patch
  25. Patch8: %{name}-meson-endianness.patch
  26. # vine
  27. Patch10000: fontconfig-2.3.2-subst-ja-font.patch
  28. Patch10001: fontconfig-2.13.1-vine.patch
  29. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  30. BuildRequires: gawk
  31. BuildRequires: freetype2-devel >= %{freetype_version}
  32. BuildRequires: perl
  33. BuildRequires: gettext
  34. BuildRequires: gperf
  35. BuildRequires: libxml2-devel
  36. BuildRequires: meson
  37. Requires(pre): freetype2 >= %{freetype_version}, coreutils
  38. Conflicts: XOrg-libs <= 6.9.0
  39. Obsoletes: XOrg-libs <= 6.9.0
  40. Conflicts: XOrg-font-utils <= 6.9.0
  41. Obsoletes: XOrg-font-utils <= 6.9.0
  42. %description
  43. Fontconfig is designed to locate fonts within the
  44. system and select them according to requirements specified by
  45. applications.
  46. %description -l ja
  47. Fontconfig は、システム内のフォントを把握し、アプリケーション
  48. が指定した要求に応じてそれらを選択するためのライブラリです。
  49. %package devel
  50. Summary: Development files for %{name}
  51. Summary(ja): Fontconfig の開発ファイル
  52. Group: programming
  53. Requires: fontconfig = %{version}-%{release}
  54. Requires: freetype2-devel >= %{freetype_version}
  55. Requires: expat-devel
  56. Requires: pkgconfig
  57. Conflicts: XOrg-devel <= 6.9.0
  58. Obsoletes: XOrg-devel <= 6.9.0
  59. %description devel
  60. The fontconfig-devel package includes the header files,
  61. and developer docs for the fontconfig package.
  62. %description -l ja devel
  63. fontconfig-devel パッケージには fontconfig を使ったソフトウエア
  64. を開発するために必要なヘッダファイルやライブラリ、開発用ドキュメ
  65. ントが含まれています。
  66. # compat32
  67. %package -n compat32-%{name}
  68. Summary: Font configuration and customization library
  69. Summary(ja): フォント設定/カスタマイズライブラリ
  70. Group: system,legacy
  71. %description -n compat32-%{name}
  72. Fontconfig is designed to locate fonts within the
  73. system and select them according to requirements specified by
  74. applications.
  75. %description -l ja -n compat32-%{name}
  76. Fontconfig は、システム内のフォントを把握し、アプリケーション
  77. が指定した要求に応じてそれらを選択するためのライブラリです。
  78. %package -n compat32-%{name}-devel
  79. Summary: Font configuration and customization library
  80. Group: programming,legacy
  81. Requires: compat32-%{name} = %{version}-%{release}
  82. Requires: %{name}-devel = %{version}-%{release}
  83. Requires: compat32-freetype2-devel >= %{freetype_version}
  84. Requires: compat32-expat-devel
  85. %description -n compat32-%{name}-devel
  86. The fontconfig-devel package includes the header files,
  87. and developer docs for the fontconfig package.
  88. %description -l ja -n compat32-%{name}-devel
  89. fontconfig-devel パッケージには fontconfig を使ったソフトウエア
  90. を開発するために必要なヘッダファイルやライブラリ、開発用ドキュメ
  91. ントが含まれています。
  92. %debug_package
  93. %prep
  94. %setup -q
  95. %autopatch -p1 -M 9999
  96. #patch10000 -p1 -b .subst-ja-font
  97. %patch10001 -p1 -b .vine
  98. %build
  99. # We don't want to rebuild the docs, but we want to install the included ones.
  100. export HASDOCBOOK=no
  101. %meson \
  102. -Ddoc=disabled \
  103. -Dcache-build=disabled \
  104. -Dxml-backend=libxml2 \
  105. -Dadditional-fonts-dirs=/usr/share/fonts,/usr/share/X11/fonts/Type1,/usr/share/X11/fonts/TTF,/usr/local/share/fonts \
  106. -Dcache-dir=/var/cache/fontconfig \
  107. --default-library=shared
  108. %meson_build
  109. %install
  110. %meson_install
  111. ln -s %{_datadir}/fontconfig/conf.avail/25-unhint-nonlatin.conf $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d/
  112. install -m664 %{SOURCE10} %{SOURCE11} $RPM_BUILD_ROOT/%{_datadir}/fontconfig/conf.avail/
  113. for i in 70-prefer-ja-font.conf 59-morisawa-font-alias.conf
  114. do
  115. ln -sf %{_datadir}/fontconfig/conf.avail/$i $RPM_BUILD_ROOT/%{_sysconfdir}/fonts/conf.d/
  116. done
  117. # Install docs manually
  118. install -d $RPM_BUILD_ROOT%{_mandir}/man1
  119. install -d $RPM_BUILD_ROOT%{_mandir}/man3
  120. install -d $RPM_BUILD_ROOT%{_mandir}/man5
  121. for f in doc/*.1; do
  122. install -p -m 0644 $f $RPM_BUILD_ROOT%{_mandir}/man1
  123. done
  124. for f in doc/*.3; do
  125. install -p -m 0644 $f $RPM_BUILD_ROOT%{_mandir}/man3
  126. done
  127. for f in doc/*.5; do
  128. install -p -m 0644 $f $RPM_BUILD_ROOT%{_mandir}/man5
  129. done
  130. for f in doc/*.txt doc/*.pdf doc/*.html; do
  131. install -p -m 0644 $f .
  132. done
  133. # adjust the timestamp to avoid conflicts for multilib
  134. touch -r doc/fontconfig-user.sgml fontconfig-user.txt
  135. touch -r doc/fontconfig-user.sgml fontconfig-user.html
  136. touch -r doc/fontconfig-devel.sgml fontconfig-devel.txt
  137. touch -r doc/fontconfig-devel.sgml fontconfig-devel.html
  138. # All font packages depend on this package, so we create
  139. # and own /usr/share/fonts
  140. mkdir -p $RPM_BUILD_ROOT%{_datadir}/fonts
  141. # remove locales (zh only)
  142. rm -rf %{buildroot}%{_datadir}/locale
  143. %transfiletriggerin -- /usr/share/fonts /usr/share/X11/fonts/Type1 /usr/share/X11/fonts/TTF /usr/local/share/fonts
  144. HOME=/root /usr/bin/fc-cache -s
  145. %transfiletriggerpostun -- /usr/share/fonts /usr/share/X11/fonts/Type1 /usr/share/X11/fonts/TTF /usr/local/share/fonts
  146. HOME=/root /usr/bin/fc-cache -s
  147. %postun
  148. if [ $1 == 0 ] && [ -e %{_sysconfdir}/xml/catalog ]; then
  149. %{_bindir}/xmlcatalog --noout --del "urn:fontconfig:fonts.dtd" %{_sysconfdir}/xml/catalog
  150. fi
  151. %posttrans
  152. umask 0022
  153. # Remove stale caches
  154. rm -f %{_localstatedir}/cache/fontconfig/????????????????????????????????-*.cache-2
  155. HOME=/root /usr/bin/fc-cache -f -s >& /dev/null
  156. if [ -e %{_sysconfdir}/xml/catalog ]; then
  157. %{_bindir}/xmlcatalog --noout --add system \
  158. "urn:fontconfig:fonts.dtd" \
  159. "file://%{_datadir}/xml/fontconfig/fonts.dtd" \
  160. %{_sysconfdir}/xml/catalog
  161. fi
  162. %files
  163. %license COPYING
  164. %doc README.md AUTHORS
  165. %doc fontconfig-user.txt fontconfig-user.html
  166. %doc %{_sysconfdir}/fonts/conf.d/README
  167. %{_libdir}/libfontconfig.so.*
  168. %{_bindir}/fc-cache
  169. %{_bindir}/fc-conflist
  170. %{_bindir}/fc-list
  171. %{_bindir}/fc-match
  172. %{_bindir}/fc-cat
  173. %{_bindir}/fc-query
  174. %{_bindir}/fc-scan
  175. %{_bindir}/fc-pattern
  176. %{_bindir}/fc-validate
  177. %dir %{_datadir}/fonts
  178. %{_datadir}/%{name}
  179. %{_datadir}/xml/%{name}/fonts.dtd
  180. %config %{_sysconfdir}/fonts/fonts.conf
  181. %config(noreplace) %{_sysconfdir}/fonts/conf.d/*.conf
  182. %dir %{_localstatedir}/cache/fontconfig
  183. %{_mandir}/man1/*
  184. %{_mandir}/man5/*
  185. %files devel
  186. %doc fontconfig-devel.txt fontconfig-devel.html
  187. %{_libdir}/libfontconfig.so
  188. %dir %{_datadir}/gettext
  189. %dir %{_datadir}/gettext/its
  190. %{_datadir}/gettext/its/*
  191. %{_libdir}/pkgconfig/*
  192. %{_includedir}/fontconfig
  193. %{_mandir}/man3/*
  194. # compat32
  195. %if %{build_compat32}
  196. %files -n compat32-%{name}
  197. %{_libdir}/libfontconfig.so.*
  198. %files -n compat32-%{name}-devel
  199. %{_libdir}/libfontconfig.so
  200. %endif
  201. %changelog
  202. * Mon Mar 3 2025 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.16.0-1
  203. - new upstream release.
  204. * Tue Oct 03 2023 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.14.2-1
  205. - new upstream release.
  206. * Tue Nov 01 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.14.1-1
  207. - new upstream release.
  208. * Fri Apr 10 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.13.1-1
  209. - new upstream release.
  210. - disabled Patch4.
  211. - updated Patch10.
  212. - truncated %%changelog: old logs are ChangeLog.fedora.
  213. * Fri Jan 05 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.12.6-1
  214. - new upstream release.
  215. - added BR:gperf.
  216. * Fri Mar 28 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.11.1-1
  217. - new upstream release
  218. * Mon Dec 30 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.11.0-1
  219. - new upstream release
  220. - remove Patch1,2
  221. * Tue May 07 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 2.10.92-2
  222. - install/enable 70-prefer-ja-font.conf and 59-morisawa-font-alias.conf (again)
  223. - enable 25-unhint-nonlatin.conf (again)
  224. - add patch0-2 from fedora package
  225. - patch0: less sleep in fc-cache
  226. - patch1: fix font matching issue
  227. - patch2: fix web font issue in firefox
  228. * Wed Apr 17 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.10.92-1
  229. - new upstream release
  230. - remove Patch1 (fontconfig-2.2.1-AppleRoman-DynaFont.patch)
  231. * Fri Dec 24 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.8.0-3
  232. - rebuild with freetype2-2.4.8
  233. - add Requires: expat-devel (-devel package)
  234. * Tue Sep 21 2010 IWAI, Masaharu <iwai@alib.jp> 2.8.0-2
  235. - build with rpm-4.8.1-1 for pkg-config file
  236. * Fri Jan 08 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 2.8.0-1
  237. - new upstream release
  238. - remove static libs
  239. * Sun Aug 16 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 2.7.1-3
  240. - update %%post
  241. * Thu Aug 06 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 2.7.1-2
  242. - add translated summary and description
  243. * Wed Aug 05 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 2.7.1-1
  244. - new upstream release
  245. * Mon Jul 20 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 2.7.0-2
  246. - add fc-query and fc-scan to %%files
  247. * Mon Jul 20 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 2.7.0-1
  248. - new upstream release
  249. - update 59-morisawa-font-alias.conf
  250. * Sun May 03 2009 NAKAMURA Kenta <kenta@vinelinux.org> 2.6.0-3
  251. - added compat32 package for x86_64 arch support
  252. * Tue Jan 06 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 2.6.0-2
  253. - update 59-morisawa-font-alias.conf
  254. - add FutoMin, FutoGo, Jun alias
  255. * Thu Jun 12 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 2.6.0-1
  256. - new upstream release
  257. - rename 10-prefer-ja-font.conf to 70-prefer-ja-font.conf
  258. * Thu May 29 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 2.5.0-3
  259. - add 10-prefer-ja-font.conf to prefer Japanese fonts.
  260. - add 59-morisawa-font-alias.conf
  261. - bind Ryumin to serif and GothicBBB to sans-serif
  262. * Mon May 12 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 2.5.0-2
  263. - add legacy font path for compatibility
  264. * Thu Apr 17 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 2.5.0-1
  265. - add Conflits/Obsoletes: XOrg-font-utils <= 6.9.0
  266. * Mon Dec 10 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 2.5.0-0vl1
  267. - initial build for Vine Linux
  268. - splitted from XOrg package.