dev-libs/protobuf-c: compile-fix ensure new enough dev-libs/protobuf
[gentoo.git] / dev-libs / protobuf-c / protobuf-c-1.3.2.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 autotools multilib-minimal
7
8 MY_PV="${PV/_/-}"
9 MY_P="${PN}-${MY_PV}"
10
11 DESCRIPTION="Protocol Buffers implementation in C"
12 HOMEPAGE="https://github.com/protobuf-c/protobuf-c"
13 SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${MY_PV}/${MY_P}.tar.gz"
14
15 LICENSE="BSD-2"
16 # Subslot == SONAME version
17 SLOT="0/1.0.0"
18 KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 s390 sparc x86"
19 IUSE="static-libs test"
20 RESTRICT="!test? ( test )"
21
22 BDEPEND=">=dev-libs/protobuf-3:0
23         virtual/pkgconfig[${MULTILIB_USEDEP}]"
24 DEPEND=">=dev-libs/protobuf-3:0=[${MULTILIB_USEDEP}]"
25 RDEPEND="${DEPEND}"
26
27 S="${WORKDIR}/${MY_P}"
28
29 src_prepare() {
30         default
31         if ! use test; then
32                 eapply "${FILESDIR}"/${PN}-1.3.0-no-build-tests.patch
33         fi
34
35         eautoreconf
36 }
37
38 multilib_src_configure() {
39         local myeconfargs=(
40                 $(use_enable static-libs static)
41         )
42         ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
43 }