Commit 6718413b authored by Luca Barbato's avatar Luca Barbato

build: Allow to override the VLC source path

parent a568853f
...@@ -51,6 +51,7 @@ OPTIONS ...@@ -51,6 +51,7 @@ OPTIONS
-y Build universal static libraries -y Build universal static libraries
-b Enable bitcode -b Enable bitcode
-a Build framework for specific arch (all|i386|x86_64|armv7|armv7s|aarch64) -a Build framework for specific arch (all|i386|x86_64|armv7|armv7s|aarch64)
-e External VLC source path
EOF EOF
} }
...@@ -946,7 +947,7 @@ build_universal_static_lib() { ...@@ -946,7 +947,7 @@ build_universal_static_lib() {
spopd # vlc spopd # vlc
} }
while getopts "hvwsfbdxntlk:a:" OPTION while getopts "hvwsfbdxntlk:a:e:" OPTION
do do
case $OPTION in case $OPTION in
h) h)
...@@ -1011,6 +1012,9 @@ do ...@@ -1011,6 +1012,9 @@ do
BUILD_DYNAMIC_FRAMEWORK=yes BUILD_DYNAMIC_FRAMEWORK=yes
BUILD_STATIC_FRAMEWORK=no BUILD_STATIC_FRAMEWORK=no
;; ;;
e)
VLCROOT=$OPTARG
;;
?) ?)
usage usage
exit 1 exit 1
...@@ -1034,41 +1038,42 @@ spushd . ...@@ -1034,41 +1038,42 @@ spushd .
ROOT_DIR=`pwd` ROOT_DIR=`pwd`
spopd spopd
VLCROOT=${ROOT_DIR}/libvlc/vlc if [ "$VLCROOT" = "" ]; then
export PATH="${VLCROOT}/extras/tools/build/bin:${VLCROOT}/contrib/${TARGET}/bin:${VLC_PATH}:/usr/bin:/bin:/usr/sbin:/sbin" VLCROOT=${ROOT_DIR}/libvlc/vlc
info "Preparing build dirs"
info "Preparing build dirs"
mkdir -p libvlc
mkdir -p libvlc spushd libvlc
spushd libvlc if [ "$NONETWORK" != "yes" ]; then
if ! [ -e vlc ]; then
echo `pwd` git clone https://git.videolan.org/git/vlc/vlc-3.0.git vlc
info "Applying patches to vlc.git"
if [ "$NONETWORK" != "yes" ]; then cd vlc
if ! [ -e vlc ]; then git checkout -B localBranch ${TESTEDHASH}
git clone https://git.videolan.org/git/vlc/vlc-3.0.git vlc git branch --set-upstream-to=origin/master localBranch
info "Applying patches to vlc.git" git am ${ROOT_DIR}/Resources/MobileVLCKit/patches/*.patch
cd vlc if [ $? -ne 0 ]; then
git checkout -B localBranch ${TESTEDHASH} git am --abort
git branch --set-upstream-to=origin/master localBranch info "Applying the patches failed, aborting git-am"
git am ${ROOT_DIR}/Resources/MobileVLCKit/patches/*.patch exit 1
if [ $? -ne 0 ]; then fi
git am --abort cd ..
info "Applying the patches failed, aborting git-am" else
exit 1 cd vlc
git reset --hard ${TESTEDHASH}
git pull --rebase
git am ${ROOT_DIR}/Resources/MobileVLCKit/patches/*.patch
cd ..
fi fi
cd ..
else
cd vlc
git reset --hard ${TESTEDHASH}
git pull --rebase
git am ${ROOT_DIR}/Resources/MobileVLCKit/patches/*.patch
cd ..
fi fi
spopd
fi fi
spopd export PATH="${VLCROOT}/extras/tools/build/bin:${VLCROOT}/contrib/${TARGET}/bin:${VLC_PATH}:/usr/bin:/bin:/usr/sbin:/sbin"
echo `pwd`
# #
# Build time # Build time
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment