From 0e2c95a78f492892c5b862445365773036f90766 Mon Sep 17 00:00:00 2001 From: Zero_Chaos Date: Fri, 3 Mar 2017 23:59:01 -0500 Subject: net-libs/libbtbb: bump, cleanup, enable pcapdump and btaptap properly Package-Manager: Portage-2.3.3, Repoman-2.3.1 --- net-libs/libbtbb/Manifest | 3 +- net-libs/libbtbb/libbtbb-2015.09.2-r1.ebuild | 134 ----------------------- net-libs/libbtbb/libbtbb-2017.03.1.ebuild | 156 +++++++++++++++++++++++++++ net-libs/libbtbb/libbtbb-9999.ebuild | 28 ++--- net-libs/libbtbb/metadata.xml | 3 +- 5 files changed, 175 insertions(+), 149 deletions(-) delete mode 100644 net-libs/libbtbb/libbtbb-2015.09.2-r1.ebuild create mode 100644 net-libs/libbtbb/libbtbb-2017.03.1.ebuild (limited to 'net-libs/libbtbb') diff --git a/net-libs/libbtbb/Manifest b/net-libs/libbtbb/Manifest index 952fe8d5c434..5c82b8e756a2 100644 --- a/net-libs/libbtbb/Manifest +++ b/net-libs/libbtbb/Manifest @@ -1,3 +1,2 @@ -DIST libbtbb-2015-09-R2.tar.gz 222045 SHA256 35ce44636649163f0d9a4de5905f686470f54c79b408959760db8c8182853161 SHA512 e300ec09de34644a0cd2f4aba2fe0b03021aaa0b0fe5035022f1e698ff10867adfd84850d0d40e9c070fbd622efee1b614221c1f5b1818f1d4f5d58cc3f31919 WHIRLPOOL 99d8c621b263cd3cd82e423eabff21d4979b0407c31430aa26424d273c9e3ed802e68833e3a100588a46a9a2126a84d0be56e41c1b609ea2eed4a3d64203c995 DIST libbtbb-2015-10-R1.tar.gz 221859 SHA256 95f493d379a53ec1134cfb36349cc9aac95d77260db4fdb557313b0dbb5c1d5a SHA512 550d793326cfb4d31ed00d46faf3521ccafc133614f866961ba6226dff41d3deda428b45f01178e0dea7925635a64e843f0510049408c3f299ad427f2c0832ac WHIRLPOOL 4ac8697150ff5215765a5331695bfc6d2967ff61a4fc89820dd8e3c72f52f51f3d5aff2b4f020de6c728cd368a295a90bbd0bb1cebb60d895c84d5219cc70e77 -DIST libbtbb-2015.09.2-rename-plugins.patch.xz 15636 SHA256 391a51ef542deecbb680d7d14f1649e8190096bce38a38965bc00fe1e97ad038 SHA512 40af251835fae9031a28720bf15ec9a903eac5fc42f38a0edf234021861e3c64e3fb77c03675ac7623b6dae901988d28f3ef90d53ea9e2b62b2d692ca0bf2d2f WHIRLPOOL eb15206c66f6293d509affa855f186ccfbb32c9d745675217c1228e7d07c0ef587bd6f997f664c1141e9fa0f4c453faefed3b82982b4099b53b81ec233b2dfec +DIST libbtbb-2017-03-R1.tar.gz 303019 SHA256 c9d163140012c9af758ea6a39a5f7193c433b107b2d4ff984f8b86821af4f181 SHA512 7535d24c70eb30eb4c0b711ee46c9aed7548ba26c9431eb9e3eac697d52afbd025534d23df24085f219be2427209fbc3a9094df65b32c5ff8a82110ce8ce4cd1 WHIRLPOOL b425583f9affe59a875702b83e9723948807691f1538979ca556655bd540bd860872398aa42635bb1883ff7fc8278fbaffb67f7efd9e2093bf635527a20c9e68 diff --git a/net-libs/libbtbb/libbtbb-2015.09.2-r1.ebuild b/net-libs/libbtbb/libbtbb-2015.09.2-r1.ebuild deleted file mode 100644 index b1ddd4861acf..000000000000 --- a/net-libs/libbtbb/libbtbb-2015.09.2-r1.ebuild +++ /dev/null @@ -1,134 +0,0 @@ -# Copyright 1999-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=5 - -inherit multilib cmake-utils - -DESCRIPTION="A library to decode Bluetooth baseband packets" -HOMEPAGE="http://libbtbb.sourceforge.net/" - -if [[ ${PV} == "9999" ]] ; then - EGIT_REPO_URI="https://github.com/greatscottgadgets/libbtbb.git" - inherit git-r3 - KEYWORDS="" -else - 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" - KEYWORDS="~amd64 ~arm ~x86" -fi - -LICENSE="GPL-2" -SLOT="0/${PV}" -IUSE="+pcap +wireshark-plugins" - -RDEPEND=" - pcap? ( net-libs/libpcap ) - wireshark-plugins? ( - >=net-analyzer/wireshark-1.8.3-r1:= - !>net-analyzer/wireshark-1.98 - ) -" -DEPEND="${RDEPEND} - wireshark-plugins? ( dev-libs/glib - virtual/pkgconfig )" - -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 - plugins="btbb btbredr" - elif 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-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 + fi +} + +src_configure() { + CMAKE_USE_DIR="${S}" + BUILD_DIR="${S}"_build + local mycmakeargs=( + -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 + 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)" + ) + cmake-utils_src_configure + done + fi +} + +src_compile(){ + CMAKE_USE_DIR="${S}" + BUILD_DIR="${S}"_build + cmake-utils_src_compile + + if use wireshark-plugins; then + for i in ${plugins} + do + 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 + fi +} + +src_test(){ + CMAKE_USE_DIR="${S}" + BUILD_DIR="${S}"_build + cmake-utils_src_test + + if use wireshark-plugins; then + for i in ${plugins} + do + 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 + fi +} + +src_install(){ + CMAKE_USE_DIR="${S}" + BUILD_DIR="${S}"_build + cmake-utils_src_install + + if use wireshark-plugins; then + for i in ${plugins} + do + 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 + fi +} diff --git a/net-libs/libbtbb/libbtbb-9999.ebuild b/net-libs/libbtbb/libbtbb-9999.ebuild index 8899e59aafa8..9fda2336a37f 100644 --- a/net-libs/libbtbb/libbtbb-9999.ebuild +++ b/net-libs/libbtbb/libbtbb-9999.ebuild @@ -1,9 +1,12 @@ -# 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/" @@ -22,10 +25,9 @@ fi 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:= ) @@ -34,10 +36,14 @@ 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 'Rick Farina - Add support for network packet capture via net-libs/libpcap + Install pcapdump and btaptap tools + Add support for network packet capture via net-libs/libpcap Build the wireshark plugins for bluetooth baseband sniffing -- cgit v1.2.3-65-gdbad