summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGonzalo Exequiel Pedone2019-04-15 16:56:20 -0300
committerGonzalo Exequiel Pedone2019-04-15 16:56:20 -0300
commitd6a8abc35c866a8ecb1ed45607596555fc5f8cef (patch)
treead6f538c5bbdbe9f0371b70c1eddc04ced5af7b2
parent5a3764fdab3c111c0c5bdb983e33bc9e95378009 (diff)
downloadaur-d6a8abc35c866a8ecb1ed45607596555fc5f8cef.tar.gz
Package updated.
-rw-r--r--.SRCINFO11
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD25
-rwxr-xr-xandroid-env.sh42
4 files changed, 56 insertions, 26 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 30dfe4da48b..967992f3bfe 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,19 +1,14 @@
# Generated by mksrcinfo v8
-# jue abr 4 19:39:40 UTC 2019
+# lun abr 15 19:55:17 UTC 2019
pkgbase = android-armv7a-eabi-libogg
pkgdesc = Ogg bitstream and framing library (android)
pkgver = 1.3.3
- pkgrel = 1
+ pkgrel = 2
url = http://xiph.org
arch = any
license = BSD
makedepends = android-pkg-config
- depends = apache-ant
- depends = android-ndk>=r18.b
- depends = android-platform-22
- depends = android-sdk-25.2.5
- depends = android-sdk-build-tools
- depends = android-sdk-platform-tools
+ depends = android-ndk
options = !strip
options = !buildflags
options = staticlibs
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..b5bc2aa573e
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+pkg
+src
+*.tar.xz
+*.tar.gz
diff --git a/PKGBUILD b/PKGBUILD
index 2eaa6644a93..a4af9fe8702 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,4 +1,4 @@
-# PKGBUILD for android-ffmpeg
+# PKGBUILD for android-libogg
# Maintainer: Gonzalo Exequiel Pedone <hipersayan DOT x AT gmail DOT com>
_android_arch=armv7a-eabi
@@ -6,22 +6,25 @@ source android-env.sh ${_android_arch}
pkgname=android-${_android_arch}-libogg
pkgver=1.3.3
-pkgrel=1
+pkgrel=2
pkgdesc="Ogg bitstream and framing library (android)"
-arch=(any)
+arch=('any')
url="http://xiph.org"
license=('BSD')
-depends=('apache-ant'
- 'android-ndk>=r18.b'
- "android-platform-$ANDROID_MINIMUM_PLATFORM"
- 'android-sdk-25.2.5'
- 'android-sdk-build-tools'
- 'android-sdk-platform-tools')
+
+if [ -z "${ANDROID_NO_DEPS}" ]; then
+ depends=('android-ndk')
+fi
+
options=(!strip !buildflags staticlibs !emptydirs)
makedepends=('android-pkg-config')
source=(http://downloads.xiph.org/releases/ogg/libogg-${pkgver}.tar.gz)
sha256sums=('c2e8a485110b97550f453226ec644ebac6cb29d1caef2902c007edab4308d985')
+prepare() {
+ check_ndk_version_ge_than 18.0
+}
+
build() {
cd "${srcdir}"/libogg-${pkgver}
@@ -47,6 +50,6 @@ package() {
make DESTDIR="$pkgdir" install
rm -r "${pkgdir}"/${ANDROID_LIBS}/share/doc
- ${ANDROID_STRIP} "${pkgdir}"/${ANDROID_LIBS}/lib/*.so
- ${ANDROID_STRIP} "$pkgdir"/${ANDROID_LIBS}/lib/*.a
+ ${ANDROID_STRIP} -g --strip-unneeded "${pkgdir}"/${ANDROID_LIBS}/lib/*.so
+ ${ANDROID_STRIP} -g "$pkgdir"/${ANDROID_LIBS}/lib/*.a
}
diff --git a/android-env.sh b/android-env.sh
index d9f6b78ecbb..3549d530bb1 100755
--- a/android-env.sh
+++ b/android-env.sh
@@ -6,6 +6,10 @@
_android_arch=$1
+if [ -z "${_android_arch}" ]; then
+ _android_arch=armv7a-eabi
+fi
+
# Minimum Android platform based on:
#
# https://developer.android.com/about/dashboards/
@@ -13,12 +17,12 @@ if [ -z "${ANDROID_MINIMUM_PLATFORM}" ]; then
export ANDROID_MINIMUM_PLATFORM=22
fi
-if [ -z "${ANDROID_NDK_ROOT}" ]; then
- export ANDROID_NDK_ROOT=/opt/android-ndk
+if [ -z "${ANDROID_HOME}" ]; then
+ export ANDROID_HOME=/opt/android-sdk
fi
-if [ -z "${ANDROID_SDK_ROOT}" ]; then
- export ANDROID_SDK_ROOT=/opt/android-sdk
+if [ -z "${ANDROID_NDK_HOME}" ]; then
+ export ANDROID_NDK_HOME=/opt/android-ndk
fi
get_last() {
@@ -26,7 +30,7 @@ get_last() {
}
if [ -z "${ANDROID_BUILD_TOOLS_REVISION}" ]; then
- export ANDROID_BUILD_TOOLS_REVISION=$(get_last ${ANDROID_SDK_ROOT}/build-tools)
+ export ANDROID_BUILD_TOOLS_REVISION=$(get_last ${ANDROID_HOME}/build-tools)
fi
if [ -z "${ANDROID_API_VERSION}" ]; then
@@ -37,8 +41,8 @@ if [ -z "${ANDROID_NDK_PLATFORM}" ]; then
export ANDROID_NDK_PLATFORM=android-$ANDROID_MINIMUM_PLATFORM
fi
-export ANDROID_PLATFORM=${ANDROID_NDK_ROOT}/platforms/$ANDROID_NDK_PLATFORM
-export ANDROID_TOOLCHAIN=${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/linux-x86_64
+export ANDROID_PLATFORM=${ANDROID_NDK_HOME}/platforms/$ANDROID_NDK_PLATFORM
+export ANDROID_TOOLCHAIN=${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64
export ANDROID_SYSROOT=${ANDROID_TOOLCHAIN}/sysroot
export ANDROID_CROSS_PREFIX=$ANDROID_TOOLCHAIN/bin/
export ANDROID_PKGCONFIG=android-${_android_arch}-pkg-config
@@ -65,9 +69,33 @@ esac
export ANDROID_CC=${ANDROID_TOOLS_COMPILER_PREFIX}clang
export ANDROID_CXX=${ANDROID_TOOLS_COMPILER_PREFIX}clang++
export ANDROID_AR=${ANDROID_TOOLS_PREFIX}ar
+export ANDROID_AS=${ANDROID_TOOLS_PREFIX}as
export ANDROID_NM=${ANDROID_TOOLS_PREFIX}nm
export ANDROID_RANLIB=${ANDROID_TOOLS_PREFIX}ranlib
export ANDROID_STRIP=${ANDROID_TOOLS_PREFIX}strip
export ANDROID_LIBS=/opt/android-libs/${_android_arch}
export PKG_CONFIG_SYSROOT_DIR=${ANDROID_LIBS}
export PKG_CONFIG_LIBDIR=${PKG_CONFIG_SYSROOT_DIR}/lib/pkgconfig:${PKG_CONFIG_SYSROOT_DIR}/share/pkgconfig
+
+ndk_version() {
+ grep 'Pkg.Revision' ${ANDROID_NDK_HOME}/source.properties | awk '{print $3}'
+}
+
+check_ndk_version_ge_than() {
+ version=$1
+ ndk_ver=$(ndk_version)
+
+ if [ "${version}" = "${ndk_ver}" ]; then
+ return 0
+ fi
+
+ older_ver=$(printf "${version}\n${ndk_ver}" | sort -V | head -n 1)
+
+ if [ "${older_ver}" = "${ndk_ver}" ]; then
+ echo "ERROR: NDK version >= $version required."
+
+ return 1
+ fi
+
+ return 0
+}