Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 458802
Collapse All | Expand All

(-)asciidoc-8.6.8.ebuild (-19 / +24 lines)
Lines 2-14 Link Here
2
# Distributed under the terms of the GNU General Public License v2
2
# Distributed under the terms of the GNU General Public License v2
3
# $Header: /var/cvsroot/gentoo-x86/app-text/asciidoc/asciidoc-8.6.8.ebuild,v 1.2 2012/12/27 19:09:35 ottxor Exp $
3
# $Header: /var/cvsroot/gentoo-x86/app-text/asciidoc/asciidoc-8.6.8.ebuild,v 1.2 2012/12/27 19:09:35 ottxor Exp $
4
4
5
EAPI="3"
5
EAPI=5
6
6
7
PYTHON_DEPEND="2:2.5"
7
PYTHON_COMPAT=( python{2_5,2_6,2_7} pypy{1_9,2_0} )
8
RESTRICT_PYTHON_ABIS="3.*"
9
8
10
[ "$PV" == "9999" ] && inherit mercurial autotools
9
[ "$PV" == "9999" ] && inherit mercurial autotools
11
inherit python
10
inherit python-r1
12
11
13
DESCRIPTION="A text document format for writing short documents, articles, books and UNIX man pages"
12
DESCRIPTION="A text document format for writing short documents, articles, books and UNIX man pages"
14
HOMEPAGE="http://www.methods.co.nz/asciidoc/"
13
HOMEPAGE="http://www.methods.co.nz/asciidoc/"
Lines 29-42 RDEPEND=">=app-text/docbook-xsl-styleshe Link Here
29
		dev-libs/libxslt
28
		dev-libs/libxslt
30
		graphviz? ( media-gfx/graphviz )
29
		graphviz? ( media-gfx/graphviz )
31
		app-text/docbook-xml-dtd:4.5
30
		app-text/docbook-xml-dtd:4.5
32
		highlight? ( || ( dev-python/pygments dev-util/source-highlight ) )
31
		highlight? ( || ( dev-python/pygments[${PYTHON_USEDEP}] dev-util/source-highlight ) )
32
		${PYTHON_DEPS}
33
"
33
"
34
DEPEND="test? ( dev-util/source-highlight
34
DEPEND="test? ( dev-util/source-highlight
35
			media-sound/lilypond
35
			media-sound/lilypond
36
			media-gfx/imagemagick
36
			media-gfx/imagemagick
37
			dev-texlive/texlive-latex
37
			dev-texlive/texlive-latex
38
			app-text/dvipng
38
			app-text/dvipng
39
			media-gfx/graphviz )
39
			media-gfx/graphviz
40
			${PYTHON_DEPS} )
40
"
41
"
41
42
42
if [ "$PV" == "9999" ]; then
43
if [ "$PV" == "9999" ]; then
Lines 46-55 if [ "$PV" == "9999" ]; then Link Here
46
		dev-util/source-highlight"
47
		dev-util/source-highlight"
47
fi
48
fi
48
49
49
pkg_setup() {
50
	python_set_active_version 2
51
}
52
53
src_prepare() {
50
src_prepare() {
54
	if ! use vim-syntax; then
51
	if ! use vim-syntax; then
55
		sed -i -e '/^install/s/install-vim//' Makefile.in || die
52
		sed -i -e '/^install/s/install-vim//' Makefile.in || die
Lines 68-73 src_prepare() { Link Here
68
}
65
}
69
66
70
src_configure() {
67
src_configure() {
68
	python_export_best
69
71
	econf --sysconfdir="${EPREFIX}"/usr/share
70
	econf --sysconfdir="${EPREFIX}"/usr/share
72
}
71
}
73
72
Lines 75-106 src_compile() { Link Here
75
	default
74
	default
76
75
77
	if [ "$PV" == "9999" ]; then
76
	if [ "$PV" == "9999" ]; then
78
		( cd doc && aap -f main.aap ../{CHANGELOG,README,BUGS} )
77
		cd doc || die
78
		aap -f main.aap ../{CHANGELOG,README,BUGS} || die
79
	fi
79
	fi
80
}
80
}
81
81
82
src_install() {
82
src_install() {
83
	use vim-syntax && dodir /usr/share/vim/vimfiles
83
	use vim-syntax && dodir /usr/share/vim/vimfiles
84
84
85
	emake DESTDIR="${D}" install || die "install failed"
85
	emake DESTDIR="${D}" install
86
86
87
	python_convert_shebangs -r 2 "${D}"
87
	python_replicate_script "${ED}"/usr/bin/*.py
88
88
89
	if use examples; then
89
	if use examples; then
90
		# This is a symlink to a directory
90
		# This is a symlink to a directory
91
		rm examples/website/images || die
91
		rm examples/website/images || die
92
92
93
		insinto /usr/share/doc/${PF}
93
		dodoc -r examples
94
		doins -r examples || die
94
		docompress -x /usr/share/doc/${PF}/examples
95
		dosym ../../../asciidoc/images /usr/share/doc/${PF}/examples || die
95
		dosym ../../../asciidoc/images /usr/share/doc/${PF}/examples
96
	fi
96
	fi
97
97
98
	dodoc BUGS CHANGELOG README docbook-xsl/asciidoc-docbook-xsl.txt \
98
	dodoc BUGS CHANGELOG README docbook-xsl/asciidoc-docbook-xsl.txt \
99
			dblatex/dblatex-readme.txt filters/code/code-filter-readme.txt || die
99
			dblatex/dblatex-readme.txt filters/code/code-filter-readme.txt
100
}
101
102
python_test() {
103
	local -x ASCIIDOC_PY=../asciidoc.py
104
	"${PYTHON}" test${PN}.py update || die "Tests fail with ${EPYTHON}"
105
	"${PYTHON}" test${PN}.py run || die "Tests fail with ${EPYTHON}"
100
}
106
}
101
107
102
src_test() {
108
src_test() {
103
	cd tests || die
109
	cd tests || die
104
	ASCIIDOC_PY=../asciidoc.py "$(PYTHON)" test${PN}.py update || die
110
	python_foreach_impl python_test
105
	ASCIIDOC_PY=../asciidoc.py "$(PYTHON)" test${PN}.py run || die
106
}
111
}

Return to bug 458802