2012-04-23 11:35:31 +02:00
|
|
|
# Copyright 1999-2012 Gentoo Foundation
|
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
# $Header: $
|
|
|
|
|
|
|
|
EAPI=4
|
|
|
|
|
|
|
|
inherit python
|
|
|
|
|
|
|
|
DESCRIPTION="ReText is a simple editor that reads your text with MarkDown or \
|
|
|
|
HTML markup and saves it as plain text, HTML or PDF."
|
|
|
|
HOMEPAGE="http://sourceforge.net/projects/retext"
|
|
|
|
SRC_URI="mirror://sourceforge/retext/ReText_${PV}.tar.gz
|
|
|
|
mirror://sourceforge/retext/Icons/ReTextIcons_r3.tar.gz"
|
|
|
|
|
|
|
|
LICENSE="GPLv3"
|
|
|
|
SLOT="0"
|
|
|
|
KEYWORDS="~amd64"
|
|
|
|
IUSE="gdocs spell"
|
|
|
|
|
|
|
|
DEPEND="dev-python/PyQt4
|
|
|
|
dev-python/markdown
|
|
|
|
dev-python/docutils
|
|
|
|
spell? ( dev-python/pyenchant )
|
|
|
|
gdocs? ( dev-python/gdata )
|
|
|
|
"
|
|
|
|
RDEPEND="${DEPEND}"
|
|
|
|
|
|
|
|
src_unpack() {
|
|
|
|
mkdir -p ${P}/icons
|
|
|
|
tar xzf ${DISTDIR}/ReText_${PV}.tar.gz -C ${P}/
|
|
|
|
tar xzf ${DISTDIR}/ReTextIcons_r3.tar.gz -C ${P}/icons/
|
|
|
|
}
|
|
|
|
|
|
|
|
src_prepare() {
|
|
|
|
sed -i -e "s:^\(icon_path = \).*:\1\"/usr/share/${PN}/icons\":" \
|
|
|
|
-e "s:\(wpgen/wpgen.py\):/usr/share/${PN}\1:" \
|
2012-04-23 12:38:32 +02:00
|
|
|
-e "s:\(QSettings('\)ReText project\(', 'ReText')\):\1retext\2:" \
|
2012-04-23 11:35:31 +02:00
|
|
|
retext.py
|
|
|
|
}
|
|
|
|
|
|
|
|
src_install() {
|
|
|
|
dobin retext.py
|
|
|
|
|
|
|
|
insinto /usr/share/${PN}
|
|
|
|
doins -r icons locale wpgen
|
|
|
|
}
|
2012-04-23 12:38:32 +02:00
|
|
|
|
|
|
|
pkg_postinst() {
|
|
|
|
echo
|
|
|
|
elog
|
|
|
|
elog "To activate PHP Markdown Extra compatibility, add "
|
|
|
|
elog "mdExtensions=extra"
|
|
|
|
elog "to ~/.config/retext/ReText.conf "
|
|
|
|
elog
|
|
|
|
}
|