diff options
author | Gonzalo Exequiel Pedone | 2019-07-22 14:00:30 -0300 |
---|---|---|
committer | Gonzalo Exequiel Pedone | 2019-07-22 14:00:30 -0300 |
commit | 1116af7065f6373fb90383c55eb339227ec3f937 (patch) | |
tree | d78dd63683de326d43167ee75b407c57dba96e06 | |
download | aur-1116af7065f6373fb90383c55eb339227ec3f937.tar.gz |
New package.
-rw-r--r-- | .SRCINFO | 24 | ||||
-rw-r--r-- | .gitignore | 5 | ||||
-rw-r--r-- | PKGBUILD | 68 | ||||
-rw-r--r-- | soname.patch | 24 |
4 files changed, 121 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..843cdf6e7025 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,24 @@ +pkgbase = android-x86-64-x264-bootstrap + pkgdesc = Free library for encoding H264/AVC video streams (android) + pkgver = 157.r72db4377 + pkgrel = 1 + url = https://www.videolan.org/developers/x264.html + arch = any + license = GPL + makedepends = android-configure + makedepends = yasm + makedepends = git + depends = android-ndk + provides = android-x86-64-x264 + conflicts = android-x86-64-x264 + options = !strip + options = !buildflags + options = staticlibs + options = !emptydirs + source = git+https://code.videolan.org/videolan/x264.git#commit=72db437770fd1ce3961f624dd57a8e75ff65ae0b + source = soname.patch + md5sums = SKIP + md5sums = SKIP + +pkgname = android-x86-64-x264-bootstrap + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..47731b2e7117 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +pkg +src +*.tar.xz +*.tar.gz +*.tar.bz2 diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..e3079e25ff99 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,68 @@ +# Maintainer: Gonzalo Exequiel Pedone <hipersayan DOT x AT gmail DOT com> +# Contributor: Martchus <martchus@gmx.net> +# Contributor: Karl-Felix Glatzer <karl.glatzer@gmx.de> + +_android_arch=x86-64 + +pkgname=android-${_android_arch}-x264-bootstrap +pkgver=157.r72db4377 +pkgrel=1 +arch=('any') +pkgdesc='Free library for encoding H264/AVC video streams (android)' +license=('GPL') +url='https://www.videolan.org/developers/x264.html' +depends=('android-ndk') +options=(!strip !buildflags staticlibs !emptydirs) +makedepends=('android-configure' 'yasm' 'git') +provides=(${pkgname%-bootstrap}) +conflicts=(${pkgname%-bootstrap}) +_commit=72db437770fd1ce3961f624dd57a8e75ff65ae0b +source=("git+https://code.videolan.org/videolan/x264.git#commit=${_commit}" + 'soname.patch') +md5sums=('SKIP' + 'SKIP') + +pkgver() { + cd "${srcdir}"/x264 + local _ver=$(grep '#define X264_BUILD' x264.h | cut -d' ' -f3) + local _rev=$(git rev-parse --short HEAD) + echo ${_ver}.r${_rev} +} + +prepare() { + cd "${srcdir}"/x264 + patch -Np1 -i ../soname.patch +} + +build() { + cd "${srcdir}"/x264 + source android-env ${_android_arch} + unset LDFLAGS CPPFLAGS + + configue_opts=" + --disable-cli" + + # Platform specific patches + case "$_android_arch" in + x86) + configue_opts+=" + --enable-pic + --disable-asm + --host=i686-linux" + ;; + *) + ;; + esac + + android-${_android_arch}-configure ${configue_opts} + make $MAKEFLAGS +} + +package() { + cd "${srcdir}"/x264 + source android-env ${_android_arch} + + make DESTDIR="$pkgdir" install + ${ANDROID_STRIP} -g --strip-unneeded "${pkgdir}"/${ANDROID_PREFIX_LIB}/*.so + ${ANDROID_STRIP} -g "$pkgdir"/${ANDROID_PREFIX_LIB}/*.a +} diff --git a/soname.patch b/soname.patch new file mode 100644 index 000000000000..ee2139d7a785 --- /dev/null +++ b/soname.patch @@ -0,0 +1,24 @@ +--- a/configure 2019-07-22 12:39:27.767668982 -0300 ++++ b/configure 2019-07-22 12:51:12.107203568 -0300 +@@ -1512,8 +1512,8 @@ + echo "SOFLAGS=-shared -Wl,-h,\$(SONAME) $SOFLAGS" >> config.mak + else + echo "SOSUFFIX=so" >> config.mak +- echo "SONAME=libx264.so.$API" >> config.mak +- echo "SOFLAGS=-shared -Wl,-soname,\$(SONAME) $SOFLAGS" >> config.mak ++ echo "SONAME=libx264.so" >> config.mak ++ echo "SOFLAGS=-shared $SOFLAGS" >> config.mak + fi + echo 'default: lib-shared' >> config.mak + echo 'install: install-lib-shared' >> config.mak + +--- a/Makefile 2019-07-22 12:39:27.737668862 -0300 ++++ b/Makefile 2019-07-22 12:55:12.284852758 -0300 +@@ -398,7 +398,6 @@ + $(INSTALL) -m 755 $(SONAME) $(DESTDIR)$(bindir) + $(INSTALL) -m 644 $(IMPLIBNAME) $(DESTDIR)$(libdir) + else ifneq ($(SONAME),) +- ln -f -s $(SONAME) $(DESTDIR)$(libdir)/libx264.$(SOSUFFIX) + $(INSTALL) -m 755 $(SONAME) $(DESTDIR)$(libdir) + endif + |