PKGBUILDs/mkvtoolnix/default/PKGBUILD

57 lines
1.8 KiB
Bash

# Maintainer: Martchus <martchus@gmx.net>
# In contrast to the official package this one includes both GUIs - the legacy one which uses wxGTK and the new Qt 5 based.
# Since I was not able to build the version from https://www.bunkus.org/videotools/mkvtoolnix/sources/mkvtoolnix-8.2.0.tar.xz
# I decided to use the latest sources from Git.
pkgname='mkvtoolnix-git'
pkgver=8434.59a1651
pkgrel=1
pkgdesc="Set of tools to create, edit and inspect Matroska files - includes both: wxGTK and Qt 5 GUI."
arch=('i686' 'x86_64')
license=('GPL')
url="http://www.bunkus.org/videotools/mkvtoolnix/index.html"
depends=('libmatroska' 'expat' 'flac' 'libvorbis' 'file' 'boost-libs' 'lzo' 'wxgtk' 'qt5-base' 'xdg-utils' 'desktop-file-utils')
makedepends=('boost' 'ruby')
provides=('mkvtoolnix' 'mkvtoolnix-gtk' 'mkvtoolnix-gui')
conflicts=('mkvtoolnix')
source=("${pkgname}::git://github.com/mbunkus/mkvtoolnix.git")
md5sums=('skip')
install=mkvtoolnix.install
pkgver() {
cd "${srcdir}/${pkgname}"
echo "$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
}
prepare() {
cd "${srcdir}/${pkgname}"
# Disable automagic curl dep used for online update checking
sed -i -e '/curl/d' configure.in
export CURL_CFLAGS="" CURL_LIBS=""
export CFLAGS="${CFLAGS} -DBOOST_FILESYSTEM_VERSION=3"
export CXXFLAGS="${CXXFLAGS} -DBOOST_FILESYSTEM_VERSION=3"
# Sets number of threads for a parallel build
export DRAKETHREADS=4
./autogen.sh
}
build() {
cd "${srcdir}/${pkgname}"
# XXX: Temporary define to build against boost 1.58
# https://github.com/mbunkus/mkvtoolnix/issues/1172
CXXFLAGS+=' -DBOOST_CODECVT_DO_LENGTH_CONST=const'
./configure --prefix=/usr \
--with-boost-libdir=/usr/lib
./drake
}
package() {
cd "${srcdir}/${pkgname}"
./drake DESTDIR="${pkgdir}" install
}