# Copyright 1999-2002 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: $ DESCRIPTION="RedHat's Bluecurve theme for GTK1, GTK2, KDE3, GDM, Metacity and Nautilus" HOMEPAGE="http://www.redhat.com" SRC_URI="ftp://ftp.sunet.se/pub/Linux/distributions/redhat/redhat/linux/rawhide/SRPMS/SRPMS/${P}-2.src.rpm" LICENSE="GPL-2" SLOT="0" KEYWORDS="x86 ppc sparc sparc64" # Needed to build... DEPEND="app-arch/rpm >=media-libs/gdk-pixbuf-0.2.5 =x11-libs/gtk+-1.2* >=x11-libs/gtk+-2.0 >=kde-base/kdelibs-3.0 " # Because one may only want to use the theme with kde OR gtk OR Metacity # OR gdm, we don't want any run-time dependencies... RDEPEND="" S="${WORKDIR}/${P}" # We need to change som RedHat-specific stuff to Gentoo-style... _replace() { FROM=$1 TO=$2 echo -n Changing \"$FROM\" to \"$TO\" in $FILE... for FILE in $(fgrep -r -l "$FROM" *); do echo -n Changing \"$FROM\" to \"$TO\" in $FILE... sed "s:$FROM:$TO:g" < "$FILE" > "$FILE.$$" mv "$FILE.$$" "$FILE" echo Done. done } src_unpack() { rpm2cpio ${DISTDIR}/${A} | cpio -i --quiet tar xfz ${P}.tar.gz } src_compile() { # Fix paths... _replace "/usr/lib/qt3" "${QTDIR}" _replace '${libdir}/qt3' "${QTDIR}" _replace '$(libdir)/qt3' "${QTDIR}" _replace "/usr/lib/kde3" "${KDEDIR}/lib" _replace '${libdir}/kde3' "${KDEDIR}/lib" _replace "/usr/lib/kwin.la" "${KDEDIR}/lib/kwin.la" /bin/sh ./configure \ --host=${CHOST} \ --prefix=/usr \ --infodir=/usr/share/info \ --mandir=/usr/share/man || die "./configure failed" emake || die } src_install () { make DESTDIR=${D} install || dir mkdir -p ${D}/${KDEDIR}/share mv ${D}/usr/share/apps ${D}/${KDEDIR}/share/apps mv ${D}/usr/share/icons ${D}/${KDEDIR}/share/icons dodoc AUTHORS COPYING NEWS README }