-
Notifications
You must be signed in to change notification settings - Fork 553
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Import
XZ
from https://raw.githubusercontent.com/bicycle1885/XzBui…
…lder` Also jump up the `-fPIC` factor
- Loading branch information
1 parent
94a66cc
commit 041be5e
Showing
1 changed file
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Note that this script can accept some limited command-line arguments, run | ||
# `julia build_tarballs.jl --help` to see a usage message. | ||
using BinaryBuilder | ||
|
||
name = "XZ" | ||
version = v"5.2.4" | ||
|
||
# Collection of sources required to build XzBuilder | ||
sources = [ | ||
"https://tukaani.org/xz/xz-$(version).tar.xz" => | ||
"9717ae363760dedf573dad241420c5fea86256b65bc21d2cf71b2b12f0544f4b", | ||
"https://tukaani.org/xz/xz-$(version)-windows.zip" => | ||
"9a5163623f435b6fa0844b6b884babd6bf4f8d876ae2d8134deeb296afd49c61", | ||
] | ||
|
||
# Bash recipe for building across all platforms | ||
script = raw""" | ||
if [ ${target} = "x86_64-w64-mingw32" ]; then | ||
mkdir -p ${WORKSPACE}/destdir/bin/ | ||
cp bin_x86-64/liblzma.dll ${WORKSPACE}/destdir/bin/ | ||
elif [ ${target} = "i686-w64-mingw32" ]; then | ||
mkdir -p ${WORKSPACE}/destdir/bin/ | ||
cp bin_i686/liblzma.dll ${WORKSPACE}/destdir/bin/ | ||
else | ||
cd $WORKSPACE/srcdir/xz-* | ||
./configure --prefix=${prefix} --host=${target} --with-pic | ||
make -j${nproc} | ||
make install | ||
fi | ||
""" | ||
|
||
# These are the platforms we will build for by default, unless further | ||
# platforms are passed in on the command line | ||
platforms = supported_platforms() | ||
|
||
# The products that we will ensure are always built | ||
products(prefix) = [ | ||
LibraryProduct(prefix, "liblzma", :liblzma) | ||
] | ||
|
||
# Dependencies that must be installed before this package can be built | ||
dependencies = [] | ||
|
||
# Build the tarballs, and possibly a `build.jl` as well. | ||
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies) |