From 0c4be31f62fcdd755aa42653bbecc17b462d8999 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 15 Apr 2020 18:44:28 -0700 Subject: vlc: Use pkgconfig to find userland graphics libs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add mmal, x264, fluidsynth as packageconfigs so it can be easily enabled/disabled by users Signed-off-by: Khem Raj Cc: Andreas Müller --- ...-Use-packageconfig-to-detect-mmal-support.patch | 61 ++++++++++++++++++++++ .../recipes-multimedia/vlc/vlc_3.0.9.2.bb | 9 +++- 2 files changed, 68 insertions(+), 2 deletions(-) create mode 100644 meta-multimedia/recipes-multimedia/vlc/vlc/0001-Use-packageconfig-to-detect-mmal-support.patch (limited to 'meta-multimedia/recipes-multimedia') 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 @@ +From e8716a7755eef93e1033bb913e1eb4faee54658f Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 15 Apr 2020 18:29:26 -0700 +Subject: [PATCH] Use packageconfig to detect mmal support + +This needs userland graphics libraries, because distros may install it +in different locations, therefore its best to rely on pkgconf to find +the libs and header locations instead of assuming /opt/vc which might +work on some distros ( like raspbian ) but not everywhere + +Signed-off-by: Khem Raj +--- + configure.ac | 31 +++++++++++-------------------- + 1 file changed, 11 insertions(+), 20 deletions(-) + +diff --git a/configure.ac b/configure.ac +index d7cf692..f81b99d 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -3427,27 +3427,18 @@ AC_ARG_ENABLE(mmal, + AS_HELP_STRING([--enable-mmal], + [Multi-Media Abstraction Layer (MMAL) hardware plugin (default enable)])) + if test "${enable_mmal}" != "no"; then +- VLC_SAVE_FLAGS +- LDFLAGS="${LDFLAGS} -L/opt/vc/lib -lvchostif" +- CPPFLAGS="${CPPFLAGS} -isystem /opt/vc/include -isystem /opt/vc/include/interface/vcos/pthreads -isystem /opt/vc/include/interface/vmcs_host/linux" +- AC_CHECK_HEADERS(interface/mmal/mmal.h, +- [ AC_CHECK_LIB(bcm_host, vc_tv_unregister_callback_full, [ +- have_mmal="yes" +- VLC_ADD_PLUGIN([mmal]) +- VLC_ADD_LDFLAGS([mmal],[ -L/opt/vc/lib ]) +- VLC_ADD_CFLAGS([mmal],[ -isystem /opt/vc/include -isystem /opt/vc/include/interface/vcos/pthreads -isystem /opt/vc/include/interface/vmcs_host/linux ]) +- VLC_ADD_LIBS([mmal],[ -lbcm_host -lmmal -lmmal_core -lmmal_components -lmmal_util -lvchostif ]) ], [ +- AS_IF([test "${enable_mmal}" = "yes"], +- [ AC_MSG_ERROR([Cannot find bcm library...]) ], +- [ AC_MSG_WARN([Cannot find bcm library...]) ]) +- ], +- []) +- ] , [ AS_IF([test "${enable_mmal}" = "yes"], +- [ AC_MSG_ERROR([Cannot find development headers for mmal...]) ], +- [ AC_MSG_WARN([Cannot find development headers for mmal...]) ]) ]) +- VLC_RESTORE_FLAGS ++ PKG_CHECK_MODULES(BCMHOST, [bcm_host], [ ++ HAVE_BCMHOST=yes ++ AC_DEFINE(HAVE_BCMHOST, 1, [Define this if you have have userlang graphics installed]) ++ VLC_ADD_LIBS([bcmhost],[$BCMHOST_LIBS]) ++ VLC_ADD_CFLAGS([bcmhost],[$BCMHOST_CFLAGS]) ++ ],: ++ [AC_MSG_WARN([${BCMHOST_PKG_ERRORS}: userland graphics not available.]) ++ HAVE_BCMHOST=no]) ++ ++ AC_CHECK_HEADERS(interface/mmal/mmal.h) + fi +-AM_CONDITIONAL([HAVE_MMAL], [test "${have_mmal}" = "yes"]) ++AM_CONDITIONAL([HAVE_MMAL], [test "${have_bcmhost}" = "yes"]) + + dnl + dnl evas plugin +-- +2.26.1 + 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" DEPENDS = "coreutils-native fribidi libtool libgcrypt libgcrypt-native \ dbus libxml2 gnutls \ - tremor faad2 ffmpeg flac fluidsynth alsa-lib \ + tremor faad2 ffmpeg flac alsa-lib \ lua-native lua libidn \ avahi jpeg xz libmodplug mpeg2dec \ libmtp libopus orc libsamplerate0 libusb1 schroedinger taglib \ @@ -22,6 +22,7 @@ SRC_URI = "http://download.videolan.org/pub/videolan/${BPN}/${PV}/${BP}.tar.xz \ file://0006-make-opencv-configurable.patch \ file://0007-use-vorbisidec.patch \ file://0008-fix-luaL-checkint.patch \ + file://0001-Use-packageconfig-to-detect-mmal-support.patch \ " SRC_URI[sha256sum] = "a9bdad293d81cd48516abad8d490d8ab4012964ae541ff19e00021e071e47601" @@ -51,12 +52,16 @@ EXTRA_OECONF = "\ " PACKAGECONFIG ?= " \ - live555 dc1394 dv1394 notify fontconfig freetype dvdread png \ + live555 dc1394 dv1394 notify fontconfig fluidsynth freetype dvdread png \ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \ + x264 \ " inherit ${@bb.utils.contains('PACKAGECONFIG', 'qt5', 'qmake5_paths', '', d)} +PACKAGECONFIG[mmal] = "--enable-omxil --enable-omxil-vout --enable-rpi-omxil --enable-mmal,,userland" +PACKAGECONFIG[x264] = "--enable-x264,--disable-x264,x264" +PACKAGECONFIG[fluidsynth] = ",,fluidsynth" PACKAGECONFIG[mad] = "--enable-mad,--disable-mad,libmad" PACKAGECONFIG[a52] = "--enable-a52,--disable-a52,liba52" PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack" -- cgit 1.2.3-korg