From ea870ce7162ca91befe31d7f61e3ce3340894876 Mon Sep 17 00:00:00 2001 From: Hitesh Sondhi Date: Fri, 5 Sep 2014 04:05:39 -0400 Subject: [PATCH 1/5] Removed libpng submodule and using official libpng url to build it --- .gitignore | 2 +- .gitmodules | 3 --- download_from_repo.sh | 11 +++++++++++ libpng | 1 - libpng_build.sh | Bin 455 -> 683 bytes settings.sh | 4 ++++ 6 files changed, 16 insertions(+), 5 deletions(-) create mode 100755 download_from_repo.sh delete mode 160000 libpng diff --git a/.gitignore b/.gitignore index 2c226c9..e97caf6 100755 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ *.o build toolchain-* +libpng-* # Created by http://www.gitignore.io @@ -33,4 +34,3 @@ Temporary Items # KDE directory preferences .directory - diff --git a/.gitmodules b/.gitmodules index 27493c0..52fa41a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -16,9 +16,6 @@ [submodule "expat"] path = expat url = https://github.com/hiteshsondhi88/expat.git -[submodule "libpng"] - path = libpng - url = https://github.com/hiteshsondhi88/libpng.git [submodule "fribidi"] path = fribidi url = https://github.com/hiteshsondhi88/fribidi.git diff --git a/download_from_repo.sh b/download_from_repo.sh new file mode 100755 index 0000000..6f0cdf6 --- /dev/null +++ b/download_from_repo.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +url="$1" +tarcommand="$2" +dirname="$3" +delete_regex="$4" + +if [ ! -d "$dirname" ]; then + rm -rf $delete_regex + wget -O- "$url" | tar "$tarcommand" +fi diff --git a/libpng b/libpng deleted file mode 160000 index 259fb77..0000000 --- a/libpng +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 259fb7761d747655c607efcec7a12ff1f3c24561 diff --git a/libpng_build.sh b/libpng_build.sh index 3bccafb27345953d1108a08c98de02ca56dfb19a..60bea2c7c04e4860d509b3966241f8f4635ffe1a 100755 GIT binary patch delta 270 zcmYk0O$x#=5QQtn&74Al8wC@J(1p;g3olV(Gg>u&Bqq3EXZBbHCUE#m<7@Gk08spZqe>#z02TMQ<#~`M2|NH{saS*n delta 24 fcmZ3@dYpNJCQm_WaYl+lPG(X;UixM+#z~9-Z0iVJ diff --git a/settings.sh b/settings.sh index 9a722e9..b218123 100755 --- a/settings.sh +++ b/settings.sh @@ -2,6 +2,10 @@ SUPPORTED_ARCHITECTURES=(armeabi-v7a armeabi-v7a-neon) ANDROID_NDK_ROOT_PATH=${ANDROID_NDK} +if [[ -z "$ANDROID_NDK_ROOT_PATH" ]]; then + echo "You need to set ANDROID_NDK environment variable, please check instructions" + exit +fi ANDROID_API_VERSION=9 NDK_TOOLCHAIN_ABI_VERSION=4.8 From 172fe2a299bcdc50a9cfeb844ad32598df513a87 Mon Sep 17 00:00:00 2001 From: Hitesh Sondhi Date: Fri, 5 Sep 2014 04:09:03 -0400 Subject: [PATCH 2/5] Removed submodule expat --- .gitmodules | 3 --- expat | 1 - 2 files changed, 4 deletions(-) delete mode 160000 expat diff --git a/.gitmodules b/.gitmodules index 52fa41a..ba1c49d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -13,9 +13,6 @@ [submodule "fontconfig"] path = fontconfig url = git://anongit.freedesktop.org/fontconfig -[submodule "expat"] - path = expat - url = https://github.com/hiteshsondhi88/expat.git [submodule "fribidi"] path = fribidi url = https://github.com/hiteshsondhi88/fribidi.git diff --git a/expat b/expat deleted file mode 160000 index 37f4ea1..0000000 --- a/expat +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 37f4ea195144c1f9b13a88cb8045465e12d47fe6 From a75b0743fd54cc37c033e426ba99fd4c16cdd341 Mon Sep 17 00:00:00 2001 From: Hitesh Sondhi Date: Fri, 5 Sep 2014 04:11:14 -0400 Subject: [PATCH 3/5] Removed submodule fribidi --- .gitmodules | 3 --- fribidi | 1 - 2 files changed, 4 deletions(-) delete mode 160000 fribidi diff --git a/.gitmodules b/.gitmodules index ba1c49d..888fcaf 100644 --- a/.gitmodules +++ b/.gitmodules @@ -13,9 +13,6 @@ [submodule "fontconfig"] path = fontconfig url = git://anongit.freedesktop.org/fontconfig -[submodule "fribidi"] - path = fribidi - url = https://github.com/hiteshsondhi88/fribidi.git [submodule "SampleFFmpegApp"] path = SampleFFmpegApp url = https://github.com/hiteshsondhi88/SampleFFmpegApp.git diff --git a/fribidi b/fribidi deleted file mode 160000 index b2d0da7..0000000 --- a/fribidi +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b2d0da7fde67b731ff64b372e5c9e33db5fa4642 From ac14fcc77b63c14cf642182e4f8c34babb0af473 Mon Sep 17 00:00:00 2001 From: Hitesh Sondhi Date: Fri, 5 Sep 2014 04:11:53 -0400 Subject: [PATCH 4/5] updated .gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index e97caf6..c4c08d5 100755 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,8 @@ build toolchain-* libpng-* +expat-* +fribidi-* # Created by http://www.gitignore.io From 6717abc21065cee6149848836f39b26a76c2d5a3 Mon Sep 17 00:00:00 2001 From: Hitesh Sondhi Date: Fri, 5 Sep 2014 04:50:27 -0400 Subject: [PATCH 5/5] Added script to init/update repo --- README.md | 3 ++- download_from_repo.sh | 11 ----------- expat_build.sh | 2 +- fribidi_build.sh | 2 +- init_update_libs.sh | 15 +++++++++++++++ libpng_build.sh | Bin 683 -> 465 bytes 6 files changed, 19 insertions(+), 14 deletions(-) delete mode 100755 download_from_repo.sh create mode 100755 init_update_libs.sh diff --git a/README.md b/README.md index 8e27087..72a5736 100755 --- a/README.md +++ b/README.md @@ -14,8 +14,9 @@ Instructions 1. export ANDROID_NDK={Android NDK Base Path} * Run following commands to compile ffmpeg 1. sudo apt-get --quiet --yes install build-essential git autoconf libtool pkg-config gperf gettext - 2. git submodule update --init + 2. ./init_update_libs.sh 3. ./android_build.sh +* To update submodules and libraries you can use ./init_update_libs.sh command * Find the executable binary in build directory. * If you want to use FONTCONFIG then you need to specify your custom fontconfig config file (e.g - "FONTCONFIG_FILE=/sdcard/fonts.conf ./ffmpeg --version", where /sdcard/fonts.conf is location of your FONTCONFIG configuration file). * You can also download [prebuilt-binaries](https://github.com/hiteshsondhi88/ffmpeg-android/releases/download/v0.1.0/prebuilt-binaries.tar.gz) here. diff --git a/download_from_repo.sh b/download_from_repo.sh deleted file mode 100755 index 6f0cdf6..0000000 --- a/download_from_repo.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -url="$1" -tarcommand="$2" -dirname="$3" -delete_regex="$4" - -if [ ! -d "$dirname" ]; then - rm -rf $delete_regex - wget -O- "$url" | tar "$tarcommand" -fi diff --git a/expat_build.sh b/expat_build.sh index 5272580..611c945 100755 --- a/expat_build.sh +++ b/expat_build.sh @@ -2,7 +2,7 @@ . abi_settings.sh $1 $2 $3 -pushd expat +pushd expat-2.1.0 make clean diff --git a/fribidi_build.sh b/fribidi_build.sh index 5e895b6..49610bc 100755 --- a/fribidi_build.sh +++ b/fribidi_build.sh @@ -2,7 +2,7 @@ . abi_settings.sh $1 $2 $3 -pushd fribidi +pushd fribidi-0.19.6 make clean diff --git a/init_update_libs.sh b/init_update_libs.sh new file mode 100755 index 0000000..4195aa5 --- /dev/null +++ b/init_update_libs.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +echo "============================================" +echo "Updating submodules" +git submodule update --init +echo "============================================" +echo "Updating libpng, expat and fribidi" +rm -rf libpng-* +rm -rf expat-* +rm -rf fribidi-* + +wget -O- https://downloads.sf.net/project/libpng/libpng16/1.6.13/libpng-1.6.13.tar.xz | tar xJ +wget -O- http://downloads.sourceforge.net/project/expat/expat/2.1.0/expat-2.1.0.tar.gz | tar xz +wget -O- http://fribidi.org/download/fribidi-0.19.6.tar.bz2 | tar xj +echo "============================================" diff --git a/libpng_build.sh b/libpng_build.sh index 60bea2c7c04e4860d509b3966241f8f4635ffe1a..bece48dd8aca975a771b5ee6e437c4b5e3284ce1 100755 GIT binary patch delta 31 mcmZ3@dXag8rf@-NaYl+lPG(X;Ub?QKo|&GZ@n$i`sf+-tqzT0U delta 266 zcmYk0O$x#=5QPzOlT(!7M!|$4xDa{)!84TDOn)?gBq6)1MFx;*UCsXz2uXH=q!7RqLIrb={dMvJ3MW{L