diff options
author | Daniel Bermond | 2019-06-09 18:53:51 +0000 |
---|---|---|
committer | Daniel Bermond | 2019-06-09 19:09:38 +0000 |
commit | a52961f704a974522e1711f367218a2ea25da5b7 (patch) | |
tree | f528c5d3dfea43aef109bf5012b17211c6992fbc | |
download | aur-a52961f704a974522e1711f367218a2ea25da5b7.tar.gz |
Initial commit of avbin-git
-rw-r--r-- | .SRCINFO | 28 | ||||
-rw-r--r-- | 0001-avbin-remove-unwanted-optimization.patch | 24 | ||||
-rw-r--r-- | 0002-avbin-fix-link-and-add-full-relro.patch | 24 | ||||
-rw-r--r-- | 0003-avbin-faster-build.patch | 21 | ||||
-rw-r--r-- | PKGBUILD | 66 | ||||
-rw-r--r-- | avbin.pc | 10 |
6 files changed, 173 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..9b3722dfa2fa --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,28 @@ +pkgbase = avbin-git + pkgdesc = A C library that provides a wrapper around Libav’s video and audio decoding functionality (git version) + pkgver = 10.r60.g6a8ea87 + pkgrel = 1 + url = https://avbin.github.io/ + arch = x86_64 + license = LGPL3 + makedepends = git + makedepends = yasm + depends = bzip2 + depends = zlib + provides = avbin + conflicts = avbin + source = git+https://github.com/AVbin/AVbin.git + source = libav-avbin::git+https://github.com/AVbin/libav.git + source = 0001-avbin-remove-unwanted-optimization.patch + source = 0002-avbin-fix-link-and-add-full-relro.patch + source = 0003-avbin-faster-build.patch + source = avbin.pc + sha256sums = SKIP + sha256sums = SKIP + sha256sums = 8f8b20d6e57bdc6bf73723691740ae35b157785ebda5764a7611a68df427c30a + sha256sums = fa8f7263326b10f968836f5fe7ae9efef04cdce58a28cfd3f7cb93985fffb469 + sha256sums = 5629f9f239b5dafb8ded30224136854ee8fda537d5e528f9db35450bf057a5ad + sha256sums = d601ceed81c584d7af1d4cb0217e7ab34b7973232a81a09ce24eb620b4796199 + +pkgname = avbin-git + diff --git a/0001-avbin-remove-unwanted-optimization.patch b/0001-avbin-remove-unwanted-optimization.patch new file mode 100644 index 000000000000..da283151dd02 --- /dev/null +++ b/0001-avbin-remove-unwanted-optimization.patch @@ -0,0 +1,24 @@ +diff -Naurp a/linux-x86-32.Makefile b/linux-x86-32.Makefile +--- a/linux-x86-32.Makefile 2019-04-28 20:25:40.000000000 +0000 ++++ b/linux-x86-32.Makefile 2019-04-28 20:32:41.972095497 +0000 +@@ -1,7 +1,7 @@ + SONAME=libavbin.so.$(AVBIN_VERSION) + LIBNAME=$(OUTDIR)/$(SONAME) + +-CFLAGS += -fPIC -O3 ++CFLAGS += -fPIC + LDFLAGS += -shared -soname $(SONAME) -zmuldefs + + STATIC_LIBS = -whole-archive \ +diff -Naurp a/linux-x86-64.Makefile b/linux-x86-64.Makefile +--- a/linux-x86-64.Makefile 2019-04-28 20:25:40.000000000 +0000 ++++ b/linux-x86-64.Makefile 2019-04-28 20:32:47.072032317 +0000 +@@ -1,7 +1,7 @@ + SONAME=libavbin.so.$(AVBIN_VERSION) + LIBNAME=$(OUTDIR)/$(SONAME) + +-CFLAGS += -fPIC -O3 ++CFLAGS += -fPIC + LDFLAGS += -shared -soname $(SONAME) -Bsymbolic -zmuldefs + + STATIC_LIBS = -whole-archive \ diff --git a/0002-avbin-fix-link-and-add-full-relro.patch b/0002-avbin-fix-link-and-add-full-relro.patch new file mode 100644 index 000000000000..735a88b48073 --- /dev/null +++ b/0002-avbin-fix-link-and-add-full-relro.patch @@ -0,0 +1,24 @@ +diff -Naurp a/linux-x86-32.Makefile b/linux-x86-32.Makefile +--- a/linux-x86-32.Makefile 2019-04-28 20:32:41.000000000 +0000 ++++ b/linux-x86-32.Makefile 2019-04-28 20:36:08.000000000 +0000 +@@ -2,7 +2,7 @@ SONAME=libavbin.so.$(AVBIN_VERSION) + LIBNAME=$(OUTDIR)/$(SONAME) + + CFLAGS += -fPIC +-LDFLAGS += -shared -soname $(SONAME) -zmuldefs ++LDFLAGS += -shared -soname $(SONAME) -zmuldefs -O1 --sort-common --as-needed -z relro -z now -O1 --sort-common --as-needed -z relro -z now + + STATIC_LIBS = -whole-archive \ + $(BACKEND_DIR)/libavformat/libavformat.a \ +diff -Naurp a/linux-x86-64.Makefile b/linux-x86-64.Makefile +--- a/linux-x86-64.Makefile 2019-04-28 20:32:47.000000000 +0000 ++++ b/linux-x86-64.Makefile 2019-04-28 20:36:08.000000000 +0000 +@@ -2,7 +2,7 @@ SONAME=libavbin.so.$(AVBIN_VERSION) + LIBNAME=$(OUTDIR)/$(SONAME) + + CFLAGS += -fPIC +-LDFLAGS += -shared -soname $(SONAME) -Bsymbolic -zmuldefs ++LDFLAGS += -shared -soname $(SONAME) -Bsymbolic -zmuldefs -O1 --sort-common --as-needed -z relro -z now -O1 --sort-common --as-needed -z relro -z now + + STATIC_LIBS = -whole-archive \ + $(BACKEND_DIR)/libavformat/libavformat.a \ diff --git a/0003-avbin-faster-build.patch b/0003-avbin-faster-build.patch new file mode 100644 index 000000000000..e2ce3a82486f --- /dev/null +++ b/0003-avbin-faster-build.patch @@ -0,0 +1,21 @@ +diff -Naurp a/build.sh b/build.sh +--- a/build.sh 2019-06-09 18:44:46.000000000 +0000 ++++ b/build.sh 2019-06-09 18:44:47.000000000 +0000 +@@ -147,7 +147,7 @@ die_usage() { + echo + echo "Options" + echo " --clean Don't build, just clean up all generated files and directories." +- echo " --fast Use 'make -j9' when compiling" ++ echo " --fast Use 'make -j<threads+1>' when compiling" + echo " --help Display this help text." + echo " --rebuild Don't reconfigure, just run make again." + echo +@@ -165,7 +165,7 @@ die_usage() { + for arg in $* ; do + case $arg in + "--fast") +- FAST="-j9" ;; ++ FAST="-j$(($(nproc)+1))" ;; + "--help") + die_usage ;; + "--rebuild") diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..5514296dbdbf --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,66 @@ +# Maintainer: Daniel Bermond < gmail-com: danielbermond > + +pkgname=avbin-git +pkgver=10.r60.g6a8ea87 +pkgrel=1 +pkgdesc='A C library that provides a wrapper around Libav’s video and audio decoding functionality (git version)' +arch=('x86_64') +url='https://avbin.github.io/' +license=('LGPL3') +depends=('bzip2' 'zlib') +makedepends=('git' 'yasm') +provides=('avbin') +conflicts=('avbin') +source=('git+https://github.com/AVbin/AVbin.git' + 'libav-avbin'::'git+https://github.com/AVbin/libav.git' + '0001-avbin-remove-unwanted-optimization.patch' + '0002-avbin-fix-link-and-add-full-relro.patch' + '0003-avbin-faster-build.patch' + 'avbin.pc') +sha256sums=('SKIP' + 'SKIP' + '8f8b20d6e57bdc6bf73723691740ae35b157785ebda5764a7611a68df427c30a' + 'fa8f7263326b10f968836f5fe7ae9efef04cdce58a28cfd3f7cb93985fffb469' + '5629f9f239b5dafb8ded30224136854ee8fda537d5e528f9db35450bf057a5ad' + 'd601ceed81c584d7af1d4cb0217e7ab34b7973232a81a09ce24eb620b4796199') + +prepare() { + cd AVbin + + git submodule init + git config --local "submodule.libav.url" "${srcdir}/libav-avbin" + git submodule update + + patch -Np1 -i "${srcdir}/0001-avbin-remove-unwanted-optimization.patch" + patch -Np1 -i "${srcdir}/0002-avbin-fix-link-and-add-full-relro.patch" + patch -Np1 -i "${srcdir}/0003-avbin-faster-build.patch" +} + +pkgver() { + cd AVbin + + # git, tags available + git describe --long --tags | sed 's/^avbin-//;s/\([^-]*-g\)/r\1/;s/-/./g;s/^v//' +} + +build() { + cd AVbin + + unset LDFLAGS # won't build if setted, modified by patch + + ./build.sh --fast linux-x86-64 +} + +package() { + # header + install -D -m644 AVbin/include/avbin.h -t "${pkgdir}/usr/include" + + # library + local _sover + _sover="$((${pkgver%%.*} + 1))" + install -D -m755 "AVbin/dist/linux-x86-64/libavbin.so.${_sover}" -t "${pkgdir}/usr/lib" + ln -s "libavbin.so.${_sover}" "${pkgdir}/usr/lib/libavbin.so" + + # pkgconfig + install -D -m644 avbin.pc -t "${pkgdir}/usr/lib/pkgconfig" +} diff --git a/avbin.pc b/avbin.pc new file mode 100644 index 000000000000..db64fa86c05f --- /dev/null +++ b/avbin.pc @@ -0,0 +1,10 @@ +prefix=/usr +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: AVbin +Description: A C library that provides a wrapper around Libav’s video and audio decoding functionality +Version: 11 +Libs: -L${libdir} -lavbin +Cflags: -I${includedir} |