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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Sun Aug 28 15:47:25 2011 UTC (3 years, 4 months ago) by naota
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Move the previous change to -r0

(Portage version: 2.2.0_alpha51/cvs/Linux x86_64)

1 # Copyright 1999-2011 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-r1.ebuild,v 1.1 2011/08/25 22:29:45 naota Exp $
4
5 EAPI=3
6 inherit eutils flag-o-matic elisp-common toolchain-funcs
7
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 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
13 SLOT="0"
14 LICENSE="GPL-2"
15 IUSE="motif neXt Xaw3d emacs"
16
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 !motif? ( neXt? ( x11-libs/neXtaw )
23 !neXt? ( Xaw3d? ( x11-libs/libXaw3d ) ) )
24 virtual/latex-base
25 !<app-text/texlive-2007"
26 DEPEND="sys-devel/flex
27 virtual/yacc
28 ${RDEPEND}"
29 TEXMF_PATH=/usr/share/texmf
30 S=${WORKDIR}/${P}/texk/xdvik
31
32 src_prepare() {
33 epatch "${FILESDIR}"/${P}-open-mode.patch \
34 "${FILESDIR}"/${P}-cvararg.patch \
35 "${FILESDIR}"/${P}-parallel_make.patch
36 has_version '>=app-text/texlive-core-2009' && epatch "${FILESDIR}"/${P}-kpathsea_version.patch
37 # Make sure system kpathsea headers are used
38 cd "${WORKDIR}/${P}/texk/kpathsea"
39 for i in *.h ; do echo "#include_next \"$i\"" > $i; done
40 }
41
42 src_configure() {
43 cd "${WORKDIR}/${P}"
44
45 tc-export CC AR RANLIB
46
47 local toolkit
48
49 if use motif ; then
50 toolkit="motif"
51 elif use neXt ; then
52 toolkit="neXtaw"
53 elif use Xaw3d ; then
54 toolkit="xaw3d"
55 else
56 toolkit="xaw"
57 fi
58
59 econf --disable-multiplatform \
60 --enable-t1lib \
61 --enable-gf \
62 --with-system-t1lib \
63 --with-system-kpathsea \
64 --with-kpathsea-include="${EPREFIX}"/usr/include/kpathsea \
65 --with-xdvi-x-toolkit="${toolkit}"
66 }
67
68 src_compile() {
69 emake kpathsea_dir="${EPREFIX}/usr/include/kpathsea" texmf="${EPREFIX}${TEXMF_PATH}" || die
70 use emacs && elisp-compile xdvi-search.el
71 }
72
73 src_install() {
74 einstall kpathsea_dir="${EPREFIX}/usr/include/kpathsea" texmf="${ED}${TEXMF_PATH}" || die "install failed"
75
76 dodir /etc/texmf/xdvi /etc/X11/app-defaults
77 mv "${ED}${TEXMF_PATH}/xdvi/XDvi" "${ED}etc/X11/app-defaults" || die "failed to move config file"
78 dosym {/etc/X11/app-defaults,"${TEXMF_PATH}/xdvi"}/XDvi || die "failed to symlink config file"
79 for i in $(find "${ED}${TEXMF_PATH}/xdvi" -maxdepth 1 -type f) ; do
80 mv ${i} "${ED}etc/texmf/xdvi" || die "failed to move $i"
81 dosym {/etc/texmf,"${TEXMF_PATH}"}/xdvi/$(basename ${i}) || die "failed to symlink $i"
82 done
83
84 dodoc BUGS FAQ README.* || die "dodoc failed"
85
86 use emacs && elisp-install tex-utils *.el *.elc
87
88 doicon "${FILESDIR}"/${PN}.xpm
89 make_desktop_entry xdvi "XDVI" xdvik "Graphics;Viewer"
90 echo "MimeType=application/x-dvi;" >> "${ED}"usr/share/applications/xdvi-"${PN}".desktop
91 }
92
93 pkg_postinst() {
94 if use emacs; then
95 elog "Add"
96 elog " (add-to-list 'load-path \"${EPREFIX}${SITELISP}/tex-utils\")"
97 elog " (require 'xdvi-search)"
98 elog "to your ~/.emacs file"
99 fi
100 }

  ViewVC Help
Powered by ViewVC 1.1.20