[Mod] First commit

This commit is contained in:
2022-10-31 22:18:58 +08:00
commit 1c8a3d9709
13090 changed files with 526733 additions and 0 deletions

View File

@ -0,0 +1,23 @@
[PATCH] fix altivec.h detection
Patch from Gentoo:
http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/media-libs/libmpeg2/files/libmpeg2-0.5.1-altivec.patch?revision=1.1&view=markup
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
--- a/configure.ac.bak 2010-05-25 17:12:14.756245990 +0000
+++ b/configure.ac 2010-05-25 17:11:51.629581723 +0000
@@ -79,11 +79,10 @@
CFLAGS="$OPT_CFLAGS $TRY_CFLAGS $CFLAGS"
AC_MSG_CHECKING([if <altivec.h> is needed])
AC_TRY_COMPILE([],
- [typedef vector int t;
- vec_ld(0, (unsigned char *)0);],
+ [vector int t; t = vec_add(t,t);],
[have_altivec=yes; AC_MSG_RESULT(no)],
[AC_TRY_COMPILE([#include <altivec.h>],
- [typedef vector int t; vec_ld(0, (unsigned char *)0);],
+ [vector int t; t = vec_add(t,t);],
[AC_DEFINE([HAVE_ALTIVEC_H],,
[Define to 1 if you have the <altivec.h> header.])
have_altivec=yes; AC_MSG_RESULT(yes)],

View File

@ -0,0 +1,24 @@
Patch taken from gentoo.
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
diff -urNp libmpeg2.orig/libmpeg2/motion_comp_arm_s.S libmpeg2/libmpeg2/motion_comp_arm_s.S
--- libmpeg2.orig/libmpeg2/motion_comp_arm_s.S 2008-07-09 21:16:05.000000000 +0200
+++ libmpeg2/libmpeg2/motion_comp_arm_s.S 2009-11-20 19:55:22.000000000 +0100
@@ -19,6 +19,16 @@
@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+@ Data preload is supported only by ARM V5TE and above
+
+#if (defined (__ARM_ARCH_2__) || defined (__ARM_ARCH_3__) \
+ || defined (__ARM_ARCH_3M__) || defined (__ARM_ARCH_4__) \
+ || defined (__ARM_ARCH_4T__) || defined (__ARM_ARCH_5__) \
+ || defined (__ARM_ARCH_5T__))
+.macro pld reg
+.endm
+#endif
+
.text
@ ----------------------------------------------------------------

View File

@ -0,0 +1,39 @@
Improve the ARM detection to work on Thumb-only architecture
The ARM-specific assembly code doesn't build on Thumb-only
architectures such as ARMv7-M, but the configure script assumes that
if the host tuple is arm*, then it can build and use the ARM optimized
code.
This patch improves the configure.ac detection logic, by building one
of the instruction of the optimized assembly code, and using this to
decide whether or not the optimizations should be enabled.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Index: b/configure.ac
===================================================================
--- a/configure.ac
+++ b/configure.ac
@@ -101,8 +101,10 @@
alpha*)
AC_DEFINE([ARCH_ALPHA],,[alpha architecture]);;
arm*)
- arm_conditional=:
- AC_DEFINE([ARCH_ARM],,[ARM architecture]);;
+ AC_TRY_LINK([], [asm(".syntax divided\nstmfd sp!,{r4-r11,lr}")],
+ [AC_DEFINE([ARCH_ARM],,[ARM architecture])
+ use_arm_optimization=yes],
+ [use_arm_optimization=no])
esac
elif test x"$CC" = x"tendracc"; then
dnl TenDRA portability checking compiler
@@ -122,7 +124,7 @@
esac
fi
-AM_CONDITIONAL(ARCH_ARM, ${arm_conditional})
+AM_CONDITIONAL(ARCH_ARM, test "${use_arm_optimization}" = "yes")
dnl Checks for libtool - this must be done after we set cflags
AC_LIBTOOL_WIN32_DLL

View File

@ -0,0 +1,16 @@
Do not use sparcv9 optimization flags for sparcv8 builds
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
diff -Nur libmpeg2-0.5.1.orig/configure.ac libmpeg2-0.5.1/configure.ac
--- libmpeg2-0.5.1.orig/configure.ac 2008-07-18 16:30:17.000000000 +0200
+++ libmpeg2-0.5.1/configure.ac 2017-04-26 21:09:15.780838339 +0200
@@ -95,7 +95,7 @@
break
fi
done;;
- sparc-* | sparc64-*)
+ sparc64-*)
AC_DEFINE([ARCH_SPARC],,[sparc architecture])
TRY_CFLAGS="$OPT_CFLAGS -mcpu=ultrasparc -mvis"
AC_TRY_CFLAGS([$TRY_CFLAGS $CFLAGS],[OPT_CFLAGS="$TRY_CFLAGS"]);;

View File

@ -0,0 +1,16 @@
config BR2_PACKAGE_LIBMPEG2
bool "libmpeg2"
help
MPEG1/MPEG2 video decoder library
http://libmpeg2.sourceforge.net/
if BR2_PACKAGE_LIBMPEG2
config BR2_PACKAGE_LIBMPEG2_BINS
bool "mpeg2 binaries"
help
Install mpeg2dec, corrupt_mpeg2 and extract_mpeg2 programs as
well.
endif

View File

@ -0,0 +1,3 @@
# Locally computed:
sha256 dee22e893cb5fc2b2b6ebd60b88478ab8556cb3b93f9a0d7ce8f3b61851871d4 libmpeg2-0.5.1.tar.gz
sha256 32b1062f7da84967e7019d01ab805935caa7ab7321a7ced0e30ebe75e5df1670 COPYING

View File

@ -0,0 +1,32 @@
################################################################################
#
# libmpeg2
#
################################################################################
LIBMPEG2_VERSION = 0.5.1
LIBMPEG2_SITE = http://libmpeg2.sourceforge.net/files
LIBMPEG2_LICENSE = GPL-2.0+
LIBMPEG2_LICENSE_FILES = COPYING
LIBMPEG2_INSTALL_STAGING = YES
LIBMPEG2_AUTORECONF = YES
LIBMPEG2_CONF_OPTS = --without-x --disable-directx
ifeq ($(BR2_PACKAGE_SDL),y)
LIBMPEG2_CONF_ENV += ac_cv_prog_SDLCONFIG=$(STAGING_DIR)/usr/bin/sdl-config
LIBMPEG2_CONF_OPTS += --enable-sdl
LIBMPEG2_DEPENDENCIES += sdl
else
LIBMPEG2_CONF_OPTS += --disable-sdl
endif
ifneq ($(BR2_PACKAGE_LIBMPEG2_BINS),y)
define LIBMPEG2_REMOVE_BINS
rm -f $(addprefix $(TARGET_DIR)/usr/bin/,\
mpeg2dec corrupt_mpeg2 extract_mpeg2)
endef
LIBMPEG2_POST_INSTALL_TARGET_HOOKS += LIBMPEG2_REMOVE_BINS
endif
$(eval $(autotools-package))