Update bento4 to 1.5.1.624

This commit is contained in:
Martchus 2018-08-23 22:14:20 +02:00
parent 6c05950040
commit 85e750e720
1 changed files with 20 additions and 34 deletions

View File

@ -4,50 +4,36 @@
# you also find the URL of a binary repository.
pkgname=bento4
pkgver=1.4.3.608
_pkgverstr=1.4.3-608
pkgver=1.5.1.624
_pkgverstr=1.5.1-624
pkgrel=1
pkgdesc="C++ class library and tools designed to read and write ISO-MP4 files"
pkgdesc='C++ class library and tools designed to read and write ISO-MP4 files'
arch=('i686' 'x86_64')
url="https://www.bento4.com/"
url='https://www.bento4.com/'
license=('GPL')
makedepends=('cmake')
optdepends=('python')
source=("https://github.com/axiomatic-systems/Bento4/archive/v${_pkgverstr}.tar.gz")
sha256sums=('f3e2ae92eb7b1d09e3ae1bfc02a1ab546207bc11033e9e7d6c7a46db53b9a4ca')
_config="Release"
if [[ $CARCH == "i686" ]]; then
_arch="x86"
else
_arch=$CARCH
fi
sha256sums=('eda725298e77df83e51793508a3a2640eabdfda1abc8aa841eca69983de83a4c')
build() {
cd "${srcdir}/Bento4-${_pkgverstr}/Build/Targets/$_arch-unknown-linux/"
sed -i "6s/.*/AP4_BUILD_CONFIG = $_config/" ../../Makefiles/Bootstrap.mak
make sdk AP4_BUILD_CONFIG=$_config
# make shared library manually
cd "${srcdir}/Bento4-${_pkgverstr}/Build/Targets/$_arch-unknown-linux/$_config/SDK/lib"
mkdir shared
cd shared
ar x ../libAP4.a
g++ -shared -Wl,-soname,libAP4.so.$pkgver -o libAP4.so.$pkgver *.o
cd "${srcdir}/Bento4-${_pkgverstr}"
sed -i "s/ STATIC / SHARED /" CMakeLists.txt
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="/usr" -DCMAKE_SKIP_BUILD_RPATH=ON
make
}
package() {
cd "${srcdir}/Bento4-${_pkgverstr}/Build/Targets/$_arch-unknown-linux/$_config/SDK"
mkdir -p "$pkgdir/usr/bin/"
mkdir -p "$pkgdir/usr/lib/"
mkdir -p "$pkgdir/usr/include/$pkgname/"
pushd ./bin
for file in *; do
# prefix binaries with "bento4-" to avoid conflicts
install -m755 -D "./$file" "$pkgdir/usr/bin/bento4-$file"
cd "${srcdir}/Bento4-${_pkgverstr}"
# prevent conflict with libmp4v2
for conflicting_file in mp4extract mp4info; do
mv $conflicting_file $conflicting_file-bento4
done
popd
install -m644 -D ./lib/*.a "$pkgdir/usr/lib/" # static lib is usually removed anyways
install -m644 -D ./lib/shared/*.so.* "$pkgdir/usr/lib/"
install -m644 -D ./include/*.h "$pkgdir/usr/include/$pkgname/"
cd "$pkgdir/usr/lib/"
ln -s libAP4.so.$pkgver libAP4.so
# install manually (there's no install target)
mkdir -p "${pkgdir}/usr/"{lib,bin}
find -iname '*.so' -exec mv --target-directory="${pkgdir}/usr/lib" {} \;
find -maxdepth 1 -executable -type f -exec mv --target-directory="${pkgdir}/usr/bin" {} \;
}