diff options
author | 2005-10-31 16:59:44 +0000 | |
---|---|---|
committer | 2005-10-31 16:59:44 +0000 | |
commit | 8d737e1dc940654dc3db132d496af75acaa9cd33 (patch) | |
tree | a1f321b4b6dc2cf2071bc71c0676e3e0a6270c38 /x11-libs/gtk+ | |
parent | Version bumped. (diff) | |
download | gentoo-2-8d737e1dc940654dc3db132d496af75acaa9cd33.tar.gz gentoo-2-8d737e1dc940654dc3db132d496af75acaa9cd33.tar.bz2 gentoo-2-8d737e1dc940654dc3db132d496af75acaa9cd33.zip |
Fix logic around GTK2_CONFDIR to make the postinst hook work on binary packages.
(Portage version: 2.0.53_rc7)
Diffstat (limited to 'x11-libs/gtk+')
-rw-r--r-- | x11-libs/gtk+/ChangeLog | 7 | ||||
-rw-r--r-- | x11-libs/gtk+/gtk+-2.6.10.ebuild | 26 | ||||
-rw-r--r-- | x11-libs/gtk+/gtk+-2.8.6.ebuild | 22 |
3 files changed, 38 insertions, 17 deletions
diff --git a/x11-libs/gtk+/ChangeLog b/x11-libs/gtk+/ChangeLog index 42decdae7377..9ae79f8a8f1c 100644 --- a/x11-libs/gtk+/ChangeLog +++ b/x11-libs/gtk+/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for x11-libs/gtk+ # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/x11-libs/gtk+/ChangeLog,v 1.193 2005/10/27 21:43:24 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-libs/gtk+/ChangeLog,v 1.194 2005/10/31 16:59:44 leonardop Exp $ + + 31 Oct 2005; Leonardo Boshell <leonardop@gentoo.org> gtk+-2.6.10.ebuild, + gtk+-2.8.6.ebuild: + Fix logic around GTK2_CONFDIR to make the postinst hook work on binary + packages. 27 Oct 2005; Diego Pettenò <flameeyes@gentoo.org> +files/gtk+-2.8.6-freebsd.patch, gtk+-2.8.6.ebuild: diff --git a/x11-libs/gtk+/gtk+-2.6.10.ebuild b/x11-libs/gtk+/gtk+-2.6.10.ebuild index b6f19f878fc1..d44d4b7771f5 100644 --- a/x11-libs/gtk+/gtk+-2.6.10.ebuild +++ b/x11-libs/gtk+/gtk+-2.6.10.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/x11-libs/gtk+/gtk+-2.6.10.ebuild,v 1.3 2005/10/22 15:11:38 nigoro Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-libs/gtk+/gtk+-2.6.10.ebuild,v 1.4 2005/10/31 16:59:44 leonardop Exp $ inherit flag-o-matic eutils @@ -30,16 +30,18 @@ DEPEND="${RDEPEND} >=sys-devel/automake-1.7.9 doc? ( >=dev-util/gtk-doc-1 )" -# An arch specific config directory is used on multilib systems -has_multilib_profile && GTK2_CONFDIR="/etc/gtk-2.0/${CHOST}" -use x86 && [ "$(get_libdir)" == "lib32" ] && GTK2_CONFDIR="/etc/gtk-2.0/${CHOST}" -GTK2_CONFDIR=${GTK2_CONFDIR:=/etc/gtk-2.0/} -src_unpack() { +set_gtk2_confdir() { + # An arch specific config directory is used on multilib systems + has_multilib_profile && GTK2_CONFDIR="/etc/gtk-2.0/${CHOST}" + use x86 && [ "$(get_libdir)" == "lib32" ] && GTK2_CONFDIR="/etc/gtk-2.0/${CHOST}" + GTK2_CONFDIR=${GTK2_CONFDIR:=/etc/gtk-2.0} +} +src_unpack() { unpack ${A} - cd ${S} + # beautifying patch for disabled icons epatch ${FILESDIR}/${PN}-2.2.1-disable_icons_smooth_alpha.patch # add smoothscroll support for usability reasons @@ -86,8 +88,9 @@ src_compile() { } src_install() { - + set_gtk2_confdir dodir ${GTK2_CONFDIR} + keepdir ${GTK2_CONFDIR} make DESTDIR=${D} install || die @@ -96,12 +99,11 @@ src_install() { echo "GDK_USE_XFT=1" >${D}/etc/env.d/50gtk2 dodoc AUTHORS ChangeLog* HACKING NEWS* README* - } pkg_postinst() { + set_gtk2_confdir - gtk-query-immodules-2.0 > /${GTK2_CONFDIR}/gtk.immodules - gdk-pixbuf-query-loaders > /${GTK2_CONFDIR}/gdk-pixbuf.loaders - + gtk-query-immodules-2.0 > ${ROOT}${GTK2_CONFDIR}/gtk.immodules + gdk-pixbuf-query-loaders > ${ROOT}${GTK2_CONFDIR}/gdk-pixbuf.loaders } diff --git a/x11-libs/gtk+/gtk+-2.8.6.ebuild b/x11-libs/gtk+/gtk+-2.8.6.ebuild index c4c6f95bd42b..d60cfb028fba 100644 --- a/x11-libs/gtk+/gtk+-2.8.6.ebuild +++ b/x11-libs/gtk+/gtk+-2.8.6.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/x11-libs/gtk+/gtk+-2.8.6.ebuild,v 1.3 2005/10/27 21:43:24 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-libs/gtk+/gtk+-2.8.6.ebuild,v 1.4 2005/10/31 16:59:44 leonardop Exp $ inherit gnome.org flag-o-matic eutils debug @@ -52,7 +52,8 @@ DEPEND="${RDEPEND} >=dev-util/gtk-doc-1.4 ~app-text/docbook-xml-dtd-4.1.2 )" -pkg_setup() { + +set_gtk2_confdir() { # An arch specific config directory is used on multilib systems has_multilib_profile && GTK2_CONFDIR="/etc/gtk-2.0/${CHOST}" use x86 && [ "$(get_libdir)" == "lib32" ] && GTK2_CONFDIR="/etc/gtk-2.0/${CHOST}" @@ -112,7 +113,9 @@ src_compile() { src_install() { make DESTDIR="${D}" install || die "Installation failed" + set_gtk2_confdir dodir ${GTK2_CONFDIR} + keepdir ${GTK2_CONFDIR} # Enable xft in environment as suggested by <utx@gentoo.org> dodir /etc/env.d @@ -122,6 +125,17 @@ src_install() { } pkg_postinst() { - gtk-query-immodules-2.0 > ${GTK2_CONFDIR}/gtk.immodules - gdk-pixbuf-query-loaders > ${GTK2_CONFDIR}/gdk-pixbuf.loaders + set_gtk2_confdir + + if [ -d "${ROOT}${GTK2_CONFDIR}" ]; then + gtk-query-immodules-2.0 > ${ROOT}${GTK2_CONFDIR}/gtk.immodules + gdk-pixbuf-query-loaders > ${ROOT}${GTK2_CONFDIR}/gdk-pixbuf.loaders + else + ewarn "The destination path ${ROOT}${GTK2_CONFDIR} doesn't exist;" + ewarn "to complete the installation of GTK+, please create the" + ewarn "directory and then manually run:" + ewarn " cd ${ROOT}${GTK2_CONFDIR}" + ewarn " gtk-query-immodules-2.0 > gtk.immodules" + ewarn " gdk-pixbuf-query-loaders > gdk-pixbuf.loaders" + fi } |