/[gentoo-x86]/net-libs/libbtbb/libbtbb-9999.ebuild
Gentoo

Contents of /net-libs/libbtbb/libbtbb-9999.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.15 - (show annotations) (download)
Sat Apr 18 12:39:52 2015 UTC (5 years, 2 months ago) by swegener
Branch: MAIN
CVS Tags: HEAD
Changes since 1.14: +2 -2 lines
Rename distfile to include package name.

(Portage version: 2.2.17/cvs/Linux x86_64, signed Manifest commit with key 0x64D4CF24)

1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-libs/libbtbb/libbtbb-9999.ebuild,v 1.14 2015/03/19 20:45:13 zerochaos Exp $
4
5 EAPI=5
6
7 inherit multilib cmake-utils
8
9 DESCRIPTION="A library to decode Bluetooth baseband packets"
10 HOMEPAGE="http://libbtbb.sourceforge.net/"
11
12 if [[ ${PV} == "9999" ]] ; then
13 EGIT_REPO_URI="https://github.com/greatscottgadgets/libbtbb.git"
14 inherit git-r3
15 KEYWORDS=""
16 else
17 MY_PV=${PV/\./-}
18 MY_PV=${MY_PV/./-R}
19 S=${WORKDIR}/${PN}-${MY_PV}
20 SRC_URI="https://github.com/greatscottgadgets/${PN}/archive/${MY_PV}.tar.gz -> ${PN}-${MY_PV}.tar.gz"
21 KEYWORDS="~amd64 ~arm ~x86"
22 fi
23
24 LICENSE="GPL-2"
25 SLOT="0/${PV}"
26 IUSE="+pcap +wireshark-plugins"
27
28 RDEPEND="
29 pcap? ( net-libs/libpcap )
30 wireshark-plugins? (
31 >=net-analyzer/wireshark-1.8.3-r1:=
32 )
33 "
34 DEPEND="${RDEPEND}
35 wireshark-plugins? ( dev-libs/glib
36 virtual/pkgconfig )"
37
38 get_PV() { local pv=$(best_version $1); pv=${pv#$1-}; pv=${pv%-r*}; pv=${pv//_}; echo ${pv}; }
39
40 which_plugins() {
41 if has_version '>=net-analyzer/wireshark-1.12.0'; then
42 plugins="btbb"
43 elif has_version '<net-analyzer/wireshark-1.12.0'; then
44 plugins="btbb btle btsm"
45 fi
46 }
47
48 src_prepare(){
49 CMAKE_USE_DIR="${S}"
50 BUILD_DIR="${S}"_build
51 cmake-utils_src_prepare
52
53 if use wireshark-plugins; then
54 which_plugins
55 for i in ${plugins}
56 do
57 sed -i 's#column_info#packet#' wireshark/plugins/${i}/cmake/FindWireshark.cmake || die
58 CMAKE_USE_DIR="${S}"/wireshark/plugins/${i}
59 BUILD_DIR="${WORKDIR}"/${i}_build
60 cmake-utils_src_prepare
61 done
62 fi
63 }
64
65 src_configure() {
66 CMAKE_USE_DIR="${S}"
67 BUILD_DIR="${S}"_build
68 local mycmakeargs=(
69 -DDISABLE_PYTHON=true
70 -DPACKAGE_MANAGER=true
71 $(cmake-utils_use pcap PCAPDUMP)
72 $(cmake-utils_use pcap USE_PCAP)
73 )
74 cmake-utils_src_configure
75
76 if use wireshark-plugins; then
77 for i in ${plugins}
78 do
79 CMAKE_USE_DIR="${S}"/wireshark/plugins/${i}
80 BUILD_DIR="${WORKDIR}"/${i}_build
81 local mycmakeargs=(
82 -DCMAKE_INSTALL_LIBDIR="/usr/$(get_libdir)/wireshark/plugins/$(get_PV net-analyzer/wireshark)"
83 )
84 cmake-utils_src_configure
85 done
86 fi
87 }
88
89 src_compile(){
90 CMAKE_USE_DIR="${S}"
91 BUILD_DIR="${S}"_build
92 cmake-utils_src_compile
93
94 if use wireshark-plugins; then
95 for i in ${plugins}
96 do
97 CMAKE_USE_DIR="${S}"/wireshark/plugins/${i}
98 BUILD_DIR="${WORKDIR}"/${i}_build
99 cmake-utils_src_compile
100 done
101 fi
102 }
103
104 src_test(){
105 CMAKE_USE_DIR="${S}"
106 BUILD_DIR="${S}"_build
107 cmake-utils_src_test
108
109 if use wireshark-plugins; then
110 for i in ${plugins}
111 do
112 CMAKE_USE_DIR="${S}"/wireshark/plugins/${i}
113 BUILD_DIR="${WORKDIR}"/${i}_build
114 cmake-utils_src_test
115 done
116 fi
117 }
118
119 src_install(){
120 CMAKE_USE_DIR="${S}"
121 BUILD_DIR="${S}"_build
122 cmake-utils_src_install
123
124 if use wireshark-plugins; then
125 for i in ${plugins}
126 do
127 CMAKE_USE_DIR="${S}"/wireshark/plugins/${i}
128 BUILD_DIR="${WORKDIR}"/${i}_build
129 cmake-utils_src_install
130 done
131 fi
132 }

  ViewVC Help
Powered by ViewVC 1.1.20