Accepting request 576853 from home:iznogood:branches:multimedia:libs

This may be possible to submit to OSS now, as it seems the last US patent have expired on the 14/02/2018.

Wanted fwd to Factory for legal review.

OBS-URL: https://build.opensuse.org/request/show/576853
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/libmpeg2?expand=0&rev=1
This commit is contained in:
Tomáš Chvátal 2018-02-14 22:48:31 +00:00 committed by Git OBS Bridge
commit 89b8734ce3
9 changed files with 334 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

1
baselibs.conf Normal file
View File

@ -0,0 +1 @@
libmpeg2-0

View File

@ -0,0 +1,18 @@
Index: 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-12-22 22:30:20.891751430 +0100
@@ -79,11 +79,10 @@ elif test x"$GCC" = x"yes"; then
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,44 @@
Set visibility of global symbols used in ARM specific assembly file to internal
--- a/libmpeg2/motion_comp_arm_s.S
+++ b/libmpeg2/motion_comp_arm_s.S
@@ -23,7 +23,8 @@
@ ----------------------------------------------------------------
.align
- .global MC_put_o_16_arm
+ .global MC_put_o_16_arm
+ .internal MC_put_o_16_arm
MC_put_o_16_arm:
@@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height)
pld [r1]
@@ -83,7 +84,8 @@
@ ----------------------------------------------------------------
.align
- .global MC_put_o_8_arm
+ .global MC_put_o_8_arm
+ .internal MC_put_o_8_arm
MC_put_o_8_arm:
@@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height)
pld [r1]
@@ -152,7 +154,8 @@
.endm
.align
- .global MC_put_x_16_arm
+ .global MC_put_x_16_arm
+ .internal MC_put_x_16_arm
MC_put_x_16_arm:
@@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height)
pld [r1]
@@ -244,7 +247,8 @@
@ ----------------------------------------------------------------
.align
- .global MC_put_x_8_arm
+ .global MC_put_x_8_arm
+ .internal MC_put_x_8_arm
MC_put_x_8_arm:
@@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height)
pld [r1]

View File

@ -0,0 +1,62 @@
Rewrite the public symbol check to verify the shared libraries, to check for
more things, and to avoid duplication; fixes make check on ARM
Index: libmpeg2-0.5.1/test/globals
===================================================================
--- libmpeg2-0.5.1.orig/test/globals 2008-07-09 20:28:24.000000000 +0200
+++ libmpeg2-0.5.1/test/globals 2017-12-22 22:30:20.911751685 +0100
@@ -1,4 +1,8 @@
#!/bin/sh
+# TODO
+# - fix checking of .a libs; problem is that "nm -g --defined-only" lists
+# internal symbols; this can be solved by using objdump, but it's probably
+# good enough to just run the tests on the shared lib
if test x"$srcdir" != x""; then
builddir="." # running from make check, but it does not define that
@@ -14,22 +18,30 @@ builddir=`cd $builddir;pwd`
error=0
-bad_globals=`nm -g --defined-only $builddir/../libmpeg2/*.o |\
- awk '{if ($3) print $3}' | grep -v '^_\?mpeg2_'`
-
-if test x"$bad_globals" != x""; then
- echo BAD GLOBAL SYMBOLS:
- for s in $bad_globals; do echo $s; done
+# check_bad_public_symbols <symbol prefix> <lib file> [<lib file>...]
+#
+# checks public symbols in shared libs:
+# - allow prefix_anything
+# - reject _prefixanything
+# - allow _anything
+# - reject anything else
+#
+# NB: skips missing files
+check_bad_public_symbols() {
+ symbols_prefix="$1"
+ shift
+ lib_files=`ls "$@" 2>/dev/null`
+ [ -z "$lib_files" ] && return
+ bad_globals=`nm -g --defined-only $lib_files |
+ awk '{if ($3) print $3}' |
+ sed -n "/^${symbols_prefix}_/ d; /^_${symbols_prefix}/ { p; d }; /^_/ d; p"`
+ [ -z "$bad_globals" ] && return
error=1
-fi
-
-bad_globals=`nm -g --defined-only $builddir/../libmpeg2/convert/*.o |\
- awk '{if ($3) print $3}' | grep -v '^_\?mpeg2convert_'`
+ echo BAD GLOBAL SYMBOLS in $lib_files:
+ echo "$bad_globals"
+}
-if test x"$bad_globals" != x""; then
- echo BAD GLOBAL SYMBOLS:
- for s in $bad_globals; do echo $s; done
- error=1
-fi
+check_bad_public_symbols mpeg2 $builddir/../libmpeg2/.libs/libmpeg2.so
+check_bad_public_symbols mpeg2convert $builddir/../libmpeg2/convert/.libs/libmpeg2convert.so
exit $error

BIN
libmpeg2-0.5.1.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

55
libmpeg2.changes Normal file
View File

@ -0,0 +1,55 @@
-------------------------------------------------------------------
Wed Feb 14 20:37:38 UTC 2018 - bjorn.lie@gmail.com
- Rebase patches and use modern macros, prepare for submission to
openSUSE.
-------------------------------------------------------------------
Sat Oct 4 14:44:47 UTC 2014 - olaf@aepfle.de
- Split libmpeg2convert0 to cover old pkg from VideoLAN
-------------------------------------------------------------------
Fri Jul 5 13:03:54 UTC 2013 - scarabeus@opensuse.org
- Format the spec file.
-------------------------------------------------------------------
Fri Jul 5 13:02:29 UTC 2013 - scarabeus@opensuse.org
- Cleanup the spec file to comply suse standards.
- Apply patches for ppc and arm to work on those archs.
-------------------------------------------------------------------
Mon Aug 24 00:00:00 UTC 2009 - henne@links2linux.de
- Fix some build errors by removing stuff from %doc
- specfile cleanup
-------------------------------------------------------------------
Mon Sep 29 00:00:00 UTC 2008 - detlef@links2linux.de
- fix shared lib policy
-------------------------------------------------------------------
Sat Aug 30 00:00:00 UTC 2008 - detlef@links2linux.de
- new upstream version <0.5.1>
* fix broken installation of headers
* put back /mpeg2dec in the .pc file's include path
-------------------------------------------------------------------
Tue Apr 4 00:00:00 UTC 2006 - henne@links2linux.de
- more x86_64 fixes.
-------------------------------------------------------------------
Sun Feb 20 00:00:00 UTC 2005 - rainer@links2linux.de
- changes for 64 bit
-------------------------------------------------------------------
Tue Nov 9 00:00:00 UTC 2004 - rainer@links2linux.de
- removed source from package

127
libmpeg2.spec Normal file
View File

@ -0,0 +1,127 @@
#
# spec file for package libmpeg2
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define libname libmpeg2-0
%define libconvertname libmpeg2convert0
Name: libmpeg2
Version: 0.5.1
Release: 0
Summary: MPEG-2 Video Stream Decoder
License: GPL-2.0+
Group: System/Libraries
URL: http://libmpeg2.sourceforge.net/
Source0: http://libmpeg2.sourceforge.net/files/libmpeg2-%{version}.tar.gz
Patch0: libmpeg2-0.5.1-altivec.patch
Patch1: libmpeg2-0.5.1-arm-private-symbols.patch
Patch2: libmpeg2-0.5.1-global-symbol-test.patch
BuildRequires: SDL-devel
BuildRequires: libtool
BuildRequires: libXext-devel
BuildRequires: libXv-devel
BuildRequires: pkgconfig
%description
libmpeg2 is a free library for decoding mpeg-2 and mpeg-1 video streams. It is
released under the terms of the GPL license.
%package -n %{libname}
Summary: MPEG-2 Video Stream Decoder
Group: System/Libraries
%description -n %{libname}
libmpeg2 is a free library for decoding mpeg-2 and mpeg-1 video streams. It is
released under the terms of the GPL license.
%package -n %{libconvertname}
Summary: MPEG-2 Video Stream Decoder
Group: System/Libraries
%description -n %{libconvertname}
libmpeg2 is a free library for decoding mpeg-2 and mpeg-1 video streams. It is
released under the terms of the GPL license.
%package devel
Summary: Development files for %{name}
Group: Development/Libraries/C and C++
Requires: %{libconvertname} = %{version}
Requires: %{libname} = %{version}
Requires: SDL-devel
%description devel
Include Files and Libraries mandatory for libmpeg2 Development
%package -n mpeg2dec
Summary: MPEG-2 Decoder
Group: Productivity/Multimedia/Video/Editors and Convertors
Requires: %{libconvertname} = %{version}
Requires: %{libname} = %{version}
%description -n mpeg2dec
A MPEG2Decoder based on the libmpeg2 libraries.
%prep
%autosetup -p1
%build
autoreconf -vi
%configure \
--disable-static \
--disable-dependency-tracking \
--enable-sdl \
%{nil}
make %{?_smp_mflags}
%install
%make_install
find %{buildroot} -type f -name "*.la" -delete -print
%post -n %{libname} -p /sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig
%post -n %{libconvertname} -p /sbin/ldconfig
%postun -n %{libconvertname} -p /sbin/ldconfig
%files -n %{libname}
%license COPYING
%{_libdir}/libmpeg2.so.*
%files -n %{libconvertname}
%{_libdir}/libmpeg2convert.so.*
%files devel
%doc AUTHORS ChangeLog NEWS README TODO
%doc doc/*.txt doc/*.c
%dir %{_includedir}/mpeg2dec
%{_includedir}/mpeg2dec/mpeg2.h
%{_includedir}/mpeg2dec/mpeg2convert.h
%{_libdir}/libmpeg2.so
%{_libdir}/libmpeg2convert.so
%{_libdir}/pkgconfig/libmpeg2.pc
%{_libdir}/pkgconfig/libmpeg2convert.pc
%files -n mpeg2dec
%{_bindir}/corrupt_mpeg2
%{_bindir}/extract_mpeg2
%{_bindir}/mpeg2dec
%{_mandir}/man?/mpeg2dec.?%{ext_man}
%{_mandir}/man?/extract_mpeg2.?%{ext_man}
%changelog