diff options
author | Chris White <chriswhite@gentoo.org> | 2005-11-30 09:59:41 +0000 |
---|---|---|
committer | Chris White <chriswhite@gentoo.org> | 2005-11-30 09:59:41 +0000 |
commit | 452d5f75c3ad3754e34865c736497ee0ddb71331 (patch) | |
tree | 9d9056d6e6c1e92175e1401a23b215303b9b4f65 /eclass/gtk-engines.eclass | |
parent | *** empty log message *** (diff) | |
download | gentoo-2-452d5f75c3ad3754e34865c736497ee0ddb71331.tar.gz gentoo-2-452d5f75c3ad3754e34865c736497ee0ddb71331.tar.bz2 gentoo-2-452d5f75c3ad3754e34865c736497ee0ddb71331.zip |
*** empty log message ***
Diffstat (limited to 'eclass/gtk-engines.eclass')
-rw-r--r-- | eclass/gtk-engines.eclass | 217 |
1 files changed, 150 insertions, 67 deletions
diff --git a/eclass/gtk-engines.eclass b/eclass/gtk-engines.eclass index a68ab8e8d2ee..f30996fc443b 100644 --- a/eclass/gtk-engines.eclass +++ b/eclass/gtk-engines.eclass @@ -1,53 +1,80 @@ -# Copyright 1999-2000 Gentoo Technologies, Inc. -# Distributed under the terms of the GNU General Public License, v2 or later -# /space/gentoo/cvsroot/gentoo-x86/eclass/gtk-engines.eclass,v 1.0 2002/04/20 09:55:11 danarmak Exp +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/eclass/gtk-engines.eclass,v 1.1.1.1 2005/11/30 09:59:28 chriswhite Exp $ -# The gtk-engines eclass is inheritd by all gtk-engines-* ebuilds. +# IMPORTANT: +# This eclass is deprecated and should not be used in new ebuilds. -inherit base +# +# The gtk-engines eclass is inherited by all gtk-engines-* ebuilds. +# +# Please note that Gtk engines are special packages that mainly provide +# common libraries for Gtk themes, and there is a special meta-package +# that have what you're probably looking for: gtk-themes. +# +# If you want themes to make your GTK 2 apps look pretty, you can do +# something like the following, and everything will be taken care of: +# +# emerge gtk-themes +# +# If themes for GTK 1 programs is what you're looking for, then something +# like this should help you: +# +# emerge =gtk-themes-1* -ECLASS=gtk-engines +inherit eutils -DESCRIPTION="Based on the ${ECLASS} eclass" -HOMEPAGE="" -LICENSE="GPL-2" -KEYWORDS="x86" -newdepend /c virtual/x11 +[ -n "$DEBUG" ] && einfo "Entering gtk-engines.eclass" + +[ -z "$DESCRIPTION" ] && DESCRIPTION="Based on the gtk-engines eclass" +[ -z "$HOMEPAGE" ] && HOMEPAGE="http://www.gnome.org/" +[ -z "$LICENSE" ] && LICENSE="GPL-2" + +KEYWORDS="x86 ppc alpha sparc hppa amd64" + +DEPEND="virtual/x11" case "${SLOT}" in "1" ) - newdepend '=x11-libs/gtk+-1.2*' ;; + DEPEND="${DEPEND} =x11-libs/gtk+-1.2*" ;; "2" ) - newdepend '>=x11-libs/gtk+-2' ;; + DEPEND="${DEPEND} >=x11-libs/gtk+-2" ;; * ) - newdepend x11-libs/gtk+ ;; + DEPEND="${DEPEND} x11-libs/gtk+" ;; esac +[ -n "$DEBUG" ] && einfo "SLOT is ${SLOT}" + MY_PN="${PN}" INSTALL_FONTS=0 ENGINE=${PN/gtk-engines-/} +[ -n "$DEBUG" ] && einfo "ENGINE is ${ENGINE}" + case "${ENGINE}" in "cleanice" ) [ "$SLOT" -eq "2" ] && MY_PN="gtk-engines-cleanice2" ;; + "crux" ) - MY_PN="crux" - newdepend '>=gnome-base/libgnomeui-2.0.1' \ - '>=gnome-base/libglade-2.0.0' - DEPEND="${DEPEND} sys-devel/libtool" - ;; + MY_PN="crux" ;; + "eazel" ) - MY_PN="eazel-engine" - newdepend media-libs/gdk-pixbuf - ;; - "gtkstep" ) - LICENSE="LGPL-2" ;; + MY_PN="eazel-engine" ;; + + "flat" ) + [ "$SLOT" -eq "2" ] && MY_PN="gtk-flat-theme-2.0" ;; + + "geramik" ) + MY_PN="3952-Geramik" ;; + + "lighthouseblue" ) + MY_PN="lighthouseblue" ;; + "metal" | "notif" | "pixbuf" | "pixmap" | "raleigh" | "redmond95" ) MY_PN="gtk-engines" if [ "$SLOT" -eq "2" ] then - newdepend media-libs/gdk-pixbuf DEPEND="${DEPEND} >=dev-util/pkgconfig-0.12.0" # Do _NOT_ strip symbols in the build! Need both lines for Portage @@ -57,77 +84,99 @@ case "${ENGINE}" in # force debug information CFLAGS="${CFLAGS} -g" CXXFLAGS="${CXXFLAGS} -g" - + else - newdepend '>=media-libs/imlib-1.8' + DEPEND="${DEPEND} >=media-libs/imlib-1.8" fi ;; + + "mist" ) + MY_PN="GTK-mist-engine" ;; + "thinice" ) [ "$SLOT" -eq "2" ] && MY_PN="gtk-thinice-engine" ;; + "xenophilia" ) MY_PN="xenophilia" INSTALL_FONTS=1 - LICENSE="LGPL-2" ;; + "xfce" ) MY_PN="gtk-xfce-engine" ;; esac MY_P="${MY_PN}-${PV}" +[ -n "$DEBUG" ] && einfo "MY_P is ${MY_P}" + if [ "X${ENGINE}" = "Xthinice" ] && [ "$SLOT" -eq "2" ] then SRC_URI="http://thinice.sourceforge.net/${MY_P}.tar.gz" - + +elif [ "X${ENGINE}" = "Xmist" ] +then + SRC_URI="http://ftp.gnome.org/pub/GNOME/teams/art.gnome.org/themes/gtk2/${MY_P}.tar.gz" + +elif [ "X${ENGINE}" = "Xflat" ] && [ "$SLOT" -eq "2" ] +then + SRC_URI="http://download.freshmeat.net/themes/gtk2flat/gtk2flat-default.tar.gz" + +elif [ "X${ENGINE}" = "Xgeramik" ] +then + SRC_URI="http://www.kde-look.org/content/files/${MY_P}.tar.gz" + elif [ "X${ENGINE}" = "Xxfce" ] then SRC_URI="mirror://sourceforge/xfce/${MY_P}.tar.gz" - + +elif [ "X${ENGINE}" = "Xlighthouseblue" ] +then + SRC_URI="mirror://sourceforge/lighthouseblue/${MY_P}.tar.gz" + elif [ "X${ENGINE}" = "Xcrux" ] then - SRC_URI="mirror://gnome/sources/${MY_PN}/${MY_P}.tar.bz2" - + PVP=(${PV//[-\._]/ }) + SRC_URI="mirror://gnome/sources/${MY_PN}/${PVP[0]}.${PVP[1]}/${MY_P}.tar.bz2" + elif [ "X${MY_PN}" = "Xgtk-engines" ] && [ "$SLOT" -eq "2" ] then - SRC_URI="mirror://gnome/sources/${MY_PN}/${MY_P}.tar.bz2" + PVP=(${PV//[-\._]/ }) + SRC_URI="mirror://gnome/sources/${MY_PN}/${PVP[0]}.${PVP[1]}/${MY_P}.tar.bz2" else - SRC_PATH=`echo ${MY_PN} | awk '{print substr($0,1,1);}'` - SRC_PATH="${SRC_PATH}/${MY_PN}/${MY_PN}_${PV}.orig.tar.gz" + SRC_PATH="${MY_PN:0:1}/${MY_PN}/${MY_PN}_${PV}.orig.tar.gz" SRC_URI="http://ftp.debian.org/debian/pool/main/$SRC_PATH" fi +[ -n "$DEBUG" ] && einfo "SRC_URI is ${SRC_URI}" gtk-engines_src_unpack() { unpack ${A} - - # Let's try to figure out the right value for S - S="${WORKDIR}/`ls -t ${WORKDIR} | head -n 1`" + + [ -f "${FILESDIR}/${P}-gentoo.diff" ] && \ + patch -p0 < ${FILESDIR}/${P}-gentoo.diff + + MY_DIR=`ls -t ${WORKDIR} | head -n 1` + + mv $MY_DIR $S } gtk-engines_src_compile() { - econf || die - - if [ "X${MY_PN}" = "Xgtk-engines" ] - then - cd ${ENGINE} - fi - - emake || die + econf || die "./configure failed" + + [ "X${MY_PN}" = "Xgtk-engines" ] && cd ${ENGINE} + + emake || die "Compilation failed" } gtk-engines_src_install() { - cd ${S} - - if [ "X${MY_PN}" = "Xgtk-engines" ] - then - cd ${ENGINE} - fi + [ "X${MY_PN}" = "Xgtk-engines" ] && cd ${ENGINE} - if [ "X${MY_PN}" = "Xxenophilia" ] + # Some corrections to misc files + if [ "X${ENGINE}" = "Xxenophilia" ] then - dodir /usr/X11R6/lib/X11/fonts/misc - + dodir /usr/X11R6/$(get_libdir)/X11/fonts/misc + mv fonts/Makefile fonts/Makefile.orig sed -e 's:/usr:${D}/usr:' \ -e 's:local:misc:' \ @@ -138,10 +187,50 @@ gtk-engines_src_install() { einstall \ THEME_DIR=${D}/usr/share/themes \ - ENGINE_DIR=${D}/usr/lib/gtk/themes/engines || die - + ENGINE_DIR=${D}/usr/$(get_libdir)/gtk/themes/engines \ + || die "Installation failed" + + # Remove unwanted stuff, since some engines include GTK-1 and GTK-2 + # support. + if [ "X${ENGINE}" = "Xmist" ] + then + if [ "$SLOT" -eq "2" ] + then + rm -rf ${D}/usr/$(get_libdir)/gtk ${D}/usr/share/themes/Mist/gtk + else + rm -rf ${D}/usr/$(get_libdir)/gtk-2.0 ${D}/usr/share/themes/Mist/gtk-2.0 + fi + + rm -rf ${D}/usr/share/themes/Mist/metacity-1 + + elif [ "X${ENGINE}" = "Xgeramik" ] + then + if [ "$SLOT" -eq "2" ] + then + mv ${D}/usr/share/themes/Geramik/gtk/*png \ + ${D}/usr/share/themes/Geramik/gtk-2.0 + mv ${D}/usr/share/themes/Geramik/gtk-2.0/gtkrc-2.0 \ + ${D}/usr/share/themes/Geramik/gtk-2.0/gtkrc + + rm -rf ${D}/usr/$(get_libdir)/gtk ${D}/usr/share/themes/Geramik/gtk + else + rm -rf ${D}/usr/$(get_libdir)/gtk-2.0 ${D}/usr/share/themes/Geramik/gtk-2.0 + fi + + elif [ "X${ENGINE}" = "Xlighthouseblue" ] + then + if [ "$SLOT" -eq "2" ] + then + rm -rf ${D}/usr/$(get_libdir)/gtk ${D}/usr/share/themes/LighthouseBlue/gtk + else + rm -rf \ + ${D}/usr/$(get_libdir)/gtk-2.0 \ + ${D}/usr/share/themes/LighthouseBlue/gtk-2.0 + fi + fi + for doc in AUTHORS BUGS ChangeLog CONFIGURATION COPYING CUSTOMIZATION \ - INSTALL NEWS README THANKS TODO + NEWS README THANKS TODO do [ -s $doc ] && dodoc $doc done @@ -151,7 +240,7 @@ gtk-engines_pkg_postinst() { if [ "$INSTALL_FONTS" -ne 0 ] then echo ">>> Updating X fonts..." - mkfontdir /usr/X11R6/lib/X11/fonts/misc + mkfontdir /usr/X11R6/$(get_libdir)/X11/fonts/misc xset fp rehash || fonts_notice fi } @@ -160,22 +249,16 @@ gtk-engines_pkg_postrm() { if [ "$INSTALL_FONTS" -ne 0 ] then echo ">>> Updating X fonts..." - mkfontdir /usr/X11R6/lib/X11/fonts/misc + mkfontdir /usr/X11R6/$(get_libdir)/X11/fonts/misc xset fp rehash || fonts_notice fi } fonts_notice() { - einfo "" - einfo "*************************************************************" - einfo "" einfo "We can't reset the font path at the moment. You might want" einfo "to run the following command manually:" einfo "" einfo " xset fp rehash" - einfo "" - einfo "*************************************************************" - einfo "" } - + EXPORT_FUNCTIONS src_unpack src_compile src_install pkg_postinst pkg_postrm |