Merge the GLEP 67 transition changes
[gentoo.git] / dev-tex / chktex / chktex-1.7.2.ebuild
1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=4
6 AUTOTOOLS_AUTORECONF=true
7
8 inherit autotools-utils
9
10 DESCRIPTION="Checks latex source for common mistakes"
11 HOMEPAGE="http://www.nongnu.org/chktex/"
12 SRC_URI="http://download.savannah.gnu.org/releases/chktex/${P}.tar.gz"
13
14 LICENSE="GPL-2"
15 SLOT="0"
16 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
17 IUSE="debug doc +pcre test"
18 # Tests fail without pcre. Enable pcre by default and make tests depend on it.
19 REQUIRED_USE="test? ( pcre )"
20
21 RDEPEND="virtual/latex-base
22         dev-lang/perl
23         pcre? ( dev-libs/libpcre )"
24 DEPEND="${RDEPEND}
25         sys-apps/groff
26         doc? ( dev-tex/latex2html )"
27
28 PATCHES=( "${FILESDIR}/${PN}-1.7.1-asneeded.patch" )
29 DOCS=( NEWS )
30
31 src_configure() {
32         local myeconfargs=(
33                 $(use_enable debug debug-info)
34                 $(use_enable pcre)
35         )
36         autotools-utils_src_configure
37 }
38
39 src_compile() {
40         autotools-utils_src_compile
41         use doc && autotools-utils_src_compile html
42 }
43
44 src_install() {
45         if use doc ; then
46                 HTML_DOCS=("${AUTOTOOLS_BUILD_DIR}/HTML/ChkTeX/")
47                 DOCS+=("${AUTOTOOLS_BUILD_DIR}/HTML/ChkTeX.tex")
48         fi
49         autotools-utils_src_install
50         doman *.1
51 }