summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Bermond2018-08-17 21:32:43 +0000
committerDaniel Bermond2018-08-17 21:32:43 +0000
commitdf6a5dcadc20f93e5be8db1e4fcfeee59762da18 (patch)
tree20c4c7ff320433188359ace802adf4830490e4a6
parent725aaa50c7ba14d6a21fc9994a5d243943bd6fa2 (diff)
downloadaur-df6a5dcadc20f93e5be8db1e4fcfeee59762da18.tar.gz
Change to single package providing everything
This will match the latest changes in package x264 from [extra] official repository. Although x264 package is not related to this one, the base source code template and build system are very similar. Being such, x264 package from [extra] serves as a basis for this package. This change simplifies things by eliminating the need of multiple little correlated davs2 packages, sticking with the Arch KISS principle. References ---------- https://git.archlinux.org/svntogit/packages.git/commit/trunk?h=packages/x264&id=c2411345dd7a39390ce4019cea0bfbdd363feb1d
-rw-r--r--.SRCINFO30
-rw-r--r--PKGBUILD150
2 files changed, 76 insertions, 104 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 6377a7e71c72..c892924fff78 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,5 +1,6 @@
pkgbase = davs2-git
- pkgver = 1.0.r116.gc29c026
+ pkgdesc = Open-Source decoder of AVS2-P2/IEEE1857.4 video coding standard (git version)
+ pkgver = 1.0.r124.gb81c17c
pkgrel = 1
url = https://github.com/pkuvcl/davs2/
arch = i686
@@ -10,26 +11,17 @@ pkgbase = davs2-git
makedepends = yasm
makedepends = l-smash
depends = glibc
+ depends = liblsmash.so
+ provides = davs2
+ provides = libdavs2
+ provides = libdavs2-git
+ provides = libdavs2.so
+ conflicts = davs2
+ conflicts = libdavs2
+ conflicts = libdavs2-git
+ replaces = libdavs2-git
source = davs2-git::git+https://github.com/pkuvcl/davs2.git
sha256sums = SKIP
pkgname = davs2-git
- pkgdesc = CLI tool for the open-source decoder of AVS2-P2/IEEE1857.4 video coding standard (git version)
- depends = glibc
- depends = l-smash
- provides =
- provides = davs2-bit-git
- provides = davs2-bit
- conflicts =
- conflicts = davs2-bit
-
-pkgname = libdavs2-git
- pkgdesc = Library for the open-source decoder of AVS2-P2/IEEE1857.4 video coding standard (8bit depth) (git version)
- provides = libdavs2-8bit-git
- provides = libdavs2-8bit
- provides = libdavs2
- provides = libdavs2.so
- conflicts = libdavs2-8bit
- conflicts = libdavs2-10bit
- conflicts = libdavs2-10bit-git
diff --git a/PKGBUILD b/PKGBUILD
index 9649fc38b503..ee4fc1085dc4 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,120 +1,100 @@
# Maintainer : Daniel Bermond < yahoo-com: danielbermond >
# NOTE:
-# - 10-bit depth currently fails to build
-# - 10-bit sections are commented out until it works
+# 10-bit depth currently fails to build
+# https://github.com/pkuvcl/davs2/issues/4
-pkgbase=davs2-git
-pkgname=('davs2-git' 'libdavs2-git') #'libdavs2-10bit-git' 'libdavs2-all-git')
-pkgver=1.0.r116.gc29c026
+pkgname=davs2-git
+pkgver=1.0.r124.gb81c17c
pkgrel=1
arch=('i686' 'x86_64')
+pkgdesc='Open-Source decoder of AVS2-P2/IEEE1857.4 video coding standard (git version)'
url='https://github.com/pkuvcl/davs2/'
license=('GPL')
-depends=('glibc')
+depends=('glibc' 'liblsmash.so')
makedepends=('git' 'gcc7' 'yasm' 'l-smash')
-source=("$pkgbase"::'git+https://github.com/pkuvcl/davs2.git')
+provides=('davs2' 'libdavs2' 'libdavs2-git' 'libdavs2.so')
+conflicts=('davs2' 'libdavs2' 'libdavs2-git')
+replaces=('libdavs2-git')
+source=("$pkgname"::'git+https://github.com/pkuvcl/davs2.git')
sha256sums=('SKIP')
prepare() {
- cd "$pkgbase"
+ cd "$pkgname"
# use gcc7 (it does not build with gcc8)
sed -i 's/g++/g++-7/' build/linux/configure
-
- # must copy the entire source tree for each build or it will not work
- cd "$srcdir"
- cp -af "$pkgbase" build-8bit
- #cp -af "$pkgbase" build-10bit
}
pkgver() {
- cd "$pkgbase"
+ cd "$pkgname"
# git, tags available
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^v//'
}
build() {
- for _depth in 8 #10
- do
- msg2 "Building for ${_depth}-bit..."
-
- cd "build-${_depth}bit/build/linux"
-
- ./configure \
- --prefix='/usr' \
- --enable-shared \
- --bit-depth="$_depth" \
- --chroma-format='all' \
- --enable-lto \
- --enable-pic \
- --disable-swscale \
- --disable-lavf \
- --disable-ffms \
- --disable-gpac
-
+ # must copy the entire source tree for each build or it will not work
+ cd "$srcdir"
+ cp -af "$pkgname" build-8bit
+ cp -af "$pkgname" build-10bit
+
+ msg2 'Building for 8-bit...'
+ cd build-8bit/build/linux
+ ./configure \
+ --prefix='/usr' \
+ --enable-shared \
+ --bit-depth='8' \
+ --chroma-format='all' \
+ --enable-lto \
+ --enable-pic \
+ --disable-swscale \
+ --disable-lavf \
+ --disable-ffms \
+ --disable-gpac
+ make
+
+ msg2 'Building for 10-bit...'
+ cd "${srcdir}/build-10bit/build/linux"
+ if ./configure \
+ --prefix='/usr' \
+ --libdir='/usr/lib/davs2-10bit' \
+ --includedir='/usr/include/davs2-10bit' \
+ --enable-shared \
+ --bit-depth='10' \
+ --chroma-format='all' \
+ --enable-lto \
+ --enable-pic \
+ --disable-swscale \
+ --disable-lavf \
+ --disable-ffms \
+ --disable-gpac
+ then
make
-
+ else
cd "$srcdir"
- done
+ rm -rf build-10bit
+ fi
}
-package_davs2-git() {
- pkgdesc='CLI tool for the open-source decoder of AVS2-P2/IEEE1857.4 video coding standard (git version)'
- depends+=('l-smash')
+package() {
+ local _depth
- for _depth in 8 #10
+ for _depth in 10 8
do
- provides+=("davs2-${_depth}bit-git" "davs2-${_depth}bit")
- conflicts+=("davs2-${_depth}bit")
+ msg2 "Installing for ${_depth}-bit..."
- msg2 "Installing CLI for ${_depth}-bit..."
+ if [ "$_depth" -eq '10' ] && ! [ -d 'build-10bit' ]
+ then
+ printf '%s\n' 'BitDepth 10 not supported currently.'
+ continue
+ fi
- make -C "build-${_depth}bit/build/linux" DESTDIR="$pkgdir" install-cli
-
- mv "$pkgdir"/usr/bin/davs2 "$pkgdir"/usr/bin/davs2-${_depth}bit
- done
-
- ln -sf davs2-8bit "${pkgdir}"/usr/bin/davs2
-}
-
-package_libdavs2-git() {
- pkgdesc='Library for the open-source decoder of AVS2-P2/IEEE1857.4 video coding standard (8bit depth) (git version)'
- provides=('libdavs2-8bit-git' 'libdavs2-8bit' 'libdavs2' 'libdavs2.so')
- conflicts=('libdavs2-8bit' 'libdavs2-10bit' 'libdavs2-10bit-git')
-
- make -C build-8bit/build/linux DESTDIR="$pkgdir" install-lib-shared
-}
-
-# bash block-comment
-:<<'10-bit-pkgs'
-package_libdavs2-10bit-git() {
- pkgdesc='Library for the open-source decoder of AVS2-P2/IEEE1857.4 video coding standard (10bit depth) (git version)'
- provides=('libdavs2-10bit' 'libdavs2' 'libdavs2-git' 'libdavs2.so')
- conflicts=('libdavs2-10bit' 'libdavs2-8bit' 'libdavs2-8bit-git' 'libdavs2-git')
-
- make -C build-8bit/build/linux DESTDIR="$pkgdir" install-lib-shared
-}
-
-package_libdavs2-all-git() {
- pkgdesc="Library for the open-source decoder of AVS2-P2/IEEE1857.4 video coding standard (all depths) (git version)"
-
- local _ver="$(grep '^api=[0-9]*$' "${pkgbase}/version.sh" | awk -F'=' '{ print $2 }')"
-
- install -d "${pkgdir}/usr/lib/davs2"
-
- for _depth in 8 10
- do
- provides+=("libdavs2-${_depth}bit.so")
-
- make -C build-${_depth}bit/build/linux DESTDIR="$pkgdir" install-lib-shared
-
- mv "${pkgdir}"/usr/lib/libdavs2.so.${_ver} "${pkgdir}"/usr/lib/davs2/libdavs2-${_depth}bit.so.${_ver}
+ make -C "build-${_depth}bit/build/linux" DESTDIR="$pkgdir" install-cli install-lib-shared
- rm -r "${pkgdir}"/usr/{include,lib/libdavs2.so,lib/pkgconfig}
-
- ln -sfr "${pkgdir}"/usr/lib/davs2/libdavs2-${_depth}bit.so{.${_ver},}
+ if [ "$_depth" -eq '10' ]
+ then
+ mv "${pkgdir}/usr/bin/davs2" "${pkgdir}/usr/bin/davs2-${_depth}bit"
+ fi
done
}
-10-bit-pkgs