[libav] Backward version to 0.8.15, to build current minidlna.
authorhschang <chang@dev3>
Tue, 10 Feb 2015 05:16:33 +0000 (14:16 +0900)
committerhschang <chang@dev3>
Tue, 10 Feb 2015 05:36:58 +0000 (14:36 +0900)
meta-openvuplus/recipes-multimedia/libav/libav.inc [new file with mode: 0644]
meta-openvuplus/recipes-multimedia/libav/libav/0001-configure-enable-pic-for-AArch64.patch [new file with mode: 0644]
meta-openvuplus/recipes-multimedia/libav/libav_0.8.%.bbappend [new file with mode: 0644]
meta-openvuplus/recipes-multimedia/libav/libav_0.8.15.bb [new file with mode: 0644]
meta-openvuplus/recipes-multimedia/libav/libav_9.16.bbappend [deleted file]

diff --git a/meta-openvuplus/recipes-multimedia/libav/libav.inc b/meta-openvuplus/recipes-multimedia/libav/libav.inc
new file mode 100644 (file)
index 0000000..8b470c1
--- /dev/null
@@ -0,0 +1,139 @@
+SUMMARY = "Open source audio and video processing tools and librairies"
+DESCRIPTION = "Libav is a friendly and community-driven effort to provide its users \
+               with a set of portable, functional and high-performance libraries for \
+               dealing with multimedia formats of all sorts. It originates from the \
+               FFmpeg codebase, but goes its own way these days, providing its users \
+               with reliable releases and a clear vision how to go forward."
+HOMEPAGE = "http://libav.org/"
+SECTION = "libs"
+
+LICENSE = "GPLv2+"
+LICENSE_FLAGS = "commercial"
+
+# Provides ffmpeg compat, see http://libav.org/about.html
+PROVIDES = "ffmpeg"
+
+ARM_INSTRUCTION_SET = "arm"
+
+DEPENDS = "zlib libogg yasm-native"
+
+INC_PR = "r8"
+
+inherit autotools pkgconfig
+
+B = "${S}/build.${HOST_SYS}.${TARGET_SYS}"
+
+FULL_OPTIMIZATION_armv7a = "-fexpensive-optimizations -fomit-frame-pointer -O4 -ffast-math"
+BUILD_OPTIMIZATION = "${FULL_OPTIMIZATION}"
+
+EXTRA_FFCONF_armv7a = "--cpu=cortex-a8"
+EXTRA_FFCONF ?= ""
+
+PACKAGECONFIG ??= "bzip2 x264 theora ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
+PACKAGECONFIG[bzip2] = "--enable-bzlib,--disable-bzlib,bzip2"
+PACKAGECONFIG[faac] = "--enable-libfaac,--disable-libfaac,faac"
+PACKAGECONFIG[gsm] = "--enable-libgsm,--disable-libgsm,libgsm"
+PACKAGECONFIG[jack] = "--enable-indev=jack,--disable-indev=jack,jack"
+PACKAGECONFIG[libvorbis] = "--enable-libvorbis,--disable-libvorbis,libvorbis"
+PACKAGECONFIG[mp3lame] = "--enable-libmp3lame,--disable-libmp3lame,lame"
+PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl"
+PACKAGECONFIG[schroedinger] = "--enable-libschroedinger,--disable-libschroedinger,schroedinger"
+PACKAGECONFIG[speex] = "--enable-libspeex,--disable-libspeex,speex"
+PACKAGECONFIG[theora] = "--enable-libtheora,--disable-libtheora,libtheora"
+PACKAGECONFIG[vpx] = "--enable-libvpx,--disable-libvpx,libvpx"
+PACKAGECONFIG[x11] = "--enable-x11grab,--disable-x11grab,virtual/libx11 libxfixes libxext xproto virtual/libsdl"
+PACKAGECONFIG[x264] = "--enable-libx264,--disable-libx264,x264"
+
+# Check codecs that require --enable-nonfree
+USE_NONFREE = "${@bb.utils.contains_any('PACKAGECONFIG', [ 'faac', 'openssl' ], 'yes', '', d)}"
+
+EXTRA_OECONF = " \
+    --enable-shared \
+    --enable-pthreads \
+    --enable-gpl \
+    ${@bb.utils.contains('USE_NONFREE', 'yes', '--enable-nonfree', '', d)} \
+    --enable-avfilter \
+    \
+    --cross-prefix=${TARGET_PREFIX} \
+    --prefix=${prefix} \
+    \
+    --enable-avserver \
+    --enable-avplay \
+    --ld="${CCLD}" \
+    --arch=${TARGET_ARCH} \
+    --target-os="linux" \
+    --enable-cross-compile \
+    --extra-cflags="${TARGET_CFLAGS} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" \
+    --extra-ldflags="${TARGET_LDFLAGS}" \
+    --sysroot="${STAGING_DIR_TARGET}" \
+    --enable-hardcoded-tables \
+    ${EXTRA_FFCONF} \
+    --libdir=${libdir} \
+    --shlibdir=${libdir} \
+"
+
+do_configure() {
+    # We don't have TARGET_PREFIX-pkgconfig
+    sed -i '/pkg_config_default="${cross_prefix}${pkg_config_default}"/d' ${S}/configure
+    mkdir -p ${B}
+    cd ${B}
+    ${S}/configure ${EXTRA_OECONF}
+    sed -i -e s:Os:O4:g ${B}/config.h
+}
+
+do_install_append() {
+    install -m 0644 ${S}/libavfilter/*.h ${D}${includedir}/libavfilter/
+}
+
+PACKAGES += "${PN}-vhook-dbg ${PN}-vhook ffmpeg-x264-presets"
+
+RSUGGESTS_${PN} = "mplayer"
+FILES_${PN} = "${bindir}"
+FILES_${PN}-dev = "${includedir}/${PN}"
+
+FILES_${PN}-vhook = "${libdir}/vhook"
+FILES_${PN}-vhook-dbg += "${libdir}/vhook/.debug"
+
+FILES_ffmpeg-x264-presets = "${datadir}/*.avpreset"
+
+LEAD_SONAME = "libavcodec.so"
+
+FILES_${PN}-dev = "${includedir}"
+
+python populate_packages_prepend() {
+    av_libdir = d.expand('${libdir}')
+    av_pkgconfig = d.expand('${libdir}/pkgconfig')
+
+    # Runtime package
+    do_split_packages(d, av_libdir, '^lib(.*)\.so\..*',
+                      output_pattern='lib%s',
+                      description='libav %s library',
+                      extra_depends='',
+                      prepend=True,
+                      allow_links=True)
+
+    # Development packages (-dev, -staticdev)
+    do_split_packages(d, av_libdir, '^lib(.*)\.so$',
+                      output_pattern='lib%s-dev',
+                      description='libav %s development package',
+                      extra_depends='${PN}-dev',
+                      prepend=True,
+                      allow_links=True)
+    do_split_packages(d, av_pkgconfig, '^lib(.*)\.pc$',
+                      output_pattern='lib%s-dev',
+                      description='libav %s development package',
+                      extra_depends='${PN}-dev',
+                      prepend=True)
+    do_split_packages(d, av_libdir, '^lib(.*)\.a$',
+                      output_pattern='lib%s-staticdev',
+                      description='libav %s development package - static library',
+                      extra_depends='${PN}-dev',
+                      prepend=True,
+                      allow_links=True)
+
+    if d.getVar('TARGET_ARCH', True) == 'i586':
+        # libav can't be build with -fPIC for 32-bit x86
+        pkgs = d.getVar('PACKAGES', True).split()
+        for pkg in pkgs:
+            d.appendVar('INSANE_SKIP_%s' % pkg, ' textrel')
+}
diff --git a/meta-openvuplus/recipes-multimedia/libav/libav/0001-configure-enable-pic-for-AArch64.patch b/meta-openvuplus/recipes-multimedia/libav/libav/0001-configure-enable-pic-for-AArch64.patch
new file mode 100644 (file)
index 0000000..d9b22b9
--- /dev/null
@@ -0,0 +1,23 @@
+From 58db99e98f615d79ea90cac8f4bcf11c94e3e7c7 Mon Sep 17 00:00:00 2001
+From: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
+Date: Thu, 10 Jan 2013 12:42:19 +0100
+Subject: [PATCH] configure: enable pic for AArch64
+
+Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
+
+Upstream-Status: Backport
+---
+ configure |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- git.orig/configure
++++ git/configure
+@@ -2393,7 +2393,7 @@ check_host_cflags -std=c99
+ check_host_cflags -Wall
+ case "$arch" in
+-    alpha|ia64|mips|parisc|ppc|sparc)
++    alpha|ia64|mips|parisc|ppc|sparc|aarch64)
+         spic=$shared
+     ;;
+     x86)
diff --git a/meta-openvuplus/recipes-multimedia/libav/libav_0.8.%.bbappend b/meta-openvuplus/recipes-multimedia/libav/libav_0.8.%.bbappend
new file mode 100644 (file)
index 0000000..08f560d
--- /dev/null
@@ -0,0 +1,8 @@
+LICENSE = "LGPLv2.1+"
+PR .= "-vuplus0"
+
+EXTRA_OECONF += "--disable-gpl --disable-nonfree --disable-version3"
+
+PACKAGECONFIG = "bzip2"
+
+RSUGGESTS_${PN} = ""
diff --git a/meta-openvuplus/recipes-multimedia/libav/libav_0.8.15.bb b/meta-openvuplus/recipes-multimedia/libav/libav_0.8.15.bb
new file mode 100644 (file)
index 0000000..127a088
--- /dev/null
@@ -0,0 +1,20 @@
+require libav.inc
+
+SRC_URI = "http://libav.org/releases/${BP}.tar.xz \
+           file://0001-configure-enable-pic-for-AArch64.patch"
+
+SRC_URI[md5sum] = "e483ea8f482b5ecd65ee1d09251b0a5b"
+SRC_URI[sha256sum] = "495789ec547e93632937f0f36b06f4dd3180bc61518181f124af6746c6218710"
+
+LIC_FILES_CHKSUM = "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+                    file://COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \
+                    file://COPYING.LGPLv2.1;md5=e344c8fa836c3a41c4cbd79d7bd3a379 \
+                    file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02"
+
+PROVIDES += "libpostproc"
+
+EXTRA_OECONF += " \
+    --enable-postproc \
+"
+
+PACKAGES_DYNAMIC += "^lib(av(codec|device|filter|format|util)|postproc|swscale).*"
diff --git a/meta-openvuplus/recipes-multimedia/libav/libav_9.16.bbappend b/meta-openvuplus/recipes-multimedia/libav/libav_9.16.bbappend
deleted file mode 100644 (file)
index 08f560d..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-LICENSE = "LGPLv2.1+"
-PR .= "-vuplus0"
-
-EXTRA_OECONF += "--disable-gpl --disable-nonfree --disable-version3"
-
-PACKAGECONFIG = "bzip2"
-
-RSUGGESTS_${PN} = ""