# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI="2" inherit eutils python LANGUAGES="linguas_en linguas_ca linguas_cs linguas_de linguas_es linguas_gl linguas_ru linguas_sk" DESCRIPTION="Cycle is a calendar program for women" HOMEPAGE="http://cycle.sourceforge.net/" SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2" LICENSE="GPL-2" SLOT="0" KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd" IUSE="${LANGUAGES}" RDEPEND="dev-lang/python dev-python/wxpython" src_prepare() { epatch "${FILESDIR}/cycle-0.3.1-syntax.patch" sed -i -e '/msg_dir/ s:".*":"/usr/share/locale":'\ -e '/doc_dir/ s:".*":"/usr/share/doc/'"${PF}"'/html":'\ set_dir.py || die "sed failed" } src_install() { local PYTHON_LIBDIR=`python_get_libdir` insinto ${PYTHON_LIBDIR}/site-packages/cycle doins cal_year.py cycle.py dialogs.py p_rotor.py save_load.py set_dir.py for DIR in bitmaps icons icons/large icons/mini; do insinto ${PYTHON_LIBDIR}/site-packages/cycle/${DIR} find ${DIR} -maxdepth 1 -type f -exec doins '{}' \; done for LANG in ${LINGUAS}; do [ "x${LANG}" == "xen" ] && continue mv msg/${LANG}/LC_MESSAGES/cycle.mo msg/${LANG}.mo domo msg/${LANG}.mo done dodoc BUGS CHANGELOG COPYRIGHT INSTALL README THANKS dohtml README.html README_ru.html README_de.html echo "#!/bin/sh" > cycle echo "cd ${PYTHON_LIBDIR}/site-packages/cycle && python cycle.py" >> cycle dobin cycle doicon icons/cycle.xpm make_desktop_entry cycle "Cycle" cycle.xpm 'Office;Calendar;MedicalSoftware' }