1# Copyright 1999-2006 Gentoo Foundation 2# Distributed under the terms of the GNU General Public License v2 3# $Header: /var/cvsroot/gentoo-x86/games-board/xscrabble/xscrabble-2.10-r1.ebuild,v 1.6 2006/09/29 22:04:45 wolf31o2 Exp $ 4 5inherit eutils multilib games 6 7DESCRIPTION="An X11 clone of the well-known Scrabble" 8HOMEPAGE="http://freshmeat.net/projects/xscrabble/?topic_id=80" 9SRC_URI="ftp://ftp.ac-grenoble.fr/ge/educational_games/${P}.tgz 10 linguas_fr? ( ftp://ftp.ac-grenoble.fr/ge/educational_games/xscrabble_fr.tgz ) 11 ftp://ftp.ac-grenoble.fr/ge/educational_games/xscrabble_en.tgz" 12 13LICENSE="GPL-2" 14SLOT="0" 15KEYWORDS="amd64 ~ppc-macos x86" 16IUSE="linguas_fr" 17 18RDEPEND="x11-libs/libXaw 19 x11-libs/libXp" 20DEPEND="${RDEPEND} 21 x11-misc/gccmakedep 22 x11-misc/imake" 23 24src_unpack() { 25 unpack ${P}.tgz 26 cp "${DISTDIR}"/xscrabble_en.tgz . 27 use linguas_fr && cp "${DISTDIR}"/xscrabble_fr.tgz . 28 cd "${S}" 29 epatch "${FILESDIR}"/${P}-path-fixes.patch 30 sed -i '/install/s/-s //' build || die "sed failed" 31} 32 33src_compile() { 34 ./build bin || die "build failed" 35} 36 37src_install() { 38 local f 39 export DESTDIR="${D}" LIBDIR="$(get_libdir)" 40 ./build install || die "install failed" 41 if use linguas_fr ; then 42 ./build lang fr || die "fr failed" 43 fi 44 ./build lang en || die "en failed" 45 for f in "${D}"/usr/"${LIBDIR}"/X11/app-defaults/* ; do 46 [[ -L ${f} ]] && continue 47 sed -i \ 48 -e "s:/usr/games/lib/scrabble/:${GAMES_DATADIR}/${PN}/:" \ 49 -e "s:fr/eng:fr/en:" \ 50 ${f} || die "sed ${f} failed" 51 done 52 dodoc CHANGES README 53 prepgamesdirs 54} 55