diff options
-rw-r--r-- | .SRCINFO | 20 | ||||
-rw-r--r-- | .gitignore | 6 | ||||
-rw-r--r-- | PKGBUILD | 61 |
3 files changed, 87 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..151ed978473f --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,20 @@ +pkgbase = android-riscv64-svt-av1 + pkgdesc = Scalable Video Technology AV1 encoder and decoder (Android riscv64) + pkgver = 2.3.0 + pkgrel = 1 + url = https://gitlab.com/AOMediaCodec/SVT-AV1 + arch = any + groups = android-svt-av1 + license = BSD + license = custom: Alliance for Open Media Patent License 1.0 + makedepends = android-cmake + makedepends = nasm + depends = android-ndk + options = !strip + options = !buildflags + options = staticlibs + options = !emptydirs + source = https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v2.3.0/SVT-AV1-v2.3.0.tar.bz2 + md5sums = a86cac2227942f6d8e17ca1fdcac1627 + +pkgname = android-riscv64-svt-av1 diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..b5b03b115225 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +pkg +src +*.tar.xz +*.tar.gz +*.tar.bz2 +*.asc diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..bfec4c2222ce --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,61 @@ +# Maintainer: Gonzalo Exequiel Pedone <hipersayan DOT x AT gmail DOT com> +# Contributor: Maxime Gauduin <alucryd@archlinux.org> +# Contributor: Daniel Bermond <dbermond@archlinux.org> +# Contributor: Thomas Schneider <maxmusterm@gmail.com> + +_android_arch=riscv64 + +pkgname=android-${_android_arch}-svt-av1 +pkgver=2.3.0 +pkgrel=1 +arch=('any') +pkgdesc="Scalable Video Technology AV1 encoder and decoder (Android ${_android_arch})" +url='https://gitlab.com/AOMediaCodec/SVT-AV1' +license=('BSD' + 'custom: Alliance for Open Media Patent License 1.0') +groups=('android-svt-av1') +depends=('android-ndk') +makedepends=('android-cmake' + 'nasm') +options=(!strip !buildflags staticlibs !emptydirs) +source=("https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v${pkgver}/SVT-AV1-v${pkgver}.tar.bz2") +md5sums=('a86cac2227942f6d8e17ca1fdcac1627') + +prepare() { + cd "${srcdir}/SVT-AV1-v${pkgver}" + + sed -i '/CMAKE_BUILD_TYPE Release/d' CMakeLists.txt +} + +build() { + cd "${srcdir}/SVT-AV1-v${pkgver}" + source android-env ${_android_arch} + + export LDFLAGS="$LDFLAGS -Wl,-z,noexecstack" + + android-${_android_arch}-cmake \ + -S . \ + -B build-shared \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_APPS=OFF \ + -DNATIVE=OFF + make -C build-shared $MAKEFLAGS + + android-${_android_arch}-cmake \ + -S . \ + -B build-static \ + -DBUILD_SHARED_LIBS=OFF \ + -DBUILD_APPS=OFF \ + -DNATIVE=OFF + make -C build-static $MAKEFLAGS +} + +package() { + cd "${srcdir}/SVT-AV1-v${pkgver}" + source android-env ${_android_arch} + + make -C build-shared DESTDIR="${pkgdir}" install + make -C build-static DESTDIR="${pkgdir}" install + ${ANDROID_STRIP} -g --strip-unneeded "${pkgdir}/${ANDROID_PREFIX_LIB}"/*.so + ${ANDROID_STRIP} -g "${pkgdir}/${ANDROID_PREFIX_LIB}"/*.a || true +} |