mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-11 06:10:06 +02:00
117 lines
2.8 KiB
Bash
117 lines
2.8 KiB
Bash
SUMMARY="A SSH2 library"
|
|
DESCRIPTION="libssh is a multiplatform C library implementing the SSHv2 \
|
|
protocol on client and server side. With libssh, you can remotely execute \
|
|
programs, transfer files, use a secure and transparent tunnel, manage public \
|
|
keys and much more..."
|
|
HOMEPAGE="https://www.libssh.org/"
|
|
COPYRIGHT="2003-2025 Aris Adamantiadis, Andreas Schneider and libssh contributors"
|
|
LICENSE="GNU LGPL v2.1
|
|
BSD (2-clause)"
|
|
REVISION="2"
|
|
SOURCE_URI="https://www.libssh.org/files/${portVersion%.*}/libssh-$portVersion.tar.xz"
|
|
CHECKSUM_SHA256="69529fc18f5b601f0baf0e5a4501a2bc26df5e2f116f5f8f07f19fafaa6d04e7"
|
|
PATCHES="libssh-$portVersion.patchset"
|
|
|
|
ARCHITECTURES="all !x86_gcc2"
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
libVersion="4.10.2"
|
|
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
|
|
|
|
PROVIDES="
|
|
libssh$secondaryArchSuffix = $portVersion
|
|
lib:libssh$secondaryArchSuffix = $libVersionCompat
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
lib:libcrypto$secondaryArchSuffix
|
|
lib:libssl$secondaryArchSuffix
|
|
lib:libz$secondaryArchSuffix
|
|
"
|
|
|
|
PROVIDES_devel="
|
|
libssh${secondaryArchSuffix}_devel = $portVersion
|
|
devel:libssh$secondaryArchSuffix = $libVersionCompat
|
|
"
|
|
REQUIRES_devel="
|
|
libssh$secondaryArchSuffix == $portVersion base
|
|
"
|
|
|
|
ARCHITECTURES_doc="any"
|
|
|
|
PROVIDES_doc="
|
|
libssh_doc = $portVersion
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
devel:libcmocka$secondaryArchSuffix
|
|
devel:libcrypto$secondaryArchSuffix >= 3
|
|
devel:libssl$secondaryArchSuffix >= 3
|
|
devel:libssp_nonshared$secondaryArchSuffix
|
|
devel:libz$secondaryArchSuffix
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:cmake
|
|
cmd:doxygen
|
|
cmd:gcc$secondaryArchSuffix
|
|
cmd:ld$secondaryArchSuffix
|
|
cmd:make
|
|
cmd:pkg_config$secondaryArchSuffix
|
|
cmd:sshd
|
|
"
|
|
|
|
defineDebugInfoPackage libssh$secondaryArchSuffix \
|
|
"$libDir"/libssh.so.$libVersion
|
|
|
|
PATCH()
|
|
{
|
|
# Doesn't work in chroot, probably due to the lack of the passwd database
|
|
sed -i 's/cmocka_unit_test(torture_path_expand_tilde_unix),//' \
|
|
tests/unittests/torture_misc.c
|
|
}
|
|
|
|
BUILD()
|
|
{
|
|
_maybe_pie=()
|
|
if [ "$effectiveTargetArchitecture" = x86_64 ]; then
|
|
_maybe_pie=("-DCMAKE_EXE_LINKER_FLAGS=-pie -fstack-protector")
|
|
fi
|
|
|
|
cmake -B build -S . $cmakeDirArgs \
|
|
-DCMAKE_BUILD_TYPE="RelWithDebInfo" \
|
|
-DUNIT_TESTING=ON \
|
|
"${_maybe_pie[@]}"
|
|
make -C build $jobArgs
|
|
|
|
make -C build docs
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
make -C build install
|
|
|
|
prepareInstalledDevelLibs libssh
|
|
fixPkgconfig
|
|
|
|
ln -sr $libDir/libssh.so.$libVersion $libDir/libssh.so
|
|
|
|
sed -i "s,\/include,\/$relativeIncludeDir,g" \
|
|
"$libDir"/cmake/libssh/libssh-config.cmake
|
|
|
|
# devel package
|
|
packageEntries devel \
|
|
"$developDir" \
|
|
"$libDir"/cmake
|
|
|
|
install -d -m 755 "$developDir/documentation/libssh"
|
|
cp -rT build/doc/html "$developDir/documentation/libssh"
|
|
packageEntries doc "$developDir"
|
|
}
|
|
|
|
TEST()
|
|
{
|
|
# 96% tests passed, 1 tests failed out of 27
|
|
make -C build test
|
|
}
|