# Copyright 2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI=3 WX_GTK_VER="2.8" inherit wxwidgets autotools DESCRIPTION="xFarDic is a comprehensive multilingual dictionary" HOMEPAGE="http://www.xfardic.org/html/index.php" SRC_URI="mirror://sourceforge/xfardic/${P}-src.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86 ~amd64 ~ia64 ~alpha ~ppc ~ppc64 ~hppa ~sparc" IUSE="espeak -doc" RDEPEND="app-text/aspell dev-libs/libxml2 gnome-base/gnome-desktop x11-libs/wxGTK:2.8[X] x11-libs/libnotify dev-db/sqlite:3 espeak? ( app-accessibility/espeak ) " DEPEND="${RDEPEND}" S=${S}-src src_prepare() { einfo Patching src/Makefile.am sed -i 's@^xfardic_cppflags[[:space:]]*=[[:space:]]*.*$@xfardic_cppflags = \\\ $(shell pkg-config --cflags libxml-2.0)\\\ $(shell pkg-config --cflags gtk+-2.0)\\\ $(shell pkg-config --cflags gdk-pixbuf-2.0)\\\ $(shell pkg-config --cflags ORBit-2.0)\\\ $(shell ${WX_CONFIG} --cxxflags)@g' \ src/Makefile.am || die "sed failed" sed -i 's@^xfardic_ldflags[[:space:]]*=[[:space:]]*.*$@xfardic_ldflags = \\\ $(shell pkg-config --libs libxml-2.0) \\\ $(shell pkg-config --libs gtk+-2.0) \\\ $(shell pkg-config --libs pangoft2) \\\ $(shell ${WX_CONFIG} --libs) \\\ -laspell \\\ -lICE \\\ -lSM \\\ -lXext \\\ -lXrender \\\ -lXinerama \\\ -lXi \\\ -lXrandr \\\ -lXcursor \\\ -lXfixes \\\ -lX11 \\\ -lm \\\ -ldl \\\ -lnotify \\\ -lz \\\ -lsqlite3@g' \ src/Makefile.am || die "sed failed" sed -i 's@^AM_LDFLAGS[[:space:]]*=[[:space:]]*@LIBS = @g' \ src/Makefile.am || die "sed failed" eautoreconf } src_configure() { econf --prefix=/usr $(use_with espeak speaklib) } src_compile() { emake } src_install() { # make install will install the man page as well emake DESTDIR="${D}" install || die "Install failed" if use doc then dodoc AUTHORS ChangeLog README fi }