Commit c0aa3b28 authored by Thomas Guillem's avatar Thomas Guillem

MVK: re-indent

parent 6c34d8c9
...@@ -183,26 +183,26 @@ spushd libvlc ...@@ -183,26 +183,26 @@ spushd libvlc
echo `pwd` echo `pwd`
if [ "$NONETWORK" != "yes" ]; then if [ "$NONETWORK" != "yes" ]; then
if ! [ -e vlc ]; then if ! [ -e vlc ]; then
git clone git://git.videolan.org/vlc.git vlc git clone git://git.videolan.org/vlc.git vlc
info "Applying patches to vlc.git" info "Applying patches to vlc.git"
cd vlc cd vlc
git checkout -B localBranch ${TESTEDHASH} git checkout -B localBranch ${TESTEDHASH}
git branch --set-upstream-to=origin/master localBranch git branch --set-upstream-to=origin/master localBranch
git am ${ROOT_DIR}/Resources/MobileVLCKit/patches/*.patch git am ${ROOT_DIR}/Resources/MobileVLCKit/patches/*.patch
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
git am --abort git am --abort
info "Applying the patches failed, aborting git-am" info "Applying the patches failed, aborting git-am"
exit 1 exit 1
fi fi
cd .. cd ..
else else
cd vlc cd vlc
git pull --rebase git pull --rebase
git reset --hard ${TESTEDHASH} git reset --hard ${TESTEDHASH}
git am ${ROOT_DIR}/Resources/MobileVLCKit/patches/*.patch git am ${ROOT_DIR}/Resources/MobileVLCKit/patches/*.patch
cd .. cd ..
fi fi
fi fi
spopd spopd
...@@ -733,141 +733,141 @@ get_symbol() ...@@ -733,141 +733,141 @@ get_symbol()
} }
build_universal_static_lib() { build_universal_static_lib() {
PROJECT_DIR=`pwd` PROJECT_DIR=`pwd`
OSSTYLE="$1" OSSTYLE="$1"
info "building universal static libs for OS style $OSSTYLE" info "building universal static libs for OS style $OSSTYLE"
# remove old module list # remove old module list
rm -f $PROJECT_DIR/Resources/MobileVLCKit/vlc-plugins-$OSSTYLE.h rm -f $PROJECT_DIR/Resources/MobileVLCKit/vlc-plugins-$OSSTYLE.h
rm -f $PROJECT_DIR/Resources/MobileVLCKit/vlc-plugins-$OSSTYLE.xcconfig rm -f $PROJECT_DIR/Resources/MobileVLCKit/vlc-plugins-$OSSTYLE.xcconfig
touch $PROJECT_DIR/Resources/MobileVLCKit/vlc-plugins-$OSSTYLE.h touch $PROJECT_DIR/Resources/MobileVLCKit/vlc-plugins-$OSSTYLE.h
touch $PROJECT_DIR/Resources/MobileVLCKit/vlc-plugins-$OSSTYLE.xcconfig touch $PROJECT_DIR/Resources/MobileVLCKit/vlc-plugins-$OSSTYLE.xcconfig
spushd libvlc/vlc spushd libvlc/vlc
rm -rf install-$OSSTYLE rm -rf install-$OSSTYLE
mkdir install-$OSSTYLE mkdir install-$OSSTYLE
mkdir install-$OSSTYLE/core mkdir install-$OSSTYLE/core
mkdir install-$OSSTYLE/contrib mkdir install-$OSSTYLE/contrib
mkdir install-$OSSTYLE/plugins mkdir install-$OSSTYLE/plugins
spopd # vlc spopd # vlc
spushd libvlc/vlc/install-"$OSSTYLE"OS spushd libvlc/vlc/install-"$OSSTYLE"OS
for i in `ls .` for i in `ls .`
do do
DEVICEARCHS="$DEVICEARCHS $i" DEVICEARCHS="$DEVICEARCHS $i"
done done
spopd # vlc-install-"$OSSTYLE"OS spopd # vlc-install-"$OSSTYLE"OS
spushd libvlc/vlc/install-"$OSSTYLE"Simulator spushd libvlc/vlc/install-"$OSSTYLE"Simulator
for i in `ls .` for i in `ls .`
do do
SIMULATORARCHS="$SIMULATORARCHS $i" SIMULATORARCHS="$SIMULATORARCHS $i"
done done
spopd # vlc-install-"$OSSTYLE"Simulator spopd # vlc-install-"$OSSTYLE"Simulator
# arm64 got the lowest number of modules # arm64 got the lowest number of modules
VLCMODULES="" VLCMODULES=""
spushd libvlc/vlc/install-"$OSSTYLE"OS/arm64/lib/vlc/plugins spushd libvlc/vlc/install-"$OSSTYLE"OS/arm64/lib/vlc/plugins
for i in `ls *.a` for i in `ls *.a`
do do
VLCMODULES="$i $VLCMODULES" VLCMODULES="$i $VLCMODULES"
done done
spopd # vlc/install-"$OSSTYLE"OS/arm64/lib/vlc/plugins spopd # vlc/install-"$OSSTYLE"OS/arm64/lib/vlc/plugins
if [ "$OSSTYLE" != "AppleTV" ]; then if [ "$OSSTYLE" != "AppleTV" ]; then
# collect ARMv7/s specific neon modules # collect ARMv7/s specific neon modules
VLCNEONMODULES="" VLCNEONMODULES=""
spushd libvlc/vlc/install-"$OSSTYLE"OS/armv7/lib/vlc/plugins spushd libvlc/vlc/install-"$OSSTYLE"OS/armv7/lib/vlc/plugins
for i in `ls *.a | grep neon` for i in `ls *.a | grep neon`
do do
VLCNEONMODULES="$i $VLCNEONMODULES" VLCNEONMODULES="$i $VLCNEONMODULES"
done done
spopd # vlc/install-"$OSSTYLE"OS/armv7/lib/vlc/plugins spopd # vlc/install-"$OSSTYLE"OS/armv7/lib/vlc/plugins
fi fi
spushd libvlc/vlc spushd libvlc/vlc
# lipo all the vlc libraries and its plugins # lipo all the vlc libraries and its plugins
doVLCLipo "" "libvlc.a" "no" $OSSTYLE doVLCLipo "" "libvlc.a" "no" $OSSTYLE
doVLCLipo "" "libvlccore.a" "no" $OSSTYLE doVLCLipo "" "libvlccore.a" "no" $OSSTYLE
doVLCLipo "vlc/" "libcompat.a" "no" $OSSTYLE doVLCLipo "vlc/" "libcompat.a" "no" $OSSTYLE
for i in $VLCMODULES for i in $VLCMODULES
do do
doVLCLipo "vlc/plugins/" $i "yes" $OSSTYLE doVLCLipo "vlc/plugins/" $i "yes" $OSSTYLE
done done
# lipo contrib libraries # lipo contrib libraries
CONTRIBLIBS="" CONTRIBLIBS=""
spushd contrib/$OSSTYLE-aarch64-apple-darwin14-aarch64/lib spushd contrib/$OSSTYLE-aarch64-apple-darwin14-aarch64/lib
for i in `ls *.a` for i in `ls *.a`
do do
CONTRIBLIBS="$i $CONTRIBLIBS" CONTRIBLIBS="$i $CONTRIBLIBS"
done done
spopd # contrib/$OSSTYLE-aarch64-apple-darwin14-aarch64/lib spopd # contrib/$OSSTYLE-aarch64-apple-darwin14-aarch64/lib
for i in $CONTRIBLIBS for i in $CONTRIBLIBS
do do
doContribLipo $i $OSSTYLE doContribLipo $i $OSSTYLE
done done
if [ "$OSSTYLE" != "AppleTV" ]; then if [ "$OSSTYLE" != "AppleTV" ]; then
# lipo the remaining NEON plugins # lipo the remaining NEON plugins
DEVICEARCHS="armv7 armv7s" DEVICEARCHS="armv7 armv7s"
SIMULATORARCHS="" SIMULATORARCHS=""
for i in $VLCNEONMODULES for i in $VLCNEONMODULES
do do
doVLCLipo "vlc/plugins/" $i "yes" $OSSTYLE doVLCLipo "vlc/plugins/" $i "yes" $OSSTYLE
done done
fi fi
# create module list # create module list
info "creating module list" info "creating module list"
echo "// This file is autogenerated by $(basename $0)\n\n" > $PROJECT_DIR/Resources/MobileVLCKit/vlc-plugins-$OSSTYLE.h echo "// This file is autogenerated by $(basename $0)\n\n" > $PROJECT_DIR/Resources/MobileVLCKit/vlc-plugins-$OSSTYLE.h
echo "// This file is autogenerated by $(basename $0)\n\n" > $PROJECT_DIR/Resources/MobileVLCKit/vlc-plugins-$OSSTYLE.xcconfig echo "// This file is autogenerated by $(basename $0)\n\n" > $PROJECT_DIR/Resources/MobileVLCKit/vlc-plugins-$OSSTYLE.xcconfig
# arm64 got the lowest number of modules # arm64 got the lowest number of modules
BUILTINS="const void *vlc_static_modules[] = {\n"; \ BUILTINS="const void *vlc_static_modules[] = {\n"; \
LDFLAGS="" LDFLAGS=""
DEFINITIONS="" DEFINITIONS=""
# add contrib libraries to LDFLAGS # add contrib libraries to LDFLAGS
for file in $CONTRIBLIBS for file in $CONTRIBLIBS
do do
LDFLAGS+="\$(PROJECT_DIR)/libvlc/vlc/install-"$OSSTYLE"/contrib/$file " LDFLAGS+="\$(PROJECT_DIR)/libvlc/vlc/install-"$OSSTYLE"/contrib/$file "
done done
for file in $VLCMODULES for file in $VLCMODULES
do do
symbols=$(nm -g -arch arm64 install-$OSSTYLE/plugins/$file) symbols=$(nm -g -arch arm64 install-$OSSTYLE/plugins/$file)
entryname=$(get_symbol "$symbols" _) entryname=$(get_symbol "$symbols" _)
DEFINITIONS+="int $entryname (int (*)(void *, void *, int, ...), void *);\n"; DEFINITIONS+="int $entryname (int (*)(void *, void *, int, ...), void *);\n";
BUILTINS+=" $entryname,\n" BUILTINS+=" $entryname,\n"
LDFLAGS+="\$(PROJECT_DIR)/libvlc/vlc/install-"$OSSTYLE"/plugins/$file " LDFLAGS+="\$(PROJECT_DIR)/libvlc/vlc/install-"$OSSTYLE"/plugins/$file "
info "...$entryname" info "...$entryname"
done; done;
if [ "$OSSTYLE" != "AppleTV" ]; then if [ "$OSSTYLE" != "AppleTV" ]; then
BUILTINS+="#ifdef __arm__\n" BUILTINS+="#ifdef __arm__\n"
DEFINITIONS+="#ifdef __arm__\n" DEFINITIONS+="#ifdef __arm__\n"
for file in $VLCNEONMODULES for file in $VLCNEONMODULES
do do
symbols=$(nm -g -arch armv7 install-$OSSTYLE/plugins/$file) symbols=$(nm -g -arch armv7 install-$OSSTYLE/plugins/$file)
entryname=$(get_symbol "$symbols" _) entryname=$(get_symbol "$symbols" _)
DEFINITIONS+="int $entryname (int (*)(void *, void *, int, ...), void *);\n"; DEFINITIONS+="int $entryname (int (*)(void *, void *, int, ...), void *);\n";
BUILTINS+=" $entryname,\n" BUILTINS+=" $entryname,\n"
LDFLAGS+="\$(PROJECT_DIR)/libvlc/vlc/install-"$OSSTYLE"/plugins/$file " LDFLAGS+="\$(PROJECT_DIR)/libvlc/vlc/install-"$OSSTYLE"/plugins/$file "
info "...$entryname" info "...$entryname"
done; done;
BUILTINS+="#endif\n" BUILTINS+="#endif\n"
DEFINITIONS+="#endif\n" DEFINITIONS+="#endif\n"
fi fi
BUILTINS="$BUILTINS NULL\n};\n" BUILTINS="$BUILTINS NULL\n};\n"
echo "$DEFINITIONS\n$BUILTINS" > $PROJECT_DIR/Resources/MobileVLCKit/vlc-plugins-$OSSTYLE.h echo "$DEFINITIONS\n$BUILTINS" > $PROJECT_DIR/Resources/MobileVLCKit/vlc-plugins-$OSSTYLE.h
echo "VLC_PLUGINS_LDFLAGS=$LDFLAGS" > $PROJECT_DIR/Resources/MobileVLCKit/vlc-plugins-$OSSTYLE.xcconfig echo "VLC_PLUGINS_LDFLAGS=$LDFLAGS" > $PROJECT_DIR/Resources/MobileVLCKit/vlc-plugins-$OSSTYLE.xcconfig
spopd # vlc spopd # vlc
} }
if [ "$TVOS" != "yes" ]; then if [ "$TVOS" != "yes" ]; then
......
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