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

Add recipe for libssh 0.10.6 #7903

Merged
merged 4 commits into from
Jan 5, 2024
Merged
Changes from 1 commit
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
65 changes: 65 additions & 0 deletions L/libssh/build_tarballs.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# 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 = "libssh"
version = v"0.10.6"

# Collection of sources required to complete build
sources = [
ArchiveSource("https://www.libssh.org/files/$(version.major).$(version.minor)/libssh-$(version).tar.xz", "1861d498f5b6f1741b6abc73e608478491edcf9c9d4b6630eef6e74596de9dc1")
]

# Bash recipe for building across all platforms
script = raw"""
# Necessary for cmake to find openssl on Windows
export OPENSSL_ROOT_DIR=$WORKSPACE/destdir/lib64
giordano marked this conversation as resolved.
Show resolved Hide resolved
export DOC_DIR=${prefix}/usr/share/doc/libssh
giordano marked this conversation as resolved.
Show resolved Hide resolved

# Build and install library
cd $WORKSPACE/srcdir/libssh-*
mkdir build
cd build/

# Kerberos_krb5_jll is only built for Linux and FreeBSD, so GSSAPI support is
# only available on those platforms.
if [[ ${target} == *linux* || ${target} == *freebsd* ]]; then
export GSSAPI_ENABLED=ON
else
export GSSAPI_ENABLED=OFF
fi

cmake -DCMAKE_INSTALL_PREFIX=$prefix -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TARGET_TOOLCHAIN} \
-DCMAKE_BUILD_TYPE=Release \
-DWITH_GSSAPI=${GSSAPI_ENABLED} \
-DWITH_EXAMPLES=OFF \
-DDOXYGEN_GENERATE_TAGFILE='tags.xml' ..
make -j${nproc}
make docs install

# Install Doxygen tagfile
mkdir -p ${DOC_DIR}
cp ../doc/tags.xml ${DOC_DIR}
giordano marked this conversation as resolved.
Show resolved Hide resolved
"""

# These are the platforms we will build for by default, unless further
# platforms are passed in on the command line
platforms = supported_platforms(; experimental=true)
giordano marked this conversation as resolved.
Show resolved Hide resolved


# The products that we will ensure are always built
products = [
LibraryProduct("libssh", :libssh),
FileProduct("usr/share/doc/libssh/tags.xml", :doxygen_tags)
]

# Dependencies that must be installed before this package can be built
dependencies = [
HostBuildDependency("Doxygen_jll"),
Dependency("Kerberos_krb5_jll"),
Dependency(PackageSpec(name="OpenSSL_jll", uuid="458c3c95-2e84-50aa-8efc-19380b2a3a95")),
giordano marked this conversation as resolved.
Show resolved Hide resolved
Dependency(PackageSpec(name="Zlib_jll", uuid="83775a58-1f1d-513f-b197-d71354ab007a"))
]

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