Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 1 | DESCRIPTION = "Video player and streamer - davinci edition" |
| 2 | HOMEPAGE = "http://www.videolan.org" |
| 3 | SECTION = "multimedia" |
| 4 | |
| 5 | LICENSE = "GPL-2.0-only" |
| 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" |
| 7 | |
| 8 | SRC_URI = "\ |
| 9 | git://git@github.com/RPi-Distro/vlc;protocol=https;branch=buster-rpt \ |
| 10 | file://0001-configure-fix-linking-on-RISC-V-ISA.patch \ |
| 11 | file://0002-Revert-configure-Require-libmodplug-0.8.9.patch \ |
| 12 | file://0003-mmal_20.patch \ |
| 13 | file://0004-mmal_exit_fix.patch \ |
| 14 | file://0005-mmal_chain.patch \ |
| 15 | file://0006-Use-packageconfig-to-detect-mmal-support.patch \ |
| 16 | file://0007-use-vorbisidec.patch \ |
| 17 | file://0008-fix-luaL-checkint.patch \ |
| 18 | file://0009-fix-EGL-macro-undeclared-and-EGLImageKHR.patch \ |
| 19 | file://0010-fix-numeric_limits-is-not-a-member-of-std.patch \ |
| 20 | " |
| 21 | |
| 22 | SRCREV = "f7fd69f12a3b89d03768fa3bd468e8f33cd1dc7c" |
| 23 | |
| 24 | S = "${WORKDIR}/git" |
| 25 | |
| 26 | PROVIDES = "vlc" |
| 27 | RPROVIDES:${PN} = "${PROVIDES}" |
| 28 | DEPENDS = "coreutils-native fribidi libtool libgcrypt libgcrypt-native \ |
| 29 | dbus libxml2 gnutls tremor faad2 ffmpeg flac alsa-lib libidn \ |
| 30 | jpeg xz libmodplug mpeg2dec libmtp libopus orc libsamplerate0 \ |
| 31 | avahi libusb1 schroedinger taglib tiff" |
| 32 | |
| 33 | inherit autotools gettext pkgconfig mime-xdg |
| 34 | |
| 35 | export BUILDCC = "${BUILD_CC} -std=c11" |
| 36 | EXTRA_OECONF = "\ |
| 37 | --enable-run-as-root \ |
| 38 | --enable-xvideo \ |
| 39 | --disable-lua \ |
| 40 | --disable-screen --disable-caca \ |
| 41 | --enable-vlm \ |
| 42 | --enable-tremor \ |
| 43 | --disable-aa --disable-faad \ |
| 44 | --enable-dbus \ |
| 45 | --without-contrib \ |
| 46 | --without-kde-solid \ |
| 47 | --enable-realrtsp \ |
| 48 | --disable-libtar \ |
| 49 | --enable-avcodec \ |
| 50 | " |
| 51 | |
| 52 | PACKAGECONFIG ?= "\ |
| 53 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \ |
| 54 | ${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', 'mmal', d)} \ |
| 55 | live555 dv1394 notify fontconfig fluidsynth freetype dvdread png udev \ |
| 56 | x264 alsa harfbuzz jack neon fribidi dvbpsi a52 v4l2 gles2 \ |
| 57 | " |
| 58 | |
| 59 | PACKAGECONFIG[mmal] = "--enable-omxil --enable-omxil-vout --enable-rpi-omxil --enable-mmal --enable-mmal-avcodec,,userland" |
| 60 | PACKAGECONFIG[x264] = "--enable-x264,--disable-x264,x264" |
| 61 | PACKAGECONFIG[mad] = "--enable-mad,--disable-mad,libmad" |
| 62 | PACKAGECONFIG[a52] = "--enable-a52,--disable-a52,liba52" |
| 63 | PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack" |
| 64 | PACKAGECONFIG[live555] = "--enable-live555 LIVE555_PREFIX=${STAGING_DIR_HOST}${prefix},--disable-live555,live555" |
| 65 | PACKAGECONFIG[libass] = "--enable-libass,--disable-libass,libass" |
| 66 | PACKAGECONFIG[postproc] = "--enable-postproc,--disable-postproc,libpostproc" |
| 67 | PACKAGECONFIG[libva] = "--enable-libva,--disable-libva,libva" |
| 68 | PACKAGECONFIG[opencv] = "--enable-opencv,--disable-opencv,opencv" |
| 69 | PACKAGECONFIG[speex] = "--enable-speex,--disable-speex,speex" |
| 70 | PACKAGECONFIG[gstreamer] = "--enable-gst-decode,--disable-gst-decode,gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad" |
| 71 | PACKAGECONFIG[vpx] = "--enable-vpx,--disable-vpx, libvpx" |
| 72 | PACKAGECONFIG[freerdp] = "--enable-freerdp,--disable-freerdp, freerdp" |
| 73 | PACKAGECONFIG[dvbpsi] = "--enable-dvbpsi,--disable-dvbpsi, libdvbpsi" |
| 74 | PACKAGECONFIG[samba] = "--enable-smbclient,--disable-smbclient, samba" |
| 75 | PACKAGECONFIG[upnp] = "--enable-upnp,--disable-upnp,libupnp" |
| 76 | PACKAGECONFIG[dvdnav] = "--enable-dvdnav,--disable-dvdnav,libdvdnav libdvdcss" |
| 77 | PACKAGECONFIG[sftp] = "--enable-sftp,--disable-sftp,libssh2" |
| 78 | PACKAGECONFIG[vorbis] = "--enable-vorbis,--disable-vorbis,libvorbis libogg" |
| 79 | PACKAGECONFIG[ogg] = "--enable-ogg,--disable-ogg,libvorbis libogg" |
| 80 | PACKAGECONFIG[dc1394] = "--enable-dc1394,--disable-dc1394,libdc1394" |
| 81 | PACKAGECONFIG[dv1394] = "--enable-dv1394,--disable-dv1394,libraw1394 libavc1394" |
| 82 | PACKAGECONFIG[svg] = "--enable-svg,--disable-svg,librsvg" |
| 83 | PACKAGECONFIG[svgdec] = "--enable-svgdec,--disable-svgdec,librsvg cairo" |
| 84 | PACKAGECONFIG[notify] = "--enable-notify,--disable-notify, libnotify gtk+3" |
| 85 | PACKAGECONFIG[fontconfig] = "--enable-fontconfig,--disable-fontconfig, fontconfig" |
| 86 | PACKAGECONFIG[freetype] = "--enable-freetype,--disable-freetype, freetype" |
| 87 | PACKAGECONFIG[dvdread] = "--enable-dvdread,--disable-dvdread, libdvdread libdvdcss" |
| 88 | PACKAGECONFIG[vnc] = "--enable-vnc,--disable-vnc, libvncserver" |
| 89 | PACKAGECONFIG[x11] = "--with-x --enable-xcb,--without-x --disable-xcb, xcb-util-keysyms libxpm libxinerama" |
| 90 | PACKAGECONFIG[png] = "--enable-png,--disable-png,libpng" |
| 91 | PACKAGECONFIG[vdpau] = "--enable-vdpau,--disable-vdpau,libvdpau" |
| 92 | PACKAGECONFIG[wayland] = "--enable-wayland,--disable-wayland,wayland wayland-native" |
| 93 | PACKAGECONFIG[gles2] = "--enable-gles2,--disable-gles2,virtual/libgles2" |
| 94 | PACKAGECONFIG[dca] = "--enable-dca,," |
| 95 | PACKAGECONFIG[fribidi] = "--enable-fribidi,,fribidi" |
| 96 | PACKAGECONFIG[gnutls] = "--enable-gnutls,,gnutls" |
| 97 | PACKAGECONFIG[fluidsynth] = "--enable-fluidsynth,,fluidsynth" |
| 98 | PACKAGECONFIG[harfbuzz] = "--enable-harfbuzz,--disable-harfbuzz,harfbuzz" |
| 99 | PACKAGECONFIG[udev] = "--enable-udev,--disable-udev,udev" |
| 100 | PACKAGECONFIG[neon] = "--enable-neon,--disable-neon," |
| 101 | PACKAGECONFIG[opus] = "--enable-opus,--disable-opus,libopus libogg" |
| 102 | PACKAGECONFIG[ncurses] = "--enable-ncurses,--disable-ncurses,ncurses" |
| 103 | PACKAGECONFIG[alsa] = "--enable-alsa,--disable-alsa,alsa-lib" |
| 104 | PACKAGECONFIG[pulseaudio] = "--enable-pulse,--disable-pulse,pulseaudio" |
| 105 | PACKAGECONFIG[sdl-image] = "--enable-sdl-image,,libsdl-image" |
| 106 | PACKAGECONFIG[v4l2] = "--enable-v4l2,,v4l-utils" |
| 107 | |
| 108 | # Workaround for modules/codec/omxil/omxil_core.h |
| 109 | # multiple definition of `pf_enable_graphic_buffers' |
| 110 | # multiple definition of `pf_get_graphic_buffer_usage' |
| 111 | # multiple definition of `pf_get_hal_format' |
| 112 | TARGET_CFLAGS:append = " -fcommon" |
| 113 | TARGET_CXXFLAGS:append = " -fcommon" |
| 114 | |
| 115 | # Ensures the --enable-mmal-avcodec flag is available for usage |
| 116 | do_configure:prepend() { |
| 117 | olddir=`pwd` |
| 118 | cd ${S} |
| 119 | ./bootstrap |
| 120 | cd $olddir |
| 121 | } |
| 122 | |
| 123 | do_configure:append() { |
| 124 | # https://forums.raspberrypi.com/viewtopic.php?p=1601535 |
| 125 | sed -i "/GLAPI void APIENTRY glShaderSource (/d" ${STAGING_INCDIR}/GL/glext.h |
| 126 | #sed -i -e s:'${top_builddir_slash}libtool':'${top_builddir_slash}'${TARGET_SYS}-libtool:g ${B}/doltlibtool |
| 127 | } |
| 128 | |
| 129 | # This recipe packages vlc as a library as well, so qt4 dependencies |
| 130 | # can be avoided when only the library is installed. |
| 131 | PACKAGES =+ "libvlc" |
| 132 | |
| 133 | LEAD_SONAME_libvlc = "libvlc.so.5" |
| 134 | FILES:libvlc = "${libdir}/lib*.so.*" |
| 135 | |
| 136 | FILES:${PN} += "\ |
| 137 | ${bindir}/vlc \ |
| 138 | ${libdir}/vlc \ |
| 139 | ${datadir}/applications \ |
| 140 | ${datadir}/vlc \ |
| 141 | ${datadir}/icons \ |
| 142 | ${datadir}/metainfo/vlc.appdata.xml \ |
| 143 | " |
| 144 | |
| 145 | FILES:${PN}-dbg += "\ |
| 146 | ${libdir}/vlc/*/.debug \ |
| 147 | ${libdir}/vlc/plugins/*/.debug \ |
| 148 | " |
| 149 | |
| 150 | FILES:${PN}-staticdev += "\ |
| 151 | ${libdir}/vlc/plugins/*/*.a \ |
| 152 | ${libdir}/vlc/libcompat.a \ |
| 153 | " |
| 154 | |
| 155 | # Only enable it for rpi class of machines |
| 156 | COMPATIBLE_HOST = "null" |
| 157 | COMPATIBLE_HOST:rpi = "'(.*)'" |
| 158 | |
| 159 | INSANE_SKIP:${PN} = "dev-so" |