Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 193476 | Differences between
and this patch

Collapse All | Expand All

(-)/usr/portage/media-libs/fontconfig/fontconfig-2.6.0-r2.ebuild (-3 / +31 lines)
Lines 101-114 Link Here
101
	doenvd "${T}"/37fontconfig
101
	doenvd "${T}"/37fontconfig
102
}
102
}
103
103
104
pkg_preinst() {
105
	# Bug #193476
106
	# /etc/fonts/conf.d/ contains symlinks to ../conf.avail/ to include various
107
	# config files.  If we install as-is, we'll blow away user settings.
108
109
	local f
110
111
	ebegin "Syncing configuration to system"
112
	if [[ -e ${ROOT}/etc/fonts/conf.d ]]; then
113
		for f in $(ls "${ROOT}"/etc/fonts/conf.avail/); do
114
			if [[ -L ${ROOT}/etc/fonts/conf.d/${f} ]]; then
115
				[[ -f ${D}etc/fonts/conf.avail/${f} ]] \
116
					&& ln -sf ../conf.avail/"${f}" "${D}"etc/fonts/conf.d/ &>/dev/null
117
			else
118
				[[ -f ${D}etc/fonts/conf.avail/${f} ]] \
119
					&& rm "${D}"etc/fonts/conf.d/"${f}" &>/dev/null
120
			fi
121
		done
122
	fi
123
	eend $?
124
}
125
104
pkg_postinst() {
126
pkg_postinst() {
127
	# clean up broken symlinks
128
	find -L "${ROOT}"etc/fonts/conf.d/ -lname "*" -print0 | xargs -0 rm
129
105
	echo
130
	echo
106
	ewarn "Please make fontconfig configuration changes in /etc/fonts/conf.d/"
131
	ewarn "Please make fontconfig configuration changes using \`eselect fontconfig\`"
107
	ewarn "and NOT to /etc/fonts/fonts.conf, as it will be replaced!"
132
	ewarn "Any changes made to /etc/fonts/fonts.conf will be overwritten."
133
	ewarn
134
	ewarn "If you need to reset your configuration to upstream defaults, delete"
135
	ewarn "the directory ${ROOT}etc/fonts/conf.d/ and re-emerge fontconfig."
108
	echo
136
	echo
109
137
110
	if [[ ${ROOT} = / ]]; then
138
	if [[ ${ROOT} = / ]]; then
111
		ebegin "Creating global font cache..."
139
		ebegin "Creating global font cache"
112
		/usr/bin/fc-cache -sr
140
		/usr/bin/fc-cache -sr
113
		eend $?
141
		eend $?
114
	fi
142
	fi

Return to bug 193476