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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Sat Jul 10 13:26:59 2010 UTC (4 years, 2 months ago) by ssuominen
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
old, stabilize for everyone
(Portage version: 2.2_rc67/cvs/Linux x86_64)

1 # Copyright 1999-2009 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.14-r1.ebuild,v 1.1 2009/02/08 11:07:00 aballier Exp $
4
5 inherit eutils flag-o-matic elisp-common toolchain-funcs
6
7 XDVIK_JP="${P}-j1.40.patch.gz"
8
9 DESCRIPTION="DVI previewer for X Window System"
10 HOMEPAGE="http://xdvi.sourceforge.net/ http://xdvi.sourceforge.jp/"
11 SRC_URI="mirror://sourceforge/xdvi/${P}.tar.gz
12 cjk? ( mirror://sourceforge.jp/xdvi/31972/${XDVIK_JP} )"
13
14 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd"
15 SLOT="0"
16 LICENSE="GPL-2"
17 IUSE="cjk motif neXt Xaw3d emacs"
18
19 RDEPEND=">=media-libs/t1lib-5.0.2
20 x11-libs/libXmu
21 x11-libs/libXp
22 x11-libs/libXpm
23 motif? ( x11-libs/openmotif )
24 !motif? ( neXt? ( x11-libs/neXtaw )
25 !neXt? ( Xaw3d? ( x11-libs/Xaw3d ) ) )
26 cjk? ( || ( app-text/texlive-core app-text/ptex )
27 >=media-libs/freetype-2
28 >=media-fonts/kochi-substitute-20030809-r3 )
29 !cjk? ( virtual/latex-base )
30 !<app-text/texlive-2007"
31 DEPEND="${RDEPEND}"
32
33 src_unpack() {
34 unpack ${P}.tar.gz
35 cd "${S}"
36 if use cjk ; then
37 epatch "${DISTDIR}/${XDVIK_JP}"
38 cat >>"${S}/texk/xdvik/vfontmap.sample"<<-EOF
39
40 # TrueType fonts
41 min /usr/share/fonts/kochi-substitute/kochi-mincho-subst.ttf
42 nmin /usr/share/fonts/kochi-substitute/kochi-mincho-subst.ttf
43 goth /usr/share/fonts/kochi-substitute/kochi-gothic-subst.ttf
44 tmin /usr/share/fonts/kochi-substitute/kochi-mincho-subst.ttf
45 tgoth /usr/share/fonts/kochi-substitute/kochi-gothic-subst.ttf
46 ngoth /usr/share/fonts/kochi-substitute/kochi-gothic-subst.ttf
47 jis /usr/share/fonts/kochi-substitute/kochi-mincho-subst.ttf
48 jisg /usr/share/fonts/kochi-substitute/kochi-gothic-subst.ttf
49 dm /usr/share/fonts/kochi-substitute/kochi-mincho-subst.ttf
50 dg /usr/share/fonts/kochi-substitute/kochi-gothic-subst.ttf
51 mgoth /usr/share/fonts/kochi-substitute/kochi-gothic-subst.ttf
52 fmin /usr/share/fonts/kochi-substitute/kochi-mincho-subst.ttf
53 fgoth /usr/share/fonts/kochi-substitute/kochi-gothic-subst.ttf
54 EOF
55 fi
56 }
57
58 src_compile() {
59 tc-export CC AR RANLIB
60
61 local TEXMF_PATH=$(kpsewhich --expand-var='$TEXMFMAIN')
62 local myconf toolkit
63
64 if use motif ; then
65 toolkit="motif"
66 elif use neXt ; then
67 toolkit="neXtaw"
68 elif use Xaw3d ; then
69 toolkit="xaw3d"
70 else
71 toolkit="xaw"
72 fi
73
74 econf --disable-multiplatform \
75 --enable-t1lib \
76 --enable-gf \
77 --with-system-t1lib \
78 --with-system-kpathsea \
79 --with-kpathsea-include=/usr/include/kpathsea \
80 --with-xdvi-x-toolkit="${toolkit}" \
81 ${myconf} || die "econf failed"
82
83 cd texk/xdvik
84 emake kpathsea_dir="/usr/include/kpathsea" texmf="${TEXMF_PATH}" || die
85 use emacs && elisp-compile xdvi-search.el
86 }
87
88 src_install() {
89
90 dodir /etc/texmf/xdvi /etc/X11/app-defaults
91
92 local TEXMF_PATH=$(kpsewhich --expand-var='$TEXMFMAIN')
93
94 cd "${S}/texk/xdvik"
95 einstall kpathsea_dir="/usr/include/kpathsea" texmf="${D}${TEXMF_PATH}" || die "install failed"
96
97 mv "${D}${TEXMF_PATH}/xdvi/XDvi" "${D}etc/X11/app-defaults" || die "failed to move config file"
98 dosym {/etc/X11/app-defaults,"${TEXMF_PATH}/xdvi"}/XDvi || die "failed to symlink config file"
99 for i in $(find "${D}${TEXMF_PATH}/xdvi" -type f -maxdepth 1) ; do
100 mv ${i} "${D}etc/texmf/xdvi" || die "failed to move $i"
101 dosym {/etc/texmf,"${TEXMF_PATH}"}/xdvi/$(basename ${i}) || die "failed to symlink $i"
102 done
103
104 dodoc BUGS FAQ README.* || die "dodoc failed"
105 if use cjk; then
106 dodoc CHANGES.xdvik-jp || die "dodoc failed"
107 docinto READMEs
108 dodoc READMEs/* || die "dodoc failed"
109 fi
110
111 use emacs && elisp-install tex-utils *.el *.elc
112 doicon "${FILESDIR}/${PN}.png"
113 make_desktop_entry xdvi "XDVI" xdvik "Graphics;Viewer"
114 echo "MimeType=application/x-dvi;" >> "${D}"usr/share/applications/xdvi-"${PN}".desktop
115 }
116
117 pkg_postinst() {
118 if use emacs; then
119 elog "Add"
120 elog " (add-to-list 'load-path \"${SITELISP}/tex-utils\")"
121 elog " (require 'xdvi-search)"
122 elog "to your ~/.emacs file"
123 fi
124 }

  ViewVC Help
Powered by ViewVC 1.1.20