Merge github#925: dev-perl/M*: updates and related fixes.
[gentoo.git] / dev-libs / json-c / json-c-0.11.ebuild
1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6
7 AUTOTOOLS_AUTORECONF=true
8
9 inherit autotools-utils
10
11 DESCRIPTION="A JSON implementation in C"
12 HOMEPAGE="https://github.com/json-c/json-c/wiki"
13 SRC_URI="https://s3.amazonaws.com/json-c_releases/releases/${P}.tar.gz"
14
15 LICENSE="MIT"
16 SLOT="0/0"
17 KEYWORDS="~alpha amd64 arm hppa ia64 ~ppc ppc64 ~s390 ~sh ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos"
18 IUSE="doc static-libs"
19
20 # tests break otherwise
21 AUTOTOOLS_IN_SOURCE_BUILD=1
22
23 src_prepare() {
24         sed -i -e "s:-Werror::" Makefile.am.inc || die
25         autotools-utils_src_prepare
26 }
27
28 src_configure() {
29         # Disable old lib compatibility
30         myeconfargs=(--disable-oldname-compat)
31         autotools-utils_src_configure
32 }
33
34 src_test() {
35         export USE_VALGRIND=0 VERBOSE=1
36         autotools-utils_src_test
37 }
38
39 src_install() {
40         use doc && HTML_DOCS=( "${S}"/doc/html )
41         autotools-utils_src_install
42
43         # add symlink for projects not using pkgconfig
44         dosym ../json-c /usr/include/json-c/json
45 }