-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
+EAPI=6
-inherit multilib cmake-utils
+PYTHON_COMPAT=( python2_7 )
+DISTUTILS_OPTIONAL=1
+
+inherit multilib cmake-utils python-single-r1
DESCRIPTION="A library to decode Bluetooth baseband packets"
HOMEPAGE="http://libbtbb.sourceforge.net/"
MY_PV=${PV/\./-}
MY_PV=${MY_PV/./-R}
S=${WORKDIR}/${PN}-${MY_PV}
- SRC_URI="https://github.com/greatscottgadgets/${PN}/archive/${MY_PV}.tar.gz -> ${PN}-${MY_PV}.tar.gz \
- https://dev.gentoo.org/~zerochaos/distfiles/libbtbb-2015.09.2-rename-plugins.patch.xz"
+ SRC_URI="https://github.com/greatscottgadgets/${PN}/archive/${MY_PV}.tar.gz -> ${PN}-${MY_PV}.tar.gz"
KEYWORDS="~amd64 ~arm ~x86"
fi
LICENSE="GPL-2"
SLOT="0/${PV}"
-IUSE="+pcap +wireshark-plugins"
+IUSE="extras static-libs +wireshark-plugins"
-RDEPEND="
- pcap? ( net-libs/libpcap )
+RDEPEND="extras? ( ${PYTHON_DEPS} )
wireshark-plugins? (
>=net-analyzer/wireshark-1.8.3-r1:=
- !>net-analyzer/wireshark-1.98
)
"
DEPEND="${RDEPEND}
wireshark-plugins? ( dev-libs/glib
virtual/pkgconfig )"
+REQUIRED_USE="extras? ( ${PYTHON_REQUIRED_USE} )"
+
get_PV() { local pv=$(best_version $1); pv=${pv#$1-}; pv=${pv%-r*}; pv=${pv//_}; echo ${pv}; }
which_plugins() {
- if has_version '>=net-analyzer/wireshark-1.12.0'; then
+ if has_version '>=net-analyzer/wireshark-2.2.0'; then
+ plugins=""
+ elif has_version '>=net-analyzer/wireshark-1.12.0'; then
plugins="btbb btbredr"
elif has_version '<net-analyzer/wireshark-1.12.0'; then
plugins="btbb btle btsm"
src_prepare(){
CMAKE_USE_DIR="${S}"
BUILD_DIR="${S}"_build
- epatch "${WORKDIR}"/${P}-rename-plugins.patch
cmake-utils_src_prepare
if use wireshark-plugins; then
for i in ${plugins}
do
sed -i 's#column_info#packet#' wireshark/plugins/${i}/cmake/FindWireshark.cmake || die
- CMAKE_USE_DIR="${S}"/wireshark/plugins/${i}
+ if has_version '>=net-analyzer/wireshark-2.0'; then
+ CMAKE_USE_DIR="${S}"/wireshark/plugins/${i}
+ else
+ CMAKE_USE_DIR="${S}"/wireshark/plugins-legacy/${i}
+ fi
BUILD_DIR="${WORKDIR}"/${i}_build
cmake-utils_src_prepare
done
CMAKE_USE_DIR="${S}"
BUILD_DIR="${S}"_build
local mycmakeargs=(
- -DDISABLE_PYTHON=true
- -DPACKAGE_MANAGER=true
- $(cmake-utils_use pcap PCAPDUMP)
- $(cmake-utils_use pcap USE_PCAP)
+ -DENABLE_PYTHON=$(usex extras)
+ -DBUILD_STATIC_LIB=$(usex static-libs)
+ -DBUILD_ROOT="${ED}"
)
cmake-utils_src_configure
if use wireshark-plugins; then
for i in ${plugins}
do
- CMAKE_USE_DIR="${S}"/wireshark/plugins/${i}
+ if has_version '>=net-analyzer/wireshark-2.0'; then
+ CMAKE_USE_DIR="${S}"/wireshark/plugins/${i}
+ else
+ CMAKE_USE_DIR="${S}"/wireshark/plugins-legacy/${i}
+ fi
BUILD_DIR="${WORKDIR}"/${i}_build
local mycmakeargs=(
-DCMAKE_INSTALL_LIBDIR="/usr/$(get_libdir)/wireshark/plugins/$(get_PV net-analyzer/wireshark)"
if use wireshark-plugins; then
for i in ${plugins}
do
- CMAKE_USE_DIR="${S}"/wireshark/plugins/${i}
+ if has_version '>=net-analyzer/wireshark-2.0'; then
+ CMAKE_USE_DIR="${S}"/wireshark/plugins/${i}
+ else
+ CMAKE_USE_DIR="${S}"/wireshark/plugins-legacy/${i}
+ fi
BUILD_DIR="${WORKDIR}"/${i}_build
cmake-utils_src_compile
done
if use wireshark-plugins; then
for i in ${plugins}
do
- CMAKE_USE_DIR="${S}"/wireshark/plugins/${i}
+ if has_version '>=net-analyzer/wireshark-2.0'; then
+ CMAKE_USE_DIR="${S}"/wireshark/plugins/${i}
+ else
+ CMAKE_USE_DIR="${S}"/wireshark/plugins-legacy/${i}
+ fi
BUILD_DIR="${WORKDIR}"/${i}_build
cmake-utils_src_test
done
if use wireshark-plugins; then
for i in ${plugins}
do
- CMAKE_USE_DIR="${S}"/wireshark/plugins/${i}
+ if has_version '>=net-analyzer/wireshark-2.0'; then
+ CMAKE_USE_DIR="${S}"/wireshark/plugins/${i}
+ else
+ CMAKE_USE_DIR="${S}"/wireshark/plugins-legacy/${i}
+ fi
BUILD_DIR="${WORKDIR}"/${i}_build
cmake-utils_src_install
done
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
+EAPI=6
-inherit multilib cmake-utils
+PYTHON_COMPAT=( python2_7 )
+DISTUTILS_OPTIONAL=1
+
+inherit multilib cmake-utils python-single-r1
DESCRIPTION="A library to decode Bluetooth baseband packets"
HOMEPAGE="http://libbtbb.sourceforge.net/"
LICENSE="GPL-2"
SLOT="0/${PV}"
-IUSE="+pcap static-libs +wireshark-plugins"
+IUSE="extras static-libs +wireshark-plugins"
-RDEPEND="
- pcap? ( net-libs/libpcap[static-libs?] )
+RDEPEND="extras? ( ${PYTHON_DEPS} )
wireshark-plugins? (
>=net-analyzer/wireshark-1.8.3-r1:=
)
wireshark-plugins? ( dev-libs/glib
virtual/pkgconfig )"
+REQUIRED_USE="extras? ( ${PYTHON_REQUIRED_USE} )"
+
get_PV() { local pv=$(best_version $1); pv=${pv#$1-}; pv=${pv%-r*}; pv=${pv//_}; echo ${pv}; }
which_plugins() {
- if has_version '>=net-analyzer/wireshark-1.12.0'; then
+ if has_version '>=net-analyzer/wireshark-2.2.0'; then
+ plugins=""
+ elif has_version '>=net-analyzer/wireshark-1.12.0'; then
plugins="btbb btbredr"
elif has_version '<net-analyzer/wireshark-1.12.0'; then
plugins="btbb btle btsm"
CMAKE_USE_DIR="${S}"
BUILD_DIR="${S}"_build
local mycmakeargs=(
- -DENABLE_PYTHON=false
- -DPACKAGE_MANAGER=true
- $(cmake-utils_use pcap PCAPDUMP)
- $(cmake-utils_use pcap USE_PCAP)
- $(cmake-utils_use static-libs BUILD_STATIC_LIB)
+ -DENABLE_PYTHON=$(usex extras)
+ -DBUILD_STATIC_LIB=$(usex static-libs)
+ -DBUILD_ROOT="${ED}"
)
cmake-utils_src_configure