1 # Copyright 1999-2008 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
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
16 http://cs.haifa.ac.il/~dekelts/lyx/files/hebrew.bind
17 http://cs.haifa.ac.il/~dekelts/lyx/files/preferences
23 IUSE
="cups debug latex monolithic nls linguas_he"
52 app-text/sgmltools-lite
69 linguas_he? ( dev-tex/ivritex )"
73 nls? ( sys-devel/gettext )"
78 if use monolithic
; then
80 ewarn
"Bulding LyX with USE=monolithic needs 512Mb of RAM or more"
81 ewarn
"for each make job (-j). Don't come crying to me if you run"
88 subversion_fetch || die
"Fetch with SVN failed kthnx."
90 epatch
"${FILESDIR}"/${PN}-1.5
.0-gentoo.
patch || die
92 # trunk needs to regen with autotools
93 # lets use gentoo tools instead of the lyx script,
94 # which calls aclocal, autoheader, automake, autoconf
95 rm -rf "${S}"/autom4te.cache
103 append-flags
"$(test-flags -fno-stack-protector -fno-stack-protector-all)"
104 replace-flags
"-Os" "-O2"
109 if use monolithic
; then
110 monolithic
="--enable-monolithic-client"
111 monolithic
="${monolithic} --enable-monolithic-insets"
112 monolithic
="${monolithic} --enable-monolithic-mathed"
113 monolithic
="${monolithic} --enable-monolithic-core"
114 monolithic
="${monolithic} --enable-monolithic-tex2lyx"
115 monolithic
="${monolithic} --enable-monolithic-frontend-qt4"
119 build_type
="--enable-build-type=development"
121 build_type
="--enable-build-type=release"
124 econf
${monolithic} \
126 $
(use_enable debug
) \
128 --disable-pch --with-aspell --without-included-boost || die
"econf failed"
129 emake || die
"emake failed"
133 local mylinguas
="${LINGUAS}"
136 emake DESTDIR
="${D}" install || die
"emake install failed"
138 LINGUAS
="${mylinguas}"
140 dodoc ANNOUNCE ChangeLog NEWS README RELEASE-NOTES UPGRADING
142 if use linguas_he
; then
143 insinto
/usr
/share
/lyx
/bind
144 doins
"${DISTDIR}"/hebrew.
bind
145 dodoc
"${DISTDIR}"/preferences
148 domenu
"${FILESDIR}"/lyx.desktop
150 cd "${WORKDIR}"/${FONT_P}
151 emake DESTDIR
="${D}" install || die
"Font installation failed"
156 dosym ..
/..
/..
/lyx
/tex
/usr
/share
/texmf
/tex
/latex
/lyx
167 if use linguas_he
; then
169 elog
"How to use Hebrew in LyX:"
170 elog
"bunzip2 /usr/share/doc/${PF}/preferences.bz2 into ~/.lyx/preferences"
171 elog
"or, read http://cs.haifa.ac.il/~dekelts/lyx/instructions2.html"
172 elog
"for instructions on using lyx's own preferences dialog to equal effect."
177 elog
"There are known issues in the case of 1.4->1.5 config files transition."
178 elog
"In case your File->Export list is incomplete try reconfiguring or even"
179 elog
"remove the old configuration files in ~/.lyx ."