From fa3a73f9ccf6fcd82ff66ed0e77aa678c95bcb48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Legat?= Date: Fri, 20 Feb 2026 09:01:04 +0100 Subject: [PATCH 1/4] [asio] New package --- A/asio/build_tarballs.jl | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 A/asio/build_tarballs.jl diff --git a/A/asio/build_tarballs.jl b/A/asio/build_tarballs.jl new file mode 100644 index 00000000000..d3ac17587f0 --- /dev/null +++ b/A/asio/build_tarballs.jl @@ -0,0 +1,39 @@ +# Note that this script can accept some limited command-line arguments, run +# `julia build_tarballs.jl --help` to see a usage message. +using BinaryBuilder, Pkg + +name = "asio" +version = v"1.36.0" + +# Collection of sources required to complete build +sources = [ + GitSource("https://github.com/chriskohlhoff/asio.git", "231cb29bab30f82712fcd54faaea42424cc6e710"), +] + +# Bash recipe for building across all platforms +script = raw""" +cd $WORKSPACE/srcdir +cd asio/asio +./autogen.sh +./configure --prefix=${prefix} --build=${MACHTYPE} --host=${target} +make -j${nproc} +make install +""" + +# These are the platforms we will build for by default, unless further +# platforms are passed in on the command line +all_platforms = supported_platforms() + +# The products that we will ensure are always built +products = Product[ + LibraryProduct("libasio", :libasio), +] + +# 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, all_platforms, products, dependencies; + julia_compat="1.6", +) From 7efeea40722327b721baa47bcb90234bcf13a8fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Legat?= Date: Fri, 20 Feb 2026 11:19:09 +0100 Subject: [PATCH 2/4] Bump gcc to v5 --- A/asio/build_tarballs.jl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/A/asio/build_tarballs.jl b/A/asio/build_tarballs.jl index d3ac17587f0..1bc360b5aea 100644 --- a/A/asio/build_tarballs.jl +++ b/A/asio/build_tarballs.jl @@ -33,7 +33,9 @@ products = Product[ dependencies = [] # Build the tarballs, and possibly a `build.jl` as well. +# GCC v4 is missing `std::align` build_tarballs( ARGS, name, version, sources, script, all_platforms, products, dependencies; julia_compat="1.6", + preferred_gcc_version=v"5", ) From 01d4ffadf1c2828c1fe9a4f49aaf766e475b0578 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Legat?= Date: Fri, 20 Feb 2026 11:51:57 +0100 Subject: [PATCH 3/4] Add header as product --- A/asio/build_tarballs.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/A/asio/build_tarballs.jl b/A/asio/build_tarballs.jl index 1bc360b5aea..3c0952f7bc7 100644 --- a/A/asio/build_tarballs.jl +++ b/A/asio/build_tarballs.jl @@ -24,9 +24,9 @@ make install # platforms are passed in on the command line all_platforms = supported_platforms() -# The products that we will ensure are always built +# The products that we will ensure are always built (header-only: export main header so downstreams can discover include/) products = Product[ - LibraryProduct("libasio", :libasio), + FileProduct("include/asio.hpp", :asio_hpp), ] # Dependencies that must be installed before this package can be built From a1e4f75bbe2ba9aab96813d5f3e2708eba8fc4b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Legat?= Date: Fri, 20 Feb 2026 13:02:50 +0100 Subject: [PATCH 4/4] Skip make for windows --- A/asio/build_tarballs.jl | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/A/asio/build_tarballs.jl b/A/asio/build_tarballs.jl index 3c0952f7bc7..52ba2334eae 100644 --- a/A/asio/build_tarballs.jl +++ b/A/asio/build_tarballs.jl @@ -14,10 +14,17 @@ sources = [ script = raw""" cd $WORKSPACE/srcdir cd asio/asio -./autogen.sh -./configure --prefix=${prefix} --build=${MACHTYPE} --host=${target} -make -j${nproc} -make install +if [[ ${target} == *-w64-mingw32 ]]; then + # Header-only: on Windows skip build (examples use POSIX-only asio::posix::stream_descriptor) and install headers manually + mkdir -p ${includedir} + cp include/asio.hpp ${includedir}/ + cp -r include/asio ${includedir}/ +else + ./autogen.sh + ./configure --prefix=${prefix} --build=${MACHTYPE} --host=${target} + make -j${nproc} + make install +fi """ # These are the platforms we will build for by default, unless further