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

Contents of /app-text/xdvik/xdvik-22.85-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (hide annotations) (download)
Thu Jul 5 11:03:09 2012 UTC (2 years, 1 month ago) by blueness
Branch: MAIN
Changes since 1.5: +2 -2 lines
Keyword ~mips

(Portage version: 2.1.10.65/cvs/Linux x86_64)

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

  ViewVC Help
Powered by ViewVC 1.1.20