From a54d8ec6d7c80b4d10bf33a0cf323a36cfcceb3b Mon Sep 17 00:00:00 2001 From: Leonardo Valeri Manera Date: Tue, 29 Apr 2008 00:01:02 +0200 Subject: [PATCH] Add LyX. --- app-office/lyx/Manifest | 7 ++ app-office/lyx/files/lyx-1.5.0-gentoo.patch | 30 ++++++ app-office/lyx/files/lyx.desktop | 10 ++ app-office/lyx/lyx-1.5.4.ebuild | 145 ++++++++++++++++++++++++++++ 4 files changed, 192 insertions(+) create mode 100644 app-office/lyx/Manifest create mode 100644 app-office/lyx/files/lyx-1.5.0-gentoo.patch create mode 100644 app-office/lyx/files/lyx.desktop create mode 100644 app-office/lyx/lyx-1.5.4.ebuild diff --git a/app-office/lyx/Manifest b/app-office/lyx/Manifest new file mode 100644 index 0000000..8606d34 --- /dev/null +++ b/app-office/lyx/Manifest @@ -0,0 +1,7 @@ +AUX lyx-1.5.0-gentoo.patch 1298 RMD160 69b7ce68234e7f5c2fee708944267f1974aa10d0 SHA1 16c3e6f846c55c3eb5fd9d7da1247a3429efa7a4 SHA256 36be1ea2577cce270319a7a3b4bed92e5925c0e974edda8729bda2179ac8ffe2 +AUX lyx.desktop 215 RMD160 13192f0f4e84e870565a3daff7d46c56954ed0fe SHA1 f72f3ff17a3a1b84cbb0aaf12c9e75387879a420 SHA256 b0ffd201e0a2e0cb39a52aadb9921e86fbb31c8d3cac04526371d6606246898c +DIST hebrew.bind 45 RMD160 1621bd311aa053798815fd6c795406a505761531 SHA1 85c39df7cd0a3a4f95fe6101a23d44abb7641b2c SHA256 fc3b1e19560f7a22af1c6bca13c0c0d7786d6453e292201645abff54fd0b67dd +DIST latex-xft-fonts-0.1.tar.gz 91730 RMD160 0a516eeba71ddc474e97f315e45e41028efa2e4d SHA1 50edf35ff08354bdf08517add33e16ee37f769e9 SHA256 78bceea8a055bc43bd0d246ae8e69f81d2f161ae4d8f1aaaa2dfff9e293ae964 +DIST lyx-1.5.4.tar.bz2 9045016 RMD160 fca3cb9c9c9437e879c8abea820fbd28a5d1d72d SHA1 75c2be653b64eedeb443caf2b0401fb74a15e908 SHA256 6c8b9aafc287ee683b68ebb08166e660e27af9942a30291f14c18de39aca8f2b +DIST preferences 1669 RMD160 26986d7bcc48c4ecf60f84d95490148a5e171785 SHA1 3567ad4d4a2a041c295e40fef76ca53de6cb260d SHA256 41867ac67bc729d1057253bf305aced1ff666ee4d648dfefc99fd0c3c0501d43 +EBUILD lyx-1.5.4.ebuild 3242 RMD160 405c1f9b3c4e0ca64d590ddfc902f5ce37b54926 SHA1 e12df5e3db578b4c32c8a11e2fdfb28ccc8eb37d SHA256 9d969574de467af78efd093ba4595a498081eab5e5280d92e0617b186e8e1a41 diff --git a/app-office/lyx/files/lyx-1.5.0-gentoo.patch b/app-office/lyx/files/lyx-1.5.0-gentoo.patch new file mode 100644 index 0000000..07f397a --- /dev/null +++ b/app-office/lyx/files/lyx-1.5.0-gentoo.patch @@ -0,0 +1,30 @@ +diff -Naur lyx-1.5.0.orig/lib/configure.py lyx-1.5.0/lib/configure.py +--- lyx-1.5.0.orig/lib/configure.py 2007-07-25 06:08:25.000000000 +0900 ++++ lyx-1.5.0/lib/configure.py 2007-07-27 08:05:53.000000000 +0900 +@@ -214,7 +214,7 @@ + \\@@end + ''') + # run latex on chklatex.ltx and check result +- if cmdOutput(LATEX + ' chklatex.ltx').find('ThisIsLaTeX2e') != -1: ++ if cmdOutput(LATEX + ' --no-mktex=tfm chklatex.ltx').find('ThisIsLaTeX2e') != -1: + # valid latex2e + return LATEX + else: +@@ -386,7 +386,7 @@ + checkProg('a DVI to TXT converter', ['catdvi $$i > $$o'], + rc_entry = [ r'\converter dvi text4 "%%" ""' ]) + # +- checkProg('a DVI to PS converter', ['dvips -o $$o $$i'], ++ checkProg('a DVI to PS converter', ['dvips -R0 -o $$o $$i'], + rc_entry = [ r'\converter dvi ps "%%" ""' ]) + # + checkProg('a DVI to PDF converter', ['dvipdfmx -o $$o $$i', 'dvipdfm -o $$o $$i'], +@@ -650,7 +650,7 @@ + cl.close() + # + # we have chklayouts.tex, then process it +- fout = os.popen(LATEX + ' wrap_chkconfig.ltx') ++ fout = os.popen(LATEX + ' --no-mktex=tfm wrap_chkconfig.ltx') + while True: + line = fout.readline() + if not line: diff --git a/app-office/lyx/files/lyx.desktop b/app-office/lyx/files/lyx.desktop new file mode 100644 index 0000000..3dfdd9c --- /dev/null +++ b/app-office/lyx/files/lyx.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Name=Lyx +Comment=Latex WYSIWYM Editor +Icon=/usr/share/lyx/images/lyx.xpm +Exec=lyx +Terminal=false +Type=Application +StartupNotify=false +Categories=GNOME;Application;Office; +MimeType=application/x-lyx; diff --git a/app-office/lyx/lyx-1.5.4.ebuild b/app-office/lyx/lyx-1.5.4.ebuild new file mode 100644 index 0000000..3b63b19 --- /dev/null +++ b/app-office/lyx/lyx-1.5.4.ebuild @@ -0,0 +1,145 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="1" + +inherit qt4 eutils flag-o-matic font toolchain-funcs + +MY_P="${P/_}" +S="${WORKDIR}/${MY_P}" +FONT_P="latex-xft-fonts-0.1" +FONT_S="${WORKDIR}/${FONT_P}" +DESCRIPTION="WYSIWYM frontend for LaTeX, DocBook, etc." +HOMEPAGE="http://www.lyx.org/" +SRC_URI="ftp://ftp.lyx.org/pub/lyx/stable/${P}.tar.bz2 + ftp://ftp.lyx.org/pub/lyx/contrib/${FONT_P}.tar.gz + linguas_he? ( + http://cs.haifa.ac.il/~dekelts/lyx/files/hebrew.bind + http://cs.haifa.ac.il/~dekelts/lyx/files/preferences + )" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 hppa ia64 ppc ppc64 sparc x86" +IUSE="cups debug nls pch linguas_he latex" +RESTRICT="test" + +RDEPEND="x11-libs/qt:4 + x11-libs/libXrandr + x11-libs/libXcursor + x11-libs/libXrender + x11-libs/libXfixes + x11-libs/libXext + x11-libs/libSM + x11-libs/libICE + x11-libs/libX11 + x11-libs/libXau + x11-libs/libXdmcp + media-gfx/imagemagick + media-libs/libpng + media-libs/fontconfig + media-libs/freetype + dev-libs/libxml2 + dev-libs/boost + app-text/aiksaurus + app-text/sgmltools-lite + virtual/aspell-dict + virtual/python + cups? ( virtual/lpr ) + latex? ( + virtual/latex-base + virtual/ghostscript + app-text/noweb + dev-tex/dvipost + dev-tex/chktex + || ( + dev-tex/latex2html + dev-tex/tth + dev-tex/hevea + dev-tex/tex4ht + ) + ) + linguas_he? ( dev-tex/ivritex )" + +DEPEND="${RDEPEND} + x11-proto/xproto + nls? ( sys-devel/gettext )" + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}"/${PN}-1.5.0-gentoo.patch || die +} + +src_compile() { + append-flags "$(test-flags -fno-stack-protector -fno-stack-protector-all)" + replace-flags "-Os" "-O2" + tc-export CXX + + unset LINGUAS + + econf \ + $(use_enable nls) \ + $(use_enable debug) \ + $(use_enable pch) \ + --with-aspell --without-included-boost || die "econf failed" + emake || die "emake failed" +} + +src_install() { + local mylinguas="${LINGUAS}" + + unset LINGUAS + emake DESTDIR="${D}" install || die "emake install failed" + + LINGUAS="${mylinguas}" + + dodoc ANNOUNCE ChangeLog NEWS README RELEASE-NOTES UPGRADING + + if use linguas_he ; then + insinto /usr/share/lyx/bind + doins "${DISTDIR}"/hebrew.bind + dodoc "${DISTDIR}"/preferences + fi + + domenu "${FILESDIR}"/lyx.desktop + + cd "${WORKDIR}"/${FONT_P} + emake DESTDIR="${D}" install || die "Font installation failed" + + font_src_install + + if use latex ; then + dosym ../../../lyx/tex /usr/share/texmf/tex/latex/lyx + fi +} + +pkg_postinst() { + font_pkg_postinst + + if use latex ; then + texhash + fi + + if use linguas_he ; then + elog + elog "How to use Hebrew in LyX:" + elog "bunzip2 /usr/share/doc/${PF}/preferences.bz2 into ~/.lyx/preferences" + elog "or, read http://cs.haifa.ac.il/~dekelts/lyx/instructions2.html" + elog "for instructions on using lyx's own preferences dialog to equal effect." + elog + fi + + elog + elog "There are known issues in the case of 1.4->1.5 config files transition." + elog "In case your File->Export list is incomplete try reconfiguring or even" + elog "remove the old configuration files in ~/.lyx ." + elog +} + +pkg_postrm() { + if use latex ; then + texhash + fi +} -- 2.11.4.GIT