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

P11Kit: New version 0.25.5 #9780

Merged
merged 9 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from 7 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
44 changes: 28 additions & 16 deletions P/P11Kit/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,42 @@
using BinaryBuilder, Pkg

name = "P11Kit"
version = v"0.24.1"
version = v"0.25.5"

# Collection of sources required to complete build
sources = [
ArchiveSource("https://github.com/p11-glue/p11-kit/releases/download/$(version)/p11-kit-$(version).tar.xz", "d8be783efd5cd4ae534cee4132338e3f40f182c3205d23b200094ec85faaaef8")
ArchiveSource("https://github.com/p11-glue/p11-kit/releases/download/$(version)/p11-kit-$(version).tar.xz",
"04d0a86450cdb1be018f26af6699857171a188ac6d5b8c90786a60854e1198e5"),
DirectorySource("bundled"),
]

# Bash recipe for building across all platforms
script = raw"""
cd $WORKSPACE/srcdir
meson --cross-file=${MESON_TARGET_TOOLCHAIN} --buildtype=release p11-kit-*

# Meson beautifully forces thin archives, without checking whether the dynamic linker
# actually supports them: <https://github.com/mesonbuild/meson/issues/10823>. Let's remove
# the (deprecated...) `T` option to `ar`
sed -i.bak 's/csrDT/csrD/' build.ninja

ninja -j${nproc}
ninja install
install_license p11-kit-*/COPYING
cd ${WORKSPACE}/srcdir/p11-kit-*

# Update our compiler wrappers.
# (This prevents compiler warnings that are later treated as errors.)
# - Only pass linker arguments when linking.
if [[ ${target} = aarch64-apple-darwin* ]]; then
pushd /
atomic_patch -p0 ${WORKSPACE}/srcdir/patches/aarch4-apple-clang.patch
eschnett marked this conversation as resolved.
Show resolved Hide resolved
popd
fi
if [[ ${target} = x86_64-apple-darwin* ]]; then
pushd /
atomic_patch -p0 ${WORKSPACE}/srcdir/patches/x86_64-apple-clang.patch
popd
fi

meson setup --cross-file="${MESON_TARGET_TOOLCHAIN}" --buildtype=release builddir
meson compile -C builddir
meson install -C builddir
"""

# 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 = [
# p11-kit-client.so is not built on Windows, so we temporarily disable it
Expand All @@ -39,8 +48,11 @@ products = [
]

# Dependencies that must be installed before this package can be built
dependencies = Dependency[
dependencies = [
Dependency("Libffi_jll"),
eschnett marked this conversation as resolved.
Show resolved Hide resolved
]

# Build the tarballs, and possibly a `build.jl` as well.
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; julia_compat="1.6")
# Prefer GCC 6 to define `memcpy@GLIBC_2.14'`
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies;
clang_use_lld=false, julia_compat="1.6", preferred_gcc_version=v"6")
15 changes: 15 additions & 0 deletions P/P11Kit/bundled/patches/aarch4-apple-clang.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
--- opt/bin/aarch64-apple-darwin20-libgfortran5-cxx11/aarch64-apple-darwin20-clang
+++ opt/bin/aarch64-apple-darwin20-libgfortran5-cxx11/aarch64-apple-darwin20-clang
@@ -23,11 +23,11 @@
PRE_FLAGS+=( /opt/aarch64-apple-darwin20/aarch64-apple-darwin20/sys-root/usr/include/c++/v1 )
PRE_FLAGS+=( -Wno-unused-command-line-argument )
PRE_FLAGS+=( -mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET} )
- PRE_FLAGS+=( -Wl,-sdk_version,${MACOSX_DEPLOYMENT_TARGET} )
fi


if [[ " ${ARGS[@]} " != *' -c '* ]] && [[ " ${ARGS[@]} " != *' -E '* ]] && [[ " ${ARGS[@]} " != *' -M '* ]] && [[ " ${ARGS[@]} " != *' -fsyntax-only '* ]]; then
+ PRE_FLAGS+=( -Wl,-sdk_version,${MACOSX_DEPLOYMENT_TARGET} )
POST_FLAGS+=( -L/opt/aarch64-apple-darwin20/aarch64-apple-darwin20/lib )
POST_FLAGS+=( -fuse-ld=aarch64-apple-darwin20 )
POST_FLAGS+=( -headerpad_max_install_names )
15 changes: 15 additions & 0 deletions P/P11Kit/bundled/patches/x86_64-apple-clang.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
--- opt/bin/x86_64-apple-darwin14-libgfortran3-cxx11/x86_64-apple-darwin14-clang
+++ opt/bin/x86_64-apple-darwin14-libgfortran3-cxx11/x86_64-apple-darwin14-clang
@@ -23,11 +23,11 @@
PRE_FLAGS+=( /opt/x86_64-apple-darwin14/x86_64-apple-darwin14/sys-root/usr/include/c++/v1 )
PRE_FLAGS+=( -Wno-unused-command-line-argument )
PRE_FLAGS+=( -mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET} )
- PRE_FLAGS+=( -Wl,-sdk_version,${MACOSX_DEPLOYMENT_TARGET} )
fi


if [[ " ${ARGS[@]} " != *' -c '* ]] && [[ " ${ARGS[@]} " != *' -E '* ]] && [[ " ${ARGS[@]} " != *' -M '* ]] && [[ " ${ARGS[@]} " != *' -fsyntax-only '* ]]; then
+ PRE_FLAGS+=( -Wl,-sdk_version,${MACOSX_DEPLOYMENT_TARGET} )
POST_FLAGS+=( -L/opt/x86_64-apple-darwin14/x86_64-apple-darwin14/lib )
POST_FLAGS+=( -fuse-ld=x86_64-apple-darwin14 )
POST_FLAGS+=( -headerpad_max_install_names )