summaryrefslogtreecommitdiffstats
path: root/meta-multimedia/recipes-multimedia/vlc
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2020-04-15 18:44:28 -0700
committerKhem Raj <raj.khem@gmail.com>2020-04-16 11:40:40 -0700
commit0c4be31f62fcdd755aa42653bbecc17b462d8999 (patch)
tree4082d035bb63f387580c4b06bf3b5455f5e69f2f /meta-multimedia/recipes-multimedia/vlc
parenteb3264e3137b9096bf47f8d80dc3b4eda19a031a (diff)
downloadmeta-openembedded-0c4be31f62fcdd755aa42653bbecc17b462d8999.tar.gz
vlc: Use pkgconfig to find userland graphics libs
Add mmal, x264, fluidsynth as packageconfigs so it can be easily enabled/disabled by users Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Andreas Müller <schnitzeltony@gmail.com>
Diffstat (limited to 'meta-multimedia/recipes-multimedia/vlc')
-rw-r--r--meta-multimedia/recipes-multimedia/vlc/vlc/0001-Use-packageconfig-to-detect-mmal-support.patch61
-rw-r--r--meta-multimedia/recipes-multimedia/vlc/vlc_3.0.9.2.bb9
2 files changed, 68 insertions, 2 deletions
diff --git a/meta-multimedia/recipes-multimedia/vlc/vlc/0001-Use-packageconfig-to-detect-mmal-support.patch b/meta-multimedia/recipes-multimedia/vlc/vlc/0001-Use-packageconfig-to-detect-mmal-support.patch
new file mode 100644
index 0000000000..424aaa2815
--- /dev/null
+++ b/meta-multimedia/recipes-multimedia/vlc/vlc/0001-Use-packageconfig-to-detect-mmal-support.patch
@@ -0,0 +1,61 @@
1From e8716a7755eef93e1033bb913e1eb4faee54658f Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 15 Apr 2020 18:29:26 -0700
4Subject: [PATCH] Use packageconfig to detect mmal support
5
6This needs userland graphics libraries, because distros may install it
7in different locations, therefore its best to rely on pkgconf to find
8the libs and header locations instead of assuming /opt/vc which might
9work on some distros ( like raspbian ) but not everywhere
10
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13 configure.ac | 31 +++++++++++--------------------
14 1 file changed, 11 insertions(+), 20 deletions(-)
15
16diff --git a/configure.ac b/configure.ac
17index d7cf692..f81b99d 100644
18--- a/configure.ac
19+++ b/configure.ac
20@@ -3427,27 +3427,18 @@ AC_ARG_ENABLE(mmal,
21 AS_HELP_STRING([--enable-mmal],
22 [Multi-Media Abstraction Layer (MMAL) hardware plugin (default enable)]))
23 if test "${enable_mmal}" != "no"; then
24- VLC_SAVE_FLAGS
25- LDFLAGS="${LDFLAGS} -L/opt/vc/lib -lvchostif"
26- CPPFLAGS="${CPPFLAGS} -isystem /opt/vc/include -isystem /opt/vc/include/interface/vcos/pthreads -isystem /opt/vc/include/interface/vmcs_host/linux"
27- AC_CHECK_HEADERS(interface/mmal/mmal.h,
28- [ AC_CHECK_LIB(bcm_host, vc_tv_unregister_callback_full, [
29- have_mmal="yes"
30- VLC_ADD_PLUGIN([mmal])
31- VLC_ADD_LDFLAGS([mmal],[ -L/opt/vc/lib ])
32- VLC_ADD_CFLAGS([mmal],[ -isystem /opt/vc/include -isystem /opt/vc/include/interface/vcos/pthreads -isystem /opt/vc/include/interface/vmcs_host/linux ])
33- VLC_ADD_LIBS([mmal],[ -lbcm_host -lmmal -lmmal_core -lmmal_components -lmmal_util -lvchostif ]) ], [
34- AS_IF([test "${enable_mmal}" = "yes"],
35- [ AC_MSG_ERROR([Cannot find bcm library...]) ],
36- [ AC_MSG_WARN([Cannot find bcm library...]) ])
37- ],
38- [])
39- ] , [ AS_IF([test "${enable_mmal}" = "yes"],
40- [ AC_MSG_ERROR([Cannot find development headers for mmal...]) ],
41- [ AC_MSG_WARN([Cannot find development headers for mmal...]) ]) ])
42- VLC_RESTORE_FLAGS
43+ PKG_CHECK_MODULES(BCMHOST, [bcm_host], [
44+ HAVE_BCMHOST=yes
45+ AC_DEFINE(HAVE_BCMHOST, 1, [Define this if you have have userlang graphics installed])
46+ VLC_ADD_LIBS([bcmhost],[$BCMHOST_LIBS])
47+ VLC_ADD_CFLAGS([bcmhost],[$BCMHOST_CFLAGS])
48+ ],:
49+ [AC_MSG_WARN([${BCMHOST_PKG_ERRORS}: userland graphics not available.])
50+ HAVE_BCMHOST=no])
51+
52+ AC_CHECK_HEADERS(interface/mmal/mmal.h)
53 fi
54-AM_CONDITIONAL([HAVE_MMAL], [test "${have_mmal}" = "yes"])
55+AM_CONDITIONAL([HAVE_MMAL], [test "${have_bcmhost}" = "yes"])
56
57 dnl
58 dnl evas plugin
59--
602.26.1
61
diff --git a/meta-multimedia/recipes-multimedia/vlc/vlc_3.0.9.2.bb b/meta-multimedia/recipes-multimedia/vlc/vlc_3.0.9.2.bb
index 556e79c7e6..e4fa7acbf1 100644
--- a/meta-multimedia/recipes-multimedia/vlc/vlc_3.0.9.2.bb
+++ b/meta-multimedia/recipes-multimedia/vlc/vlc_3.0.9.2.bb
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
7 7
8DEPENDS = "coreutils-native fribidi libtool libgcrypt libgcrypt-native \ 8DEPENDS = "coreutils-native fribidi libtool libgcrypt libgcrypt-native \
9 dbus libxml2 gnutls \ 9 dbus libxml2 gnutls \
10 tremor faad2 ffmpeg flac fluidsynth alsa-lib \ 10 tremor faad2 ffmpeg flac alsa-lib \
11 lua-native lua libidn \ 11 lua-native lua libidn \
12 avahi jpeg xz libmodplug mpeg2dec \ 12 avahi jpeg xz libmodplug mpeg2dec \
13 libmtp libopus orc libsamplerate0 libusb1 schroedinger taglib \ 13 libmtp libopus orc libsamplerate0 libusb1 schroedinger taglib \
@@ -22,6 +22,7 @@ SRC_URI = "http://download.videolan.org/pub/videolan/${BPN}/${PV}/${BP}.tar.xz \
22 file://0006-make-opencv-configurable.patch \ 22 file://0006-make-opencv-configurable.patch \
23 file://0007-use-vorbisidec.patch \ 23 file://0007-use-vorbisidec.patch \
24 file://0008-fix-luaL-checkint.patch \ 24 file://0008-fix-luaL-checkint.patch \
25 file://0001-Use-packageconfig-to-detect-mmal-support.patch \
25" 26"
26SRC_URI[sha256sum] = "a9bdad293d81cd48516abad8d490d8ab4012964ae541ff19e00021e071e47601" 27SRC_URI[sha256sum] = "a9bdad293d81cd48516abad8d490d8ab4012964ae541ff19e00021e071e47601"
27 28
@@ -51,12 +52,16 @@ EXTRA_OECONF = "\
51" 52"
52 53
53PACKAGECONFIG ?= " \ 54PACKAGECONFIG ?= " \
54 live555 dc1394 dv1394 notify fontconfig freetype dvdread png \ 55 live555 dc1394 dv1394 notify fontconfig fluidsynth freetype dvdread png \
55 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \ 56 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
57 x264 \
56" 58"
57 59
58inherit ${@bb.utils.contains('PACKAGECONFIG', 'qt5', 'qmake5_paths', '', d)} 60inherit ${@bb.utils.contains('PACKAGECONFIG', 'qt5', 'qmake5_paths', '', d)}
59 61
62PACKAGECONFIG[mmal] = "--enable-omxil --enable-omxil-vout --enable-rpi-omxil --enable-mmal,,userland"
63PACKAGECONFIG[x264] = "--enable-x264,--disable-x264,x264"
64PACKAGECONFIG[fluidsynth] = ",,fluidsynth"
60PACKAGECONFIG[mad] = "--enable-mad,--disable-mad,libmad" 65PACKAGECONFIG[mad] = "--enable-mad,--disable-mad,libmad"
61PACKAGECONFIG[a52] = "--enable-a52,--disable-a52,liba52" 66PACKAGECONFIG[a52] = "--enable-a52,--disable-a52,liba52"
62PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack" 67PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack"