# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/x11-themes/xcursor-themes/xcursor-themes-1.0.1.ebuild,v 1.5 2006/02/23 05:35:15 vapier Exp $ # Must be before x-modular eclass is inherited # SNAPSHOT="yes" inherit x-modular DESCRIPTION="X.Org cursor themes: whiteglass, redglass and handhelds" KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86" RDEPEND="x11-libs/libX11 x11-libs/libXcursor =media-libs/libpng-1.2*" DEPEND="${RDEPEND} x11-apps/xcursorgen" src_install() { emake install DESTDIR=${D} cursor_hashes() { if [ '' = "$1" ]; then cmd='cut -f 1 -d =' else cmd="grep $1= | cut -f 2 -d =" fi # add a symlink hand2 to hand first in case the theme call it hand # instead of hand2 echo 'hand2=hand 00008160000006810000408080010102=sb_v_double_arrow 028006030e0e7ebffc7f7070c0600140=sb_h_double_arrow 03b6e0fcb3499374a867c041f52298f0=crossed_circle 08e8e1c95fe2fc01f976f1e063a24ccd=left_ptr_watch 14fef782d02440884392942c11205230=h_double_arrow 2870a09082c103050810ffdffffe0204=v_double_arrow 3ecb610c1bf2410f44200f48c40d3599=left_ptr_watch 4498f0e0c1937ffe01fd06f973665830=fleur 5c6cd98b3f3ebcb1f9c7f1c204630408=question_arrow 6407b0e94181790501fd1e167b474872=copy 640fb0e74195791501fd1ed57b41487f=link 9d800788f1b08800ae810202380a0822=hand1 c7088f0f3e6c8088236ef8e1e3e70000=top_left_corner d9ce0ab605698f320427677b458ad60b=question_arrow e29285e634086352946a0e7090d73106=hand2 fcf1c3c7cd4491d801f1e1c78f100000=top_right_corner' | eval $cmd } for X in handhelds whiteglass redglass ; do einfo "Creating hashlinks for $X" cd ${D}/usr/share/cursors/xorg-x11/${X}/cursors/ for the_hash in `cursor_hashes`; do target=`cursor_hashes $the_hash` [ -f "$target" -a ! -f "$the_hash" ] && ln -s "$target" "$the_hash" done done }