Gentoo Archives: gentoo-commits

From: "Ryan Hill (dirtyepic)" <dirtyepic@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in media-libs/fontconfig: fontconfig-2.7.1-r1.ebuild ChangeLog
Date: Sun, 23 Aug 2009 22:48:24
Message-Id: E1MfLrJ-0000Hh-JI@stork.gentoo.org
1 dirtyepic 09/08/23 22:48:21
2
3 Modified: ChangeLog
4 Added: fontconfig-2.7.1-r1.ebuild
5 Log:
6 Fix sandbox violations on /var/cache/fontconfig. Bug #278221, #282021,
7 #282402, and I'm sure many others.
8 (Portage version: 2.2_rc39/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.135 media-libs/fontconfig/ChangeLog
12
13 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/fontconfig/ChangeLog?rev=1.135&view=markup
14 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/fontconfig/ChangeLog?rev=1.135&content-type=text/plain
15 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/fontconfig/ChangeLog?r1=1.134&r2=1.135
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/media-libs/fontconfig/ChangeLog,v
20 retrieving revision 1.134
21 retrieving revision 1.135
22 diff -u -r1.134 -r1.135
23 --- ChangeLog 16 Aug 2009 21:38:44 -0000 1.134
24 +++ ChangeLog 23 Aug 2009 22:48:21 -0000 1.135
25 @@ -1,6 +1,12 @@
26 # ChangeLog for media-libs/fontconfig
27 # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/media-libs/fontconfig/ChangeLog,v 1.134 2009/08/16 21:38:44 dirtyepic Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/media-libs/fontconfig/ChangeLog,v 1.135 2009/08/23 22:48:21 dirtyepic Exp $
30 +
31 +*fontconfig-2.7.1-r1 (23 Aug 2009)
32 +
33 + 23 Aug 2009; Ryan Hill <dirtyepic@g.o> +fontconfig-2.7.1-r1.ebuild:
34 + Fix sandbox violations on /var/cache/fontconfig. Bug #278221, #282021,
35 + #282402, and I'm sure many others.
36
37 *fontconfig-2.7.1 (16 Aug 2009)
38
39
40
41
42 1.1 media-libs/fontconfig/fontconfig-2.7.1-r1.ebuild
43
44 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/fontconfig/fontconfig-2.7.1-r1.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/fontconfig/fontconfig-2.7.1-r1.ebuild?rev=1.1&content-type=text/plain
46
47 Index: fontconfig-2.7.1-r1.ebuild
48 ===================================================================
49 # Copyright 1999-2009 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/media-libs/fontconfig/fontconfig-2.7.1-r1.ebuild,v 1.1 2009/08/23 22:48:21 dirtyepic Exp $
52
53 EAPI="2"
54
55 inherit eutils libtool toolchain-funcs flag-o-matic
56
57 DESCRIPTION="A library for configuring and customizing font access"
58 HOMEPAGE="http://fontconfig.org/"
59 SRC_URI="http://fontconfig.org/release/${P}.tar.gz"
60
61 LICENSE="fontconfig"
62 SLOT="1.0"
63 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
64 IUSE="doc"
65
66 # Purposefully dropped the xml USE flag and libxml2 support. Having this is
67 # silly since expat is the preferred way to go per upstream and libxml2 support
68 # simply exists as a fallback when expat isn't around. expat support is the main
69 # way to go and every other distro uses it. By using the xml USE flag to enable
70 # libxml2 support, this confuses users and results in most people getting the
71 # non-standard behavior of libxml2 usage since most profiles have USE=xml
72
73 RDEPEND=">=media-libs/freetype-2.2.1
74 >=dev-libs/expat-1.95.3"
75 DEPEND="${RDEPEND}
76 dev-util/pkgconfig
77 doc? (
78 app-text/docbook-sgml-utils[jadetex]
79 =app-text/docbook-sgml-dtd-3.1*
80 )"
81 PDEPEND="app-admin/eselect-fontconfig"
82
83 src_prepare() {
84 epatch "${FILESDIR}"/${P}-latin-reorder.patch #130466
85 epunt_cxx #74077
86
87 # Needed to get a sane .so versioning on fbsd, please dont drop
88 # If you have to run eautoreconf, you can also leave the elibtoolize call as
89 # it will be a no-op.
90 elibtoolize
91 }
92
93 src_configure() {
94 local myconf
95 if tc-is-cross-compiler; then
96 myconf="--with-arch=${ARCH}"
97 replace-flags -mtune=* -DMTUNE_CENSORED
98 replace-flags -march=* -DMARCH_CENSORED
99 fi
100 econf $(use_enable doc docs) \
101 --localstatedir=/var \
102 --with-docdir=/usr/share/doc/${PF} \
103 --with-default-fonts=/usr/share/fonts \
104 --with-add-fonts=/usr/local/share/fonts \
105 ${myconf} || die
106 }
107
108 src_install() {
109 emake DESTDIR="${D}" install || die
110
111 #fc-lang directory contains language coverage datafiles
112 #which are needed to test the coverage of fonts.
113 insinto /usr/share/fc-lang
114 doins fc-lang/*.orth
115
116 insinto /etc/fonts
117 doins "${S}"/fonts.conf
118
119 doman $(find "${S}" -type f -name *.1 -print)
120 newman doc/fonts-conf.5 fonts.conf.5
121 dodoc doc/fontconfig-user.{txt,pdf}
122
123 if use doc; then
124 doman doc/Fc*.3
125 dohtml doc/fontconfig-devel.html
126 dodoc doc/fontconfig-devel.{txt,pdf}
127 fi
128
129 dodoc AUTHORS ChangeLog README || die
130
131 # Changes should be made to /etc/fonts/local.conf, and as we had
132 # too much problems with broken fonts.conf, we force update it ...
133 # <azarah@g.o> (11 Dec 2002)
134 echo 'CONFIG_PROTECT_MASK="/etc/fonts/fonts.conf"' > "${T}"/37fontconfig
135 doenvd "${T}"/37fontconfig
136
137 # As of fontconfig 2.7, everything sticks their noses in here.
138 dodir /etc/sandbox.d
139 echo 'SANDBOX_PREDICT="/var/cache/fontconfig"' > "${D}"/etc/sandbox.d/37fontconfig
140 }
141
142 pkg_preinst() {
143 # Bug #193476
144 # /etc/fonts/conf.d/ contains symlinks to ../conf.avail/ to include various
145 # config files. If we install as-is, we'll blow away user settings.
146
147 ebegin "Syncing fontconfig configuration to system"
148 if [[ -e ${ROOT}/etc/fonts/conf.d ]]; then
149 for file in "${ROOT}"/etc/fonts/conf.avail/*; do
150 f=${file##*/}
151 if [[ -L ${ROOT}/etc/fonts/conf.d/${f} ]]; then
152 [[ -f ${D}etc/fonts/conf.avail/${f} ]] \
153 && ln -sf ../conf.avail/"${f}" "${D}"etc/fonts/conf.d/ &>/dev/null
154 else
155 [[ -f ${D}etc/fonts/conf.avail/${f} ]] \
156 && rm "${D}"etc/fonts/conf.d/"${f}" &>/dev/null
157 fi
158 done
159 fi
160 eend $?
161 }
162
163 pkg_postinst() {
164 einfo "Cleaning broken symlinks in "${ROOT}"etc/fonts/conf.d/"
165 find -L "${ROOT}"etc/fonts/conf.d/ -type l -delete
166
167 echo
168 ewarn "Please make fontconfig configuration changes using \`eselect fontconfig\`"
169 ewarn "Any changes made to /etc/fonts/fonts.conf will be overwritten."
170 ewarn
171 ewarn "If you need to reset your configuration to upstream defaults, delete"
172 ewarn "the directory ${ROOT}etc/fonts/conf.d/ and re-emerge fontconfig."
173 echo
174
175 if [[ ${ROOT} = / ]]; then
176 ebegin "Creating global font cache"
177 /usr/bin/fc-cache -sr
178 eend $?
179 fi
180 }