/[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.3 - (hide annotations) (download)
Mon Feb 22 20:48:29 2010 UTC (8 years, 5 months ago) by abcd
Branch: MAIN
Changes since 1.2: +16 -15 lines
Add prefix keywords, support; bump EAPI
(Portage version: -svn/cvs/Linux i686)

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 abcd 1.3 # $Header: /var/cvsroot/gentoo-x86/app-text/xdvik/xdvik-22.84.16.ebuild,v 1.2 2010/01/09 13:22:12 aballier Exp $
4    
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 aballier 1.1 epatch "${FILESDIR}/${P}-open-mode.patch"
33 aballier 1.2 epatch "${FILESDIR}/${P}-cvararg.patch"
34     # Make sure system kpathsea headers are used
35     cd "${WORKDIR}/${P}/texk/kpathsea"
36     for i in *.h ; do echo "#include_next \"$i\"" > $i; done
37 aballier 1.1 }
38    
39 abcd 1.3 src_configure() {
40 aballier 1.1 cd "${WORKDIR}/${P}"
41    
42     tc-export CC AR RANLIB
43    
44     local toolkit
45    
46     if use motif ; then
47     toolkit="motif"
48     elif use neXt ; then
49     toolkit="neXtaw"
50     elif use Xaw3d ; then
51     toolkit="xaw3d"
52     else
53     toolkit="xaw"
54     fi
55    
56     econf --disable-multiplatform \
57     --enable-t1lib \
58     --enable-gf \
59     --with-system-t1lib \
60     --with-system-kpathsea \
61 abcd 1.3 --with-kpathsea-include="${EPREFIX}"/usr/include/kpathsea \
62 aballier 1.1 --with-xdvi-x-toolkit="${toolkit}"
63 abcd 1.3 }
64 aballier 1.1
65 abcd 1.3 src_compile() {
66     emake kpathsea_dir="${EPREFIX}/usr/include/kpathsea" texmf="${EPREFIX}${TEXMF_PATH}" || die
67 aballier 1.1 use emacs && elisp-compile xdvi-search.el
68     }
69    
70     src_install() {
71 abcd 1.3 einstall kpathsea_dir="${EPREFIX}/usr/include/kpathsea" texmf="${ED}${TEXMF_PATH}" || die "install failed"
72 aballier 1.1
73     dodir /etc/texmf/xdvi /etc/X11/app-defaults
74 abcd 1.3 mv "${ED}${TEXMF_PATH}/xdvi/XDvi" "${ED}etc/X11/app-defaults" || die "failed to move config file"
75 aballier 1.1 dosym {/etc/X11/app-defaults,"${TEXMF_PATH}/xdvi"}/XDvi || die "failed to symlink config file"
76 abcd 1.3 for i in $(find "${ED}${TEXMF_PATH}/xdvi" -type f -maxdepth 1) ; do
77     mv ${i} "${ED}etc/texmf/xdvi" || die "failed to move $i"
78 aballier 1.1 dosym {/etc/texmf,"${TEXMF_PATH}"}/xdvi/$(basename ${i}) || die "failed to symlink $i"
79     done
80    
81     dodoc BUGS FAQ README.* || die "dodoc failed"
82    
83     use emacs && elisp-install tex-utils *.el *.elc
84    
85     doicon "${FILESDIR}/${PN}.png"
86     make_desktop_entry xdvi "XDVI" xdvik "Graphics;Viewer"
87 abcd 1.3 echo "MimeType=application/x-dvi;" >> "${ED}"usr/share/applications/xdvi-"${PN}".desktop
88 aballier 1.1 }
89    
90     pkg_postinst() {
91     if use emacs; then
92     elog "Add"
93 abcd 1.3 elog " (add-to-list 'load-path \"${EPREFIX}${SITELISP}/tex-utils\")"
94 aballier 1.1 elog " (require 'xdvi-search)"
95     elog "to your ~/.emacs file"
96     fi
97     }

  ViewVC Help
Powered by ViewVC 1.1.20