Skip to content

Commit 24a24c0

Browse files
author
Arun Veluri
committed
Tryign somehting here
1 parent c966f9c commit 24a24c0

File tree

11 files changed

+80
-16
lines changed

11 files changed

+80
-16
lines changed

tools/extra_ios_libs/crt1.3.1.o

80.7 KB
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

tools/worked_tested/_shared.sh

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
TOOLS_ROOT=`pwd`
44

5+
export ANDROID_NDK="/Users/arun/workspace/ndk/android-ndk-r15c"
6+
57
#
68
# Warning !!! Android Build !!!
79
#
@@ -27,8 +29,15 @@ TOOLS_ROOT=`pwd`
2729
ANDROID_API=${ANDROID_API:-21}
2830
ARCHS=("android" "android-armeabi" "android64-aarch64" "android-x86" "android64" "android-mips" "android-mips64")
2931
ABIS=("armeabi" "armeabi-v7a" "arm64-v8a" "x86" "x86_64" "mips" "mips64")
32+
#NDK=${ANDROID_NDK}
3033
NDK=${ANDROID_NDK}
3134

35+
CURL_LIB_VERSION="7.58.0"
36+
OPENSSL_LIB_VERSION="1.1.0f"
37+
38+
OPENSSL_VERSION="openssl-$OPENSSL_LIB_VERSION"
39+
CURL_VERSION="curl-$CURL_LIB_VERSION"
40+
3241
configure() {
3342
ARCH=$1; OUT=$2; CLANG=${3:-""};
3443

@@ -119,3 +128,33 @@ configure() {
119128
echo "export LIBS=${LIBS}"
120129
echo "**********************************************"
121130
}
131+
132+
downloadOpensslTar ()
133+
{
134+
rm -rf "${OPENSSL_VERSION}"
135+
136+
if [ ! -e ${OPENSSL_VERSION}.tar.gz ]; then
137+
echo "Downloading ${OPENSSL_VERSION}.tar.gz"
138+
curl -LO https://www.openssl.org/source/${OPENSSL_VERSION}.tar.gz
139+
else
140+
echo "Using ${OPENSSL_VERSION}.tar.gz"
141+
fi
142+
143+
echo "Unpacking openssl"
144+
tar xfz "${OPENSSL_VERSION}.tar.gz"
145+
}
146+
147+
downloadCurlTar()
148+
{
149+
rm -rf "${CURL_VERSION}"
150+
151+
if [ ! -e ${CURL_VERSION}.tar.gz ]; then
152+
echo "Downloading ${CURL_VERSION}.tar.gz"
153+
curl -LO https://curl.haxx.se/download/${CURL_VERSION}.tar.gz
154+
else
155+
echo "Using ${CURL_VERSION}.tar.gz"
156+
fi
157+
158+
echo "Unpacking CURL"
159+
tar xvf "${CURL_VERSION}.tar.gz"
160+
}

tools/worked_tested/build-curl4android.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ source ./_shared.sh cURL
2121
# Setup architectures, library name and other vars + cleanup from previous runs
2222
TOOLS_ROOT=`pwd`
2323
#LIB_NAME="curl-7.54.1"
24-
LIB_NAME="curl-7.49.1"
24+
#LIB_NAME="curl-7.49.1"
25+
LIB_NAME=$CURL_LIB_VERSION
26+
#LIB_NAME="curl-7.49.1"
2527
LIB_DEST_DIR=${TOOLS_ROOT}/libs
2628
[ -f ${LIB_NAME}.tar.gz ] || wget https://curl.haxx.se/download/${LIB_NAME}.tar.gz
2729
# Unarchive library, then configure and make for specified architectures

tools/worked_tested/build-curl4ios.sh

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
set -u
1818

19+
source ./_shared.sh
20+
1921
SOURCE="$0"
2022
while [ -h "$SOURCE" ]; do
2123
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
@@ -29,19 +31,26 @@ pwd_path="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
2931
ARCHS=("arm64" "armv7s" "armv7" "i386" "x86_64")
3032
SDKS=("iphoneos" "iphoneos" "iphoneos" "iphonesimulator" "iphonesimulator")
3133
PLATFORMS=("iPhoneOS" "iPhoneOS" "iPhoneOS" "iPhoneSimulator" "iPhoneSimulator")
32-
LIB_NAME="curl-7.53.1"
34+
#LIB_NAME="curl-7.53.1"
35+
LIB_NAME=$CURL_VERSION
3336
DEVELOPER=`xcode-select -print-path`
3437
TOOLCHAIN=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain
3538
# If you can't compile with this version, please modify the version to it which on your mac.
36-
SDK_VERSION=""10.3""
37-
IPHONEOS_DEPLOYMENT_TARGET="6.0"
39+
#SDK_VERSION=""10.3""
40+
SDK_VERSION=""
41+
IPHONEOS_DEPLOYMENT_TARGET="9.0"
3842
LIB_DEST_DIR="${pwd_path}/../output/ios/curl-universal"
3943
HEADER_DEST_DIR="include"
4044
rm -rf "${HEADER_DEST_DIR}" "${LIB_DEST_DIR}" "${LIB_NAME}"
45+
#--with-ssl=${OPENSSL}/Mac
46+
OPENSSL_DIR="${PWD}/../output/ios/openssl"
47+
#HOST="x86_64-apple-darwin"
4148

4249
# Unarchive library, then configure and make for specified architectures
4350
configure_make()
4451
{
52+
downloadCurlTar;
53+
4554
ARCH=$1; SDK=$2; PLATFORM=$3;
4655

4756
export PATH="${TOOLCHAIN}/usr/bin:${PATH}"
@@ -69,15 +78,20 @@ configure_make()
6978
else
7079
HOST="--host=${ARCH}-apple-darwin"
7180
fi
72-
./configure --prefix=${PREFIX_DIR} \
73-
--with-sysroot=${CROSS_TOP}/SDKs/${CROSS_SDK} \
74-
${HOST} \
75-
--with-darwinssl \
76-
--enable-static \
77-
--disable-shared \
78-
--disable-verbose \
79-
--enable-threaded-resolver \
80-
--enable-ipv6
81+
OPENSSL_PATH="${OPENSSL_DIR}-${ARCH}"
82+
./configure -prefix="${PREFIX_DIR}" -disable-shared --enable-static -with-random=/dev/urandom --with-ssl=${OPENSSL_PATH} --host=${HOST} \
83+
--with-sysroot=${CROSS_TOP}/SDKs/${CROSS_SDK} ${HOST}
84+
85+
#./configure --prefix=${PREFIX_DIR} \
86+
#--with-sysroot=${CROSS_TOP}/SDKs/${CROSS_SDK} \
87+
#${HOST} \
88+
##--with-darwinssl \
89+
#--enable-static \
90+
#-disable-shared \
91+
#--disable-verbose \
92+
#--enable-threaded-resolver \
93+
#--enable-ipv6 \
94+
#--with-ssl=${OPENSSL_DIR}-${ARCH}/lib
8195
make clean
8296
if make -j8
8397
then

tools/worked_tested/build-openssl4android.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,14 @@ source ./_shared.sh
2020

2121
# Setup architectures, library name and other vars + cleanup from previous runs
2222
#LIB_NAME="openssl-1.1.0f"
23-
LIB_NAME="openssl-1.0.2h"
23+
#LIB_NAME="openssl-1.0.2h"
24+
LIB_NAME=$OPENSSL_LIB_VERSION
2425
LIB_DEST_DIR=${TOOLS_ROOT}/libs
2526
[ -d ${LIB_DEST_DIR} ] && rm -rf ${LIB_DEST_DIR}
2627
[ -f "${LIB_NAME}.tar.gz" ] || wget https://www.openssl.org/source/${LIB_NAME}.tar.gz;
2728
# Unarchive library, then configure and make for specified architectures
2829
configure_make() {
30+
downloadOpensslTar;
2931
ARCH=$1; ABI=$2;
3032
rm -rf "${LIB_NAME}"
3133
tar xfz "${LIB_NAME}.tar.gz"

tools/worked_tested/build-openssl4ios.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
set -u
1818

19+
source ./_shared.sh
20+
1921
SOURCE="$0"
2022
while [ -h "$SOURCE" ]; do
2123
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
@@ -30,15 +32,20 @@ SDKS=("iphoneos" "iphoneos" "iphoneos" "iphonesimulator" "iphonesimulator")
3032
PLATFORMS=("iPhoneOS" "iPhoneOS" "iPhoneOS" "iPhoneSimulator" "iPhoneSimulator")
3133
DEVELOPER=`xcode-select -print-path`
3234
# If you can't compile with this version, please modify the version to it which on your mac.
33-
SDK_VERSION=""10.3""
34-
LIB_NAME="openssl-1.1.0f"
35+
#SDK_VERSION=""10.3""
36+
SDK_VERSION=""
37+
#LIB_NAME="openssl-1.1.0f"
38+
LIB_NAME=$OPENSSL_VERSION
3539
LIB_DEST_DIR="${pwd_path}/../output/ios/openssl-universal"
3640
HEADER_DEST_DIR="include"
3741
rm -rf "${HEADER_DEST_DIR}" "${LIB_DEST_DIR}" "${LIB_NAME}"
42+
3843

3944
# Unarchive library, then configure and make for specified architectures
4045
configure_make()
4146
{
47+
downloadOpensslTar;
48+
4249
ARCH=$1; SDK=$2; PLATFORM=$3;
4350
if [ -d "${LIB_NAME}" ]; then
4451
rm -fr "${LIB_NAME}"

0 commit comments

Comments
 (0)