# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils DESCRIPTION="gPlanarity is a simple puzzle game involving untangling planar graphs for fun and prizes. If you tend to get addicted to cute little math puzzles, this one is a doozy." HOMEPAGE="http://web.mit.edu/xiphmont/Public/gPlanarity.html" SRC_URI="http://www.qnan.org/~pmw/gentoo/releases/${PN}-${PV}.tar.bz2" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" IUSE="nls" LANGS="cs de" for X in ${LANGS}; do IUSE="${IUSE} linguas_${X}" done S="${WORKDIR}/gPlanarity" DEPEND="" RDEPEND=">=media-libs/freetype-2 >=media-libs/fontconfig-2 >=x11-libs/gtk+-2.7.2 >=x11-libs/cairo-1" src_unpack() { unpack ${A} cd "${S}" use nls && epatch "${FILESDIR}/gPlanarity-20070402-i18n.diff" use nls && epatch "${FILESDIR}/gPlanarity-20070402-i18n-want_linguas.diff" } src_compile() { if use nls; then for X in ${LANGS}; do if use linguas_${X}; then I18N="${I18N} ${X}" fi done I18N="${I18N# }" I18N="WANT_LINGUAS=${I18N}" else I18N="DISABLE_NLS=yes" fi emake PREFIX=/usr "${I18N}" all || die "make failed" } src_install() { make PREFIX=${D}/usr "${I18N}" install }