Skip to content

Commit

Permalink
[libpng] Build for experimental platforms
Browse files Browse the repository at this point in the history
Switch the build system from CMake to Autoconf because the autodetection of ARM
NEON for `aarch64-apple-darwin` (Apple Silicon, M1 CPU) at build time works with
the latter but not the former system.
  • Loading branch information
giordano committed May 22, 2021
1 parent e0a8abb commit 5b6399a
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions L/libpng/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,22 @@ sources = [
"daeb2620d829575513e35fecc83f0d3791a620b9b93d800b763542ece9390fb4"),
]

version = v"1.6.38" # <--- This version number is a lie, we need to bump it to build for experimental platforms

# Bash recipe for building across all platforms
script = raw"""
cd $WORKSPACE/srcdir/libpng-*/
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=$prefix -DCMAKE_TOOLCHAIN_FILE="${CMAKE_TARGET_TOOLCHAIN}" ..
make -j${ncore}
export CPPFLAGS="-I${includedir}"
./configure --prefix=${prefix} --build=${MACHTYPE} --host=${target} --disable-static
make -j${nproc}
make install
# Delete static libraries
rm ${prefix}/lib/libpng{,16}.a
"""

# These are the platforms we will build for by default, unless further
# platforms are passed in on the command line
platforms = supported_platforms()
platforms = supported_platforms(; experimental=true)

# The products that we will ensure are always built
products = [
Expand All @@ -35,4 +39,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")

0 comments on commit 5b6399a

Please sign in to comment.