72 lines
2.3 KiB
Bash
72 lines
2.3 KiB
Bash
# 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
|
|
}
|