Skip to content

Commit c96afcb

Browse files
committed
Add 'curl' vendor library
1 parent 790081c commit c96afcb

File tree

2,610 files changed

+492548
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,610 files changed

+492548
-0
lines changed

vendor/curl/CHANGES

Lines changed: 6315 additions & 0 deletions
Large diffs are not rendered by default.

vendor/curl/CMakeLists.txt

Lines changed: 1249 additions & 0 deletions
Large diffs are not rendered by default.

vendor/curl/COPYING

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
COPYRIGHT AND PERMISSION NOTICE
2+
3+
Copyright (c) 1996 - 2017, Daniel Stenberg, <[email protected]>, and many
4+
contributors, see the THANKS file.
5+
6+
All rights reserved.
7+
8+
Permission to use, copy, modify, and distribute this software for any purpose
9+
with or without fee is hereby granted, provided that the above copyright
10+
notice and this permission notice appear in all copies.
11+
12+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN
15+
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
16+
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
17+
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
18+
OR OTHER DEALINGS IN THE SOFTWARE.
19+
20+
Except as contained in this notice, the name of a copyright holder shall not
21+
be used in advertising or otherwise to promote the sale, use or other dealings
22+
in this Software without prior written authorization of the copyright holder.

vendor/curl/MacOSX-Framework

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
#!/bin/bash
2+
# This script performs all of the steps needed to build a
3+
# universal binary libcurl.framework for Mac OS X 10.4 or greater.
4+
#
5+
# Hendrik Visage:
6+
# Generalizations added since Snowleopard (10.6) do not include
7+
# the 10.4u SDK.
8+
#
9+
# Also note:
10+
# 10.5 is the *ONLY* SDK that support PPC64 :( -- 10.6 do not have ppc64 support
11+
#If you need to have PPC64 support then change below to 1
12+
PPC64_NEEDED=0
13+
# Apple does not support building for PPC anymore in Xcode 4 and later.
14+
# If you're using Xcode 3 or earlier and need PPC support, then change
15+
# the setting below to 1
16+
PPC_NEEDED=0
17+
18+
# For me the default is to develop for the platform I am on, and if you
19+
#desire compatibility with older versions then change USE_OLD to 1 :)
20+
USE_OLD=0
21+
22+
VERSION=`/usr/bin/sed -ne 's/^#define LIBCURL_VERSION "\(.*\)"/\1/p' include/curl/curlver.h`
23+
FRAMEWORK_VERSION=Versions/Release-$VERSION
24+
25+
#I also wanted to "copy over" the system, and thus the reason I added the
26+
# version to Versions/Release-7.20.1 etc.
27+
# now a simple rsync -vaP libcurl.framework /Library/Frameworks will install it
28+
# and setup the right paths to this version, leaving the system version
29+
# "intact", so you can "fix" it later with the links to Versions/A/...
30+
31+
DEVELOPER_PATH=`xcode-select --print-path`
32+
# Around Xcode 4.3, SDKs were moved from the Developer folder into the
33+
# MacOSX.platform folder
34+
if test -d "$DEVELOPER_PATH/Platforms/MacOSX.platform/Developer/SDKs"; then
35+
SDK_PATH="$DEVELOPER_PATH/Platforms/MacOSX.platform/Developer/SDKs"
36+
else
37+
SDK_PATH="$DEVELOPER_PATH/SDKs";
38+
fi
39+
OLD_SDK=`ls $SDK_PATH|head -1`
40+
NEW_SDK=`ls -r $SDK_PATH|head -1`
41+
42+
if test "0"$USE_OLD -gt 0
43+
then
44+
SDK32=$OLD_SDK
45+
else
46+
SDK32=$NEW_SDK
47+
fi
48+
49+
MACVER=`echo $SDK32|sed -e s/[a-zA-Z]//g -e s/.\$//`
50+
51+
SDK32_DIR=$SDK_PATH/$SDK32
52+
MINVER32='-mmacosx-version-min='$MACVER
53+
if test $PPC_NEEDED -gt 0; then
54+
ARCHES32='-arch i386 -arch ppc'
55+
else
56+
ARCHES32='-arch i386'
57+
fi
58+
59+
if test $PPC64_NEEDED -gt 0
60+
then
61+
SDK64=10.5
62+
ARCHES64='-arch x86_64 -arch ppc64'
63+
SDK64=`ls $SDK_PATH|grep 10.5|head -1`
64+
else
65+
ARCHES64='-arch x86_64'
66+
#We "know" that 10.4 and earlier do not support 64bit
67+
OLD_SDK64=`ls $SDK_PATH|egrep -v "10.[0-4]"|head -1`
68+
NEW_SDK64=`ls -r $SDK_PATH|egrep -v "10.[0-4][^0-9]" | head -1`
69+
if test $USE_OLD -gt 0
70+
then
71+
SDK64=$OLD_SDK64
72+
else
73+
SDK64=$NEW_SDK64
74+
fi
75+
fi
76+
77+
SDK64_DIR=$SDK_PATH/$SDK64
78+
MACVER64=`echo $SDK64|sed -e s/[a-zA-Z]//g -e s/.\$//`
79+
80+
MINVER64='-mmacosx-version-min='$MACVER64
81+
82+
if test ! -z $SDK32; then
83+
echo "----Configuring libcurl for 32 bit universal framework..."
84+
make clean
85+
./configure --disable-dependency-tracking --disable-static --with-gssapi --with-darwinssl \
86+
CFLAGS="-Os -isysroot $SDK32_DIR $ARCHES32" \
87+
LDFLAGS="-Wl,-syslibroot,$SDK32_DIR $ARCHES32 -Wl,-headerpad_max_install_names" \
88+
CC=$CC
89+
90+
echo "----Building 32 bit libcurl..."
91+
make -j `sysctl -n hw.logicalcpu_max`
92+
93+
echo "----Creating 32 bit framework..."
94+
rm -r libcurl.framework
95+
mkdir -p libcurl.framework/${FRAMEWORK_VERSION}/Resources
96+
cp lib/.libs/libcurl.dylib libcurl.framework/${FRAMEWORK_VERSION}/libcurl
97+
install_name_tool -id @rpath/libcurl.framework/${FRAMEWORK_VERSION}/libcurl libcurl.framework/${FRAMEWORK_VERSION}/libcurl
98+
/usr/bin/sed -e "s/7\.12\.3/$VERSION/" lib/libcurl.plist >libcurl.framework/${FRAMEWORK_VERSION}/Resources/Info.plist
99+
mkdir -p libcurl.framework/${FRAMEWORK_VERSION}/Headers/curl
100+
cp include/curl/*.h libcurl.framework/${FRAMEWORK_VERSION}/Headers/curl
101+
pushd libcurl.framework
102+
ln -fs ${FRAMEWORK_VERSION}/libcurl libcurl
103+
ln -fs ${FRAMEWORK_VERSION}/Resources Resources
104+
ln -fs ${FRAMEWORK_VERSION}/Headers Headers
105+
cd Versions
106+
ln -fs $(basename "${FRAMEWORK_VERSION}") Current
107+
108+
echo Testing for SDK64
109+
if test -d $SDK64_DIR; then
110+
echo entering...
111+
popd
112+
make clean
113+
echo "----Configuring libcurl for 64 bit universal framework..."
114+
./configure --disable-dependency-tracking --disable-static --with-gssapi --with-darwinssl \
115+
CFLAGS="-Os -isysroot $SDK64_DIR $ARCHES64" \
116+
LDFLAGS="-Wl,-syslibroot,$SDK64_DIR $ARCHES64 -Wl,-headerpad_max_install_names" \
117+
CC=$CC
118+
119+
echo "----Building 64 bit libcurl..."
120+
make -j `sysctl -n hw.logicalcpu_max`
121+
122+
echo "----Appending 64 bit framework to 32 bit framework..."
123+
cp lib/.libs/libcurl.dylib libcurl.framework/${FRAMEWORK_VERSION}/libcurl64
124+
install_name_tool -id @rpath/libcurl.framework/${FRAMEWORK_VERSION}/libcurl libcurl.framework/${FRAMEWORK_VERSION}/libcurl64
125+
cp libcurl.framework/${FRAMEWORK_VERSION}/libcurl libcurl.framework/${FRAMEWORK_VERSION}/libcurl32
126+
pwd
127+
lipo libcurl.framework/${FRAMEWORK_VERSION}/libcurl32 libcurl.framework/${FRAMEWORK_VERSION}/libcurl64 -create -output libcurl.framework/${FRAMEWORK_VERSION}/libcurl
128+
rm libcurl.framework/${FRAMEWORK_VERSION}/libcurl32 libcurl.framework/${FRAMEWORK_VERSION}/libcurl64
129+
cp libcurl.framework/${FRAMEWORK_VERSION}/Headers/curl/curlbuild.h libcurl.framework/${FRAMEWORK_VERSION}/Headers/curl/curlbuild32.h
130+
cp include/curl/curlbuild.h libcurl.framework/${FRAMEWORK_VERSION}/Headers/curl/curlbuild64.h
131+
cat >libcurl.framework/${FRAMEWORK_VERSION}/Headers/curl/curlbuild.h <<EOF
132+
#ifdef __LP64__
133+
#include "curl/curlbuild64.h"
134+
#else
135+
#include "curl/curlbuild32.h"
136+
#endif
137+
EOF
138+
fi
139+
140+
pwd
141+
lipo -info libcurl.framework/${FRAMEWORK_VERSION}/libcurl
142+
echo "libcurl.framework is built and can now be included in other projects."
143+
echo "Copy libcurl.framework to your bundle's Contents/Frameworks folder, ~/Library/Frameworks or /Library/Frameworks."
144+
else
145+
echo "Building libcurl.framework requires Mac OS X 10.4 or later with the MacOSX10.4/5/6 SDK installed."
146+
fi

vendor/curl/Makefile

Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
#***************************************************************************
2+
# _ _ ____ _
3+
# Project ___| | | | _ \| |
4+
# / __| | | | |_) | |
5+
# | (__| |_| | _ <| |___
6+
# \___|\___/|_| \_\_____|
7+
#
8+
# Copyright (C) 1998 - 2017, Daniel Stenberg, <[email protected]>, et al.
9+
#
10+
# This software is licensed as described in the file COPYING, which
11+
# you should have received as part of this distribution. The terms
12+
# are also available at https://curl.haxx.se/docs/copyright.html.
13+
#
14+
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
15+
# copies of the Software, and permit persons to whom the Software is
16+
# furnished to do so, under the terms of the COPYING file.
17+
#
18+
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19+
# KIND, either express or implied.
20+
#
21+
###########################################################################
22+
23+
all:
24+
./configure
25+
make
26+
27+
ssl:
28+
./configure --with-ssl
29+
make
30+
31+
borland:
32+
cd lib
33+
$(MAKE) -f Makefile.b32
34+
cd ..\src
35+
$(MAKE) -f Makefile.b32
36+
37+
borland-ssl:
38+
cd lib
39+
$(MAKE) -f Makefile.b32 WITH_SSL=1
40+
cd ..\src
41+
$(MAKE) -f Makefile.b32 WITH_SSL=1
42+
43+
borland-ssl-zlib:
44+
cd lib
45+
$(MAKE) -f Makefile.b32 WITH_SSL=1 WITH_ZLIB=1
46+
cd ..\src
47+
$(MAKE) -f Makefile.b32 WITH_SSL=1 WITH_ZLIB=1
48+
49+
borland-clean:
50+
cd lib
51+
$(MAKE) -f Makefile.b32 clean
52+
cd ..\src
53+
$(MAKE) -f Makefile.b32 clean
54+
55+
watcom: .SYMBOLIC
56+
cd lib && $(MAKE) -u -f Makefile.Watcom
57+
cd src && $(MAKE) -u -f Makefile.Watcom
58+
59+
watcom-clean: .SYMBOLIC
60+
cd lib && $(MAKE) -u -f Makefile.Watcom clean
61+
cd src && $(MAKE) -u -f Makefile.Watcom clean
62+
63+
watcom-vclean: .SYMBOLIC
64+
cd lib && $(MAKE) -u -f Makefile.Watcom vclean
65+
cd src && $(MAKE) -u -f Makefile.Watcom vclean
66+
67+
mingw32:
68+
$(MAKE) -C lib -f Makefile.m32
69+
$(MAKE) -C src -f Makefile.m32
70+
71+
mingw32-clean:
72+
$(MAKE) -C lib -f Makefile.m32 clean
73+
$(MAKE) -C src -f Makefile.m32 clean
74+
$(MAKE) -C docs/examples -f Makefile.m32 clean
75+
76+
mingw32-vclean mingw32-distclean:
77+
$(MAKE) -C lib -f Makefile.m32 vclean
78+
$(MAKE) -C src -f Makefile.m32 vclean
79+
$(MAKE) -C docs/examples -f Makefile.m32 vclean
80+
81+
mingw32-examples%:
82+
$(MAKE) -C docs/examples -f Makefile.m32 CFG=$@
83+
84+
mingw32%:
85+
$(MAKE) -C lib -f Makefile.m32 CFG=$@
86+
$(MAKE) -C src -f Makefile.m32 CFG=$@
87+
88+
vc:
89+
cd winbuild
90+
nmake /f Makefile.vc MACHINE=x86
91+
92+
vc-x64:
93+
cd winbuild
94+
nmake /f Makefile.vc MACHINE=x64
95+
96+
djgpp:
97+
$(MAKE) -C lib -f Makefile.dj
98+
$(MAKE) -C src -f Makefile.dj
99+
100+
cygwin:
101+
./configure
102+
make
103+
104+
cygwin-ssl:
105+
./configure --with-ssl
106+
make
107+
108+
amiga:
109+
cd ./lib && make -f makefile.amiga
110+
cd ./src && make -f makefile.amiga
111+
112+
netware:
113+
$(MAKE) -C lib -f Makefile.netware
114+
$(MAKE) -C src -f Makefile.netware
115+
116+
netware-clean:
117+
$(MAKE) -C lib -f Makefile.netware clean
118+
$(MAKE) -C src -f Makefile.netware clean
119+
$(MAKE) -C docs/examples -f Makefile.netware clean
120+
121+
netware-vclean netware-distclean:
122+
$(MAKE) -C lib -f Makefile.netware vclean
123+
$(MAKE) -C src -f Makefile.netware vclean
124+
$(MAKE) -C docs/examples -f Makefile.netware vclean
125+
126+
netware-install:
127+
$(MAKE) -C lib -f Makefile.netware install
128+
$(MAKE) -C src -f Makefile.netware install
129+
130+
netware-examples-%:
131+
$(MAKE) -C docs/examples -f Makefile.netware CFG=$@
132+
133+
netware-%:
134+
$(MAKE) -C lib -f Makefile.netware CFG=$@
135+
$(MAKE) -C src -f Makefile.netware CFG=$@
136+
137+
unix: all
138+
139+
unix-ssl: ssl
140+
141+
linux: all
142+
143+
linux-ssl: ssl
144+
145+
ca-bundle: lib/mk-ca-bundle.pl
146+
@echo "generate a fresh ca-bundle.crt"
147+
@perl $< -b -l -u lib/ca-bundle.crt
148+
149+
ca-firefox: lib/firefox-db2pem.sh
150+
@echo "generate a fresh ca-bundle.crt"
151+
./lib/firefox-db2pem.sh lib/ca-bundle.crt

0 commit comments

Comments
 (0)