From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- media-libs/fontconfig/Manifest | 14 ++ .../files/fontconfig-2.10.2-docbook.patch | 16 ++ .../files/fontconfig-2.11.1-fc-cache-r.patch | 26 ++++ .../files/fontconfig-2.12.2-gperf31.patch | 61 ++++++++ .../files/fontconfig-2.12.3-latin-update.patch | 68 +++++++++ .../files/fontconfig-2.7.1-latin-reorder.patch | 50 +++++++ media-libs/fontconfig/fontconfig-2.11.1-r2.ebuild | 159 ++++++++++++++++++++ media-libs/fontconfig/fontconfig-2.12.4.ebuild | 163 +++++++++++++++++++++ media-libs/fontconfig/fontconfig-2.12.6.ebuild | 161 ++++++++++++++++++++ media-libs/fontconfig/metadata.xml | 14 ++ 10 files changed, 732 insertions(+) create mode 100644 media-libs/fontconfig/Manifest create mode 100644 media-libs/fontconfig/files/fontconfig-2.10.2-docbook.patch create mode 100644 media-libs/fontconfig/files/fontconfig-2.11.1-fc-cache-r.patch create mode 100644 media-libs/fontconfig/files/fontconfig-2.12.2-gperf31.patch create mode 100644 media-libs/fontconfig/files/fontconfig-2.12.3-latin-update.patch create mode 100644 media-libs/fontconfig/files/fontconfig-2.7.1-latin-reorder.patch create mode 100644 media-libs/fontconfig/fontconfig-2.11.1-r2.ebuild create mode 100644 media-libs/fontconfig/fontconfig-2.12.4.ebuild create mode 100644 media-libs/fontconfig/fontconfig-2.12.6.ebuild create mode 100644 media-libs/fontconfig/metadata.xml (limited to 'media-libs/fontconfig') diff --git a/media-libs/fontconfig/Manifest b/media-libs/fontconfig/Manifest new file mode 100644 index 000000000000..28dd7b6473f9 --- /dev/null +++ b/media-libs/fontconfig/Manifest @@ -0,0 +1,14 @@ +AUX fontconfig-2.10.2-docbook.patch 648 SHA256 d4b5acc1fe079071cbe7b886769dc561d6318f9193c1e32ed2cca9720a3c346e SHA512 b0adb7c406445c25c96c5dc37af9e6fcc8c75a0752af255465673812bdc332ce43439a100c056744ace0dd5b3350596eedd612489c33d19a6f6cd182c08e2961 WHIRLPOOL b2cfd619aff49024190409c33bd5ff3754b88e5c04a30df52c90bf0ab9b4ce5cd5727423939b70538760bb1e7a02325d76426cf94bdb9e8eb165966b40767197 +AUX fontconfig-2.11.1-fc-cache-r.patch 854 SHA256 e2ff1b583ff569a3cb9540d6b5ab6ed2c81e8c7ff0c5557646c2e8c94714b963 SHA512 6f9fc84720fab01dc86ec626501114b5e8ab979e87057c40374afd31deeed4b424e5f576734a0214b666a8b1867294da138f25d8b4fcf39e1bd99ca951ff48a4 WHIRLPOOL 0aa128a1b71d170a85506e8ed7e6c18c469d42fa3884f017fa6bb1fae424bec582f8efc1c7fdccc2fd9abaa7961e9c5ebb69bf90fe08833075e96f00d9682283 +AUX fontconfig-2.12.2-gperf31.patch 2076 SHA256 dc804531d19cc4f6ac499e7ec6a566ca843331b20d8e3c4d3b1983e104558b64 SHA512 0a88b0e2f7ca0cf934779c7612b87d9a476ab1396a512dafb2e89d26655657b333fb1b442773088ffc559c19782258128f366f5fc8a0e754288a7ea288506a6f WHIRLPOOL 9a6171c411b9bb30fc5e231cd0b91b5461066c361fbb03975a800f75caee4db274a31a84f309464e63bdcf0b35a1d42cf727661af71728f446e4dcbe0fc50b44 +AUX fontconfig-2.12.3-latin-update.patch 2049 SHA256 8fd224aa804c3ff59b7d4848ed501126a0974ffd36fd41ddc0cd82a5946a0a38 SHA512 24520d40e7049d0fa5c05054dbe6d82149688d3e327b1818c6816bd3315de56969b040c88f8db0cbbf4f377d5ebf77199dbd3af5bc7bcae8bcaea69820d68ce6 WHIRLPOOL 1973e9d23c152fdb74eaffc427913df02d128281d1fd2b37be8bdf771f3203f834efdbc824623f686c984dd21149187f8a3b8d931380afb745073cdd57a259f3 +AUX fontconfig-2.7.1-latin-reorder.patch 1701 SHA256 cd27212a9e8a3045106fd427f2e5079ea348789c8760e7af443c2745479c8f82 SHA512 8fc514649e40ecd0c52e4fef9479e0945baa3aaa396335650bf827a983f6d9187b0f66ab97bf5b11b14917518b2e955b0a1bca126a336feafbebf754ff646d5d WHIRLPOOL e6e90c38c7ce04e297c48f5b9859c5e9230a59e9722dacde5ddd434cca8fbd33fab55f704df540eea3f3efd6ee05884987e6ce5da544d2b41f869e47ce3d259d +DIST fontconfig-2.11.1.tar.bz2 1516095 SHA256 dc62447533bca844463a3c3fd4083b57c90f18a70506e7a9f4936b5a1e516a99 SHA512 acf4e6293e0e5521e4b8f29f4b48860ecd1d39744d0eab21c7332e56bfc3ccc63548e459243c5e425b8e5ef265f2cf065eece02460725e794041219d41188149 WHIRLPOOL 45009a1e0fcbbe2f532c6f642a0d57af35af3f6abfb50098c89fe39c71da96597078eb4babdd80a713ef4456e07481d70def7c1c18b7314452136d5b30a4858b +DIST fontconfig-2.12.4.tar.bz2 1613580 SHA256 668293fcc4b3c59765cdee5cee05941091c0879edcc24dfec5455ef83912e45c SHA512 f336e9220afe738e0bf7186d87a5eb09842342ad99ca2102c69820a1f0b232e15c61ef72ae3f5d56503f5be32557d09180a80e05690e85b4eb13ed88f5cece81 WHIRLPOOL 6f0b98e80bdbe5077047b42c7b998a7879e8cd1a7d53598ed6d1cc7110e7ba99b4d3cac6c14875744f7d43e05f338eec1588934e5511e3b1cd8d28d7292fcd72 +DIST fontconfig-2.12.6.tar.bz2 1624683 SHA256 cf0c30807d08f6a28ab46c61b8dbd55c97d2f292cf88f3a07d3384687f31f017 SHA512 2a1d3e62cae2bfcae2e67e9cb75ab6534a35bda4215f1ad4b8bf757e77e7d9d609c016562f5288fd10046a0e94655a807f6dd044d7868ed81a146c4275c4dd06 WHIRLPOOL 45741ad1389604325bdd517098edf8075a4302d35c680eb5b2280732c112c4c65521fa6b84c58647b4629a57b244f5e717d8a70afc14f3b72a8652c0670a63de +EBUILD fontconfig-2.11.1-r2.ebuild 4782 SHA256 8268aa11db1e9caffe1a291c8953fd37c08956fce10543d1653090d1ec00703e SHA512 9062067b0c39210ce14f4ad02ca6c603db6d5ec766e2d250fcf617ad3f6f360e684ae148eaf12c0dbbb334d62f021081c9b1b59220a4f3afd77f0b84a3a13f33 WHIRLPOOL 65344c4ed3a29914f8873e6e5011beb80126ec7c2b26e8489a63546a93caf3d2969a164499da6c7e41830f1ed3dec161378aae718940b680f967173dc6253e91 +EBUILD fontconfig-2.12.4.ebuild 4942 SHA256 ef34f45160e5c2b486efcc8a586976b0675e3037be36554290bb4c10a5b92e15 SHA512 ad239f720f3e2d7b41dd2bfd4a59e4a9fac956729caf96877d00e4a451b489c3b553cdab09b7e6555da3fa72760249962bc983c583a6f36620e10fff39ec18b9 WHIRLPOOL cd8915efe60f02025637ea367a68a4e069712e04482c0eaef9b82b2cc03bb6514ff19a9c683dcf87162f5fbd63ffabf9a2ffcc7b2f39d545d73eae5da376fe80 +EBUILD fontconfig-2.12.6.ebuild 5020 SHA256 97cb85e7d0e94d684dbd6f5c3d3b2d1e88cb39ff8682ca465586a23a9a5152f1 SHA512 20223c6d58392074ef8658564005fd958b0bb67a6845b63e229290d6b5f9df5a907633c146ad5dd992ef4d0753d3e377209c42e47a9e638d281c3f1e98c58443 WHIRLPOOL b2d34feb73a50d99c1cd10cbd8179a25037e4b645f619fd01fa939e2f63ad6a9dec74a628f2a47df0ecc544ef6a6bb949329a22e290feba6785962e3ba4f9316 +MISC ChangeLog 5770 SHA256 c9221742e33a030313959675b5f682c25897719f28f8ba7af2850c660a56c59f SHA512 ef87a92a793840381bcf881f82d2fe98825c444bb9860bc8c9a68ade9267cb0f43a276e8d5f2065593e21159417efe061fb485d8d7fa6c1a93d1e3d67fca5d47 WHIRLPOOL 937c014ed54b4452223b1f77517fc09d60a2580ab004ecf2dc21519300dce952b7c2069868dbeb715482e03ac396edd3392d13fc8c6513e6165e56f702c7dda3 +MISC ChangeLog-2015 33957 SHA256 e0e85ce1c486a420faca4a4adcb554cc657cb62dcfffd864a598ac2412861c60 SHA512 c019b1309548ec84af1be4024f8be15c2dcae3f14509ba764529f6a0f0d1059d9796be1886800ff3a06cb268e39b7034a361d8ebc7d4727f30b37bcec060bfca WHIRLPOOL f98ee99b1f9b53495a049d7d6df8f1452904d35742084e1ec32ee0414489895ab9a7cffcd4c2fedf726ec3dc1269fb794e55ac109f9ce9d81fbdbb638c44693f +MISC metadata.xml 729 SHA256 21782b4f8a2109210a58ae62a817e18fb29a627d5ce1b04f833e88a08ca6ad75 SHA512 1564dd34d88ce11248bfd5ea6b508eafbc30a4e6ff47f3b9076fbc9f900cf8fe4722a2095512bf7bb659e83fc690d4dbc6b82746a8a38e862577dd09ce7b4a7b WHIRLPOOL bcdb927588f2581d5a7142c6ed0c55267abd18530fe8403c993f292bbc229875d062c63b679bd602750f805ecb23658881b10db1c55d6deebe6d75a74b0d32a8 diff --git a/media-libs/fontconfig/files/fontconfig-2.10.2-docbook.patch b/media-libs/fontconfig/files/fontconfig-2.10.2-docbook.patch new file mode 100644 index 000000000000..33d6549c8147 --- /dev/null +++ b/media-libs/fontconfig/files/fontconfig-2.10.2-docbook.patch @@ -0,0 +1,16 @@ +diff --unified -uNrp fontconfig-2.10.2-orig/configure.ac fontconfig-2.10.2/configure.ac +--- fontconfig-2.10.2-orig/configure.ac 2012-11-26 09:21:13.000000000 +0100 ++++ fontconfig-2.10.2/configure.ac 2013-01-05 15:40:54.541682239 +0100 +@@ -570,7 +570,11 @@ AC_SUBST(XMLDIR) + # Let people not build/install docs if they don't have docbook + # + +-AC_CHECK_PROG(HASDOCBOOK, docbook2html, yes, no) ++AC_ARG_ENABLE(docbook, [ --disable-docbook Don't build documentation],,) ++ ++if test x$enable_docbook != xno; then ++ AC_CHECK_PROG(HASDOCBOOK, docbook2html, yes, no) ++fi + + AM_CONDITIONAL(USEDOCBOOK, test "x$HASDOCBOOK" = xyes) + diff --git a/media-libs/fontconfig/files/fontconfig-2.11.1-fc-cache-r.patch b/media-libs/fontconfig/files/fontconfig-2.11.1-fc-cache-r.patch new file mode 100644 index 000000000000..48f67f12974d --- /dev/null +++ b/media-libs/fontconfig/files/fontconfig-2.11.1-fc-cache-r.patch @@ -0,0 +1,26 @@ +From f44157c809d280e2a0ce87fb078fc4b278d24a67 Mon Sep 17 00:00:00 2001 +From: Akira TAGOH +Date: Thu, 10 Apr 2014 19:27:55 +0900 +Subject: Fix fc-cache fail with -r + +Do not unlink the cache even if --really-force is given. +because re-scanning process expects the cache exists. + +https://bugs.freedesktop.org/show_bug.cgi?id=77252 + +diff --git a/fc-cache/fc-cache.c b/fc-cache/fc-cache.c +index 99e0e9f..90ebad3 100644 +--- a/fc-cache/fc-cache.c ++++ b/fc-cache/fc-cache.c +@@ -388,7 +388,7 @@ main (int argc, char **argv) + list = FcStrListCreate (updateDirs); + if (list) + { +- ret += scanDirs (list, config, FcTrue, really_force, verbose, FcFalse, &changed, NULL); ++ ret += scanDirs (list, config, FcTrue, FcFalse, verbose, FcFalse, &changed, NULL); + FcStrListDone (list); + } + FcStrSetDestroy (updateDirs); +-- +cgit v0.10.2 + diff --git a/media-libs/fontconfig/files/fontconfig-2.12.2-gperf31.patch b/media-libs/fontconfig/files/fontconfig-2.12.2-gperf31.patch new file mode 100644 index 000000000000..ce90c450b360 --- /dev/null +++ b/media-libs/fontconfig/files/fontconfig-2.12.2-gperf31.patch @@ -0,0 +1,61 @@ +From 9878b306f6c673d3d6cd9db487f67eb426cc03df Mon Sep 17 00:00:00 2001 +From: Akira TAGOH +Date: Thu, 23 Feb 2017 21:39:10 +0900 +Subject: Fix the build issue with gperf 3.1 + +To support the one of changes in gperf 3.1: +* The 'len' parameter of the hash function and of the lookup function is now + of type 'size_t' instead of 'unsigned int'. This makes it safe to call these + functions with strings of length > 4 GB, on 64-bit machines. + +diff --git a/configure.ac b/configure.ac +index 4948816..8fbf3d3 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -193,6 +193,26 @@ fi + AC_CHECK_MEMBERS([struct dirent.d_type],,, + [#include ]) + ++# Check the argument type of the gperf hash/lookup function ++AC_MSG_CHECKING([The type of len parameter of gperf hash/lookup function]) ++fc_gperf_test="$(echo 'foo' | gperf -L ANSI-C)" ++AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ++ #include ++ ++ const char *in_word_set(register const char *, register size_t); ++ $fc_gperf_test ++ ]])], [FC_GPERF_SIZE_T=size_t], ++ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ++ #include ++ ++ const char *in_word_set(register const char *, register unsigned int); ++ $fc_gperf_test ++ ]])], [FC_GPERF_SIZE_T="unsigned int"], ++ [AC_MSG_ERROR([Unable to determine the type of the len parameter of the gperf hash/lookup function])] ++)]) ++AC_DEFINE_UNQUOTED(FC_GPERF_SIZE_T, $FC_GPERF_SIZE_T, [The type of len parameter of the gperf hash/lookup function]) ++AC_MSG_RESULT($FC_GPERF_SIZE_T) ++ + # + # Checks for iconv + # +diff --git a/src/fcobjs.c b/src/fcobjs.c +index 16ff31c..33bba8d 100644 +--- a/src/fcobjs.c ++++ b/src/fcobjs.c +@@ -25,10 +25,10 @@ + #include "fcint.h" + + static unsigned int +-FcObjectTypeHash (register const char *str, register unsigned int len); ++FcObjectTypeHash (register const char *str, register FC_GPERF_SIZE_T len); + + static const struct FcObjectTypeInfo * +-FcObjectTypeLookup (register const char *str, register unsigned int len); ++FcObjectTypeLookup (register const char *str, register FC_GPERF_SIZE_T len); + + #include "fcobjshash.h" + +-- +cgit v0.10.2 + diff --git a/media-libs/fontconfig/files/fontconfig-2.12.3-latin-update.patch b/media-libs/fontconfig/files/fontconfig-2.12.3-latin-update.patch new file mode 100644 index 000000000000..397781e87acd --- /dev/null +++ b/media-libs/fontconfig/files/fontconfig-2.12.3-latin-update.patch @@ -0,0 +1,68 @@ +--- fontconfig-2.12.3/conf.d/60-latin.conf ++++ fontconfig-2.12.3/conf.d/60-latin.conf +@@ -4,47 +4,50 @@ + + serif + +- Bitstream Vera Serif ++ Liberation Serif + DejaVu Serif + Times New Roman +- Thorndale AMT + Luxi Serif + Nimbus Roman No9 L + Nimbus Roman + Times ++ Thorndale AMT ++ Bitstream Vera Serif + + + + sans-serif + +- Bitstream Vera Sans ++ Liberation Sans + DejaVu Sans +- Verdana + Arial +- Albany AMT + Luxi Sans + Nimbus Sans L + Nimbus Sans + Helvetica + Lucida Sans Unicode + BPG Glaho International ++ Verdana + Tahoma ++ Albany AMT ++ Bitstream Vera Sans + + + + monospace + +- Bitstream Vera Sans Mono ++ Liberation Mono + DejaVu Sans Mono + Inconsolata + Andale Mono + Courier New +- Cumberland AMT + Luxi Mono + Nimbus Mono L + Nimbus Mono + Nimbus Mono PS + Courier ++ Cumberland AMT ++ Bitstream Vera Sans Mono + + + + Tahoma +@@ -32,14 +32,14 @@ + + monospace + +- Bitstream Vera Sans Mono + DejaVu Sans Mono ++ Bitstream Vera Sans Mono + Inconsolata ++ Luxi Mono ++ Nimbus Mono L + Andale Mono + Courier New + Cumberland AMT +- Luxi Mono +- Nimbus Mono L + Courier + + diff --git a/media-libs/fontconfig/fontconfig-2.11.1-r2.ebuild b/media-libs/fontconfig/fontconfig-2.11.1-r2.ebuild new file mode 100644 index 000000000000..4c25251a5b50 --- /dev/null +++ b/media-libs/fontconfig/fontconfig-2.11.1-r2.ebuild @@ -0,0 +1,159 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +AUTOTOOLS_AUTORECONF=yes + +inherit eutils readme.gentoo autotools-multilib + +DESCRIPTION="A library for configuring and customizing font access" +HOMEPAGE="http://fontconfig.org/" +SRC_URI="http://fontconfig.org/release/${P}.tar.bz2" + +LICENSE="MIT" +SLOT="1.0" +KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" +IUSE="doc static-libs" + +# Purposefully dropped the xml USE flag and libxml2 support. Expat is the +# default and used by every distro. See bug #283191. + +RDEPEND=">=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}] + >=media-libs/freetype-2.5.3-r1[${MULTILIB_USEDEP}] + abi_x86_32? ( !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)] )" +DEPEND="${RDEPEND} + virtual/pkgconfig + doc? ( + =app-text/docbook-sgml-dtd-3.1* + app-text/docbook-sgml-utils[jadetex] + )" +PDEPEND="!x86-winnt? ( app-eselect/eselect-fontconfig ) + virtual/ttf-fonts" + +PATCHES=( + "${FILESDIR}"/${PN}-2.7.1-latin-reorder.patch # 130466 + "${FILESDIR}"/${PN}-2.10.2-docbook.patch # 310157 + "${FILESDIR}"/${PN}-2.11.1-fc-cache-r.patch # 531748 +) + +MULTILIB_CHOST_TOOLS=( + /usr/bin/fc-cache$(get_exeext) +) + +pkg_setup() { + DOC_CONTENTS="Please make fontconfig configuration changes using + \`eselect fontconfig\`. Any changes made to /etc/fonts/fonts.conf will be + overwritten. If you need to reset your configuration to upstream defaults, + delete the directory ${EROOT}etc/fonts/conf.d/ and re-emerge fontconfig." +} + +src_configure() { + local addfonts + # harvest some font locations, such that users can benefit from the + # host OS's installed fonts + case ${CHOST} in + *-darwin*) + addfonts=",/Library/Fonts,/System/Library/Fonts" + ;; + *-solaris*) + [[ -d /usr/X/lib/X11/fonts/TrueType ]] && \ + addfonts=",/usr/X/lib/X11/fonts/TrueType" + [[ -d /usr/X/lib/X11/fonts/Type1 ]] && \ + addfonts="${addfonts},/usr/X/lib/X11/fonts/Type1" + ;; + *-linux-gnu) + use prefix && [[ -d /usr/share/fonts ]] && \ + addfonts=",/usr/share/fonts" + ;; + esac + + local myeconfargs=( + $(use_enable doc docbook) + # always enable docs to install manpages + --enable-docs + --localstatedir="${EPREFIX}"/var + --with-default-fonts="${EPREFIX}"/usr/share/fonts + --with-add-fonts="${EPREFIX}/usr/local/share/fonts${addfonts}" \ + --with-templatedir="${EPREFIX}"/etc/fonts/conf.avail + ) + + autotools-multilib_src_configure +} + +multilib_src_install() { + default + + # XXX: avoid calling this multiple times, bug #459210 + if multilib_is_native_abi; then + # stuff installed from build-dir + emake -C doc DESTDIR="${D}" install-man + + insinto /etc/fonts + doins fonts.conf + fi +} + +multilib_src_install_all() { + einstalldocs + prune_libtool_files --all + + #fc-lang directory contains language coverage datafiles + #which are needed to test the coverage of fonts. + insinto /usr/share/fc-lang + doins fc-lang/*.orth + + dodoc doc/fontconfig-user.{txt,pdf} + + if [[ -e ${ED}usr/share/doc/fontconfig/ ]]; then + mv "${ED}"usr/share/doc/fontconfig/* "${ED}"/usr/share/doc/${P} || die + rm -rf "${ED}"usr/share/doc/fontconfig + fi + + # Changes should be made to /etc/fonts/local.conf, and as we had + # too much problems with broken fonts.conf we force update it ... + echo 'CONFIG_PROTECT_MASK="/etc/fonts/fonts.conf"' > "${T}"/37fontconfig + doenvd "${T}"/37fontconfig + + # As of fontconfig 2.7, everything sticks their noses in here. + dodir /etc/sandbox.d + echo 'SANDBOX_PREDICT="/var/cache/fontconfig"' > "${ED}"/etc/sandbox.d/37fontconfig + + readme.gentoo_create_doc +} + +pkg_preinst() { + # Bug #193476 + # /etc/fonts/conf.d/ contains symlinks to ../conf.avail/ to include various + # config files. If we install as-is, we'll blow away user settings. + ebegin "Syncing fontconfig configuration to system" + if [[ -e ${EROOT}/etc/fonts/conf.d ]]; then + for file in "${EROOT}"/etc/fonts/conf.avail/*; do + f=${file##*/} + if [[ -L ${EROOT}/etc/fonts/conf.d/${f} ]]; then + [[ -f ${ED}etc/fonts/conf.avail/${f} ]] \ + && ln -sf ../conf.avail/"${f}" "${ED}"etc/fonts/conf.d/ &>/dev/null + else + [[ -f ${ED}etc/fonts/conf.avail/${f} ]] \ + && rm "${ED}"etc/fonts/conf.d/"${f}" &>/dev/null + fi + done + fi + eend $? +} + +pkg_postinst() { + einfo "Cleaning broken symlinks in "${EROOT}"etc/fonts/conf.d/" + find -L "${EROOT}"etc/fonts/conf.d/ -type l -delete + + readme.gentoo_print_elog + + if [[ ${ROOT} = / ]]; then + multilib_pkg_postinst() { + ebegin "Creating global font cache for ${ABI}" + "${EPREFIX}"/usr/bin/${CHOST}-fc-cache -srf + eend $? + } + + multilib_parallel_foreach_abi multilib_pkg_postinst + fi +} diff --git a/media-libs/fontconfig/fontconfig-2.12.4.ebuild b/media-libs/fontconfig/fontconfig-2.12.4.ebuild new file mode 100644 index 000000000000..545c0af59142 --- /dev/null +++ b/media-libs/fontconfig/fontconfig-2.12.4.ebuild @@ -0,0 +1,163 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit autotools multilib-minimal readme.gentoo-r1 + +DESCRIPTION="A library for configuring and customizing font access" +HOMEPAGE="http://fontconfig.org/" +SRC_URI="http://fontconfig.org/release/${P}.tar.bz2" + +LICENSE="MIT" +SLOT="1.0" +KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" +IUSE="doc static-libs" + +# Purposefully dropped the xml USE flag and libxml2 support. Expat is the +# default and used by every distro. See bug #283191. +RDEPEND=">=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}] + >=media-libs/freetype-2.5.3-r1[${MULTILIB_USEDEP}] + abi_x86_32? ( !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)] )" +DEPEND="${RDEPEND} + virtual/pkgconfig + doc? ( =app-text/docbook-sgml-dtd-3.1* + app-text/docbook-sgml-utils[jadetex] )" +PDEPEND="!x86-winnt? ( app-eselect/eselect-fontconfig ) + virtual/ttf-fonts" + +PATCHES=( + "${FILESDIR}"/${PN}-2.10.2-docbook.patch # 310157 + "${FILESDIR}"/${PN}-2.12.3-latin-update.patch # 130466 + make liberation default +) + +MULTILIB_CHOST_TOOLS=( /usr/bin/fc-cache$(get_exeext) ) + +pkg_setup() { + DOC_CONTENTS="Please make fontconfig configuration changes using + \`eselect fontconfig\`. Any changes made to /etc/fonts/fonts.conf will be + overwritten. If you need to reset your configuration to upstream defaults, + delete the directory ${EROOT}etc/fonts/conf.d/ and re-emerge fontconfig." +} + +src_prepare() { + default + + # Revert gperf-3.1 fix as it breaks compilation + eapply -R "${FILESDIR}"/${PN}-2.12.2-gperf31.patch + export GPERF=$(type -P true) + + eautoreconf +} + +multilib_src_configure() { + local addfonts + # harvest some font locations, such that users can benefit from the + # host OS's installed fonts + case ${CHOST} in + *-darwin*) + addfonts=",/Library/Fonts,/System/Library/Fonts" + ;; + *-solaris*) + [[ -d /usr/X/lib/X11/fonts/TrueType ]] && \ + addfonts=",/usr/X/lib/X11/fonts/TrueType" + [[ -d /usr/X/lib/X11/fonts/Type1 ]] && \ + addfonts="${addfonts},/usr/X/lib/X11/fonts/Type1" + ;; + *-linux-gnu) + use prefix && [[ -d /usr/share/fonts ]] && \ + addfonts=",/usr/share/fonts" + ;; + esac + + local myeconfargs=( + $(use_enable doc docbook) + $(use_enable static-libs static) + --enable-docs + --localstatedir="${EPREFIX}"/var + --with-default-fonts="${EPREFIX}"/usr/share/fonts + --with-add-fonts="${EPREFIX}/usr/local/share/fonts${addfonts}" + --with-templatedir="${EPREFIX}"/etc/fonts/conf.avail + ) + + ECONF_SOURCE="${S}" \ + econf "${myeconfargs[@]}" +} + +multilib_src_install() { + default + + # avoid calling this multiple times, bug #459210 + if multilib_is_native_abi; then + # stuff installed from build-dir + emake -C doc DESTDIR="${D}" install-man + + insinto /etc/fonts + doins fonts.conf + fi +} + +multilib_src_install_all() { + einstalldocs + find "${ED}" -name "*.la" -delete || die + + # fc-lang directory contains language coverage datafiles + # which are needed to test the coverage of fonts. + insinto /usr/share/fc-lang + doins fc-lang/*.orth + + dodoc doc/fontconfig-user.{txt,pdf} + + if [[ -e ${ED}usr/share/doc/fontconfig/ ]]; then + mv "${ED}"usr/share/doc/fontconfig/* "${ED}"/usr/share/doc/${P} || die + rm -rf "${ED}"usr/share/doc/fontconfig + fi + + # Changes should be made to /etc/fonts/local.conf, and as we had + # too much problems with broken fonts.conf we force update it ... + echo 'CONFIG_PROTECT_MASK="/etc/fonts/fonts.conf"' > "${T}"/37fontconfig + doenvd "${T}"/37fontconfig + + # As of fontconfig 2.7, everything sticks their noses in here. + dodir /etc/sandbox.d + echo 'SANDBOX_PREDICT="/var/cache/fontconfig"' > "${ED}"/etc/sandbox.d/37fontconfig + + readme.gentoo_create_doc +} + +pkg_preinst() { + # Bug #193476 + # /etc/fonts/conf.d/ contains symlinks to ../conf.avail/ to include various + # config files. If we install as-is, we'll blow away user settings. + ebegin "Syncing fontconfig configuration to system" + if [[ -e ${EROOT}/etc/fonts/conf.d ]]; then + for file in "${EROOT}"/etc/fonts/conf.avail/*; do + f=${file##*/} + if [[ -L ${EROOT}/etc/fonts/conf.d/${f} ]]; then + [[ -f ${ED}etc/fonts/conf.avail/${f} ]] \ + && ln -sf ../conf.avail/"${f}" "${ED}"etc/fonts/conf.d/ &>/dev/null + else + [[ -f ${ED}etc/fonts/conf.avail/${f} ]] \ + && rm "${ED}"etc/fonts/conf.d/"${f}" &>/dev/null + fi + done + fi + eend $? +} + +pkg_postinst() { + einfo "Cleaning broken symlinks in "${EROOT}"etc/fonts/conf.d/" + find -L "${EROOT}"etc/fonts/conf.d/ -type l -delete + + readme.gentoo_print_elog + + if [[ ${ROOT} = / ]]; then + multilib_pkg_postinst() { + ebegin "Creating global font cache for ${ABI}" + "${EPREFIX}"/usr/bin/${CHOST}-fc-cache -srf + eend $? + } + + multilib_parallel_foreach_abi multilib_pkg_postinst + fi +} diff --git a/media-libs/fontconfig/fontconfig-2.12.6.ebuild b/media-libs/fontconfig/fontconfig-2.12.6.ebuild new file mode 100644 index 000000000000..6cfcc3f9fb4a --- /dev/null +++ b/media-libs/fontconfig/fontconfig-2.12.6.ebuild @@ -0,0 +1,161 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit autotools multilib-minimal readme.gentoo-r1 + +DESCRIPTION="A library for configuring and customizing font access" +HOMEPAGE="http://fontconfig.org/" +SRC_URI="http://fontconfig.org/release/${P}.tar.bz2" + +LICENSE="MIT" +SLOT="1.0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" +IUSE="doc static-libs" + +# Purposefully dropped the xml USE flag and libxml2 support. Expat is the +# default and used by every distro. See bug #283191. +RDEPEND=">=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}] + >=media-libs/freetype-2.5.3-r1[${MULTILIB_USEDEP}] + abi_x86_32? ( !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)] )" +DEPEND="${RDEPEND} + virtual/pkgconfig + doc? ( =app-text/docbook-sgml-dtd-3.1* + app-text/docbook-sgml-utils[jadetex] )" +PDEPEND="!x86-winnt? ( app-eselect/eselect-fontconfig ) + virtual/ttf-fonts" + +PATCHES=( + "${FILESDIR}"/${PN}-2.10.2-docbook.patch # 310157 + "${FILESDIR}"/${PN}-2.12.3-latin-update.patch # 130466 + make liberation default +) + +MULTILIB_CHOST_TOOLS=( /usr/bin/fc-cache$(get_exeext) ) + +pkg_setup() { + DOC_CONTENTS="Please make fontconfig configuration changes using + \`eselect fontconfig\`. Any changes made to /etc/fonts/fonts.conf will be + overwritten. If you need to reset your configuration to upstream defaults, + delete the directory ${EROOT}etc/fonts/conf.d/ and re-emerge fontconfig." +} + +src_prepare() { + default + export GPERF=$(type -P true) # avoid dependency on gperf, #631980 + sed -i -e 's/FC_GPERF_SIZE_T="unsigned int"/FC_GPERF_SIZE_T=size_t/' \ + configure.ac || die # rest of gperf dependency fix, #631920 + eautoreconf +} + +multilib_src_configure() { + local addfonts + # harvest some font locations, such that users can benefit from the + # host OS's installed fonts + case ${CHOST} in + *-darwin*) + addfonts=",/Library/Fonts,/System/Library/Fonts" + ;; + *-solaris*) + [[ -d /usr/X/lib/X11/fonts/TrueType ]] && \ + addfonts=",/usr/X/lib/X11/fonts/TrueType" + [[ -d /usr/X/lib/X11/fonts/Type1 ]] && \ + addfonts="${addfonts},/usr/X/lib/X11/fonts/Type1" + ;; + *-linux-gnu) + use prefix && [[ -d /usr/share/fonts ]] && \ + addfonts=",/usr/share/fonts" + ;; + esac + + local myeconfargs=( + $(use_enable doc docbook) + $(use_enable static-libs static) + --enable-docs + --localstatedir="${EPREFIX}"/var + --with-default-fonts="${EPREFIX}"/usr/share/fonts + --with-add-fonts="${EPREFIX}/usr/local/share/fonts${addfonts}" + --with-templatedir="${EPREFIX}"/etc/fonts/conf.avail + ) + + ECONF_SOURCE="${S}" \ + econf "${myeconfargs[@]}" +} + +multilib_src_install() { + default + + # avoid calling this multiple times, bug #459210 + if multilib_is_native_abi; then + # stuff installed from build-dir + emake -C doc DESTDIR="${D}" install-man + + insinto /etc/fonts + doins fonts.conf + fi +} + +multilib_src_install_all() { + einstalldocs + find "${ED}" -name "*.la" -delete || die + + # fc-lang directory contains language coverage datafiles + # which are needed to test the coverage of fonts. + insinto /usr/share/fc-lang + doins fc-lang/*.orth + + dodoc doc/fontconfig-user.{txt,pdf} + + if [[ -e ${ED}usr/share/doc/fontconfig/ ]]; then + mv "${ED}"usr/share/doc/fontconfig/* "${ED}"/usr/share/doc/${P} || die + rm -rf "${ED}"usr/share/doc/fontconfig + fi + + # Changes should be made to /etc/fonts/local.conf, and as we had + # too much problems with broken fonts.conf we force update it ... + echo 'CONFIG_PROTECT_MASK="/etc/fonts/fonts.conf"' > "${T}"/37fontconfig + doenvd "${T}"/37fontconfig + + # As of fontconfig 2.7, everything sticks their noses in here. + dodir /etc/sandbox.d + echo 'SANDBOX_PREDICT="/var/cache/fontconfig"' > "${ED}"/etc/sandbox.d/37fontconfig + + readme.gentoo_create_doc +} + +pkg_preinst() { + # Bug #193476 + # /etc/fonts/conf.d/ contains symlinks to ../conf.avail/ to include various + # config files. If we install as-is, we'll blow away user settings. + ebegin "Syncing fontconfig configuration to system" + if [[ -e ${EROOT}/etc/fonts/conf.d ]]; then + for file in "${EROOT}"/etc/fonts/conf.avail/*; do + f=${file##*/} + if [[ -L ${EROOT}/etc/fonts/conf.d/${f} ]]; then + [[ -f ${ED}etc/fonts/conf.avail/${f} ]] \ + && ln -sf ../conf.avail/"${f}" "${ED}"etc/fonts/conf.d/ &>/dev/null + else + [[ -f ${ED}etc/fonts/conf.avail/${f} ]] \ + && rm "${ED}"etc/fonts/conf.d/"${f}" &>/dev/null + fi + done + fi + eend $? +} + +pkg_postinst() { + einfo "Cleaning broken symlinks in "${EROOT}"etc/fonts/conf.d/" + find -L "${EROOT}"etc/fonts/conf.d/ -type l -delete + + readme.gentoo_print_elog + + if [[ ${ROOT} = / ]]; then + multilib_pkg_postinst() { + ebegin "Creating global font cache for ${ABI}" + "${EPREFIX}"/usr/bin/${CHOST}-fc-cache -srf + eend $? + } + + multilib_parallel_foreach_abi multilib_pkg_postinst + fi +} diff --git a/media-libs/fontconfig/metadata.xml b/media-libs/fontconfig/metadata.xml new file mode 100644 index 000000000000..799bd650c046 --- /dev/null +++ b/media-libs/fontconfig/metadata.xml @@ -0,0 +1,14 @@ + + + + + multilib@gentoo.org + gx86-multilib project + Handling the bugs related to multilib support in the package and related changes. + + + fonts@gentoo.org + Fonts + + Fontconfig is a font configuration and customization library, which does not depend on the X Window System. It is designed to locate fonts within the system and select them according to requirements specified by applications. + -- cgit v1.2.3