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

[bsdiff_classic] Update Bzip2 compat #9648

Merged
merged 5 commits into from
Oct 25, 2024
Merged
Changes from all 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
20 changes: 11 additions & 9 deletions B/bsdiff_classic/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,23 @@
using BinaryBuilder, Pkg

name = "bsdiff_classic"
version = v"4.3.0"
nhz2 marked this conversation as resolved.
Show resolved Hide resolved
version = v"4.3.17"

# Collection of sources required to complete build
sources = [
ArchiveSource("https://www.daemonology.net/bsdiff/bsdiff-4.3.tar.gz", "18821588b2dc5bf159aa37d3bcb7b885d85ffd1e19f23a0c57a58723fea85f48"),
GitSource("https://salsa.debian.org/debian/bsdiff.git", "24b5474a87e495678d71cac7ba02493fb4fa483f")
]

# Bash recipe for building across all platforms
script = raw"""
cd $WORKSPACE/srcdir/bsdiff-4.3
cd bsdiff
atomic_patch -p1 $PWD/debian/patches/10-no-bsd-make.patch
atomic_patch -p1 $PWD/debian/patches/20-CVE-2014-9862.patch
perl -i -ple '$_ = "#include <sys/types.h>\n" . $_ if $. == 31' bspatch.c
cc -O3 -lbz2 -I"${prefix}/include" bsdiff.c -o bsdiff
cc -O3 -lbz2 -I"${prefix}/include" bspatch.c -o bspatch
cc -O3 -lbz2 bsdiff.c -o bsdiff
cc -O3 -lbz2 bspatch.c -o bspatch
install bsdiff bspatch "${bindir}"
install_license debian/copyright
"""

# Disable Windows for now, as there are many BSD-isms in the source code
Expand All @@ -31,10 +34,9 @@ products = [

# Dependencies that must be installed before this package can be built
dependencies = [
# Future versions of bzip2 should allow a more relaxed compat because the
# soname of the macOS library shouldn't change at every patch release.
Dependency("Bzip2_jll", v"1.0.6"; compat="=1.0.6"),
Dependency("Bzip2_jll"; compat="1.0.8"),
]

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