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"
51 app-text/sgmltools-lite
68 linguas_he? ( dev-tex/ivritex )"
72 nls? ( sys-devel/gettext )"
77 if use monolithic
; then
79 ewarn
"Bulding LyX with USE=monolithic needs 512Mb of RAM or more"
80 ewarn
"for each make job (-j). Don't come crying to me if you run"
87 subversion_fetch || die
"Fetch with SVN failed kthnx."
89 epatch
"${FILESDIR}"/${PN}-1.5
.0-gentoo.
patch || die
91 # trunk needs to regen with autotools
92 # lets use gentoo tools instead of the lyx script,
93 # which calls aclocal, autoheader, automake, autoconf
94 rm -rf "${S}"/autom4te.cache
102 append-flags
"$(test-flags -fno-stack-protector -fno-stack-protector-all)"
103 replace-flags
"-Os" "-O2"
108 if use monolithic
; then
109 monolithic
="--enable-monolithic-client"
110 monolithic
="${monolithic} --enable-monolithic-insets"
111 monolithic
="${monolithic} --enable-monolithic-mathed"
112 monolithic
="${monolithic} --enable-monolithic-core"
113 monolithic
="${monolithic} --enable-monolithic-tex2lyx"
114 monolithic
="${monolithic} --enable-monolithic-frontend-qt4"
118 build_type
="--enable-build-type=development"
120 build_type
="--enable-build-type=release"
123 econf
${monolithic} \
125 $
(use_enable debug
) \
127 --disable-pch --with-aspell --without-included-boost || die
"econf failed"
128 emake || die
"emake failed"
132 local mylinguas
="${LINGUAS}"
135 emake DESTDIR
="${D}" install || die
"emake install failed"
137 LINGUAS
="${mylinguas}"
139 dodoc ANNOUNCE ChangeLog NEWS README RELEASE-NOTES UPGRADING
141 if use linguas_he
; then
142 insinto
/usr
/share
/lyx
/bind
143 doins
"${DISTDIR}"/hebrew.
bind
144 dodoc
"${DISTDIR}"/preferences
147 domenu
"${FILESDIR}"/lyx.desktop
148 dosed
's:lyx\.xpm:lyx\.png:' /usr
/share
/appplications
/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 ."