libmpeg2: update to 0.5.1
- remove mingw32 - install license file
This commit is contained in:
parent
771f142584
commit
52a8792739
@ -1,11 +0,0 @@
|
||||
--- libmpeg2-svn-r1206/bootstrap.orig 2013-07-31 05:25:50.960371100 +0000
|
||||
+++ libmpeg2-svn-r1206/bootstrap 2013-07-31 05:26:09.387711100 +0000
|
||||
@@ -14,8 +14,6 @@
|
||||
# The latest version of this script can be found at the following place:
|
||||
# http://sam.zoy.org/autotools/
|
||||
|
||||
-# Die if an error occurs
|
||||
-set -e
|
||||
|
||||
# Guess whether we are using configure.ac or configure.in
|
||||
if test -f configure.ac; then
|
||||
@ -1,59 +0,0 @@
|
||||
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
|
||||
# Contributor: Ray Donnelly <mingw.android@gmail.com>
|
||||
|
||||
_realname=libmpeg2
|
||||
pkgbase=mingw-w64-${_realname}-git
|
||||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git"
|
||||
pkgver=r1108.946bf4b
|
||||
pkgrel=2
|
||||
pkgdesc="Library for decoding MPEG-1 and MPEG-2 video streams (mingw-w64)"
|
||||
arch=('any')
|
||||
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clangarm64')
|
||||
url="https://libmpeg2.sourceforge.io/"
|
||||
license=("GPL2")
|
||||
provides=("${MINGW_PACKAGE_PREFIX}-${_realname}")
|
||||
conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}-svn")
|
||||
replaces=("${MINGW_PACKAGE_PREFIX}-${_realname}-svn")
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-cc" "git" "${MINGW_PACKAGE_PREFIX}-autotools")
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-cc-libs")
|
||||
source=("${_realname}"::"git+https://code.videolan.org/videolan/libmpeg2.git"
|
||||
0001-fix-bootstrap.mingw.patch
|
||||
0002-libmpeg2-fix-deprecated.patch
|
||||
0003-do-not-AC_C_ALWAYS_INLINE-it-redefines-inline-breaking-mingw-w64-GCC-5.1.0-C99.patch)
|
||||
sha256sums=('SKIP'
|
||||
'0ba11aa8ee1aa185dec49790d6c12ed364345fe2ea78616caafa96f1cbd91766'
|
||||
'4dca32a82a5845f4fcbc26d79ae4fdc5d9ab27cca5c2ae5ea5fa9078a0077eb6'
|
||||
'8beb78faac22b9a6c37b4ff23663cd83ce894443c02337e427729acd8bd6cce0')
|
||||
|
||||
pkgver() {
|
||||
cd "${srcdir}/${_realname}"
|
||||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
|
||||
}
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}"/${_realname}
|
||||
patch -p1 -i "${srcdir}"/0001-fix-bootstrap.mingw.patch
|
||||
patch -p1 -i "${srcdir}"/0002-libmpeg2-fix-deprecated.patch
|
||||
patch -p1 -i "${srcdir}"/0003-do-not-AC_C_ALWAYS_INLINE-it-redefines-inline-breaking-mingw-w64-GCC-5.1.0-C99.patch
|
||||
|
||||
./bootstrap
|
||||
}
|
||||
|
||||
build() {
|
||||
mkdir -p build-${MSYSTEM} && cd build-${MSYSTEM}
|
||||
|
||||
../${_realname}/configure \
|
||||
--prefix=${MINGW_PREFIX} \
|
||||
--build=${MINGW_CHOST} \
|
||||
--host=${MINGW_CHOST} \
|
||||
--enable-shared \
|
||||
--enable-static \
|
||||
--disable-sdl
|
||||
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}"/build-${MSYSTEM}
|
||||
make DESTDIR="${pkgdir}" install
|
||||
}
|
||||
18
mingw-w64-libmpeg2/0001-use-system-getopt.patch
Normal file
18
mingw-w64-libmpeg2/0001-use-system-getopt.patch
Normal file
@ -0,0 +1,18 @@
|
||||
--- a/src/Makefile.am
|
||||
+++ b/src/Makefile.am
|
||||
@@ -5,11 +5,11 @@
|
||||
libvo = $(top_builddir)/libvo/libvo.a $(LIBVO_LIBS)
|
||||
|
||||
bin_PROGRAMS = mpeg2dec extract_mpeg2 corrupt_mpeg2
|
||||
-mpeg2dec_SOURCES = mpeg2dec.c dump_state.c getopt.c gettimeofday.c
|
||||
+mpeg2dec_SOURCES = mpeg2dec.c dump_state.c gettimeofday.c
|
||||
mpeg2dec_LDADD = $(libvo) $(libmpeg2) $(libmpeg2convert)
|
||||
-extract_mpeg2_SOURCES = extract_mpeg2.c getopt.c
|
||||
-corrupt_mpeg2_SOURCES = corrupt_mpeg2.c getopt.c
|
||||
+extract_mpeg2_SOURCES = extract_mpeg2.c
|
||||
+corrupt_mpeg2_SOURCES = corrupt_mpeg2.c
|
||||
|
||||
man_MANS = mpeg2dec.1 extract_mpeg2.1
|
||||
|
||||
-EXTRA_DIST = getopt.h gettimeofday.h $(man_MANS)
|
||||
+EXTRA_DIST = gettimeofday.h $(man_MANS)
|
||||
@ -1,6 +1,14 @@
|
||||
--- libmpeg2/libvo/video_out_dx.c 2014-07-11 00:22:33.440400000 +0400
|
||||
+++ libmpeg2/libvo/video_out_dx.c.new 2014-07-11 00:22:27.824400000 +0400
|
||||
@@ -92,7 +92,7 @@
|
||||
--- a/libvo/video_out_dx.c
|
||||
+++ b/libvo/video_out_dx.c
|
||||
@@ -34,6 +34,7 @@
|
||||
#include "mpeg2.h"
|
||||
#include "video_out.h"
|
||||
#include "mpeg2convert.h"
|
||||
+#include "vo_internal.h"
|
||||
|
||||
#include <ddraw.h>
|
||||
#include <initguid.h>
|
||||
@@ -92,7 +93,7 @@
|
||||
switch (message) {
|
||||
|
||||
case WM_WINDOWPOSCHANGED:
|
||||
@ -9,12 +17,12 @@
|
||||
|
||||
/* update the window position and size */
|
||||
point_window.x = 0;
|
||||
@@ -173,7 +173,7 @@
|
||||
@@ -173,7 +174,7 @@
|
||||
/* store a directx_instance pointer into the window local storage
|
||||
* (for later use in event_handler).
|
||||
* We need to use SetWindowLongPtr when it is available in mingw */
|
||||
- SetWindowLong (instance->window, GWL_USERDATA, (LONG) instance);
|
||||
+ SetWindowLongPtr (instance->window, GWLP_USERDATA, (LONG) instance);
|
||||
+ SetWindowLongPtr (instance->window, GWLP_USERDATA, (LONG_PTR) instance);
|
||||
|
||||
ShowWindow (instance->window, SW_SHOW);
|
||||
|
||||
40
mingw-w64-libmpeg2/0004-stringop-overflow.patch
Normal file
40
mingw-w64-libmpeg2/0004-stringop-overflow.patch
Normal file
@ -0,0 +1,40 @@
|
||||
--- a/src/extract_mpeg2.c
|
||||
+++ b/src/extract_mpeg2.c
|
||||
@@ -148,7 +148,7 @@
|
||||
return 0; \
|
||||
} \
|
||||
} else { \
|
||||
- memcpy (head_buf, header, bytes); \
|
||||
+ memcpy ((void*)head_buf, header, bytes); \
|
||||
state = DEMUX_HEADER; \
|
||||
state_bytes = bytes; \
|
||||
return 0; \
|
||||
@@ -437,7 +437,7 @@
|
||||
}
|
||||
if (end != buffer + BUFFER_SIZE)
|
||||
break;
|
||||
- memcpy (buffer, buf, end - buf);
|
||||
+ memcpy ((void*)buffer, buf, end - buf);
|
||||
buf = buffer + (end - buf);
|
||||
}
|
||||
}
|
||||
--- a/src/mpeg2dec.c
|
||||
+++ b/src/mpeg2dec.c
|
||||
@@ -406,7 +406,7 @@
|
||||
return 0; \
|
||||
} \
|
||||
} else { \
|
||||
- memcpy (head_buf, header, bytes); \
|
||||
+ memcpy ((void*)head_buf, header, bytes); \
|
||||
state = DEMUX_HEADER; \
|
||||
state_bytes = bytes; \
|
||||
return 0; \
|
||||
@@ -740,7 +740,7 @@
|
||||
}
|
||||
if (end != buffer + buffer_size)
|
||||
break;
|
||||
- memcpy (buffer, buf, end - buf);
|
||||
+ memcpy ((void*)buffer, buf, end - buf);
|
||||
buf = buffer + (end - buf);
|
||||
} while (!sigint);
|
||||
free (buffer);
|
||||
71
mingw-w64-libmpeg2/PKGBUILD
Normal file
71
mingw-w64-libmpeg2/PKGBUILD
Normal file
@ -0,0 +1,71 @@
|
||||
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
|
||||
# Contributor: Ray Donnelly <mingw.android@gmail.com>
|
||||
|
||||
_realname=libmpeg2
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
|
||||
pkgver=0.5.1
|
||||
pkgrel=1
|
||||
pkgdesc="Library for decoding MPEG-1 and MPEG-2 video streams (mingw-w64)"
|
||||
arch=('any')
|
||||
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
|
||||
url="https://libmpeg2.sourceforge.io/"
|
||||
license=('spdx:GPL-2.0-or-later')
|
||||
provides=("${MINGW_PACKAGE_PREFIX}-${_realname}-git")
|
||||
conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}-git")
|
||||
replaces=("${MINGW_PACKAGE_PREFIX}-${_realname}-git")
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
|
||||
"${MINGW_PACKAGE_PREFIX}-autotools")
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-cc-libs")
|
||||
source=("https://download.videolan.org/contrib/libmpeg2/${_realname}-${pkgver}.tar.gz"
|
||||
0001-use-system-getopt.patch
|
||||
0002-libmpeg2-fix-deprecated.patch
|
||||
0003-do-not-AC_C_ALWAYS_INLINE-it-redefines-inline-breaking-mingw-w64-GCC-5.1.0-C99.patch
|
||||
0004-stringop-overflow.patch)
|
||||
sha256sums=('dee22e893cb5fc2b2b6ebd60b88478ab8556cb3b93f9a0d7ce8f3b61851871d4'
|
||||
'8df95ae46b9224e9888513137ee8f99423de88973c2c865e30c19f213e6660d8'
|
||||
'0b9fddc5161ee11d7d0dba559ace98425c2d709b6ab99e130b6ff816444f014a'
|
||||
'8beb78faac22b9a6c37b4ff23663cd83ce894443c02337e427729acd8bd6cce0'
|
||||
'b21d712c563fad8a68d7d7851858fdb041de682929b2e80993a1febdd9ea5f44')
|
||||
|
||||
apply_patch_with_msg() {
|
||||
for _patch in "$@"
|
||||
do
|
||||
msg2 "Applying ${_patch}"
|
||||
patch -p1 -i "${srcdir}/${_patch}"
|
||||
done
|
||||
}
|
||||
|
||||
prepare() {
|
||||
cd ${_realname}-${pkgver}
|
||||
|
||||
apply_patch_with_msg \
|
||||
0001-use-system-getopt.patch \
|
||||
0002-libmpeg2-fix-deprecated.patch \
|
||||
0003-do-not-AC_C_ALWAYS_INLINE-it-redefines-inline-breaking-mingw-w64-GCC-5.1.0-C99.patch \
|
||||
0004-stringop-overflow.patch
|
||||
|
||||
# Use system getopt.h instead
|
||||
rm -f src/getopt.h
|
||||
|
||||
autoreconf -fi
|
||||
}
|
||||
|
||||
build() {
|
||||
mkdir -p build-${MSYSTEM} && cd build-${MSYSTEM}
|
||||
|
||||
../${_realname}-${pkgver}/configure \
|
||||
--prefix=${MINGW_PREFIX} \
|
||||
--enable-shared \
|
||||
--enable-static \
|
||||
--disable-sdl
|
||||
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd build-${MSYSTEM}
|
||||
make DESTDIR="${pkgdir}" install
|
||||
|
||||
install -Dm644 "${srcdir}"/${_realname}-${pkgver}/COPYING "${pkgdir}"${MINGW_PREFIX}/share/licenses/libmpeg2/LICENSE
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user