From c2790aad53075bf7d68fa79a4871abd8625eb0a6 Mon Sep 17 00:00:00 2001 From: Carlos Rafael Giani Date: Wed, 10 May 2017 11:33:26 +0200 Subject: mpeg2dec: upgrade to version 0.5.1 Signed-off-by: Carlos Rafael Giani Signed-off-by: Ross Burton --- .../mpeg2dec/files/altivec_h_needed.patch | 43 ++++++++++++++++++++++ .../mpeg2dec/mpeg2dec-0.4.1/altivec_h_needed.patch | 43 ---------------------- meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.4.1.bb | 40 -------------------- meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.5.1.bb | 42 +++++++++++++++++++++ 4 files changed, 85 insertions(+), 83 deletions(-) create mode 100644 meta/recipes-multimedia/mpeg2dec/files/altivec_h_needed.patch delete mode 100644 meta/recipes-multimedia/mpeg2dec/mpeg2dec-0.4.1/altivec_h_needed.patch delete mode 100644 meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.4.1.bb create mode 100644 meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.5.1.bb diff --git a/meta/recipes-multimedia/mpeg2dec/files/altivec_h_needed.patch b/meta/recipes-multimedia/mpeg2dec/files/altivec_h_needed.patch new file mode 100644 index 0000000000..5113ad44fe --- /dev/null +++ b/meta/recipes-multimedia/mpeg2dec/files/altivec_h_needed.patch @@ -0,0 +1,43 @@ +Add new method to judge whether is needed + +The original logic will use "typedef vector int t;" to judge +whether is needed. altivec.h contains the following +statement: + + #if !defined(__APPLE_ALTIVEC__) + #define vector __vector + #define pixel __pixel + #define bool + #endif + +In gcc-4.3.3, __APPLE_ALTIVEC__ is not defined by compiler, neither +as vector, pixel, and bool. In order to make "typedef vector int t;" +pass the compilation, we need to include altivec.h. + +However in gcc-4.5.0, __APPLE_ALTIVEC__ is defined by compiler, +so as vector, pixel, and bool. We could not judge whether +altivec.h is needed by "typedef vector int t;". +Here we include another statement "int tmp = __CR6_EQ;", in +which __CR6_EQ is defined in altivec.h. + +Upstream-Status: Pending + +Signed-off-by: Dongxiao Xu + +diff -ruN a/configure.in b/configure.in +--- a/configure.ac 2010-09-14 20:55:42.399687663 +0800 ++++ b/configure.ac 2010-09-14 20:56:43.403204648 +0800 +@@ -79,11 +79,11 @@ + CFLAGS="$OPT_CFLAGS $TRY_CFLAGS $CFLAGS" + AC_MSG_CHECKING([if is needed]) + AC_TRY_COMPILE([], +- [typedef vector int t; ++ [typedef vector int t; int tmp = __CR6_EQ; + vec_ld(0, (unsigned char *)0);], + [have_altivec=yes; AC_MSG_RESULT(no)], + [AC_TRY_COMPILE([#include ], +- [typedef vector int t; vec_ld(0, (unsigned char *)0);], ++ [typedef vector int t; int tmp = __CR6_EQ; vec_ld(0, (unsigned char *)0);], + [AC_DEFINE([HAVE_ALTIVEC_H],, + [Define to 1 if you have the header.]) + have_altivec=yes; AC_MSG_RESULT(yes)], diff --git a/meta/recipes-multimedia/mpeg2dec/mpeg2dec-0.4.1/altivec_h_needed.patch b/meta/recipes-multimedia/mpeg2dec/mpeg2dec-0.4.1/altivec_h_needed.patch deleted file mode 100644 index 7dc56436f0..0000000000 --- a/meta/recipes-multimedia/mpeg2dec/mpeg2dec-0.4.1/altivec_h_needed.patch +++ /dev/null @@ -1,43 +0,0 @@ -Add new method to judge whether is needed - -The original logic will use "typedef vector int t;" to judge -whether is needed. altivec.h contains the following -statement: - - #if !defined(__APPLE_ALTIVEC__) - #define vector __vector - #define pixel __pixel - #define bool - #endif - -In gcc-4.3.3, __APPLE_ALTIVEC__ is not defined by compiler, neither -as vector, pixel, and bool. In order to make "typedef vector int t;" -pass the compilation, we need to include altivec.h. - -However in gcc-4.5.0, __APPLE_ALTIVEC__ is defined by compiler, -so as vector, pixel, and bool. We could not judge whether -altivec.h is needed by "typedef vector int t;". -Here we include another statement "int tmp = __CR6_EQ;", in -which __CR6_EQ is defined in altivec.h. - -Upstream-Status: Pending - -Signed-off-by: Dongxiao Xu - -diff -ruN mpeg2dec-0.4.1-orig/configure.in mpeg2dec-0.4.1/configure.in ---- mpeg2dec-0.4.1-orig/configure.in 2010-09-14 20:55:42.399687663 +0800 -+++ mpeg2dec-0.4.1/configure.in 2010-09-14 20:56:43.403204648 +0800 -@@ -75,11 +75,11 @@ - CFLAGS="$OPT_CFLAGS $TRY_CFLAGS $CFLAGS" - AC_MSG_CHECKING([if is needed]) - AC_TRY_COMPILE([], -- [typedef vector int t; -+ [typedef vector int t; int tmp = __CR6_EQ; - vec_ld(0, (unsigned char *)0);], - [have_altivec=yes; AC_MSG_RESULT(no)], - [AC_TRY_COMPILE([#include ], -- [typedef vector int t; vec_ld(0, (unsigned char *)0);], -+ [typedef vector int t; int tmp = __CR6_EQ; vec_ld(0, (unsigned char *)0);], - [AC_DEFINE([HAVE_ALTIVEC_H],, - [Define to 1 if you have the header.]) - have_altivec=yes; AC_MSG_RESULT(yes)], diff --git a/meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.4.1.bb b/meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.4.1.bb deleted file mode 100644 index fe765da193..0000000000 --- a/meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.4.1.bb +++ /dev/null @@ -1,40 +0,0 @@ -SUMMARY = "Library and test program for decoding MPEG-2 and MPEG-1 video streams" -HOMEPAGE = "http://libmpeg2.sourceforge.net/" -SECTION = "libs" -LICENSE = "GPLv2+" -LICENSE_FLAGS = "commercial" -LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ - file://include/mpeg2.h;beginline=1;endline=22;md5=ead62602d4638329d3b5b86a55803154" - -PR = "r2" - -SRC_URI = "http://libmpeg2.sourceforge.net/files/mpeg2dec-${PV}.tar.gz \ - file://altivec_h_needed.patch" - -SRC_URI[md5sum] = "7631b0a4bcfdd0d78c0bb0083080b0dc" -SRC_URI[sha256sum] = "c74a76068f8ec36d4bb59a03bf1157be44118ca02252180e8b358b0b5e3edeee" - -UPSTREAM_CHECK_URI = "http://libmpeg2.sourceforge.net/downloads.html" - -inherit autotools pkgconfig - -EXTRA_OECONF = "--enable-shared --disable-sdl" - -PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" -PACKAGECONFIG[x11] = "--with-x,--without-x,virtual/libx11 libxext libxv" - -PACKAGES = "mpeg2dec-dbg mpeg2dec mpeg2dec-doc libmpeg2 libmpeg2-dev libmpeg2convert libmpeg2convert-dev libmpeg2-staticdev libmpeg2convert-staticdev" - -FILES_${PN} = "${bindir}/*" -FILES_libmpeg2 = "${libdir}/libmpeg2.so.*" -FILES_libmpeg2convert = "${libdir}/libmpeg2convert.so.*" -FILES_libmpeg2-dev = "${libdir}/libmpeg2.so \ - ${libdir}/libmpeg2.la \ - ${libdir}/pkgconfig/libmpeg2.pc \ - ${includedir}/mpeg2dec/mpeg2.h" -FILES_libmpeg2-staticdev = "${libdir}/libmpeg2.a" -FILES_libmpeg2convert-dev = "${libdir}/libmpeg2convert.so \ - ${libdir}/libmpeg2convert.la \ - ${libdir}/pkgconfig/libmpeg2convert.pc \ - ${includedir}/mpeg2dec/mpeg2convert.h" -FILES_libmpeg2convert-staticdev = "${libdir}/libmpeg2convert.a" diff --git a/meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.5.1.bb b/meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.5.1.bb new file mode 100644 index 0000000000..8e995daa7c --- /dev/null +++ b/meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.5.1.bb @@ -0,0 +1,42 @@ +SUMMARY = "Library and test program for decoding MPEG-2 and MPEG-1 video streams" +HOMEPAGE = "http://libmpeg2.sourceforge.net/" +SECTION = "libs" +LICENSE = "GPLv2+" +LICENSE_FLAGS = "commercial" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ + file://include/mpeg2.h;beginline=1;endline=22;md5=7766f4fcb58f0f8413c49a746f2ab89b" + +SRC_URI = "http://libmpeg2.sourceforge.net/files/libmpeg2-${PV}.tar.gz \ + file://altivec_h_needed.patch" + +S = "${WORKDIR}/libmpeg2-${PV}" + +SRC_URI[md5sum] = "0f92c7454e58379b4a5a378485bbd8ef" +SRC_URI[sha256sum] = "dee22e893cb5fc2b2b6ebd60b88478ab8556cb3b93f9a0d7ce8f3b61851871d4" + +UPSTREAM_CHECK_URI = "http://libmpeg2.sourceforge.net/downloads.html" + +inherit autotools pkgconfig + +EXTRA_OECONF = "--enable-shared --disable-sdl" + +PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" +PACKAGECONFIG[x11] = "--with-x,--without-x,virtual/libx11 libxext libxv" + +PACKAGES = "mpeg2dec-dbg mpeg2dec mpeg2dec-doc libmpeg2 libmpeg2-dev libmpeg2convert libmpeg2convert-dev libmpeg2-staticdev libmpeg2convert-staticdev" + +FILES_${PN} = "${bindir}/*" +FILES_libmpeg2 = "${libdir}/libmpeg2.so.*" +FILES_libmpeg2convert = "${libdir}/libmpeg2convert.so.*" +FILES_libmpeg2-dev = "${libdir}/libmpeg2.so \ + ${libdir}/libmpeg2.la \ + ${libdir}/libmpeg2arch.la \ + ${libdir}/pkgconfig/libmpeg2.pc \ + ${includedir}/mpeg2dec/mpeg2.h" +FILES_libmpeg2-staticdev = "${libdir}/libmpeg2.a" +FILES_libmpeg2convert-dev = "${libdir}/libmpeg2convert.so \ + ${libdir}/libmpeg2convert.la \ + ${libdir}/libmpeg2convertarch.la \ + ${libdir}/pkgconfig/libmpeg2convert.pc \ + ${includedir}/mpeg2dec/mpeg2convert.h" +FILES_libmpeg2convert-staticdev = "${libdir}/libmpeg2convert.a" -- cgit v1.2.3