app-office/lyx: 1.5.4 doesn't need the qt4 eclass anymore, -9999 needs
[gentoo-soor-overlay.git] / app-office / lyx / lyx-9999.ebuild
blobcc0671d13dbc8af4caccedde9e356348ca56b089
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 autotools 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=""
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*
32 =x11-libs/qt-4.2*
34 x11-libs/libXrandr
35 x11-libs/libXcursor
36 x11-libs/libXrender
37 x11-libs/libXfixes
38 x11-libs/libXext
39 x11-libs/libSM
40 x11-libs/libICE
41 x11-libs/libX11
42 x11-libs/libXau
43 x11-libs/libXdmcp
44 media-gfx/imagemagick
45 media-libs/libpng
46 media-libs/fontconfig
47 media-libs/freetype
48 dev-libs/libxml2
49 dev-libs/boost
50 app-text/aiksaurus
51 app-text/sgmltools-lite
52 virtual/aspell-dict
53 virtual/python
54 cups? ( virtual/lpr )
55 latex? (
56 virtual/latex-base
57 virtual/ghostscript
58 app-text/noweb
59 dev-tex/dvipost
60 dev-tex/chktex
61 || (
62 dev-tex/latex2html
63 dev-tex/tth
64 dev-tex/hevea
65 dev-tex/tex4ht
68 linguas_he? ( dev-tex/ivritex )"
70 DEPEND="${RDEPEND}
71 x11-proto/xproto
72 nls? ( sys-devel/gettext )"
74 S="${WORKDIR}"/${P}
76 src_unpack() {
77 subversion_fetch || die "Fetch with SVN failed kthnx."
78 unpack ${A}
79 cd "${S}"
80 epatch "${FILESDIR}"/${PN}-1.5.0-gentoo.patch || die
82 # trunk needs to regen with autotools
83 # lets use gentoo tools instead of the lyx script,
84 # which calls aclocal, autoheader, automake, autoconf
85 AT_M4DIR="-I m4 -I config"
86 rm -rf "${S}"/autom4te.cache
87 eaclocal
88 eautoheader
89 eautomake --foreign
90 eautoconf
93 src_compile() {
94 append-flags "$(test-flags -fno-stack-protector -fno-stack-protector-all)"
95 replace-flags "-Os" "-O2"
96 tc-export CXX
98 unset LINGUAS
100 econf \
101 $(use_enable nls) \
102 $(use_enable debug) \
103 $(use_enable pch) \
104 --with-aspell --without-included-boost || die "econf failed"
105 emake || die "emake failed"
108 src_install() {
109 local mylinguas="${LINGUAS}"
111 unset LINGUAS
112 emake DESTDIR="${D}" install || die "emake install failed"
114 LINGUAS="${mylinguas}"
116 dodoc ANNOUNCE ChangeLog NEWS README RELEASE-NOTES UPGRADING
118 if use linguas_he ; then
119 insinto /usr/share/lyx/bind
120 doins "${DISTDIR}"/hebrew.bind
121 dodoc "${DISTDIR}"/preferences
124 domenu "${FILESDIR}"/lyx.desktop
126 cd "${WORKDIR}"/${FONT_P}
127 emake DESTDIR="${D}" install || die "Font installation failed"
129 font_src_install
131 if use latex ; then
132 dosym ../../../lyx/tex /usr/share/texmf/tex/latex/lyx
136 pkg_postinst() {
137 font_pkg_postinst
139 if use latex ; then
140 texhash
143 if use linguas_he ; then
144 elog
145 elog "How to use Hebrew in LyX:"
146 elog "bunzip2 /usr/share/doc/${PF}/preferences.bz2 into ~/.lyx/preferences"
147 elog "or, read http://cs.haifa.ac.il/~dekelts/lyx/instructions2.html"
148 elog "for instructions on using lyx's own preferences dialog to equal effect."
149 elog
152 elog
153 elog "There are known issues in the case of 1.4->1.5 config files transition."
154 elog "In case your File->Export list is incomplete try reconfiguring or even"
155 elog "remove the old configuration files in ~/.lyx ."
156 elog
159 pkg_postrm() {
160 if use latex ; then
161 texhash