app-office/lyx: rebase release to 1.5.5
[gentoo-soor-overlay.git] / app-office / lyx / lyx-1.5.5.ebuild
Commit [+]AuthorDateLineData
a54d8ec6
LVM
Leonardo Valeri Manera2008-04-29 00:01:02 +02001# Copyright 1999-2008 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2
3# $Header: $
4
5EAPI="1"
6
d6068da7 Leonardo Valeri Manera2008-05-05 23:17:49 +02007inherit eutils flag-o-matic font toolchain-funcs
a54d8ec6
LVM
Leonardo Valeri Manera2008-04-29 00:01:02 +02008
9MY_P="${P/_}"
10S="${WORKDIR}/${MY_P}"
11FONT_P="latex-xft-fonts-0.1"
12FONT_S="${WORKDIR}/${FONT_P}"
13DESCRIPTION="WYSIWYM frontend for LaTeX, DocBook, etc."
14HOMEPAGE="http://www.lyx.org/"
15SRC_URI="ftp://ftp.lyx.org/pub/lyx/stable/${P}.tar.bz2
16 ftp://ftp.lyx.org/pub/lyx/contrib/${FONT_P}.tar.gz
17 linguas_he? (
18 http://cs.haifa.ac.il/~dekelts/lyx/files/hebrew.bind
19 http://cs.haifa.ac.il/~dekelts/lyx/files/preferences
20 )"
21
22LICENSE="GPL-2"
23SLOT="0"
be4358ee Leonardo Valeri Manera2008-05-12 00:05:11 +020024KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" # dev-tex/ivritex
9b6fb523 Leonardo Valeri Manera2008-05-06 22:49:05 +020025IUSE="cups debug nls linguas_he latex"
a54d8ec6
LVM
Leonardo Valeri Manera2008-04-29 00:01:02 +020026RESTRICT="test"
27
5e258476 Leonardo Valeri Manera2008-05-05 23:08:38 +020028RDEPEND="|| (
be4358ee
LVM
Leonardo Valeri Manera2008-05-12 00:05:11 +020029 (
30 x11-libs/qt-gui
31 x11-libs/qt-core
32 )
33 >=x11-libs/qt-4.1.1:4
5e258476 Leonardo Valeri Manera2008-05-05 23:08:38 +020034 )
a54d8ec6
LVM
Leonardo Valeri Manera2008-04-29 00:01:02 +020035 x11-libs/libXrandr
36 x11-libs/libXcursor
37 x11-libs/libXrender
38 x11-libs/libXfixes
39 x11-libs/libXext
40 x11-libs/libSM
41 x11-libs/libICE
42 x11-libs/libX11
43 x11-libs/libXau
44 x11-libs/libXdmcp
45 media-gfx/imagemagick
be4358ee Leonardo Valeri Manera2008-05-12 00:05:11 +020046 media-libs/libpng:1.2
a54d8ec6 Leonardo Valeri Manera2008-04-29 00:01:02 +020047 media-libs/fontconfig
be4358ee
LVM
Leonardo Valeri Manera2008-05-12 00:05:11 +020048 media-libs/freetype:2
49 dev-libs/libxml2:2
a54d8ec6
LVM
Leonardo Valeri Manera2008-04-29 00:01:02 +020050 dev-libs/boost
51 app-text/aiksaurus
52 app-text/sgmltools-lite
53 virtual/aspell-dict
be4358ee Leonardo Valeri Manera2008-05-12 00:05:11 +020054 >=dev-lang/python-2.3.4
a54d8ec6
LVM
Leonardo Valeri Manera2008-04-29 00:01:02 +020055 cups? ( virtual/lpr )
56 latex? (
57 virtual/latex-base
58 virtual/ghostscript
59 app-text/noweb
60 dev-tex/dvipost
61 dev-tex/chktex
62 || (
63 dev-tex/latex2html
64 dev-tex/tth
65 dev-tex/hevea
66 dev-tex/tex4ht
67 )
68 )
69 linguas_he? ( dev-tex/ivritex )"
70
71DEPEND="${RDEPEND}
72 x11-proto/xproto
73 nls? ( sys-devel/gettext )"
74
75src_unpack() {
76 unpack ${A}
77 cd "${S}"
be4358ee Leonardo Valeri Manera2008-05-12 00:05:11 +020078 # bug #125309
a54d8ec6
LVM
Leonardo Valeri Manera2008-04-29 00:01:02 +020079 epatch "${FILESDIR}"/${PN}-1.5.0-gentoo.patch || die
80}
81
82src_compile() {
83 append-flags "$(test-flags -fno-stack-protector -fno-stack-protector-all)"
84 replace-flags "-Os" "-O2"
85 tc-export CXX
86
87 unset LINGUAS
88
89 econf \
90 $(use_enable nls) \
91 $(use_enable debug) \
9b6fb523
LVM
Leonardo Valeri Manera2008-05-06 22:49:05 +020092 --disable-pch --with-aspell --without-included-boost || \
93 die "econf failed"
a54d8ec6
LVM
Leonardo Valeri Manera2008-04-29 00:01:02 +020094 emake || die "emake failed"
95}
96
97src_install() {
98 local mylinguas="${LINGUAS}"
99
100 unset LINGUAS
101 emake DESTDIR="${D}" install || die "emake install failed"
102
103 LINGUAS="${mylinguas}"
104
105 dodoc ANNOUNCE ChangeLog NEWS README RELEASE-NOTES UPGRADING
106
107 if use linguas_he ; then
108 insinto /usr/share/lyx/bind
109 doins "${DISTDIR}"/hebrew.bind
110 dodoc "${DISTDIR}"/preferences
111 fi
112
113 domenu "${FILESDIR}"/lyx.desktop
114
be4358ee
LVM
Leonardo Valeri Manera2008-05-12 00:05:11 +0200115 # install the latex-xft fonts, which should fix
116 # the problems outlined in bug #15629
117 # <obz@gentoo.org>
a54d8ec6
LVM
Leonardo Valeri Manera2008-04-29 00:01:02 +0200118 cd "${WORKDIR}"/${FONT_P}
119 emake DESTDIR="${D}" install || die "Font installation failed"
120
121 font_src_install
122
be4358ee Leonardo Valeri Manera2008-05-12 00:05:11 +0200123 # fix for bug 91108
a54d8ec6
LVM
Leonardo Valeri Manera2008-04-29 00:01:02 +0200124 if use latex ; then
125 dosym ../../../lyx/tex /usr/share/texmf/tex/latex/lyx
126 fi
127}
128
129pkg_postinst() {
130 font_pkg_postinst
131
be4358ee Leonardo Valeri Manera2008-05-12 00:05:11 +0200132 # fix for bug 91108
a54d8ec6
LVM
Leonardo Valeri Manera2008-04-29 00:01:02 +0200133 if use latex ; then
134 texhash
135 fi
136
137 if use linguas_he ; then
138 elog
139 elog "How to use Hebrew in LyX:"
140 elog "bunzip2 /usr/share/doc/${PF}/preferences.bz2 into ~/.lyx/preferences"
141 elog "or, read http://cs.haifa.ac.il/~dekelts/lyx/instructions2.html"
142 elog "for instructions on using lyx's own preferences dialog to equal effect."
143 elog
144 fi
145
146 elog
147 elog "There are known issues in the case of 1.4->1.5 config files transition."
148 elog "In case your File->Export list is incomplete try reconfiguring or even"
149 elog "remove the old configuration files in ~/.lyx ."
150 elog
151}
152
153pkg_postrm() {
154 if use latex ; then
155 texhash
156 fi
157}