|
| 1 | +# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 |
| 2 | + |
| 3 | +PortSystem 1.0 |
| 4 | +PortGroup cmake 1.1 |
| 5 | +PortGroup conflicts_build 1.0 |
| 6 | +PortGroup github 1.0 |
| 7 | +PortGroup legacysupport 1.1 |
| 8 | + |
| 9 | +github.setup greatscottgadgets ubertooth 3e9de91f406ea13f4a5a76c3fd5e21c2a0375ad8 |
| 10 | +version 2022-07-19 |
| 11 | +revision 0 |
| 12 | +categories devel net security |
| 13 | +description Software, firmware and hardware designs for Ubertooth. |
| 14 | +long_description Project Ubertooth is an open source wireless development platform suitable \ |
| 15 | + for Bluetooth experimentation. Ubertooth ships with a capable BLE (Bluetooth Smart) \ |
| 16 | + sniffer and can sniff some data from Basic Rate (BR) Bluetooth Classic connections. |
| 17 | +license GPL-2 |
| 18 | +maintainers {@barracuda156 gmail.com:vital.had} openmaintainer |
| 19 | + |
| 20 | +homepage https://ubertooth.readthedocs.io |
| 21 | + |
| 22 | +checksums rmd160 3a3545670f44bcb3a1ce257bf5dd5da42fba1014 \ |
| 23 | + sha256 3ad1dc36accd8b7f69fdf4489df93afcaa4d1e7bdd9448b24a23eacc525deec5 \ |
| 24 | + size 1307090 |
| 25 | + |
| 26 | +# clock_gettime |
| 27 | +legacysupport.newest_darwin_requires_legacy 15 |
| 28 | + |
| 29 | +patchfiles patch-python3.diff |
| 30 | + |
| 31 | +set python_branch 3.10 |
| 32 | +set python_ver [string map {. {}} ${python_branch}] |
| 33 | +configure.python ${prefix}/bin/python${python_branch} |
| 34 | + |
| 35 | +depends_build-append \ |
| 36 | + port:pkgconfig |
| 37 | + |
| 38 | +depends_lib-append path:lib/pkgconfig/libbtbb.pc:libbtbb \ |
| 39 | + path:lib/pkgconfig/libusb-1.0.pc:libusb |
| 40 | + |
| 41 | +if {${build_arch} ni [list ppc ppc64]} { |
| 42 | + depends_lib-append \ |
| 43 | + port:python${python_ver} \ |
| 44 | + port:py${python_ver}-numpy \ |
| 45 | + port:py${python_ver}-pyside \ |
| 46 | + port:py${python_ver}-setuptools |
| 47 | +} |
| 48 | + |
| 49 | +post-patch { |
| 50 | + fs-traverse f ${worksrcpath}/host/python { |
| 51 | + if {[file extension ${f}] eq ".py"} { |
| 52 | + reinplace -q "s|/usr/bin/env python3|${configure.python}|" ${f} |
| 53 | + } |
| 54 | + } |
| 55 | + reinplace "s|/usr/bin/env python3|${configure.python}|" ${worksrcpath}/host/python/ubtbr/ubertooth-btbr |
| 56 | + reinplace "s|/usr/bin/env python3|${configure.python}|" ${worksrcpath}/host/python/specan_ui/ubertooth-specan-ui |
| 57 | + reinplace "s|/usr/bin/env python3|${configure.python}|" ${worksrcpath}/host/python/specan_ui/setup.py.in |
| 58 | + reinplace "s|@PYTHON3@|${configure.python}|g" ${worksrcpath}/host/python/ubtbr/CMakeLists.txt |
| 59 | +} |
| 60 | + |
| 61 | +cmake.source_dir ${worksrcpath}/host |
| 62 | +cmake.module_path ${cmake.source_dir}/cmake/modules |
| 63 | + |
| 64 | +# See: https://github.com/greatscottgadgets/ubertooth/blob/master/host/README.md |
| 65 | +conflicts_build ${name} |
| 66 | + |
| 67 | +compiler.blacklist-append *gcc-4.* |
| 68 | + |
| 69 | +platform darwin powerpc { |
| 70 | + # Indirect dependency, py310-shiboken, currently fails on PPC: https://trac.macports.org/ticket/65708 |
| 71 | + configure.args-append \ |
| 72 | + -DENABLE_PYTHON=OFF |
| 73 | + # Needed for Rosetta |
| 74 | + compiler.blacklist-append clang |
| 75 | +} |
0 commit comments