Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
93669d4b
Commit
93669d4b
authored
Mar 20, 2012
by
Philippe Coent
Committed by
Felix Paul Kühne
Mar 20, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ios build script: updated for iOS 5 and VLC's new contrib system
Signed-off-by:
Felix Paul Kühne
<
fkuehne@videolan.org
>
parent
5a0f8165
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
99 additions
and
53 deletions
+99
-53
extras/package/ios/build.sh
extras/package/ios/build.sh
+99
-53
No files found.
extras/package/ios/build.sh
View file @
93669d4b
...
@@ -2,8 +2,8 @@
...
@@ -2,8 +2,8 @@
set
-e
set
-e
PLATFORM
=
OS
PLATFORM
=
OS
SDK
=
iphoneos3.2
VERBOSE
=
no
VERBOSE
=
no
SDK_VERSION
=
5.0
usage
()
usage
()
{
{
...
@@ -45,7 +45,7 @@ do
...
@@ -45,7 +45,7 @@ do
;;
;;
s
)
s
)
PLATFORM
=
Simulator
PLATFORM
=
Simulator
SDK
=
iphonesimulator3.2
SDK
=
5.0
;;
;;
k
)
k
)
SDK
=
$OPTARG
SDK
=
$OPTARG
...
@@ -74,16 +74,11 @@ if [ "$PLATFORM" = "Simulator" ]; then
...
@@ -74,16 +74,11 @@ if [ "$PLATFORM" = "Simulator" ]; then
TARGET
=
"i686-apple-darwin10"
TARGET
=
"i686-apple-darwin10"
ARCH
=
"i386"
ARCH
=
"i386"
else
else
TARGET
=
"arm-apple-darwin1
0
"
TARGET
=
"arm-apple-darwin1
1
"
ARCH
=
"armv7"
ARCH
=
"armv7"
OPTIM
=
"-mno-thumb"
OPTIM
=
"-mno-thumb"
fi
fi
# Test if SDK exists
xcodebuild
-find
gcc
-sdk
${
SDK
}
>
${
out
}
SDK_VERSION
=
`
echo
${
SDK
}
|
sed
-e
's/iphoneos//'
-e
's/iphonesimulator//'
`
info
"Using
${
ARCH
}
with SDK version
${
SDK_VERSION
}
"
info
"Using
${
ARCH
}
with SDK version
${
SDK_VERSION
}
"
THIS_SCRIPT_PATH
=
`
pwd
`
/
$0
THIS_SCRIPT_PATH
=
`
pwd
`
/
$0
...
@@ -92,8 +87,17 @@ spushd `dirname ${THIS_SCRIPT_PATH}`/../../..
...
@@ -92,8 +87,17 @@ spushd `dirname ${THIS_SCRIPT_PATH}`/../../..
VLCROOT
=
`
pwd
`
# Let's make sure VLCROOT is an absolute path
VLCROOT
=
`
pwd
`
# Let's make sure VLCROOT is an absolute path
spopd
spopd
DEVROOT
=
"/Developer/Platforms/iPhone
${
PLATFORM
}
.platform/Developer"
if
test
-z
"
$SDKROOT
"
IOS_SDK_ROOT
=
"
${
DEVROOT
}
/SDKs/iPhone
${
PLATFORM
}${
SDK_VERSION
}
.sdk"
then
SDKROOT
=
`
xcode-select
-print-path
`
/Platforms/iPhone
${
PLATFORM
}
.platform/Developer/SDKs/iPhone
${
PLATFORM
}${
SDK_VERSION
}
.sdk
echo
"SDKROOT not specified, assuming
$SDKROOT
"
fi
if
[
!
-d
"
${
SDKROOT
}
"
]
then
echo
"***
${
SDKROOT
}
does not exist, please install required SDK, or set SDKROOT manually. ***"
exit
1
fi
BUILDDIR
=
"
${
VLCROOT
}
/build-ios-
${
PLATFORM
}
"
BUILDDIR
=
"
${
VLCROOT
}
/build-ios-
${
PLATFORM
}
"
...
@@ -101,82 +105,110 @@ PREFIX="${VLCROOT}/install-ios-${PLATFORM}"
...
@@ -101,82 +105,110 @@ PREFIX="${VLCROOT}/install-ios-${PLATFORM}"
IOS_GAS_PREPROCESSOR
=
"
${
VLCROOT
}
/extras/package/ios/resources/gas-preprocessor.pl"
IOS_GAS_PREPROCESSOR
=
"
${
VLCROOT
}
/extras/package/ios/resources/gas-preprocessor.pl"
export
AR
=
"
${
DEVROOT
}
/usr/bin/ar"
export
PATH
=
"
${
VLCROOT
}
/extras/tools/build/bin:
${
VLCROOT
}
/contrib/
${
TARGET
}
/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin"
export
RANLIB
=
"
${
DEVROOT
}
/usr/bin/ranlib"
export
CFLAGS
=
"-isysroot
${
IOS_SDK_ROOT
}
-arch
${
ARCH
}
-miphoneos-version-min=3.2
${
OPTIM
}
"
# contains gas-processor.pl
export
PATH
=
$PATH
:
${
VLCROOT
}
/extras/package/ios/resources
info
"Building tools"
spushd
"
${
VLCROOT
}
/extras/tools"
./bootstrap
make
spopd
info
"Building contrib for iOS in '
${
VLCROOT
}
/contrib/iPhone
${
PLATFORM
}
'"
# The contrib will read the following
export
AR
=
"xcrun ar"
export
RANLIB
=
"xcrun ranlib"
export
CC
=
"xcrun clang"
export
OBJC
=
"xcrun clang"
export
CXX
=
"xcrun clang++"
export
LD
=
"xcrun ld"
export
STRIP
=
"xcrun strip"
export
SDKROOT
export
CPPFLAGS
=
"
${
CFLAGS
}
"
export
CXXFLAGS
=
"
${
CFLAGS
}
"
export
CFLAGS
=
"-isysroot
${
SDKROOT
}
-arch
${
ARCH
}
-miphoneos-version-min=5.0
${
OPTIM
}
"
export
OBJCFLAGS
=
"
${
CFLAGS
}
"
export
OBJCFLAGS
=
"
${
CFLAGS
}
"
export
CPP
=
"xcrun cc -E"
export
CXXCPP
=
"xcrun c++ -E"
if
[
"
$PLATFORM
"
=
"Simulator"
]
;
then
if
[
"
$PLATFORM
"
=
"Simulator"
]
;
then
# Use the new ABI on simulator, else we can't build
# Use the new ABI on simulator, else we can't build
export
OBJCFLAGS
=
"-fobjc-abi-version=2 -fobjc-legacy-dispatch
${
OBJCFLAGS
}
"
export
OBJCFLAGS
=
"-fobjc-abi-version=2 -fobjc-legacy-dispatch
${
OBJCFLAGS
}
"
fi
fi
export
CPPFLAGS
=
"
${
CFLAGS
}
"
export
CXXFLAGS
=
"
${
CFLAGS
}
"
export
CPP
=
"
${
DEVROOT
}
/usr/bin/cpp-4.2"
export
CXXCPP
=
"
${
DEVROOT
}
/usr/bin/cpp-4.2"
export
CC
=
"
${
DEVROOT
}
/usr/bin/gcc-4.2"
export
OBJC
=
"
${
DEVROOT
}
/usr/bin/gcc-4.2"
export
CXX
=
"
${
DEVROOT
}
/usr/bin/g++-4.2"
export
LD
=
"
${
DEVROOT
}
/usr/bin/ld"
export
STRIP
=
"
${
DEVROOT
}
/usr/bin/strip"
if
[
"
$PLATFORM
"
=
"OS"
]
;
then
if
[
"
$PLATFORM
"
=
"OS"
]
;
then
export
LDFLAGS
=
"-L
${
IOS_SDK_ROOT
}
/usr/lib -arch
${
ARCH
}
"
export
LDFLAGS
=
"-L
${
SDKROOT
}
/usr/lib -arch
${
ARCH
}
-isysroot
${
SDKROOT
}
-miphoneos-version-min=5.0
"
else
else
export
LDFLAGS
=
"-syslibroot=
${
IOS_SDK_ROOT
}
/ -arch
${
ARCH
}
"
export
LDFLAGS
=
"-syslibroot=
${
SDKROOT
}
/ -arch
${
ARCH
}
"
fi
fi
export
PATH
=
"/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:
${
VLCROOT
}
/extras/contrib/build/bin:
${
VLCROOT
}
/extras/package/ios/resources
"
info
"LD FLAGS SELECTED = '
${
LDFLAGS
}
'
"
spushd
${
VLCROOT
}
/
extras/
contrib
spushd
${
VLCROOT
}
/contrib
# contains gas-processor.pl
echo
${
VLCROOT
}
export
PATH
=
$PATH
:
${
VLCROOT
}
/extras/package/ios/resources
mkdir
-p
"
${
VLCROOT
}
/contrib/iPhone
${
PLATFORM
}
"
cd
"
${
VLCROOT
}
/contrib/iPhone
${
PLATFORM
}
"
# The contrib will read the following
if
[
"
$PLATFORM
"
=
"OS"
]
;
then
export
IOS_SDK_ROOT
export
AS
=
"
${
IOS_GAS_PREPROCESSOR
}
${
CC
}
"
export
ASCPP
=
"
${
IOS_GAS_PREPROCESSOR
}
${
CC
}
"
info
"Building contrib for iOS in '
${
VLCROOT
}
/contrib-builddir-ios-
${
TARGET
}
'"
else
export
AS
=
"xcrun as"
export
ASCPP
=
"xcrun as"
fi
./bootstrap
-t
${
TARGET
}
-d
ios
\
../bootstrap
--host
=
${
TARGET
}
--build
=
"i686-apple-darwin10"
--disable-disc
--disable-sout
>
${
out
}
-b
"
${
VLCROOT
}
/contrib-builddir-ios-
${
TARGET
}
"
\
make
-i
"
${
VLCROOT
}
/contrib-ios-
${
TARGET
}
"
>
${
out
}
spushd
"
${
VLCROOT
}
/contrib-builddir-ios-
${
TARGET
}
"
make src
>
${
out
}
spopd
spopd
info
"Building contrib for current host"
./bootstrap
>
${
out
}
make
>
${
out
}
spopd
if
[
"
$PLATFORM
"
=
"OS"
]
;
then
if
[
"
$PLATFORM
"
=
"OS"
]
;
then
export
AS
=
"
${
IOS_GAS_PREPROCESSOR
}
${
CC
}
"
export
AS
=
"
${
IOS_GAS_PREPROCESSOR
}
${
CC
}
"
export
ASCPP
=
"
${
IOS_GAS_PREPROCESSOR
}
${
CC
}
"
export
ASCPP
=
"
${
IOS_GAS_PREPROCESSOR
}
${
CC
}
"
else
else
export
AS
=
"
${
DEVROOT
}
/usr/bin/
as"
export
AS
=
"
xcrun
as"
export
ASCPP
=
"
${
DEVROOT
}
/usr/bin/
as"
export
ASCPP
=
"
xcrun
as"
fi
fi
info
"Bootstraping vlc"
info
"Bootstraping vlc"
pwd
info
"VLCROOT =
${
VLCROOT
}
"
if
!
[
-e
${
VLCROOT
}
/configure
]
;
then
if
!
[
-e
${
VLCROOT
}
/configure
]
;
then
${
VLCROOT
}
/bootstrap
>
${
out
}
${
VLCROOT
}
/bootstrap
>
${
out
}
fi
fi
info
"Bootstraping vlc finished"
if
[
".
$PLATFORM
"
!=
".Simulator"
]
;
then
if
[
".
$PLATFORM
"
!=
".Simulator"
]
;
then
# FIXME - Do we still need this?
# FIXME - Do we still need this?
export
AVCODEC_CFLAGS
=
"-I
${
PREFIX
}
/include"
export
AVCODEC_CFLAGS
=
"-I
${
PREFIX
}
/include
"
export
AVCODEC_LIBS
=
"-L
${
PREFIX
}
/lib -lavcodec -lavutil -lz"
export
AVCODEC_LIBS
=
"-L
${
PREFIX
}
/lib -lavcodec -lavutil -lz"
export
AVFORMAT_CFLAGS
=
"-I
${
PREFIX
}
/include"
export
AVFORMAT_CFLAGS
=
"-I
${
PREFIX
}
/include"
export
AVFORMAT_LIBS
=
"-L
${
PREFIX
}
/lib -lavcodec -lz -lavutil -lavformat"
export
AVFORMAT_LIBS
=
"-L
${
PREFIX
}
/lib -lavcodec -lz -lavutil -lavformat"
fi
fi
export
DVBPSI_CFLAGS
=
"-I
${
VLCROOT
}
/contrib-ios-
${
TARGET
}
/include "
export
DVBPSI_LIBS
=
"-L
${
VLCROOT
}
/contrib-ios-
${
TARGET
}
/lib "
export
SWSCALE_CFLAGS
=
"-I
${
VLCROOT
}
/contrib-ios-
${
TARGET
}
/include "
export
SWSCALE_LIBS
=
"-L
${
VLCROOT
}
/contrib-ios-
${
TARGET
}
/lib "
mkdir
-p
${
BUILDDIR
}
mkdir
-p
${
BUILDDIR
}
spushd
${
BUILDDIR
}
spushd
${
BUILDDIR
}
info
">> --prefix=
${
PREFIX
}
--host=
${
TARGET
}
"
# Run configure only upon changes.
# Run configure only upon changes.
if
[
"
${
VLCROOT
}
/configure"
-nt
config.log
-o
\
if
[
"
${
VLCROOT
}
/configure"
-nt
config.log
-o
\
"
${
THIS_SCRIPT_PATH
}
"
-nt
config.log
]
;
then
"
${
THIS_SCRIPT_PATH
}
"
-nt
config.log
]
;
then
...
@@ -190,34 +222,48 @@ ${VLCROOT}/configure \
...
@@ -190,34 +222,48 @@ ${VLCROOT}/configure \
--disable-macosx-defaults
\
--disable-macosx-defaults
\
--disable-macosx-vout
\
--disable-macosx-vout
\
--disable-macosx-dialog-provider
\
--disable-macosx-dialog-provider
\
--disable-macosx-qt
capture
\
--disable-macosx-qt
kit
\
--disable-macosx-eyetv
\
--disable-macosx-eyetv
\
--disable-macosx-vlc-app
\
--disable-macosx-vlc-app
\
--with-macosx-sdk
=
${
IOS_SDK_
ROOT
}
\
--with-macosx-sdk
=
${
SDK
ROOT
}
\
--enable-audioqueue
\
--enable-audioqueue
\
--enable-ios-vout
\
--enable-ios-vout
\
--disable-shared
\
--disable-macosx-quartztext
\
--enable-avcodec
\
--enable-avcodec
\
--enable-avformat
\
--disable-avio
\
--disable-dummy
\
--disable-mkv
\
--enable-ffmpeg
\
--enable-dvbpsi
\
--enable-swscale
\
--enable-swscale
\
--enable-faad
\
--disable-projectm
\
--disable-sout
\
--disable-faad
\
--disable-mad
\
--disable-mad
\
--disable-a52
\
--disable-a52
\
--disable-fribidi
\
--disable-fribidi
\
--disable-jpeg
\
--disable-macosx-audio
\
--disable-macosx-audio
\
--disable-qtcapture
\
--disable-qtsound
\
--disable-qt4
--disable-skins2
\
--disable-qt4
--disable-skins2
\
--disable-libgcrypt
\
--disable-libgcrypt
\
--disable-remoteosd
\
--disable-remoteosd
\
--disable-vcd
\
--disable-vcd
\
--disable-postproc
\
--disable-postproc
\
--disable-vlc
\
--disable-vlc
\
--disable-audio_filter
\
--disable-spatializer
\
--disable-vlm
\
--disable-vlm
\
--disable-httpd
\
--disable-httpd
\
--disable-nls
\
--disable-nls
\
--disable-glx
\
--disable-glx
\
--
dis
able-visual
\
--
en
able-visual
\
--disable-lua
\
--disable-lua
\
--disable-sse
\
--disable-sse
\
--disable-neon
\
--disable-neon
\
--disable-notify
\
--disable-mmx
>
${
out
}
# MMX and SSE support requires llvm which is broken on Simulator
--disable-mmx
>
${
out
}
# MMX and SSE support requires llvm which is broken on Simulator
fi
fi
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment