Gentoo Archives: gentoo-commits

From: Thomas Beierlein <tomjbe@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/gr-fosphor/, net-analyzer/gr-fosphor/files/
Date: Tue, 23 Aug 2022 14:01:57
Message-Id: 1661263285.cd094227a6f4228d2eafcd9623ed06f465057a47.tomjbe@gentoo
1 commit: cd094227a6f4228d2eafcd9623ed06f465057a47
2 Author: Thomas Beierlein <tomjbe <AT> gentoo <DOT> org>
3 AuthorDate: Tue Aug 23 13:59:53 2022 +0000
4 Commit: Thomas Beierlein <tomjbe <AT> gentoo <DOT> org>
5 CommitDate: Tue Aug 23 14:01:25 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cd094227
7
8 net-analyzer/gr-fosphor: add 0.0_p20210108
9
10 Signed-off-by: Thomas Beierlein <tomjbe <AT> gentoo.org>
11
12 net-analyzer/gr-fosphor/Manifest | 1 +
13 .../files/gr-fosphor-0.0_p20210108-fix-use.patch | 18 +++++
14 .../gr-fosphor/gr-fosphor-0.0_p20210108.ebuild | 79 ++++++++++++++++++++++
15 3 files changed, 98 insertions(+)
16
17 diff --git a/net-analyzer/gr-fosphor/Manifest b/net-analyzer/gr-fosphor/Manifest
18 index 7e83ff32c097..10e1e37143da 100644
19 --- a/net-analyzer/gr-fosphor/Manifest
20 +++ b/net-analyzer/gr-fosphor/Manifest
21 @@ -1 +1,2 @@
22 DIST gr-fosphor-0.0_p20200131.tar.gz 244685 BLAKE2B db01b9df87f377db2adaaca3d1542f99eaca9f73303c71ea9add1845307704817c8930736d44462191476b4cb935a18401b7012a1ea6465bdb5cf3624c182f2c SHA512 7bf2758f98ae7d088256060878fbf33966880ddbb7fb132da00f9c2530d84b91a6385eabbf61ff40d3002d3a42eadf5e2d78b8c797bc93501cafaf8a7bdde7ae
23 +DIST gr-fosphor-0.0_p20210108.tar.gz 223873 BLAKE2B 4c44ea026760a12fbc9f50c439f47b9af3956270d8f0a05c951fb19cc4f23a7064476a0a111d39e79183d52e8c6e686d17bf17f76df92e052f81d8940df588fe SHA512 fa2e4c28f8910eb82de42c76f2c00e8b832c023844f1d61aedb5ef3b0fafa7f3f7f26ab535a936d4ad8a42bedb380e71fe6c03f5e1b767afe731d70e080d241e
24
25 diff --git a/net-analyzer/gr-fosphor/files/gr-fosphor-0.0_p20210108-fix-use.patch b/net-analyzer/gr-fosphor/files/gr-fosphor-0.0_p20210108-fix-use.patch
26 new file mode 100644
27 index 000000000000..da3287f35496
28 --- /dev/null
29 +++ b/net-analyzer/gr-fosphor/files/gr-fosphor-0.0_p20210108-fix-use.patch
30 @@ -0,0 +1,18 @@
31 +diff --git a/python/bindings/CMakeLists.txt b/python/bindings/CMakeLists.txt
32 +index b7054da..86e5461 100644
33 +--- a/python/bindings/CMakeLists.txt
34 ++++ b/python/bindings/CMakeLists.txt
35 +@@ -54,10 +54,11 @@ endmacro(GR_PYBIND_MAKE)
36 +
37 + list(APPEND fosphor_python_files
38 + base_sink_c_python.cc
39 +- glfw_sink_c_python.cc
40 +- qt_sink_c_python.cc
41 + python_bindings.cc)
42 +
43 ++list_cond_append(ENABLE_GLFW fosphor_python_files glfw_sink_c_python.cc)
44 ++list_cond_append(ENABLE_QT fosphor_python_files qt_sink_c_python.cc)
45 ++
46 + GR_PYBIND_MAKE(fosphor
47 + ../..
48 + gr::fosphor
49
50 diff --git a/net-analyzer/gr-fosphor/gr-fosphor-0.0_p20210108.ebuild b/net-analyzer/gr-fosphor/gr-fosphor-0.0_p20210108.ebuild
51 new file mode 100644
52 index 000000000000..0ec8b0bdf894
53 --- /dev/null
54 +++ b/net-analyzer/gr-fosphor/gr-fosphor-0.0_p20210108.ebuild
55 @@ -0,0 +1,79 @@
56 +# Copyright 1999-2022 Gentoo Authors
57 +# Distributed under the terms of the GNU General Public License v2
58 +
59 +EAPI=8
60 +
61 +PYTHON_COMPAT=( python3_{8..10} )
62 +
63 +inherit cmake python-single-r1
64 +
65 +DESCRIPTION="gnuradio fosphor block (GPU spectrum display)"
66 +HOMEPAGE="https://sdr.osmocom.org/trac/wiki/fosphor"
67 +
68 +if [[ ${PV} == *9999 ]]; then
69 + inherit git-r3
70 + EGIT_REPO_URI="https://github.com/osmocom/${PN}.git"
71 +else
72 + COMMIT="974ab2fe54c25e8b6c37aa4de148ba0625eef652"
73 + SRC_URI="https://github.com/osmocom/gr-fosphor/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
74 + S="${WORKDIR}/${PN}-${COMMIT}"
75 + KEYWORDS="~amd64 ~x86"
76 +fi
77 +
78 +LICENSE="GPL-3+"
79 +SLOT="0"
80 +IUSE="glfw qt5"
81 +REQUIRED_USE="${PYTHON_REQUIRED_USE}"
82 +
83 +RDEPEND="
84 + dev-libs/boost:=
85 + dev-libs/log4cpp
86 + media-libs/freetype
87 + >=net-wireless/gnuradio-3.9:0=[qt5,${PYTHON_SINGLE_USEDEP}]
88 + $(python_gen_cond_dep 'dev-python/pygccxml[${PYTHON_USEDEP}]')
89 + glfw? ( >=media-libs/glfw-3 )
90 + virtual/opencl
91 + virtual/opengl
92 + ${PYTHON_DEPS}
93 + qt5? (
94 + dev-qt/qtcore:5
95 + dev-qt/qtgui:5
96 + dev-qt/qtopengl:5
97 + dev-qt/qtwidgets:5
98 + )"
99 +DEPEND="${RDEPEND}"
100 +BDEPEND="$(python_gen_cond_dep 'dev-python/pybind11[${PYTHON_USEDEP}]')"
101 +
102 +PATCHES=( "${FILESDIR}"/${PN}-0.0_p20200131-htmldir.patch
103 + "${FILESDIR}"/${P}-fix-use.patch )
104 +
105 +src_prepare() {
106 + cmake_src_prepare
107 +
108 + # adapt python bindings to use flags
109 + use glfw || sed -i -e "s#bind_glfw_sink_c(m)##" \
110 + "${S}"/python/bindings/python_bindings.cc ||die
111 + use qt5 || sed -i -e "s#bind_qt_sink_c(m)##" \
112 + "${S}"/python/bindings/python_bindings.cc ||die
113 +
114 + eapply_user
115 +}
116 +
117 +src_configure() {
118 + # tries to run OpenCL test program, but failing doesn't hurt
119 + addpredict /dev/dri
120 +
121 + local mycmakeargs=(
122 + -DENABLE_DEFAULT=OFF
123 + -DENABLE_GLFW="$(usex glfw)"
124 + -DENABLE_QT="$(usex qt5)"
125 + -DENABLE_PYTHON=ON
126 + )
127 + cmake_src_configure
128 +}
129 +
130 +src_install() {
131 + cmake_src_install
132 + find "${D}" -name '*.py[oc]' -delete || die
133 + python_optimize
134 +}