xref: /OK3568_Linux_fs/yocto/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc_3.0.17-1.bb (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunDESCRIPTION = "Video player and streamer - davinci edition"
2*4882a593SmuzhiyunHOMEPAGE = "http://www.videolan.org"
3*4882a593SmuzhiyunSECTION = "multimedia"
4*4882a593Smuzhiyun
5*4882a593SmuzhiyunLICENSE = "GPL-2.0-only"
6*4882a593SmuzhiyunLIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
7*4882a593Smuzhiyun
8*4882a593SmuzhiyunDEPENDS = "coreutils-native fribidi libtool libgcrypt libgcrypt-native bison-native \
9*4882a593Smuzhiyun   dbus libxml2 gnutls \
10*4882a593Smuzhiyun   tremor faad2 ffmpeg flac alsa-lib \
11*4882a593Smuzhiyun   lua-native lua libidn \
12*4882a593Smuzhiyun   avahi jpeg xz libmodplug mpeg2dec \
13*4882a593Smuzhiyun   libmtp libopus orc libsamplerate0 libusb1 schroedinger taglib \
14*4882a593Smuzhiyun   tiff"
15*4882a593Smuzhiyun
16*4882a593SmuzhiyunLDFLAGS:append:riscv64 = " -latomic"
17*4882a593SmuzhiyunLDFLAGS:append:riscv32 = " -latomic"
18*4882a593Smuzhiyun
19*4882a593SmuzhiyunSRC_URI = "git://github.com/videolan/vlc.git;protocol=https;branch=3.0.x \
20*4882a593Smuzhiyun           file://0001-make-opencv-configurable.patch \
21*4882a593Smuzhiyun           file://0002-use-vorbisidec.patch \
22*4882a593Smuzhiyun           file://0003-fix-luaL-checkint.patch \
23*4882a593Smuzhiyun           file://0004-Use-packageconfig-to-detect-mmal-support.patch \
24*4882a593Smuzhiyun           file://0005-linux-thread-Use-SYS_futex-instead-of-__NR_futex.patch \
25*4882a593Smuzhiyun"
26*4882a593SmuzhiyunSRCREV = "aa76328c572d93f1d99c867a94ecad1dc3259733"
27*4882a593SmuzhiyunS = "${WORKDIR}/git"
28*4882a593Smuzhiyun
29*4882a593Smuzhiyuninherit autotools-brokensep features_check gettext pkgconfig mime-xdg
30*4882a593Smuzhiyun
31*4882a593SmuzhiyunREQUIRED_DISTRO_FEATURES = "x11"
32*4882a593Smuzhiyun
33*4882a593Smuzhiyunexport BUILDCC = "${BUILD_CC}"
34*4882a593SmuzhiyunEXTRA_OECONF = "\
35*4882a593Smuzhiyun    --enable-run-as-root \
36*4882a593Smuzhiyun    --enable-xvideo \
37*4882a593Smuzhiyun    --disable-screen --disable-caca \
38*4882a593Smuzhiyun    --enable-vlm \
39*4882a593Smuzhiyun    --enable-freetype \
40*4882a593Smuzhiyun    --enable-tremor \
41*4882a593Smuzhiyun    --enable-v4l2 --disable-aa --disable-faad \
42*4882a593Smuzhiyun    --enable-dbus \
43*4882a593Smuzhiyun    --without-contrib \
44*4882a593Smuzhiyun    --without-kde-solid \
45*4882a593Smuzhiyun    --enable-realrtsp \
46*4882a593Smuzhiyun    --disable-libtar \
47*4882a593Smuzhiyun    --enable-avcodec \
48*4882a593Smuzhiyun    ac_cv_path_MOC=${STAGING_BINDIR_NATIVE}${QT_DIR_NAME}/moc \
49*4882a593Smuzhiyun    ac_cv_path_RCC=${STAGING_BINDIR_NATIVE}${QT_DIR_NAME}/rcc \
50*4882a593Smuzhiyun    ac_cv_path_UIC=${STAGING_BINDIR_NATIVE}${QT_DIR_NAME}/uic \
51*4882a593Smuzhiyun"
52*4882a593Smuzhiyun
53*4882a593SmuzhiyunPACKAGECONFIG ?= " \
54*4882a593Smuzhiyun    live555 dc1394 dv1394 notify fontconfig fluidsynth freetype dvdread png \
55*4882a593Smuzhiyun    ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
56*4882a593Smuzhiyun    x264 \
57*4882a593Smuzhiyun"
58*4882a593Smuzhiyun
59*4882a593Smuzhiyuninherit ${@bb.utils.contains('PACKAGECONFIG', 'qt5', 'qmake5_paths', '', d)}
60*4882a593Smuzhiyun
61*4882a593SmuzhiyunPACKAGECONFIG[mmal] = "--enable-omxil --enable-omxil-vout --enable-rpi-omxil --enable-mmal,,userland"
62*4882a593SmuzhiyunPACKAGECONFIG[x264] = "--enable-x264,--disable-x264,x264"
63*4882a593SmuzhiyunPACKAGECONFIG[fluidsynth] = ",,fluidsynth"
64*4882a593SmuzhiyunPACKAGECONFIG[mad] = "--enable-mad,--disable-mad,libmad"
65*4882a593SmuzhiyunPACKAGECONFIG[a52] = "--enable-a52,--disable-a52,liba52"
66*4882a593SmuzhiyunPACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack"
67*4882a593SmuzhiyunPACKAGECONFIG[live555] = "--enable-live555 LIVE555_PREFIX=${STAGING_DIR_HOST}${prefix},--disable-live555,live555"
68*4882a593SmuzhiyunPACKAGECONFIG[libass] = "--enable-libass,--disable-libass,libass"
69*4882a593SmuzhiyunPACKAGECONFIG[postproc] = "--enable-postproc,--disable-postproc,libpostproc"
70*4882a593SmuzhiyunPACKAGECONFIG[libva] = "--enable-libva,--disable-libva,libva"
71*4882a593SmuzhiyunPACKAGECONFIG[opencv] = "--enable-opencv,--disable-opencv,opencv"
72*4882a593SmuzhiyunPACKAGECONFIG[speex] = "--enable-speex,--disable-speex,speex"
73*4882a593SmuzhiyunPACKAGECONFIG[gstreamer] = "--enable-gst-decode,--disable-gst-decode,gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad"
74*4882a593SmuzhiyunPACKAGECONFIG[vpx] = "--enable-vpx,--disable-vpx, libvpx"
75*4882a593SmuzhiyunPACKAGECONFIG[qt5] = "--enable-qt,--disable-qt, qtbase-native qtx11extras qtsvg"
76*4882a593SmuzhiyunPACKAGECONFIG[freerdp] = "--enable-freerdp,--disable-freerdp, freerdp"
77*4882a593SmuzhiyunPACKAGECONFIG[dvbpsi] = "--enable-dvbpsi,--disable-dvbpsi, libdvbpsi"
78*4882a593SmuzhiyunPACKAGECONFIG[samba] = "--enable-smbclient,--disable-smbclient, samba"
79*4882a593SmuzhiyunPACKAGECONFIG[upnp] = "--enable-upnp,--disable-upnp,libupnp"
80*4882a593SmuzhiyunPACKAGECONFIG[dvdnav] = "--enable-dvdnav,--disable-dvdnav,libdvdnav libdvdcss"
81*4882a593SmuzhiyunPACKAGECONFIG[sftp] = "--enable-sftp,--disable-sftp,libssh2"
82*4882a593SmuzhiyunPACKAGECONFIG[vorbis] = "--enable-vorbis,--disable-vorbis,libvorbis libogg"
83*4882a593SmuzhiyunPACKAGECONFIG[ogg] = "--enable-ogg,--disable-ogg,libvorbis libogg"
84*4882a593SmuzhiyunPACKAGECONFIG[dc1394] = "--enable-dc1394,--disable-dc1394,libdc1394"
85*4882a593SmuzhiyunPACKAGECONFIG[dv1394] = "--enable-dv1394,--disable-dv1394,libraw1394 libavc1394"
86*4882a593SmuzhiyunPACKAGECONFIG[svg] = "--enable-svg,--disable-svg,librsvg"
87*4882a593SmuzhiyunPACKAGECONFIG[svgdec] = "--enable-svgdec,--disable-svgdec,librsvg cairo"
88*4882a593SmuzhiyunPACKAGECONFIG[notify] = "--enable-notify,--disable-notify, libnotify gtk+3"
89*4882a593SmuzhiyunPACKAGECONFIG[fontconfig] = "--enable-fontconfig,--disable-fontconfig, fontconfig"
90*4882a593SmuzhiyunPACKAGECONFIG[freetype] = "--enable-freetype,--disable-freetype, freetype"
91*4882a593SmuzhiyunPACKAGECONFIG[dvdread] = "--enable-dvdread,--disable-dvdread, libdvdread libdvdcss"
92*4882a593SmuzhiyunPACKAGECONFIG[vnc] = "--enable-vnc,--disable-vnc, libvncserver"
93*4882a593SmuzhiyunPACKAGECONFIG[x11] = "--with-x --enable-xcb,--without-x --disable-xcb,  xcb-util-keysyms libxpm libxinerama"
94*4882a593SmuzhiyunPACKAGECONFIG[png] = "--enable-png,--disable-png,libpng"
95*4882a593SmuzhiyunPACKAGECONFIG[vdpau] = "--enable-vdpau,--disable-vdpau,libvdpau"
96*4882a593SmuzhiyunPACKAGECONFIG[wayland] = "--enable-wayland,--disable-wayland,wayland wayland-native"
97*4882a593Smuzhiyun
98*4882a593Smuzhiyundo_configure:append() {
99*4882a593Smuzhiyun    # moc needs support: precreate build paths
100*4882a593Smuzhiyun    for qtpath in adapters components/epg components/playlist components/sout dialogs managers styles util/buttons; do
101*4882a593Smuzhiyun        mkdir -p "${B}/modules/gui/qt/$qtpath"
102*4882a593Smuzhiyun    done
103*4882a593Smuzhiyun}
104*4882a593Smuzhiyun
105*4882a593Smuzhiyun# This recipe packages vlc as a library as well, so qt4 dependencies
106*4882a593Smuzhiyun# can be avoided when only the library is installed.
107*4882a593SmuzhiyunPACKAGES =+ "libvlc"
108*4882a593Smuzhiyun
109*4882a593SmuzhiyunLEAD_SONAME_libvlc = "libvlc.so.5"
110*4882a593SmuzhiyunFILES:libvlc = "${libdir}/lib*.so.*"
111*4882a593Smuzhiyun
112*4882a593SmuzhiyunFILES:${PN} += "\
113*4882a593Smuzhiyun    ${bindir}/vlc \
114*4882a593Smuzhiyun    ${libdir}/vlc/vlc/libvlc_vdpau.so \
115*4882a593Smuzhiyun    ${datadir}/applications \
116*4882a593Smuzhiyun    ${datadir}/vlc/ \
117*4882a593Smuzhiyun    ${datadir}/icons \
118*4882a593Smuzhiyun    ${datadir}/metainfo/vlc.appdata.xml \
119*4882a593Smuzhiyun"
120*4882a593Smuzhiyun
121*4882a593SmuzhiyunFILES:${PN}-dbg += "\
122*4882a593Smuzhiyun    ${libdir}/vlc/*/.debug \
123*4882a593Smuzhiyun    ${libdir}/vlc/plugins/*/.debug \
124*4882a593Smuzhiyun"
125*4882a593Smuzhiyun
126*4882a593SmuzhiyunFILES:${PN}-staticdev += "\
127*4882a593Smuzhiyun    ${libdir}/vlc/plugins/*/*.a \
128*4882a593Smuzhiyun"
129*4882a593Smuzhiyun
130*4882a593SmuzhiyunINSANE_SKIP:${PN} = "dev-so"
131*4882a593Smuzhiyun
132*4882a593SmuzhiyunEXCLUDE_FROM_WORLD = "${@bb.utils.contains("LICENSE_FLAGS_ACCEPTED", "commercial", "0", "1", d)}"
133