/[gentoo-x86]/app-text/txt2tags/txt2tags-2.6.ebuild
Gentoo

Contents of /app-text/txt2tags/txt2tags-2.6.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.9 - (show annotations) (download)
Thu Mar 22 21:49:41 2012 UTC (2 years, 8 months ago) by floppym
Branch: MAIN
Changes since 1.8: +4 -2 lines
Set PYTHON_DEPEND=2, bug 312125. Remove old.

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

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/app-text/txt2tags/txt2tags-2.6.ebuild,v 1.8 2012/03/06 16:09:50 ranger Exp $
4
5 EAPI="2"
6 PYTHON_USE_WITH="tk"
7 PYTHON_USE_WITH_OPT="tk"
8 PYTHON_DEPEND="2"
9
10 inherit eutils elisp-common python
11
12 DESCRIPTION="A tool for generating marked up documents (HTML, SGML, ...) from a plain text file with markup"
13 HOMEPAGE="http://txt2tags.org/"
14 SRC_URI="http://${PN}.googlecode.com/files/${P}.tgz"
15
16 LICENSE="GPL-2"
17 SLOT="0"
18 KEYWORDS="amd64 ppc ~ppc64 x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris"
19 IUSE="emacs tk vim-syntax"
20
21 DEPEND="dev-lang/python
22 tk? ( dev-lang/tk )
23 vim-syntax? (
24 || (
25 app-editors/vim
26 app-editors/gvim
27 )
28 )
29 emacs? ( virtual/emacs )"
30
31 RDEPEND="${DEPEND}"
32
33 SITEFILE="51${PN}-gentoo.el"
34
35 src_compile() {
36 if use emacs; then
37 elisp-compile extras/txt2tags-mode.el || die "elisp-compile failed"
38 fi
39 }
40
41 src_install() {
42 dobin txt2tags || die
43
44 dodoc README ChangeLog* || die
45 insinto /usr/share/doc/${PF}
46 doins doc/*.{pdf,t2t} || die
47 # samples go into "samples" doc directory
48 docinto samples
49 dodoc samples/sample.* || die
50 docinto samples/css
51 dodoc samples/css/* || die
52 docinto samples/img
53 dodoc samples/img/* || die
54 docinto samples/module
55 dodoc samples/module/* || die
56 # extras go into "extras" doc directory
57 insinto /usr/share/doc/${PF}/extras
58 doins -r extras/* || die
59 newman doc/manpage.man txt2tags.1 || die
60
61 # make .po files
62 for pofile in "${S}"/po/*.po; do
63 msgfmt -o ${pofile%%.po}.mo ${pofile}
64 done
65 domo po/*.mo
66
67 # emacs support
68 if use emacs; then
69 elisp-install ${PN} extras/txt2tags-mode.{el,elc}
70 elisp-site-file-install "${FILESDIR}/${SITEFILE}"
71 fi
72
73 if use vim-syntax; then
74 insinto /usr/share/vim/vimfiles/syntax/
75 doins extras/txt2tags.vim || die
76
77 echo 'au BufNewFile,BufRead *.t2t set ft=txt2tags' > "${T}/${PN}.vim"
78 insinto /usr/share/vim/vimfiles/ftdetect
79 doins "${T}/${PN}.vim" || die
80 fi
81
82 python_convert_shebangs -r 2 "${D}"
83 }
84
85 pkg_postinst() {
86 use emacs && elisp-site-regen
87 }
88
89 pkg_postrm() {
90 use emacs && elisp-site-regen
91 }

  ViewVC Help
Powered by ViewVC 1.1.20