mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-06-10 16:40:03 +00:00
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>
This commit is contained in:
+61
@@ -0,0 +1,61 @@
|
|||||||
|
From e8716a7755eef93e1033bb913e1eb4faee54658f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Khem Raj <raj.khem@gmail.com>
|
||||||
|
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 <raj.khem@gmail.com>
|
||||||
|
---
|
||||||
|
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
|
||||||
|
|
||||||
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
|
|||||||
|
|
||||||
DEPENDS = "coreutils-native fribidi libtool libgcrypt libgcrypt-native \
|
DEPENDS = "coreutils-native fribidi libtool libgcrypt libgcrypt-native \
|
||||||
dbus libxml2 gnutls \
|
dbus libxml2 gnutls \
|
||||||
tremor faad2 ffmpeg flac fluidsynth alsa-lib \
|
tremor faad2 ffmpeg flac alsa-lib \
|
||||||
lua-native lua libidn \
|
lua-native lua libidn \
|
||||||
avahi jpeg xz libmodplug mpeg2dec \
|
avahi jpeg xz libmodplug mpeg2dec \
|
||||||
libmtp libopus orc libsamplerate0 libusb1 schroedinger taglib \
|
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://0006-make-opencv-configurable.patch \
|
||||||
file://0007-use-vorbisidec.patch \
|
file://0007-use-vorbisidec.patch \
|
||||||
file://0008-fix-luaL-checkint.patch \
|
file://0008-fix-luaL-checkint.patch \
|
||||||
|
file://0001-Use-packageconfig-to-detect-mmal-support.patch \
|
||||||
"
|
"
|
||||||
SRC_URI[sha256sum] = "a9bdad293d81cd48516abad8d490d8ab4012964ae541ff19e00021e071e47601"
|
SRC_URI[sha256sum] = "a9bdad293d81cd48516abad8d490d8ab4012964ae541ff19e00021e071e47601"
|
||||||
|
|
||||||
@@ -51,12 +52,16 @@ EXTRA_OECONF = "\
|
|||||||
"
|
"
|
||||||
|
|
||||||
PACKAGECONFIG ?= " \
|
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)} \
|
${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
|
||||||
|
x264 \
|
||||||
"
|
"
|
||||||
|
|
||||||
inherit ${@bb.utils.contains('PACKAGECONFIG', 'qt5', 'qmake5_paths', '', d)}
|
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[mad] = "--enable-mad,--disable-mad,libmad"
|
||||||
PACKAGECONFIG[a52] = "--enable-a52,--disable-a52,liba52"
|
PACKAGECONFIG[a52] = "--enable-a52,--disable-a52,liba52"
|
||||||
PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack"
|
PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack"
|
||||||
|
|||||||
Reference in New Issue
Block a user