app-office/lyx: add -9999 ebuild, make it even works ;o
[gentoo-soor-overlay.git] / app-office / lyx / lyx-9999.ebuild
blob3806b5d6a5441b70c44ef082ca5c9f4c37696bc2
1 # Copyright 1999-2008 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
5 EAPI="1"
7 inherit subversion eutils flag-o-matic font toolchain-funcs
9 FONT_P="latex-xft-fonts-0.1"
11 DESCRIPTION="WYSIWYM frontend for LaTeX, DocBook, etc."
12 HOMEPAGE="http://www.lyx.org/"
13 ESVN_REPO_URI="svn://svn.lyx.org/lyx/lyx-devel/trunk"
14 SRC_URI="ftp://ftp.lyx.org/pub/lyx/contrib/${FONT_P}.tar.gz
15 linguas_he? (
16 http://cs.haifa.ac.il/~dekelts/lyx/files/hebrew.bind
17 http://cs.haifa.ac.il/~dekelts/lyx/files/preferences
20 LICENSE="GPL-2"
21 SLOT="0"
22 KEYWORDS="alpha amd64 hppa ia64 ppc ppc64 sparc x86"
23 IUSE="cups debug nls pch linguas_he latex"
24 RESTRICT="test"
26 RDEPEND="|| (
28 x11-libs/qt-core:4
29 x11-libs/qt-gui:4
31 =x11-libs/qt-4.3*
33 x11-libs/libXrandr
34 x11-libs/libXcursor
35 x11-libs/libXrender
36 x11-libs/libXfixes
37 x11-libs/libXext
38 x11-libs/libSM
39 x11-libs/libICE
40 x11-libs/libX11
41 x11-libs/libXau
42 x11-libs/libXdmcp
43 media-gfx/imagemagick
44 media-libs/libpng
45 media-libs/fontconfig
46 media-libs/freetype
47 dev-libs/libxml2
48 dev-libs/boost
49 app-text/aiksaurus
50 app-text/sgmltools-lite
51 virtual/aspell-dict
52 virtual/python
53 cups? ( virtual/lpr )
54 latex? (
55 virtual/latex-base
56 virtual/ghostscript
57 app-text/noweb
58 dev-tex/dvipost
59 dev-tex/chktex
60 || (
61 dev-tex/latex2html
62 dev-tex/tth
63 dev-tex/hevea
64 dev-tex/tex4ht
67 linguas_he? ( dev-tex/ivritex )"
69 DEPEND="${RDEPEND}
70 x11-proto/xproto
71 nls? ( sys-devel/gettext )"
73 S="${WORKDIR}"/${P}
75 src_unpack() {
76 subversion_fetch || die "Fetch with SVN failed kthnx."
77 unpack ${A}
78 cd "${S}"
79 epatch "${FILESDIR}"/${PN}-1.5.0-gentoo.patch || die
82 src_compile() {
83 append-flags "$(test-flags -fno-stack-protector -fno-stack-protector-all)"
84 replace-flags "-Os" "-O2"
85 tc-export CXX
87 unset LINGUAS
89 econf \
90 $(use_enable nls) \
91 $(use_enable debug) \
92 $(use_enable pch) \
93 --with-aspell --without-included-boost || die "econf failed"
94 emake || die "emake failed"
97 src_install() {
98 local mylinguas="${LINGUAS}"
100 unset LINGUAS
101 emake DESTDIR="${D}" install || die "emake install failed"
103 LINGUAS="${mylinguas}"
105 dodoc ANNOUNCE ChangeLog NEWS README RELEASE-NOTES UPGRADING
107 if use linguas_he ; then
108 insinto /usr/share/lyx/bind
109 doins "${DISTDIR}"/hebrew.bind
110 dodoc "${DISTDIR}"/preferences
113 domenu "${FILESDIR}"/lyx.desktop
115 cd "${WORKDIR}"/${FONT_P}
116 emake DESTDIR="${D}" install || die "Font installation failed"
118 font_src_install
120 if use latex ; then
121 dosym ../../../lyx/tex /usr/share/texmf/tex/latex/lyx
125 pkg_postinst() {
126 font_pkg_postinst
128 if use latex ; then
129 texhash
132 if use linguas_he ; then
133 elog
134 elog "How to use Hebrew in LyX:"
135 elog "bunzip2 /usr/share/doc/${PF}/preferences.bz2 into ~/.lyx/preferences"
136 elog "or, read http://cs.haifa.ac.il/~dekelts/lyx/instructions2.html"
137 elog "for instructions on using lyx's own preferences dialog to equal effect."
138 elog
141 elog
142 elog "There are known issues in the case of 1.4->1.5 config files transition."
143 elog "In case your File->Export list is incomplete try reconfiguring or even"
144 elog "remove the old configuration files in ~/.lyx ."
145 elog
148 pkg_postrm() {
149 if use latex ; then
150 texhash