Gentoo Archives: gentoo-commits

From: Andrew Ammerlaan <andrewammerlaan@××××××.net>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:dev commit in: media-tv/droidcam/, media-tv/droidcam/files/
Date: Thu, 30 Jul 2020 16:16:36
Message-Id: 1596125781.4b4682b4a9acc2b8b82d7cbcc4323026d1f9ba7d.andrewammerlaan@gentoo
1 commit: 4b4682b4a9acc2b8b82d7cbcc4323026d1f9ba7d
2 Author: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
3 AuthorDate: Thu Jul 30 16:16:21 2020 +0000
4 Commit: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
5 CommitDate: Thu Jul 30 16:16:21 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=4b4682b4
7
8 media-tv/droidcam: revision bump
9
10 Changes based on the PR by @henrikp
11
12 See also: https://github.com/gentoo/gentoo/pull/16736
13
14 Package-Manager: Portage-3.0.1, Repoman-2.3.23
15 Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> riseup.net>
16
17 ...{droidcam-1.4.ebuild => droidcam-1.4-r1.ebuild} | 71 ++++++++++++----------
18 media-tv/droidcam/files/README.gentoo | 6 --
19 media-tv/droidcam/files/droidcam-audio.conf | 1 +
20 media-tv/droidcam/files/droidcam-modprobe.conf | 2 +
21 .../{v4l2loopback-dc.conf => droidcam-video.conf} | 0
22 media-tv/droidcam/metadata.xml | 8 +++
23 6 files changed, 51 insertions(+), 37 deletions(-)
24
25 diff --git a/media-tv/droidcam/droidcam-1.4.ebuild b/media-tv/droidcam/droidcam-1.4-r1.ebuild
26 similarity index 70%
27 rename from media-tv/droidcam/droidcam-1.4.ebuild
28 rename to media-tv/droidcam/droidcam-1.4-r1.ebuild
29 index 1573c2c..7d447b5 100644
30 --- a/media-tv/droidcam/droidcam-1.4.ebuild
31 +++ b/media-tv/droidcam/droidcam-1.4-r1.ebuild
32 @@ -14,55 +14,64 @@ KEYWORDS="~amd64"
33 LICENSE="GPL-2"
34 SLOT="0"
35
36 -IUSE="gtk"
37 +IUSE="audio gtk usb"
38
39 # Requires connection to android phone
40 RESTRICT="test"
41
42 DEPEND="
43 - gtk? (
44 - dev-cpp/gtkmm:3.0
45 - media-video/ffmpeg
46 - )
47 =app-pda/libusbmuxd-1*
48 + dev-libs/glib
49 + gtk? ( dev-cpp/gtkmm:3.0 )
50 media-libs/alsa-lib
51 -"
52 -
53 -BDEPEND="
54 media-libs/libjpeg-turbo
55 >=media-libs/speex-1.2.0-r1
56 - virtual/pkgconfig
57 + media-video/ffmpeg
58 + usb? ( dev-util/android-tools )
59 + x11-libs/gdk-pixbuf
60 + x11-libs/gtk+:3
61 + x11-libs/libX11
62 + x11-libs/pango
63 "
64
65 -S="${WORKDIR}/${P}/linux"
66 +BDEPEND="virtual/pkgconfig"
67
68 -PATCHES="${FILESDIR}/${PN}-makefile-fixes.patch"
69 +S="${WORKDIR}/${P}/linux"
70
71 DOCS=( README.md README-DKMS.md )
72 DISABLE_AUTOFORMATTING="true"
73 DOC_CONTENTS="
74 - The default resolution for v4l2loopback-dc[1] is 640x480. You can override these
75 - values in /etc/modprobe.d/v4l2loopback-dc.conf
76 + The default resolution for v4l2loopback-dc[1] is 640x480. You can override the
77 + value by copying droidcam.conf.default to /etc/modprobe.d/droidcam.conf
78 and modifying 'width' and 'height'.
79 [1] https://github.com/aramg/droidcam/issues/56
80 "
81
82 BUILD_TARGETS="all"
83 MODULE_NAMES="v4l2loopback-dc(video:${S}/v4l2loopback:${S}/v4l2loopback)"
84 -CONFIG_CHECK="VIDEO_DEV ~SND_ALOOP MEDIA_SUPPORT MEDIA_CAMERA_SUPPORT"
85 -ERROR_SND_ALOOP="CONFIG_SND_ALOOP: missing, required for audio support"
86 +CONFIG_CHECK="VIDEO_DEV MEDIA_SUPPORT MEDIA_CAMERA_SUPPORT"
87 MODULESD_V4L2LOOPBACK_DC_ENABLED="yes"
88
89 +PATCHES="${FILESDIR}/${PN}-makefile-fixes.patch"
90 +
91 src_prepare() {
92 - default
93 if ! use gtk ; then
94 sed -i -e '/cflags gtk+/d' Makefile
95 + else
96 + xdg_src_prepare
97 fi
98 linux-mod_pkg_setup
99 }
100
101 src_configure() {
102 set_arch_to_kernel
103 + if use audio ; then
104 + if linux_config_exists ; then
105 + if ! linux_chkconfig_present SND_ALOOP ; then
106 + die "Audio requested but CONFIG_SND_ALOOP not selected in config!"
107 + fi
108 + fi
109 + fi
110 default
111 }
112
113 @@ -81,6 +90,10 @@ src_test() {
114 popd
115 }
116
117 +pkg_preinst() {
118 + xdg_pkg_preinst
119 +}
120 +
121 src_install() {
122 if use gtk ; then
123 dobin droidcam
124 @@ -94,36 +107,32 @@ src_install() {
125
126 # The cli and gui do not auto load the module if unloaded (why not tho?)
127 # so we just put it in modules-load.d to make sure it always works
128 - insinto /usr/lib/modules-load.d/
129 - doins "${FILESDIR}/v4l2loopback-dc.conf"
130 + insinto /etc/modules-load.d
131 + doins "${FILESDIR}"/${PN}-video.conf
132 + if use audio && linux_chkconfig_module SND_ALOOP ; then
133 + doins "${FILESDIR}"/${PN}-audio.conf
134 + fi
135
136 + newdoc "${FILESDIR}"/${PN}-modprobe.conf ${PN}.conf.default
137 einstalldocs
138 linux-mod_src_install
139 }
140
141 pkg_postinst() {
142 - linux-mod_pkg_postinst
143 -
144 if use gtk ; then
145 xdg_pkg_postinst
146 else
147 - elog ""
148 + elog
149 elog "Only droidcam-cli has been installed since no 'gtk' flag was present"
150 elog "in the USE list."
151 + elog
152 fi
153
154 - elog ""
155 + linux-mod_pkg_postinst
156 readme.gentoo_print_elog
157
158 - elog ""
159 - elog "To use this package, you will need to download the Android or iOS app as well:"
160 - elog "Android:"
161 - elog "Free version: https://play.google.com/store/apps/details?id=com.dev47apps.droidcam"
162 - elog "Paid version: https://play.google.com/store/apps/details?id=com.dev47apps.droidcamx"
163 - elog "iOS: https://apps.apple.com/us/app/droidcam-wireless-webcam/id1510258102"
164 -
165 - elog ""
166 - optfeature "to connection with USB via ADB instead of over wifi" dev-util/android-tools
167 + elog "Links to the Android/iPhone/iPad apps can be reached at"
168 + elog "https://www.dev47apps.com/"
169 }
170
171 pkg_postrm() {
172
173 diff --git a/media-tv/droidcam/files/README.gentoo b/media-tv/droidcam/files/README.gentoo
174 deleted file mode 100644
175 index 6a5bdb4..0000000
176 --- a/media-tv/droidcam/files/README.gentoo
177 +++ /dev/null
178 @@ -1,6 +0,0 @@
179 -The default resolution for v4l2loopback-dc is 640x480. You can override these
180 -values in /etc/modprobe.d/v4l2loopback-dc.conf
181 -and modifying 'width' and 'height'.
182 -
183 -See https://github.com/aramg/droidcam/issues/56 on why a fork of v4l2loopback
184 -is currently being used here.
185
186 diff --git a/media-tv/droidcam/files/droidcam-audio.conf b/media-tv/droidcam/files/droidcam-audio.conf
187 new file mode 100644
188 index 0000000..6619319
189 --- /dev/null
190 +++ b/media-tv/droidcam/files/droidcam-audio.conf
191 @@ -0,0 +1 @@
192 +snd_aloop
193
194 diff --git a/media-tv/droidcam/files/droidcam-modprobe.conf b/media-tv/droidcam/files/droidcam-modprobe.conf
195 new file mode 100644
196 index 0000000..d4d5801
197 --- /dev/null
198 +++ b/media-tv/droidcam/files/droidcam-modprobe.conf
199 @@ -0,0 +1,2 @@
200 +# Suggested values: 640×480, 960×720, 1280×720 (720p), 1920×1080 (1080p).
201 +options v4l2loopback-dc width=640 height=480
202
203 diff --git a/media-tv/droidcam/files/v4l2loopback-dc.conf b/media-tv/droidcam/files/droidcam-video.conf
204 similarity index 100%
205 rename from media-tv/droidcam/files/v4l2loopback-dc.conf
206 rename to media-tv/droidcam/files/droidcam-video.conf
207
208 diff --git a/media-tv/droidcam/metadata.xml b/media-tv/droidcam/metadata.xml
209 index 59c300f..7796f4b 100644
210 --- a/media-tv/droidcam/metadata.xml
211 +++ b/media-tv/droidcam/metadata.xml
212 @@ -7,5 +7,13 @@
213 </maintainer>
214 <use>
215 <flag name="gtk">Build the <pkg>dev-cpp/gtkmm</pkg>:3.0 client.</flag>
216 + <flag name="audio">Use snd_aloop kernel module for audio</flag>
217 </use>
218 + <longdescription>
219 + DroidCam allows you to use your Android or iOS device as webcam, wired (USB
220 + and ADB) or wireless (TCP/IP). Works with the free version of the phone app.
221 + </longdescription>
222 + <upstream>
223 + <remote-id type="github">aramg/droidcam</remote-id>
224 + </upstream>
225 </pkgmetadata>