Skip to content

Commit 5dc5689

Browse files
committed
- opus 1.3.1
- libzip 1.5.2 - ndk r19c
1 parent f96b5e5 commit 5dc5689

7 files changed

Lines changed: 37 additions & 35 deletions

File tree

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
*.tar.gz
2+
*.a
3+
*.h
4+
*.h.in
5+
*.pc

.travis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
language: cpp
1+
language: cpp
22
dist: xenial
33
sudo: required
44
addons:
@@ -7,9 +7,9 @@ addons:
77
- cmake
88
- build-essential
99
before_install:
10-
- wget https://dl.google.com/android/repository/android-ndk-r19-linux-x86_64.zip
11-
- unzip -qq android-ndk-r19-linux-x86_64.zip -d $HOME
12-
- export ANDROID_NDK=$HOME/android-ndk-r19
10+
- wget https://dl.google.com/android/repository/android-ndk-r19c-linux-x86_64.zip
11+
- unzip -qq android-ndk-r19c-linux-x86_64.zip -d $HOME
12+
- export ANDROID_NDK=$HOME/android-ndk-r19c
1313
- "$ANDROID_NDK/ndk-build --version"
1414
script:
1515
- bash build.sh

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# android-lib
1+
# android-lib
22
[![Build Status](https://travis-ci.org/damaex/android-lib.svg?branch=master)](https://travis-ci.org/damaex/android-lib)
33

44
prebuild some libs for android (unix based)
55

66
## libraries
7-
- openssl 1.1.1a
8-
- opus-1.3
9-
- libzip (ff55682b2cb85f3bd53813cddc7c6afb94c7572c)
7+
- openssl 1.1.1b
8+
- opus 1.3.1
9+
- libzip 1.5.2
1010

1111
## requirements
1212
- Android NDK (https://developer.android.com/ndk/downloads/)
@@ -15,6 +15,6 @@ prebuild some libs for android (unix based)
1515

1616
## build
1717
```bash
18-
export ANDROID_NDK="/home/user/android-ndk-r19" #path to android ndk
18+
export ANDROID_NDK="/home/user/android-ndk-r19c" #path to android ndk
1919
./build.sh
2020
```

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#! /usr/bin/env bash
1+
#! /usr/bin/env bash
22
mkdir -p "build"
33

44
cd openssl

openssl/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#! /usr/bin/env bash
1+
#! /usr/bin/env bash
22

33
ANDROID_API=16
44
ANDROID_API_64=21

opus/build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
#! /usr/bin/env bash
1+
#! /usr/bin/env bash
22

33
ANDROID_API=16
44
ANDROID_API_64=21
5-
OPUS_FULL_VERSION="opus-1.3"
5+
OPUS_FULL_VERSION="opus-1.3.1"
66

77
#create output dir
88
OUTPUT_DIR="build"

zip/build.sh

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,18 @@
1-
#! /usr/bin/env bash
1+
#! /usr/bin/env bash
22

3-
#ZIP_FULL_VERSION="libzip-1.5.1"
4-
ZIP_FULL_VERSION="libzip"
3+
ANDROID_API=16
4+
ANDROID_API_64=21
5+
ZIP_FULL_VERSION="libzip-1.5.2"
56

67
#create output dir
78
OUTPUT_DIR="$(pwd)/build"
89
rm -rf ${OUTPUT_DIR}
910
mkdir -p ${OUTPUT_DIR}
1011

11-
#configure options
12-
#ZIP_CONFIGURE_OPTIONS=""
13-
1412
#Download
15-
#if [ ! -f "${ZIP_FULL_VERSION}.tar.gz" ]; then
16-
# wget https://libzip.org/download/${ZIP_FULL_VERSION}.tar.gz
17-
#fi
18-
19-
#clone git repository
20-
git clone https://github.com/nih-at/libzip.git
21-
22-
cd libzip
23-
git reset --hard ff55682b2cb85f3bd53813cddc7c6afb94c7572c
24-
cd ..
13+
if [ ! -f "${ZIP_FULL_VERSION}.tar.gz" ]; then
14+
wget https://libzip.org/download/${ZIP_FULL_VERSION}.tar.gz
15+
fi
2516

2617
#check Android NDK
2718
if [ ! ${ANDROID_NDK} ]; then
@@ -30,28 +21,34 @@ if [ ! ${ANDROID_NDK} ]; then
3021
fi
3122

3223
#extract
33-
#tar -xvzf ${ZIP_FULL_VERSION}.tar.gz
34-
#unzip ${ZIP_FULL_VERSION}.zip
24+
tar -xvzf ${ZIP_FULL_VERSION}.tar.gz
3525

3626
#move to zip folder
3727
cd ${ZIP_FULL_VERSION};
3828

3929
for ANDROID_TARGET_PLATFORM in armeabi-v7a arm64-v8a x86 x86_64
4030
do
41-
echo "Building libzip.a for ${ANDROID_TARGET_PLATFORM}"
42-
4331
mkdir -p "build-${ANDROID_TARGET_PLATFORM}"
4432
cd "build-${ANDROID_TARGET_PLATFORM}"
4533

34+
if [ "$ANDROID_TARGET_PLATFORM" == "armeabi-v7a" ] || [ "$ANDROID_TARGET_PLATFORM" == "x86" ] ; then
35+
ANDROID_API_VERSION=${ANDROID_API}
36+
else
37+
ANDROID_API_VERSION=${ANDROID_API_64}
38+
fi
39+
40+
echo "Building libzip.a for ${ANDROID_TARGET_PLATFORM}"
41+
echo "using API-Level ${ANDROID_API_VERSION}"
42+
4643
#run configuration for target platform
4744
cmake -DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK}/build/cmake/android.toolchain.cmake \
4845
-DCMAKE_INSTALL_PREFIX:PATH=${OUTPUT_DIR}/${ANDROID_TARGET_PLATFORM} \
4946
-DANDROID_ABI=${ANDROID_TARGET_PLATFORM} \
47+
-DANDROID_PLATFORM=${ANDROID_API_VERSION} \
5048
-DENABLE_OPENSSL:BOOL=OFF \
5149
-DENABLE_COMMONCRYPTO:BOOL=OFF \
5250
-DENABLE_GNUTLS:BOOL=OFF \
5351
-DENABLE_MBEDTLS:BOOL=OFF \
54-
-DENABLE_OPENSSL:BOOL=OFF \
5552
-DENABLE_WINDOWS_CRYPTO:BOOL=OFF \
5653
-DBUILD_TOOLS:BOOL=OFF \
5754
-DBUILD_REGRESS:BOOL=OFF \
@@ -88,4 +85,4 @@ cd ..
8885
rm -rf ${ZIP_FULL_VERSION}
8986

9087
#remove archive
91-
#rm ${ZIP_FULL_VERSION}.tar.gz
88+
rm ${ZIP_FULL_VERSION}.tar.gz

0 commit comments

Comments
 (0)