/[gentoo-x86]/app-text/xdvik/xdvik-22.84.16.ebuild
Gentoo

Contents of /app-text/xdvik/xdvik-22.84.16.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Sun Jun 20 09:31:06 2010 UTC (8 years, 5 months ago) by aballier
Branch: MAIN
Changes since 1.4: +2 -2 lines
fix find args order, by vapier, bug #324775
(Portage version: 2.2_rc67/cvs/Linux x86_64)

1 # Copyright 1999-2010 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/app-text/xdvik/xdvik-22.84.16.ebuild,v 1.4 2010/04/26 09:55:10 ssuominen Exp $
4
5 EAPI=3
6
7 inherit eutils flag-o-matic elisp-common toolchain-funcs
8
9 DESCRIPTION="DVI previewer for X Window System"
10 HOMEPAGE="http://xdvi.sourceforge.net/"
11 SRC_URI="mirror://sourceforge/xdvi/${P}.tar.gz"
12
13 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
14 SLOT="0"
15 LICENSE="GPL-2"
16 IUSE="motif neXt Xaw3d emacs"
17
18 RDEPEND=">=media-libs/t1lib-5.0.2
19 x11-libs/libXmu
20 x11-libs/libXp
21 x11-libs/libXpm
22 motif? ( x11-libs/openmotif )
23 !motif? ( neXt? ( x11-libs/neXtaw )
24 !neXt? ( Xaw3d? ( x11-libs/Xaw3d ) ) )
25 virtual/latex-base
26 !<app-text/texlive-2007"
27 DEPEND="${RDEPEND}"
28 TEXMF_PATH=/usr/share/texmf
29 S=${WORKDIR}/${P}/texk/xdvik
30
31 src_prepare() {
32 epatch "${FILESDIR}"/${P}-open-mode.patch \
33 "${FILESDIR}"/${P}-cvararg.patch \
34 "${FILESDIR}"/${P}-parallel_make.patch
35 # Make sure system kpathsea headers are used
36 cd "${WORKDIR}/${P}/texk/kpathsea"
37 for i in *.h ; do echo "#include_next \"$i\"" > $i; done
38 }
39
40 src_configure() {
41 cd "${WORKDIR}/${P}"
42
43 tc-export CC AR RANLIB
44
45 local toolkit
46
47 if use motif ; then
48 toolkit="motif"
49 elif use neXt ; then
50 toolkit="neXtaw"
51 elif use Xaw3d ; then
52 toolkit="xaw3d"
53 else
54 toolkit="xaw"
55 fi
56
57 econf --disable-multiplatform \
58 --enable-t1lib \
59 --enable-gf \
60 --with-system-t1lib \
61 --with-system-kpathsea \
62 --with-kpathsea-include="${EPREFIX}"/usr/include/kpathsea \
63 --with-xdvi-x-toolkit="${toolkit}"
64 }
65
66 src_compile() {
67 emake kpathsea_dir="${EPREFIX}/usr/include/kpathsea" texmf="${EPREFIX}${TEXMF_PATH}" || die
68 use emacs && elisp-compile xdvi-search.el
69 }
70
71 src_install() {
72 einstall kpathsea_dir="${EPREFIX}/usr/include/kpathsea" texmf="${ED}${TEXMF_PATH}" || die "install failed"
73
74 dodir /etc/texmf/xdvi /etc/X11/app-defaults
75 mv "${ED}${TEXMF_PATH}/xdvi/XDvi" "${ED}etc/X11/app-defaults" || die "failed to move config file"
76 dosym {/etc/X11/app-defaults,"${TEXMF_PATH}/xdvi"}/XDvi || die "failed to symlink config file"
77 for i in $(find "${ED}${TEXMF_PATH}/xdvi" -maxdepth 1 -type f) ; do
78 mv ${i} "${ED}etc/texmf/xdvi" || die "failed to move $i"
79 dosym {/etc/texmf,"${TEXMF_PATH}"}/xdvi/$(basename ${i}) || die "failed to symlink $i"
80 done
81
82 dodoc BUGS FAQ README.* || die "dodoc failed"
83
84 use emacs && elisp-install tex-utils *.el *.elc
85
86 doicon "${FILESDIR}/${PN}.png"
87 make_desktop_entry xdvi "XDVI" xdvik "Graphics;Viewer"
88 echo "MimeType=application/x-dvi;" >> "${ED}"usr/share/applications/xdvi-"${PN}".desktop
89 }
90
91 pkg_postinst() {
92 if use emacs; then
93 elog "Add"
94 elog " (add-to-list 'load-path \"${EPREFIX}${SITELISP}/tex-utils\")"
95 elog " (require 'xdvi-search)"
96 elog "to your ~/.emacs file"
97 fi
98 }

  ViewVC Help
Powered by ViewVC 1.1.20