# Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit kde-functions eutils libtool MY_PN="CJK-LyX" DESCRIPTION="a multibyte version of LyX" HOMEPAGE="http://cellular.phys.pusan.ac.kr/cjk.html" SRC_URI="ftp://ftp.lyx.org/pub/lyx/stable/lyx-${PV}.tar.bz2 http://movementarian.org/latex-xft-fonts-0.1.tar.gz http://www.math.tau.ac.il/~dekelts/lyx/files/hebrew.bind http://www.math.tau.ac.il/~dekelts/lyx/files/preferences ftp://cellular.phys.pusan.ac.kr/${MY_PN}/qt/${MY_PN}-qt-${PV}-1.patch ftp://cellular.phys.pusan.ac.kr/${MY_PN}/xforms/${MY_PN}-xforms-${PV}-1.patch" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" IUSE="cups debug qt gnome spell" # cjk-lyx and lyx cannot coexist peacefully due to filename collisions DEPEND="virtual/x11 virtual/tetex !app-office/lyx >=dev-lang/perl-5 sys-devel/gettext spell? ( app-text/aiksaurus ) qt? ( >=x11-libs/qt-3 ) : ( =x11-libs/xforms-1* )" RDEPEND="${DEPEND} virtual/aspell-dict virtual/ghostscript cups? ( virtual/lpr ) app-text/gv app-text/noweb app-text/rcs app-text/sgmltools-lite app-text/xpdf dev-tex/chktex dev-tex/latex2html dev-util/cvs media-gfx/imagemagick" DEPEND="$DEPEND >=sys-devel/autoconf-2.58" S=${WORKDIR}/lyx-${PV} src_unpack() { unpack lyx-${PV}.tar.bz2 unpack latex-xft-fonts-0.1.tar.gz cd ${S} epatch ${FILESDIR}/lyx-1.3.2-nomktex.patch epatch ${FILESDIR}/lyx-1.3.3-configure-diff if use qt; then epatch ${DISTDIR}/${MY_PN}-qt-${PV}-1.patch else epatch ${DISTDIR}/${MY_PN}-xforms-${PV}-1.patch fi elibtoolize || die } src_compile() { local myconf="" if use qt ; then set-qtdir 3 myconf="$myconf --with-frontend=qt --with-qt-dir=${QTDIR}" else myconf="$myconf --with-frontend=xforms" fi export WANT_AUTOCONF=2.5 local flags="${CFLAGS}" unset CFLAGS unset CXXFLAGS econf \ --enable-nls \ `use_enable debug` \ ${myconf} \ --enable-optimization="$flags" \ || die emake || die "emake failed" } src_install() { einstall || die dodoc README* UPGRADING INSTALL* ChangeLog NEWS COPYING \ ANNOUNCE ABOUT-NLS ${DISTDIR}/preferences insinto /usr/share/${PN}/bind doins ${DISTDIR}/hebrew.bind # gnome menu entry if use gnome ; then insinto /usr/share/applications doins ${FILESDIR}/.desktop fi # install the latex-xft fonts, which should fix # the problems outlined in bug #15629 # cd ${WORKDIR}/latex-xft-fonts-0.1 make DESTDIR=${D} install || die "Font installation failed" # Symlink lyx to cjk-lyx, in keeping with the Rule of Least Surprise cd ${D}usr/bin ln -s lyx cjk-lyx cd - } pkg_postinst() { einfo "Updating the font cache" fc-cache -f --system-only einfo "" einfo "================" einfo "" einfo "How to use Hebrew in LyX:" einfo "1. emerge app-text/ivritex." einfo "2. unzip /usr/share/doc/${P}/preferences.gz into ~/.lyx/preferences" einfo "or, read http://www.math.tau.ac.il/~dekelts/lyx/instructions2.html" einfo "for instructions on using lyx's own preferences dialog to equal effect." einfo "3. use lyx's qt interface (compile with USE=qt) for maximum effect." einfo "" if use qt ; then einfo "================" einfo "" einfo "If you have a multi-head setup not using xinerama you can only use lyx" einfo "on the 2nd head if not using qt (maybe due to a xforms bug). See bug #40392." einfo "" fi einfo "================" einfo "" einfo "In order to input CJK, you will need one of the following input methods:" einfo "Chinese: app-i18n/chinput or app-i18n/xcin" einfo "Japanese: app-i18n/kinput2" einfo "Korean: x11-misc/ami" }