From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 5F97C1580C6 for ; Wed, 5 Apr 2023 19:23:39 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 762C6E0784; Wed, 5 Apr 2023 19:23:38 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3BEF7E0784 for ; Wed, 5 Apr 2023 19:23:38 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 03985340ED3 for ; Wed, 5 Apr 2023 19:23:37 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 4D143A16 for ; Wed, 5 Apr 2023 19:23:35 +0000 (UTC) From: "Andrew Ammerlaan" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andrew Ammerlaan" Message-ID: <1680722606.45e3a4051fe41e72b918e9062211478cedac59c1.andrewammerlaan@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-video/droidcam/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-video/droidcam/Manifest media-video/droidcam/droidcam-1.9.0.ebuild X-VCS-Directories: media-video/droidcam/ X-VCS-Committer: andrewammerlaan X-VCS-Committer-Name: Andrew Ammerlaan X-VCS-Revision: 45e3a4051fe41e72b918e9062211478cedac59c1 X-VCS-Branch: master Date: Wed, 5 Apr 2023 19:23:35 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 9bcc6c5d-c6ee-4681-a9ec-9b552c9620a1 X-Archives-Hash: 5006083a13fdc97e477dd62016a03f0d commit: 45e3a4051fe41e72b918e9062211478cedac59c1 Author: Andrew Ammerlaan gentoo org> AuthorDate: Wed Apr 5 18:49:03 2023 +0000 Commit: Andrew Ammerlaan gentoo org> CommitDate: Wed Apr 5 19:23:26 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=45e3a405 media-video/droidcam: add 1.9.0 Signed-off-by: Andrew Ammerlaan gentoo.org> media-video/droidcam/Manifest | 1 + media-video/droidcam/droidcam-1.9.0.ebuild | 156 +++++++++++++++++++++++++++++ 2 files changed, 157 insertions(+) diff --git a/media-video/droidcam/Manifest b/media-video/droidcam/Manifest index d6d1c64f41d2..e582cd8f9074 100644 --- a/media-video/droidcam/Manifest +++ b/media-video/droidcam/Manifest @@ -1,3 +1,4 @@ DIST droidcam-1.8.2.tar.gz 84797 BLAKE2B b2458dd04b467106a6d9a8a9f3d44058641a7c8ca429d5c92f498401c07f6bc364dc056755f21b40faac7e7aec1877250afb119ac3b7f979b24cdeb86f45c384 SHA512 507f513c8d0dffa86afe5368ccab5461931e236b6352269a6eb5e970a79e5f9b386808da3466f3b391e955170b47b24a82663632ddc3c3c84e4de5988b7d3f8f DIST droidcam-1.8.2_p20220831.tar.gz 84943 BLAKE2B db54f39a9b303b4b06dfdfcb6bf9323ce25f8cea4594cdcec063685fea531fdeb915caab393d0edf72086deb592345d7ca6aefd546d44f06e24855d66fbd8d47 SHA512 c30848c2348c70a15c46f894b1c0547a3e904bbb8582ae2d34009dbc9b0d006a49ab3950fef4491f76f838fd091d68ec1d63d5b1f52e793e98936fe5f2d44b5c +DIST droidcam-1.9.0.tar.gz 85083 BLAKE2B ab96fd70a8514ff6f3ebb98fc482e6d8ee17f984c4929c26441ed1f6223ce5dc6421039e99068ab747012fbcb252d6e158c4c778a45f117cb8143aa278766ded SHA512 47532731688c08d90dfe1c7d177154ea68180a84061050bf6602669bfb867ce6d44e1d1f351cb5526d3d4abf1c6235c26ddf53b423e3641a2956afd392f9f5f6 DIST droidcam-1.9.0_rc1.tar.gz 85035 BLAKE2B aa0129eeb1f5348948872c6144b472008d50d29b2d83bc96c32de52ba7696f067eeb59208c8ab53f0cd4d0bdcf74e94b61f11bd652d5cae828efd89bd434f595 SHA512 4b44cb702456110fdd7d9f82cd5e0f024a428dd9bed2e1c0eeb914983b9611a6405dadbb399efdb1539358a729c2194142eaa95d3eba68b6906ff1614919a29d diff --git a/media-video/droidcam/droidcam-1.9.0.ebuild b/media-video/droidcam/droidcam-1.9.0.ebuild new file mode 100644 index 000000000000..43c1cec97661 --- /dev/null +++ b/media-video/droidcam/droidcam-1.9.0.ebuild @@ -0,0 +1,156 @@ +# Copyright 2019-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit desktop linux-mod xdg + +DESCRIPTION="Use your phone or tablet as webcam with a v4l device driver and app" +HOMEPAGE="https://www.dev47apps.com/droidcam/linux/" +SRC_URI="https://github.com/dev47apps/${PN}/archive/v${PV//_rc1/-RC}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/${PN}-${PV//_rc1/-RC}" + +KEYWORDS="~amd64" +LICENSE="GPL-2" +SLOT="0" + +IUSE="gtk" + +# Requires connection to phone/tablet +RESTRICT="test" + +DEPEND=" + app-pda/libplist + app-pda/libusbmuxd + dev-libs/glib + dev-libs/libayatana-appindicator + dev-libs/libxml2 + dev-util/android-tools + media-libs/alsa-lib + media-libs/libjpeg-turbo + >=media-libs/speex-1.2.0-r1 + media-video/ffmpeg + gtk? ( + x11-libs/gdk-pixbuf + x11-libs/gtk+:3 + x11-libs/libX11 + x11-libs/pango + ) +" +RDEPEND="${DEPEND}" +BDEPEND="virtual/pkgconfig" + +BUILD_TARGETS="all" +MODULE_NAMES="v4l2loopback-dc(video:${S}/v4l2loopback:${S}/v4l2loopback)" +MODULESD_V4L2LOOPBACK_DC_ENABLED="yes" + +CONFIG_CHECK="~SND_ALOOP VIDEO_DEV MEDIA_SUPPORT MEDIA_CAMERA_SUPPORT" +ERROR_SND_ALOOP="CONFIG_SND_ALOOP is optionally required for audio support" + +PATCHES="${FILESDIR}/${PN}-1.8.2_p20220831-makefile-fixes.patch" + +src_prepare() { + if ! use gtk; then + default + sed -i -e '/cflags gtk+/d' Makefile || die + else + default + # remove path and extension from Icon and Exec entry + sed -i -e 's/Icon=\/opt\/droidcam-icon.png/Icon=droidcam/g' \ + -e 's/\/usr\/local\/bin\/droidcam/droidcam/g' \ + droidcam.desktop || die + sed -i -e 's%/opt/droidcam-icon.png%/usr/share/icons/hicolor/96x96/apps/droidcam.png%g' src/droidcam.c || die + fi +} + +src_configure() { + set_arch_to_kernel + default +} + +src_compile() { + if use gtk; then + emake droidcam + fi + emake droidcam-cli + + if linux_chkconfig_present CC_IS_CLANG; then + BUILD_PARAMS+=' CC=${CHOST}-clang' + if linux_chkconfig_present LD_IS_LLD; then + BUILD_PARAMS+=' LD=ld.lld' + if linux_chkconfig_present LTO_CLANG_THIN; then + # kernel enables cache by default leading to sandbox violations + BUILD_PARAMS+=' ldflags-y=--thinlto-cache-dir= LDFLAGS_MODULE=--thinlto-cache-dir=' + fi + fi + fi + export KERNEL_DIR || die + linux-mod_src_compile +} + +src_test() { + pushd "v4l2loopback" || die + default + ./test || die + popd || die +} + +src_install() { + if use gtk; then + dobin droidcam + newicon -s 32 icon.png droidcam.png + newicon -s 96 icon2.png droidcam.png + domenu droidcam.desktop + fi + dobin droidcam-cli + + # The cli and gui do not auto load the module if unloaded (why not though?) + # so we just put it in modules-load.d to make sure it always works + insinto /etc/modules-load.d + if linux_config_exists; then + if linux_chkconfig_module SND_ALOOP; then + newins - "${PN}.conf" <<-EOF + v4l2loopback-dc + snd_aloop + EOF + else + newins - "${PN}.conf" <<-EOF + v4l2loopback-dc + EOF + fi + fi + + einstalldocs + linux-mod_src_install +} + +pkg_preinst() { + linux-mod_pkg_preinst + if use gtk; then + xdg_pkg_preinst + fi +} + +pkg_postinst() { + linux-mod_pkg_postinst + if use gtk; then + xdg_pkg_postinst + else + elog + elog "Only droidcam-cli has been installed since 'gtk' flag was not set" + elog + fi + + elog "The default resolution for v4l2loopback-dc (i.e. droidcam) is 640x480." + elog "You can change this value in /etc/modprobe.d/v4l2loopback-dc.conf" + elog + elog "Links to the Android/iPhone/iPad apps can be found at" + elog "https://www.dev47apps.com/" +} + +pkg_postrm() { + linux-mod_pkg_postrm + if use gtk; then + xdg_pkg_postrm + fi +}