# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils DESCRIPTION="A GTK+2 subtitle creation and editing tool" HOMEPAGE="http://kitone.free.fr/subtitleeditor/" SRC_URI="http://kitone.free.fr/${PN}/files/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="cairo debug spell test nls" COMMON_DEPEND=">=x11-libs/gtk+-2.6 >=dev-cpp/gtkmm-2.6 >=dev-cpp/libglademm-2.4 >=media-libs/gstreamer-0.10 >=media-libs/gst-plugins-base-0.10 >=media-libs/gst-plugins-good-0.10 dev-libs/libpcre spell? ( >=app-text/enchant-1.1.0 ) cairo? ( x11-libs/cairo )" DEPEND="${COMMON_DEPEND} sys-apps/sed nls? ( sys-devel/gettext ) test? ( dev-util/cppunit )" RDEPEND="${COMMON_DEPEND} nls? ( virtual/libintl )" pkg_setup() { # pcre needs to support utf8; 6.6 ebuild forces it, 7.0 ebuild does not. if has_version '>=dev-libs/libpcre-7.0' && \ ! built_with_use dev-libs/libpcre unicode ; then ewarn "${P} requires pcre with utf8 support." ebeep die "Please emerge libpcre with USE=unicode" fi } src_compile() { # Sandbox violations, wooooo yayyy! export GST_REGISTRY="${T}/home/registry.cache.xml" addpredict "${ROOT}root/.gconf" addpredict "${ROOT}root/.gconfd" econf \ $(use_enable cairo) \ $(use_enable debug) \ $(use_enable spell enchant-support) \ $(use_enable nls) \ $(use_enable test cppunit) \ || die "econf failed" emake || die "emake failed" } src_install() { # Bug filed upstream -- (which bug is it?) # It's here because the desktop file needs to point to a valid image. # (do we really have to use sed? Why doesn't it go in /usr/share/pixmaps # like all the other kids? Why use a 24x24 icon? It's like, wah.) sed -i -e "s:${PN}-icon:/usr/share/${PN}/${PN}:" "share/${PN}.desktop" emake DESTDIR="${D}" install || die "emake install failed" dodoc AUTHORS NEWS README TODO } pkg_postinst() { use cairo && ewarn "cairo support is not finished; use at your own risk!" }