Diff libsigrok-0.3.0 with a libsigrok-0.4.0

/usr/portage/sci-libs/libsigrok/libsigrok-0.4.0.ebuild 2019-12-11 02:41:00.000000000 +0300
1 1
# Copyright 1999-2019 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
EAPI="5"
4
EAPI="6"
5 5

  
6
inherit eutils autotools
6
PYTHON_COMPAT=( python{2_7,3_{5,6}} )
7

  
8
inherit eutils python-single-r1 java-pkg-opt-2
7 9

  
8 10
if [[ ${PV} == "9999" ]]; then
9 11
	EGIT_REPO_URI="git://sigrok.org/${PN}"
10 12
	inherit git-r3 autotools
11 13
else
12 14
	SRC_URI="https://sigrok.org/download/source/${PN}/${P}.tar.gz"
13
	KEYWORDS="amd64 x86"
15
	KEYWORDS="~amd64 ~x86"
14 16
fi
15 17

  
16 18
DESCRIPTION="basic hardware drivers for logic analyzers and input/output file format support"
17 19
HOMEPAGE="https://sigrok.org/wiki/Libsigrok"
18 20

  
19 21
LICENSE="GPL-3"
20
SLOT="0/2"
21
IUSE="ftdi serial static-libs test usb"
22
SLOT="0/3"
23
IUSE="cxx ftdi java parport python serial static-libs test usb"
22 24
RESTRICT="!test? ( test )"
25
REQUIRED_USE="java? ( cxx ) python? ( cxx ${PYTHON_REQUIRED_USE} )"
23 26

  
24 27
# We also support librevisa, but that isn't in the tree ...
25 28
LIB_DEPEND=">=dev-libs/glib-2.32.0[static-libs(+)]
26 29
	>=dev-libs/libzip-0.8:=[static-libs(+)]
30
	cxx? ( dev-cpp/glibmm:2[static-libs(+)] )
31
	python? ( ${PYTHON_DEPS} >=dev-python/pygobject-3.0.0[${PYTHON_USEDEP}] )
27 32
	ftdi? ( >=dev-embedded/libftdi-0.16:=[static-libs(+)] )
28
	serial? ( >=dev-libs/libserialport-0.1.0[static-libs(+)] )
33
	parport? ( sys-libs/libieee1284[static-libs(+)] )
34
	serial? ( >=dev-libs/libserialport-0.1.1[static-libs(+)] )
29 35
	usb? ( virtual/libusb:1[static-libs(+)] )"
30 36
RDEPEND="!static-libs? ( ${LIB_DEPEND//\[static-libs(+)]} )
31
	static-libs? ( ${LIB_DEPEND} )"
37
	static-libs? ( ${LIB_DEPEND} )
38
	java? ( >=virtual/jre-1.4 )"
32 39
DEPEND="${LIB_DEPEND//\[static-libs(+)]}
33 40
	test? ( >=dev-libs/check-0.9.4 )
41
	cxx? ( app-doc/doxygen )
42
	java? (
43
		>=dev-lang/swig-3.0.6
44
		>=virtual/jdk-1.4
45
	)
46
	python? (
47
		dev-python/setuptools[${PYTHON_USEDEP}]
48
		dev-python/numpy[${PYTHON_USEDEP}]
49
		>=dev-lang/swig-3.0.6
50
	)
34 51
	virtual/pkgconfig"
35 52

  
36
src_prepare() {
37
	epatch "${FILESDIR}"/${PN}-0.3.0-configure-flags.patch
38
	epatch "${FILESDIR}"/${PN}-0.3.0-no-check-linkage.patch
39
	eautoreconf
40

  
41
	# Deal with libftdi-0.x & libftdi-1.x changes.
42
	if has_version dev-embedded/libftdi:1 ; then
43
		sed -i 's:libftdi >= 0.16:libftdi1 >= 0.16:g' configure || die
44
	fi
53
pkg_setup() {
54
	use python && python-single-r1_pkg_setup
55
	java-pkg-opt-2_pkg_setup
56
}
45 57

  
46
	# Fix implicit decl w/usleep.
47
	sed -i '1i#include <unistd.h>' hardware/asix-sigma/asix-sigma.c || die
58
src_prepare() {
59
	[[ ${PV} == "9999" ]] && eautoreconf
60
	eapply_user
48 61
}
49 62

  
50 63
src_configure() {
51 64
	econf \
52
		$(use_enable ftdi libftdi) \
53
		$(use_enable serial libserialport) \
54
		$(use_enable usb libusb) \
65
		$(use_with ftdi libftdi) \
66
		$(use_with parport libieee1284) \
67
		$(use_with serial libserialport) \
68
		$(use_with usb libusb) \
69
		$(use_enable cxx) \
70
		$(use_enable java) \
71
		$(use_enable python) \
72
		--disable-ruby \
55 73
		$(use_enable static-libs static)
56 74
}
57 75

  
Thank you!