summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Le Cuirot <chewi@gentoo.org>2020-08-23 17:37:15 +0100
committerJames Le Cuirot <chewi@gentoo.org>2020-08-23 17:42:18 +0100
commit205e228434c0f9ff2e6156942a1ee8f8f56129fa (patch)
treeb7e40f265eaf431016053d2b36712a346ac43042 /media-tv/v4l-utils
parentmedia-libs/libv4l: Bump to 1.20.0, fix automagics (diff)
downloadgentoo-205e228434c0f9ff2e6156942a1ee8f8f56129fa.tar.gz
gentoo-205e228434c0f9ff2e6156942a1ee8f8f56129fa.tar.bz2
gentoo-205e228434c0f9ff2e6156942a1ee8f8f56129fa.zip
media-tv/v4l-utils: Bump to 1.20.0, fix some automagics
The automagic libudev dependency has now been dealt with via a patch and udev USE flag. Among other things, this library is needed for the DVB utilities so a dvb USE flag has also been added with a corresponding dependency on libv4l[dvb]. There may be more automagics but I haven't checked yet. Bug: https://bugs.gentoo.org/691066 Bug: https://bugs.gentoo.org/721374 Package-Manager: Portage-3.0.4, Repoman-3.0.1 Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Diffstat (limited to 'media-tv/v4l-utils')
-rw-r--r--media-tv/v4l-utils/Manifest1
-rw-r--r--media-tv/v4l-utils/files/v4l-utils-1.20.0-automagic.patch52
-rw-r--r--media-tv/v4l-utils/v4l-utils-1.20.0.ebuild89
3 files changed, 142 insertions, 0 deletions
diff --git a/media-tv/v4l-utils/Manifest b/media-tv/v4l-utils/Manifest
index 67728dacc7fa..0143df89ef7f 100644
--- a/media-tv/v4l-utils/Manifest
+++ b/media-tv/v4l-utils/Manifest
@@ -2,3 +2,4 @@ DIST v4l-utils-1.10.1.tar.bz2 1352235 BLAKE2B 7ececae8ad5ebd999070b0c3626fdf5b0a
DIST v4l-utils-1.16.3.tar.bz2 1894961 BLAKE2B 71c674abbb3415e592354998e1baa3eedbb4be21757bef80b463ea987e9fc231789e6b333b37d0d9916cb30729e04951dc9f1755ab00a82502fdc415b00cb9a2 SHA512 404672d18d94861c6957ea3a15a6a48f238d3859940810952a5a8cc33b57f1a360d1a19af28405c01b073c0ece90c5995a71dbe6544b30bdb8eace7daeb4bc0b
DIST v4l-utils-1.16.6.tar.bz2 1893768 BLAKE2B f31cf794f6949fa2c1f45db8bae99a10a5fbc67af356889f636ab03cfd04011a82939a10f01145c56001b91655664530cfbda7d64c523752b8bb77159a1c80ab SHA512 f011218591e32b0ca3239373d9ea4739d7cfe3a6bef5f8a996253cea9b9d836ba488132e2a1b8f6f61cd69f1bcecc20e4b5c26f9c95a2a912e17c400b9fa9b58
DIST v4l-utils-1.18.0.tar.bz2 1995506 BLAKE2B 35cd138c88960e5b02431c408a43905a73ea6a7650a939abc2250e1f219bda1437262a7083d90d8b4d39c5bd2cce5f6fc590b8dc09a8738fb5baf55266256b94 SHA512 749c804671f039d907bf782cba5d1c23fff48066f3b6d4a0249fb9b65c493ee3945b544ee2a306dda79973da04f0301278ee88775f798aba590e5d0f15226d49
+DIST v4l-utils-1.20.0.tar.bz2 2030419 BLAKE2B 218082b88c42dcb9da3dbdd81b184c0e7402ca7ba35678a2905e16c11db1fe7065a19ec84b5fd57e2ed4718965c3e8097f8e8bdd04a38a485716efe3ec62e42a SHA512 179ca8dbbf7af5fa4870b70f17645d7834fe6ba52670ae6b58473efa257db0cd812ce14f16574cc4491c0bcb218835e4c29f1354882a151687eecec97852fc63
diff --git a/media-tv/v4l-utils/files/v4l-utils-1.20.0-automagic.patch b/media-tv/v4l-utils/files/v4l-utils-1.20.0-automagic.patch
new file mode 100644
index 000000000000..017513bcb907
--- /dev/null
+++ b/media-tv/v4l-utils/files/v4l-utils-1.20.0-automagic.patch
@@ -0,0 +1,52 @@
+From e018720a49b96535613ca9173750ce2271608cd5 Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <chewi@gentoo.org>
+Date: Sun, 23 Aug 2020 16:33:21 +0100
+Subject: [PATCH] configure.ac: Add --without-libudev option to avoid automagic
+ dep
+
+Signed-off-by: James Le Cuirot <chewi@gentoo.org>
+---
+ configure.ac | 27 +++++++++++++++++----------
+ 1 file changed, 17 insertions(+), 10 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index d9f43ab5..e6134d08 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -291,16 +291,23 @@ else
+ AC_MSG_WARN(ALSA library not available)
+ fi
+
+-PKG_CHECK_MODULES(libudev, libudev, have_libudev=yes, have_libudev=no)
+-if test "x$have_libudev" = "xyes"; then
+- AC_DEFINE([HAVE_LIBUDEV], [], [Use libudev])
+- LIBUDEV_CFLAGS="$libudev_CFLAGS"
+- LIBUDEV_LIBS="$libudev_LIBS"
+- AC_SUBST(LIBUDEV_CFLAGS)
+- AC_SUBST(LIBUDEV_LIBS)
+-else
+- AC_MSG_WARN(udev library not available)
+-fi
++AC_ARG_WITH([libudev],
++ AS_HELP_STRING([--without-libudev], [Do not use udev library]),
++ [],
++ [with_libudev=yes])
++
++have_libudev=no
++
++AS_IF([test "x$with_libudev" != xno -o "x$enable_libdvbv5" != xno],
++ [PKG_CHECK_MODULES(libudev, libudev, have_libudev=yes, [])
++ AS_IF([test "x$have_libudev" = xyes],
++ [AC_DEFINE([HAVE_LIBUDEV], [], [Use libudev])
++ LIBUDEV_CFLAGS="$libudev_CFLAGS"
++ LIBUDEV_LIBS="$libudev_LIBS"
++ AC_SUBST(LIBUDEV_CFLAGS)
++ AC_SUBST(LIBUDEV_LIBS)],
++ AC_MSG_WARN(udev library not available)
++ )])
+
+ AC_SUBST([JPEG_LIBS])
+
+--
+2.26.2
+
diff --git a/media-tv/v4l-utils/v4l-utils-1.20.0.ebuild b/media-tv/v4l-utils/v4l-utils-1.20.0.ebuild
new file mode 100644
index 000000000000..01f52bb05556
--- /dev/null
+++ b/media-tv/v4l-utils/v4l-utils-1.20.0.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools flag-o-matic udev xdg
+
+DESCRIPTION="Separate utilities ebuild from upstream v4l-utils package"
+HOMEPAGE="https://git.linuxtv.org/v4l-utils.git"
+SRC_URI="https://linuxtv.org/downloads/v4l-utils/${P}.tar.bz2"
+
+LICENSE="GPL-2+ LGPL-2.1+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="+bpf dvb opengl qt5 +udev"
+
+RDEPEND="
+ >=media-libs/libv4l-${PV}[dvb?,jpeg]
+ >=virtual/jpeg-0-r2:0=
+ bpf? ( virtual/libelf:= )
+ udev? ( virtual/libudev )
+ qt5? (
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ opengl? ( dev-qt/qtopengl:5[-gles2(-)] virtual/opengl )
+ media-libs/alsa-lib
+ )
+ !media-tv/v4l2-ctl
+ !<media-tv/ivtv-utils-1.4.0-r2
+"
+
+DEPEND="
+ ${RDEPEND}
+"
+
+BDEPEND="
+ sys-devel/gettext
+ virtual/pkgconfig
+ bpf? ( sys-devel/clang:*[llvm_targets_BPF] )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-automagic.patch
+)
+
+# Not really prebuilt but BPF objects make our QA checks go crazy.
+QA_PREBUILT="*/rc_keymaps/protocols/*.o"
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ if use qt5; then
+ append-cxxflags -std=c++11
+ local qt5_paths=( \
+ MOC="$(pkg-config --variable=host_bins Qt5Core)/moc" \
+ UIC="$(pkg-config --variable=host_bins Qt5Core)/uic" \
+ RCC="$(pkg-config --variable=host_bins Qt5Core)/rcc" \
+ )
+ if use !opengl; then
+ sed -e 's/Qt5OpenGL/DiSaBlEd/g' -i configure || die
+ fi
+ fi
+
+ # Hard disable the flags that apply only to the libs.
+ econf \
+ --disable-static \
+ $(use_enable dvb libdvbv5) \
+ $(use_enable qt5 qv4l2) \
+ $(use_enable qt5 qvidcap) \
+ $(use_enable bpf) \
+ --with-jpeg \
+ $(use_with udev libudev) \
+ --with-udevdir="$(get_udevdir)" \
+ "${qt5_paths[@]}"
+}
+
+src_install() {
+ emake -C utils DESTDIR="${D}" install
+ emake -C contrib DESTDIR="${D}" install
+
+ dodoc README
+ newdoc utils/libv4l2util/TODO TODO.libv4l2util
+ newdoc utils/libmedia_dev/README README.libmedia_dev
+ newdoc utils/dvb/README README.dvb
+ newdoc utils/v4l2-compliance/fixme.txt fixme.txt.v4l2-compliance
+}