summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGonzalo Exequiel Pedone2019-07-22 20:46:11 -0300
committerGonzalo Exequiel Pedone2019-07-22 20:46:11 -0300
commitb9f81922bbff79e4acc1dca9f86e905b4d103f64 (patch)
treed997e541fe38a0fcd5f5a892356f101b25b70a4f
downloadaur-b9f81922bbff79e4acc1dca9f86e905b4d103f64.tar.gz
New package.
-rw-r--r--.SRCINFO24
-rw-r--r--.gitignore5
-rw-r--r--PKGBUILD68
-rw-r--r--soname.patch24
4 files changed, 121 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..8ff2533f9dde
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,24 @@
+pkgbase = android-armv7a-eabi-x264
+ 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 = git
+ makedepends = nasm
+ depends = android-ndk
+ depends = android-armv7a-eabi-ffmpeg
+ depends = android-armv7a-eabi-l-smash
+ 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-armv7a-eabi-x264
+
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..744380fa0382
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,68 @@
+# Maintainer: Gonzalo Exequiel Pedone <hipersayan DOT x AT gmail DOT com>
+# Contributor: Karl-Felix Glatzer <karl.glatzer@gmx.de>
+
+_android_arch=armv7a-eabi
+
+pkgname=android-${_android_arch}-x264
+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'
+ "android-${_android_arch}-ffmpeg"
+ "android-${_android_arch}-l-smash")
+options=(!strip !buildflags staticlibs !emptydirs)
+makedepends=('android-configure' 'git' 'nasm')
+_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
+ --enable-pic
+ --enable-lto"
+
+ # Platform specific patches
+ case "$_android_arch" in
+ x86)
+ configue_opts+="
+ --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
+