Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame^] | 1 | SUMMARY = "Open Source multimedia player" |
| 2 | SECTION = "multimedia" |
| 3 | HOMEPAGE = "http://www.mplayerhq.hu/" |
| 4 | DEPENDS = "libvpx libdvdread libtheora virtual/libsdl ffmpeg xsp zlib \ |
| 5 | libpng jpeg liba52 freetype fontconfig alsa-lib lzo ncurses \ |
| 6 | libxv virtual/libx11 libass speex faad2 libxscrnsaver" |
| 7 | |
| 8 | RDEPENDS_${PN} = "mplayer-common" |
| 9 | PROVIDES = "mplayer" |
| 10 | RPROVIDES_${PN} = "mplayer" |
| 11 | RCONFLICTS_${PN} = "mplayer" |
| 12 | |
| 13 | # Depends on xsp, libxv, virtual/libx11, libxscrnsaver |
| 14 | REQUIRED_DISTRO_FEATURES = "x11" |
| 15 | |
| 16 | # because it depends on libpostproc/libav which has commercial flag |
| 17 | LICENSE_FLAGS = "${@bb.utils.contains('PACKAGECONFIG', 'postproc', 'commercial', '', d)}" |
| 18 | |
| 19 | LICENSE = "GPLv3" |
| 20 | LIC_FILES_CHKSUM = "file://LICENSE;md5=d32239bcb673463ab874e80d47fae504" |
| 21 | |
| 22 | SRC_URI = "git://repo.or.cz/mplayer.git \ |
| 23 | file://0001-configure-don-t-disable-ASS-support-when-explicitly-.patch \ |
| 24 | file://0001-demux_ogg-partially-port-libtheora-glue-code-to-Theo.patch \ |
| 25 | " |
| 26 | |
| 27 | SRCREV = "2c378c71a4d9b1df382db9aa787b646628b4e3f9" |
| 28 | |
| 29 | ARM_INSTRUCTION_SET = "arm" |
| 30 | |
| 31 | PV = "2.0+gitr${SRCPV}" |
| 32 | PR = "r13" |
| 33 | |
| 34 | PARALLEL_MAKE = "" |
| 35 | |
| 36 | S = "${WORKDIR}/git" |
| 37 | |
| 38 | FILES_${PN} = "${bindir}/mplayer ${libdir} /usr/etc/mplayer/" |
| 39 | CONFFILES_${PN} += "/usr/etc/mplayer/input.conf \ |
| 40 | /usr/etc/mplayer/example.conf \ |
| 41 | /usr/etc/mplayer/codecs.conf \ |
| 42 | " |
| 43 | |
| 44 | inherit autotools-brokensep pkgconfig python3native |
| 45 | |
| 46 | EXTRA_OECONF = " \ |
| 47 | --prefix=/usr \ |
| 48 | --mandir=${mandir} \ |
| 49 | --target=${SIMPLE_TARGET_SYS} \ |
| 50 | \ |
| 51 | --disable-lirc \ |
| 52 | --disable-lircc \ |
| 53 | --disable-joystick \ |
| 54 | --disable-vm \ |
| 55 | --disable-xf86keysym \ |
| 56 | --enable-tv \ |
| 57 | --enable-tv-v4l2 \ |
| 58 | --disable-tv-bsdbt848 \ |
| 59 | --enable-rtc \ |
| 60 | --enable-networking \ |
| 61 | --disable-smb \ |
| 62 | --disable-dvdnav \ |
| 63 | --enable-dvdread \ |
| 64 | --disable-dvdread-internal \ |
| 65 | --disable-libdvdcss-internal \ |
| 66 | --disable-enca \ |
| 67 | --disable-ftp \ |
| 68 | --disable-vstream \ |
| 69 | \ |
| 70 | --disable-gif \ |
| 71 | --enable-png \ |
| 72 | --enable-jpeg \ |
| 73 | --disable-libcdio \ |
| 74 | --disable-qtx \ |
| 75 | --disable-xanim \ |
| 76 | --disable-real \ |
| 77 | --disable-xvid \ |
| 78 | \ |
| 79 | --enable-speex \ |
| 80 | --enable-theora \ |
| 81 | --disable-ladspa \ |
| 82 | --disable-libdv \ |
| 83 | --enable-mad \ |
| 84 | --disable-xmms \ |
| 85 | --disable-musepack \ |
| 86 | \ |
| 87 | --disable-gl \ |
| 88 | --enable-sdl \ |
| 89 | --disable-caca \ |
| 90 | --disable-directx \ |
| 91 | --disable-dvb \ |
| 92 | --enable-xv \ |
| 93 | --disable-vm \ |
| 94 | --disable-xinerama \ |
| 95 | --enable-x11 \ |
| 96 | --disable-directfb \ |
| 97 | --disable-tga \ |
| 98 | --disable-pnm \ |
| 99 | --disable-md5sum \ |
| 100 | \ |
| 101 | --enable-alsa \ |
| 102 | --enable-ossaudio \ |
| 103 | --disable-pulse \ |
| 104 | --disable-jack \ |
| 105 | --disable-openal \ |
| 106 | --enable-select \ |
| 107 | --enable-libass \ |
| 108 | \ |
| 109 | --extra-libs=' -lXext -lX11 -lvorbis -ltheoradec -lasound ' \ |
| 110 | " |
| 111 | # -ltheoradec is missing in: |
| 112 | # libmpcodecs/vd_theora.o: undefined reference to symbol 'theora_decode_init@@libtheora.so.1.0' |
| 113 | |
| 114 | EXTRA_OECONF_append_armv6 = " --enable-armv6" |
| 115 | EXTRA_OECONF_append_armv7a = " --enable-armv6 --enable-neon" |
| 116 | |
| 117 | PACKAGECONFIG ??= "vorbis postproc" |
| 118 | PACKAGECONFIG[mad] = "--enable-mad,--disable-mad,libmad" |
| 119 | PACKAGECONFIG[a52] = "--enable-liba52,--disable-liba52,liba52" |
| 120 | PACKAGECONFIG[lame] = ",,lame" |
| 121 | PACKAGECONFIG[postproc] = ",--disable-libpostproc,libpostproc" |
| 122 | PACKAGECONFIG[vorbis] = ",--disable-libvorbis,libvorbis" |
| 123 | PACKAGECONFIG[portaudio] = ",--disable-portaudio,portaudio-v19" |
| 124 | PACKAGECONFIG[mpg123] = ",--disable-mpg123,mpg123" |
| 125 | PACKAGECONFIG[directfb] = "--enable-directfb,--disable-directfb,directfb" |
| 126 | |
| 127 | FULL_OPTIMIZATION = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O4 -ffast-math" |
| 128 | BUILD_OPTIMIZATION = "${FULL_OPTIMIZATION}" |
| 129 | |
| 130 | CFLAGS_append = " -I${S}/libdvdread4 " |
| 131 | |
| 132 | do_configure() { |
| 133 | sed -i 's|/usr/include|${STAGING_INCDIR}|g' ${S}/configure |
| 134 | sed -i 's|/usr/lib|${STAGING_LIBDIR}|g' ${S}/configure |
| 135 | sed -i 's|/usr/\S*include[\w/]*||g' ${S}/configure |
| 136 | sed -i 's|/usr/\S*lib[\w/]*||g' ${S}/configure |
| 137 | sed -i 's|_install_strip="-s"|_install_strip=""|g' ${S}/configure |
| 138 | sed -i 's|HOST_CC|BUILD_CC|' ${S}/Makefile |
| 139 | sed -i 's|extra_cflags="-I. $extra_cflags"|extra_cflags="-I. -I${STAGING_INCDIR}/directfb $extra_cflags"|g' ${S}/configure |
| 140 | export SIMPLE_TARGET_SYS="$(echo ${TARGET_SYS} | sed s:${TARGET_VENDOR}::g)" |
| 141 | ./configure ${EXTRA_OECONF} |
| 142 | |
| 143 | } |
| 144 | |
| 145 | do_compile () { |
| 146 | oe_runmake |
| 147 | } |
| 148 | |
| 149 | do_install() { |
| 150 | oe_runmake 'DESTDIR=${D}' install-no-man |
| 151 | install -d ${D}/usr/etc/mplayer |
| 152 | install ${S}/etc/input.conf ${D}/usr/etc/mplayer/ |
| 153 | install ${S}/etc/example.conf ${D}/usr/etc/mplayer/ |
| 154 | install ${S}/etc/codecs.conf ${D}/usr/etc/mplayer/ |
| 155 | [ -e ${D}/usr/lib ] && rmdir ${D}/usr/lib |
| 156 | } |
| 157 | |
| 158 | # http://errors.yoctoproject.org/Errors/Details/40734/ |
| 159 | PNBLACKLIST[mplayer2] ?= "Not compatible with currently used ffmpeg 3" |