dev-qt/qtxml: stable 5.14.2 for ppc, bug #719732
[gentoo.git] / dev-lang / swig / swig-4.0.0.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 inherit toolchain-funcs
7
8 DESCRIPTION="Simplified Wrapper and Interface Generator"
9 HOMEPAGE="http://www.swig.org/"
10 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
11
12 LICENSE="GPL-3+ BSD BSD-2"
13 SLOT="0"
14 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~x64-solaris ~x86-solaris"
15 IUSE="ccache doc pcre"
16 RESTRICT="test"
17
18 DEPEND="pcre? ( dev-libs/libpcre )
19         ccache? ( sys-libs/zlib )"
20 RDEPEND="${DEPEND}"
21
22 DOCS=( ANNOUNCE CHANGES CHANGES.current README TODO )
23
24 src_prepare() {
25         default
26         # https://github.com/swig/swig/pull/1796
27         sed -i \
28                 -e '/if pkg-config javascriptcoregtk-1.0/s:pkg-config:$PKGCONFIG:' \
29                 configure || die
30 }
31
32 src_configure() {
33         econf \
34                 PKGCONFIG="$(tc-getPKG_CONFIG)" \
35                 $(use_enable ccache) \
36                 $(use_with pcre)
37 }
38
39 src_install() {
40         default
41
42         if use doc; then
43                 docinto html
44                 dodoc -r Doc/{Devel,Manual}
45         fi
46 }