Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CURL, MbedTLS, and Zlib #12

Merged
merged 7 commits into from
Mar 14, 2019
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ language: julia
os:
- linux
julia:
- 0.7
- 1.0
notifications:
email: false
git:
Expand All @@ -19,7 +19,7 @@ sudo: required

# Before anything else, get the latest versions of things
before_script:
- julia -e 'using Pkg; Pkg.add([PackageSpec(name="BinaryBuilder", rev="master"), PackageSpec(name="BinaryProvider")])'
- julia -e 'using Pkg; Pkg.add([PackageSpec(name="BinaryBuilder", version=v"0.1.4"), PackageSpec(name="MbedTLS", version=v"0.6.6"), PackageSpec(name="BinaryProvider")])'

script:
- julia build_tarballs.jl
Expand Down
66 changes: 42 additions & 24 deletions build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,60 +3,78 @@
using BinaryBuilder

name = "LibCURL"
version = v"7.61.0"
version = v"7.64.0"

# Collection of sources required to build LibCURL
sources = [
"https://curl.haxx.se/download/curl-7.61.0.tar.gz" =>
"64141f0db4945268a21b490d58806b97c615d3d0c75bf8c335bbe0efd13b45b5",

"https://curl.haxx.se/download/curl-7.64.0.tar.gz" =>
"cb90d2eb74d4e358c1ed1489f8e3af96b50ea4374ad71f143fa4595e998d81b5",
]

# Bash recipe for building across all platforms
script = raw"""
cd $WORKSPACE/srcdir/curl-7.61.0
./configure --prefix=$prefix --host=$target --with-mbedtls --without-ssl --disable-manual
cd $WORKSPACE/srcdir/curl-7.64.0

# Set up ca path/bundle
ca_args=""
if [[ $target == x86_64-apple-darwin14 ]]; then
ca_args="--with-ca-bundle=/etc/ssl/cert.pem"
elif [[ $target == *-linux-* ]]; then
ca_args="--with-ca-bundle=/etc/ssl/certs/ca-certificates.crt"
fi
omus marked this conversation as resolved.
Show resolved Hide resolved

# Configure and build
./configure \
--prefix=$prefix \
--host=$target \
--with-mbedtls \
--without-ssl \
--disable-manual $ca_args

if [[ $target == *-w64-mingw32 ]]; then
LDFLAGS="-L$prefix/bin"
LDFLAGS="$LDFLAGS -L$prefix/bin"
elif [[ $target == x86_64-apple-darwin14 ]]; then
LDFLAGS="-L$prefix/lib -Wl,-rpath,$prefix/lib"
LDFLAGS="$LDFLAGS -L$prefix/lib -Wl,-rpath,$prefix/lib"
else
LDFLAGS="-L$prefix/lib -Wl,-rpath-link,$prefix/lib"
LDFLAGS="$LDFLAGS -L$prefix/lib -Wl,-rpath-link,$prefix/lib"
fi
make -j${nproc} LDFLAGS="$LDFLAGS"
make install-exec

"""

# These are the platforms we will build for by default, unless further
# platforms are passed in on the command line
platforms = [
Linux(:i686, :glibc),
Linux(:x86_64, :glibc),
Linux(:aarch64, :glibc),
Linux(:armv7l, :glibc, :eabihf),
Linux(:powerpc64le, :glibc),
Linux(:i686, :musl),
Linux(:x86_64, :musl),
Linux(:aarch64, :musl),
Linux(:armv7l, :musl, :eabihf),
Linux(:i686, libc=:glibc),
Linux(:x86_64, libc=:glibc),
Linux(:aarch64, libc=:glibc),
Linux(:armv7l, libc=:glibc, call_abi=:eabihf),
Linux(:powerpc64le, libc=:glibc),
Linux(:i686, libc=:musl),
Linux(:x86_64, libc=:musl),
Linux(:aarch64, libc=:musl),
Linux(:armv7l, libc=:musl, call_abi=:eabihf),
MacOS(:x86_64),
FreeBSD(:x86_64),
Windows(:i686),
Windows(:x86_64),
]

# The products that we will ensure are always built
products(prefix) = [
LibraryProduct(prefix, "libcurl", :libcurl),
LibraryProduct(prefix, "libcurl", :libcurl)
]

# Dependencies that must be installed before this package can be built
dependencies = [
"https://github.com/bicycle1885/ZlibBuilder/releases/download/v1.0.2/build_Zlib.v1.2.11.jl",
"https://github.com/JuliaWeb/MbedTLSBuilder/releases/download/v0.11/build_MbedTLS.v1.0.0.jl"
string(
"https://github.com/JuliaWeb/MbedTLSBuilder/releases/download/",
"v0.17.0/build_MbedTLS.v2.16.0.jl",
),
string(
"https://github.com/bicycle1885/ZlibBuilder/releases/download/",
"v1.0.3/build_Zlib.v1.2.11.jl",
),
]

# Build the tarballs, and possibly a `build.jl` as well.
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies)