/[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.4 - (hide annotations) (download)
Mon Apr 26 09:55:10 2010 UTC (8 years, 2 months ago) by ssuominen
Branch: MAIN
Changes since 1.3: +4 -3 lines
Fix parallel make failure wrt #293541 by Ed Catmur.
(Portage version: 2.2_rc67/cvs/Linux x86_64)

1 aballier 1.2 # Copyright 1999-2010 Gentoo Foundation
2 aballier 1.1 # Distributed under the terms of the GNU General Public License v2
3 ssuominen 1.4 # $Header: /var/cvsroot/gentoo-x86/app-text/xdvik/xdvik-22.84.16.ebuild,v 1.3 2010/02/22 20:48:29 abcd Exp $
4 abcd 1.3
5     EAPI=3
6 aballier 1.1
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 abcd 1.3 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 aballier 1.1 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 abcd 1.3 src_prepare() {
32 ssuominen 1.4 epatch "${FILESDIR}"/${P}-open-mode.patch \
33     "${FILESDIR}"/${P}-cvararg.patch \
34     "${FILESDIR}"/${P}-parallel_make.patch
35 aballier 1.2 # 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 aballier 1.1 }
39    
40 abcd 1.3 src_configure() {
41 aballier 1.1 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 abcd 1.3 --with-kpathsea-include="${EPREFIX}"/usr/include/kpathsea \
63 aballier 1.1 --with-xdvi-x-toolkit="${toolkit}"
64 abcd 1.3 }
65 aballier 1.1
66 abcd 1.3 src_compile() {
67     emake kpathsea_dir="${EPREFIX}/usr/include/kpathsea" texmf="${EPREFIX}${TEXMF_PATH}" || die
68 aballier 1.1 use emacs && elisp-compile xdvi-search.el
69     }
70    
71     src_install() {
72 abcd 1.3 einstall kpathsea_dir="${EPREFIX}/usr/include/kpathsea" texmf="${ED}${TEXMF_PATH}" || die "install failed"
73 aballier 1.1
74     dodir /etc/texmf/xdvi /etc/X11/app-defaults
75 abcd 1.3 mv "${ED}${TEXMF_PATH}/xdvi/XDvi" "${ED}etc/X11/app-defaults" || die "failed to move config file"
76 aballier 1.1 dosym {/etc/X11/app-defaults,"${TEXMF_PATH}/xdvi"}/XDvi || die "failed to symlink config file"
77 abcd 1.3 for i in $(find "${ED}${TEXMF_PATH}/xdvi" -type f -maxdepth 1) ; do
78     mv ${i} "${ED}etc/texmf/xdvi" || die "failed to move $i"
79 aballier 1.1 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 abcd 1.3 echo "MimeType=application/x-dvi;" >> "${ED}"usr/share/applications/xdvi-"${PN}".desktop
89 aballier 1.1 }
90    
91     pkg_postinst() {
92     if use emacs; then
93     elog "Add"
94 abcd 1.3 elog " (add-to-list 'load-path \"${EPREFIX}${SITELISP}/tex-utils\")"
95 aballier 1.1 elog " (require 'xdvi-search)"
96     elog "to your ~/.emacs file"
97     fi
98     }

  ViewVC Help
Powered by ViewVC 1.1.20