# 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="qt? ( ftp://cellular.phys.pusan.ac.kr/${MY_PN}/qt/${MY_PN}-qt-${PV}-1.src.tar.gz ) !qt? ( ftp://cellular.phys.pusan.ac.kr/${MY_PN}/xforms/${MY_PN}-xforms-${PV}-1.src.tar.gz )" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" IUSE="cups debug qt spell" ### Remove this before committing to CVS ### RESTRICT="nomirror" ### Remove this before committing to CVS ### # cjk-lyx and lyx cannot coexist peacefully due to filename collisions DEPEND="virtual/x11 virtual/tetex !app-office/lyx >=sys-devel/autoconf-2.58 sys-devel/gettext spell? ( app-text/aiksaurus ) qt? ( >=x11-libs/qt-3 ) : ( =x11-libs/xforms-1* )" RDEPEND="virtual/aspell-dict virtual/ghostscript virtual/tetex virtual/x11 !app-office/lyx app-text/gv app-text/noweb app-text/rcs app-text/sgmltools-lite app-text/xpdf >=dev-lang/perl-5 dev-tex/chktex dev-tex/latex2html dev-util/cvs media-gfx/imagemagick sys-devel/gettext cups? ( virtual/lpr ) qt? ( >=x11-libs/qt-3 ) : ( =x11-libs/xforms-1* ) spell? ( app-text/aiksaurus )" if use qt; then S=${WORKDIR}/${MY_PN}-qt-${PV} else S=${WORKDIR}/${MY_PN}-xforms-${PV} fi 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 # 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() { 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" }