# Copyright 1999-2016 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Id$ EAPI=5 inherit eutils ABBREV="scrabble-code" DESCRIPTION="Highly customizable Scrabble game including 3D." HOMEPAGE="https://sourceforge.net/projects/scrabble/" SRC_URI=" https://sourceforge.net/code-snapshots/svn/s/sc/scrabble/code/${ABBREV}-${PV}.zip if use qt4 ; then mirror://sourceforge/scrabble/files/Main_Program/Linux/libqt4pas.tar.gz fi " LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="qt4 gtk" REQUIRED_USE=" ^^ ( qt4 gtk )" RDEPEND="x11-libs/libX11 gtk? ( x11-libs/gtk+:2 ) qt4? ( >=dev-qt/qtpascal-2.5 )" DEPEND="${RDEPEND} >=dev-lang/lazarus-1.2" S="${WORKDIR}/${ABBREV}-${PV}" src_prepare(){ use qt4 && export lcl="qt" || export lcl="gtk2" use amd64 && export CPU_TARGET="x86_64" || export CPU_TARGET="i386" export lazpath="/usr/share/lazarus" if use qt4 ; then cp /usr/lib/libQt4Pas.* ${S}/ fi sed -e 's:/usr/local/bin/Lazarus:/usr/share/lazarus:' -i ScrabbleServer.lpi sed -e 's:/usr/lib/Lazarus/lcl:/usr/share/lazarus/lcl:' -i ScrabbleServer.lpi sed -e 's:/usr/local/bin/lazarus/components/opengl/lib/x86_64-linux/gtk2:/usr/share/lazarus/components/opengl/:' -i Scrabble3D.lpi } src_compile(){ } src_install(){ diropts -m0755 dodir /usr/share rsync -a "${S}/build/" "${D}/usr/share/" || die "Unable to copy files" dosym ../share/${ABBREV}/${ABBREV} /usr/bin/${ABBREV} make_desktop_entry ${ABBREV} "Scrabble 3d" "${PN}" "Games;" || die "Failed making desktop entry!" }