Skip to content
Open
Show file tree
Hide file tree
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
16 changes: 11 additions & 5 deletions I/iperf/build_tarballs.jl
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
# Note that this script can accept some limited command-line arguments, run
# `julia build_tarballs.jl --help` to see a usage message.
using BinaryBuilder
using BinaryBuilder, Pkg

const YGGDRASIL_DIR = "../.."
include(joinpath(YGGDRASIL_DIR, "platforms", "macos_sdks.jl"))

name = "iperf"
version = v"3.7.0"
version = v"3.21"

# Collection of sources required to complete build
sources = [
"https://github.com/esnet/iperf/archive/3.7.tar.gz" =>
"c349924a777e8f0a70612b765e26b8b94cc4a97cc21a80ed260f65e9823c8fc5",
ArchiveSource("https://github.com/esnet/iperf/releases/download/$(version.major).$(version.minor)/iperf-$(version.major).$(version.minor).tar.gz", "656e4405ebd620121de7ceca3eaf43a88f79ea1b857d041a6a0b1314801acdd8"),
DirectorySource("./bundled"),
]

# Bash recipe for building across all platforms
script = raw"""
cd $WORKSPACE/srcdir/iperf-*
atomic_patch -p1 $WORKSPACE/srcdir/patches/0001-use-uint64_t-for-atomic-fallback.patch # work around https://github.com/esnet/iperf/issues/2060
./configure --prefix=${prefix} --build=${MACHTYPE} --host=${target} --disable-profiling
make -j${nproc}
make install
"""

sources, script = require_macos_sdk("10.13", sources, script)

# These are the platforms we will build for by default, unless further
# platforms are passed in on the command line
platforms = filter(!Sys.iswindows, supported_platforms())
Expand All @@ -34,4 +40,4 @@ dependencies = [
]

# 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")
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/src/iperf_api.h b/src/iperf_api.h
index XXXXXXX..YYYYYYY 100644
--- a/src/iperf_api.h
+++ b/src/iperf_api.h
@@ -44,8 +44,9 @@
#ifdef HAVE_STDATOMIC_H
#include <stdatomic.h>
#else
#warning "No <stdatomic.h> available"
-typedef u_int64_t atomic_uint_fast64_t;
+#include <stdint.h>
+typedef uint64_t atomic_uint_fast64_t;
#endif // HAVE_STDATOMIC_H