Diff libsigrok-0.5.1 with a libsigrok-9999

/usr/portage/sci-libs/libsigrok/libsigrok-9999.ebuild 2019-12-11 02:41:00.000000000 +0300
4 4
EAPI="6"
5 5

  
6 6
PYTHON_COMPAT=( python{2_7,3_{5,6,7}} )
7
USE_RUBY="ruby26 ruby25 ruby24"
8
RUBY_OPTIONAL="yes"
7 9

  
8
inherit eutils gnome2-utils python-single-r1 java-pkg-opt-2 udev xdg-utils
10
inherit eutils gnome2-utils python-r1 java-pkg-opt-2 ruby-ng udev xdg-utils
9 11

  
10 12
if [[ ${PV} == "9999" ]]; then
11 13
	EGIT_REPO_URI="git://sigrok.org/${PN}"
......
19 21
HOMEPAGE="https://sigrok.org/wiki/Libsigrok"
20 22

  
21 23
LICENSE="GPL-3"
22
SLOT="0/4"
23
IUSE="cxx ftdi java parport python serial static-libs test +udev usb"
24
SLOT="0/9999"
25
IUSE="cxx ftdi java parport python ruby serial static-libs +udev test usb"
24 26
RESTRICT="!test? ( test )"
25
REQUIRED_USE="java? ( cxx ) python? ( cxx ${PYTHON_REQUIRED_USE} )"
27
REQUIRED_USE="java? ( cxx ) python? ( cxx ${PYTHON_REQUIRED_USE} ) ruby? ( cxx || ( $(ruby_get_use_targets) ) )"
26 28

  
27 29
# We also support librevisa, but that isn't in the tree ...
28 30
LIB_DEPEND=">=dev-libs/glib-2.32.0[static-libs(+)]
29 31
	>=dev-libs/libzip-0.8:=[static-libs(+)]
30 32
	cxx? ( dev-cpp/glibmm:2[static-libs(+)] )
31 33
	python? ( ${PYTHON_DEPS} >=dev-python/pygobject-3.0.0[${PYTHON_USEDEP}] )
34
	ruby? ( $(ruby_implementations_depend) )
32 35
	ftdi? ( >=dev-embedded/libftdi-0.16:=[static-libs(+)] )
33 36
	parport? ( sys-libs/libieee1284[static-libs(+)] )
34 37
	serial? ( >=dev-libs/libserialport-0.1.1[static-libs(+)] )
......
48 51
		dev-python/numpy[${PYTHON_USEDEP}]
49 52
		>=dev-lang/swig-3.0.6
50 53
	)
54
	ruby? ( >=dev-lang/swig-3.0.8 )
51 55
	virtual/pkgconfig"
52 56

  
57
S="${WORKDIR}"/${P}
58

  
53 59
pkg_setup() {
54
	use python && python-single-r1_pkg_setup
60
	use ruby && ruby-ng_pkg_setup
55 61
	java-pkg-opt-2_pkg_setup
56 62
}
57 63

  
58
src_prepare() {
64
src_unpack() {
65
	[[ ${PV} == "9999" ]] && git-r3_src_unpack || default
66
}
67

  
68
sigrok_src_prepare() {
59 69
	[[ ${PV} == "9999" ]] && eautoreconf
70
}
71

  
72
each_ruby_prepare() {
73
	sigrok_src_prepare
74
}
75

  
76
src_prepare() {
77
	use ruby && cp -rl "${S}" "${WORKDIR}"/all && ruby-ng_src_prepare
78
	sigrok_src_prepare
60 79
	eapply_user
80
	use python && python_copy_sources
61 81
}
62 82

  
63
src_configure() {
83
sigrok_src_configure() {
64 84
	econf \
65 85
		$(use_with ftdi libftdi) \
66 86
		$(use_with parport libieee1284) \
......
68 88
		$(use_with usb libusb) \
69 89
		$(use_enable cxx) \
70 90
		$(use_enable java) \
71
		$(use_enable python) \
72
		--disable-ruby \
73
		$(use_enable static-libs static)
91
		$(use_enable static-libs static) \
92
		"${@}"
93
}
94

  
95
each_ruby_configure() {
96
	RUBY="${RUBY}" sigrok_src_configure --enable-ruby --disable-python
97
}
98

  
99
each_python_configure() {
100
	cd "${BUILD_DIR}"
101
	sigrok_src_configure --disable-ruby --enable-python
102
}
103

  
104
src_configure() {
105
	python_setup
106
	sigrok_src_configure --disable-ruby --disable-python
107
	use ruby && ruby-ng_src_configure
108
	use python && python_foreach_impl each_python_configure
109
}
110

  
111
each_ruby_compile() {
112
	emake ruby-build
113
}
114

  
115
each_python_compile() {
116
	cd "${BUILD_DIR}"
117
	emake python-build
118
}
119

  
120
src_compile() {
121
	default
122
	use ruby && ruby-ng_src_compile
123
	use python && python_foreach_impl each_python_compile
74 124
}
75 125

  
76 126
src_test() {
77 127
	emake check
78 128
}
79 129

  
130
each_ruby_install() {
131
	emake ruby-install DESTDIR="${D}"
132
}
133

  
134
each_python_install() {
135
	cd "${BUILD_DIR}"
136
	emake python-install DESTDIR="${D}"
137
}
138

  
80 139
src_install() {
81 140
	default
141
	use python && python_foreach_impl each_python_install
142
	use ruby && ruby-ng_src_install
82 143
	use udev && udev_dorules contrib/*.rules
83 144
	prune_libtool_files
84 145
}
Thank you!