sci-libs/votca-tools: version bump
[gentoo.git] / sci-libs / libsigrok / libsigrok-9999.ebuild
1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI="6"
6
7 PYTHON_COMPAT=( python{2_7,3_{3,4,5}} )
8
9 inherit eutils python-single-r1 java-pkg-opt-2
10
11 if [[ ${PV} == "9999" ]]; then
12         EGIT_REPO_URI="git://sigrok.org/${PN}"
13         inherit git-r3 autotools
14 else
15         SRC_URI="http://sigrok.org/download/source/${PN}/${P}.tar.gz"
16         KEYWORDS="~amd64 ~x86"
17 fi
18
19 DESCRIPTION="provide basic hardware drivers for logic analyzers and input/output file format support"
20 HOMEPAGE="http://sigrok.org/wiki/Libsigrok"
21
22 LICENSE="GPL-3"
23 SLOT="0"
24 IUSE="cxx ftdi java parport python serial static-libs test usb"
25 REQUIRED_USE="java? ( cxx ) python? ( cxx ${PYTHON_REQUIRED_USE} )"
26
27 # We also support librevisa, but that isn't in the tree ...
28 LIB_DEPEND=">=dev-libs/glib-2.32.0[static-libs(+)]
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}] )
32         ftdi? ( >=dev-embedded/libftdi-0.16:=[static-libs(+)] )
33         parport? ( sys-libs/libieee1284[static-libs(+)] )
34         serial? ( >=dev-libs/libserialport-0.1.1[static-libs(+)] )
35         usb? ( virtual/libusb:1[static-libs(+)] )"
36 RDEPEND="!static-libs? ( ${LIB_DEPEND//\[static-libs(+)]} )
37         static-libs? ( ${LIB_DEPEND} )
38         java? ( >=virtual/jre-1.4 )"
39 DEPEND="${LIB_DEPEND//\[static-libs(+)]}
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-lang/swig-3.0.6
48         )
49         virtual/pkgconfig"
50
51 pkg_setup() {
52         use python && python-single-r1_pkg_setup
53         java-pkg-opt-2_pkg_setup
54 }
55
56 src_prepare() {
57         [[ ${PV} == "9999" ]] && eautoreconf
58         eapply_user
59 }
60
61 src_configure() {
62         econf \
63                 $(use_with ftdi libftdi) \
64                 $(use_with parport libieee1284) \
65                 $(use_with serial libserialport) \
66                 $(use_with usb libusb) \
67                 $(use_enable cxx) \
68                 $(use_enable java) \
69                 $(use_enable python) \
70                 --disable-ruby \
71                 $(use_enable static-libs static)
72 }
73
74 src_test() {
75         emake check
76 }
77
78 src_install() {
79         default
80         prune_libtool_files
81 }