mirror of
https://github.com/yann64/haikuports.git
synced 2026-03-19 01:46:00 +01:00
libsmb2, fix recipe (#6449)
Co-authored-by: begasus <begasus@gmail.com>
This commit is contained in:
81
dev-libs/libsmb2/libsmb2-4.0.0.recipe
Normal file
81
dev-libs/libsmb2/libsmb2-4.0.0.recipe
Normal file
@@ -0,0 +1,81 @@
|
||||
SUMMARY="SMB2/3 userspace client"
|
||||
DESCRIPTION="Libsmb2 is a userspace client library for accessing SMB2/SMB3 \
|
||||
shares on a network.
|
||||
It is high performance and fully async. It supports both zero-copy \
|
||||
for SMB READ/WRITE commands as well as compounded commands."
|
||||
HOMEPAGE="https://github.com/sahlberg/libsmb2"
|
||||
COPYRIGHT="2020 Ronnie Sahlberg"
|
||||
LICENSE="GNU LGPL v2.1"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/sahlberg/libsmb2/archive/refs/tags/v${portVersion}.tar.gz"
|
||||
CHECKSUM_SHA256="b4d1b13bc07adc68379a72f723b9032a950afd62fed7f2aa3e57f3421406da11"
|
||||
PATCHES="libsmb2-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
libVersion="$portVersion"
|
||||
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
|
||||
|
||||
PROVIDES="
|
||||
libsmb2$secondaryArchSuffix = $portVersion
|
||||
lib:libsmb2$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
libsmb2${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:libsmb2$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES_devel="
|
||||
libsmb2$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libssl$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:cmake
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
"
|
||||
|
||||
|
||||
defineDebugInfoPackage libsmb2$secondaryArchSuffix \
|
||||
$libDir/libsmb2.so.$libVersion
|
||||
|
||||
BUILD()
|
||||
{
|
||||
cmake -B build -S . \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DCMAKE_C_FLAGS="-DB_USE_POSITIVE_POSIX_ERRORS" \
|
||||
-DCMAKE_EXE_LINKER_FLAGS="-lposix_error_mapper -lnetwork" \
|
||||
-DINSTALL_CMAKE_DIR=$libDir/cmake \
|
||||
-DINSTALL_LIB_DIR=$libDir \
|
||||
-DINSTALL_INC_DIR=$includeDir \
|
||||
-DINSTALL_PKGCONFIG_DIR=$libDir/pkgconfig
|
||||
make -C build $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make -C build install
|
||||
|
||||
prepareInstalledDevelLib libsmb2
|
||||
fixPkgconfig
|
||||
|
||||
# devel package
|
||||
packageEntries devel \
|
||||
$developDir \
|
||||
$libDir/cmake
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
true
|
||||
# make -C build test # no tests provided
|
||||
}
|
||||
44
dev-libs/libsmb2/patches/libsmb2-4.0.0.patchset
Normal file
44
dev-libs/libsmb2/patches/libsmb2-4.0.0.patchset
Normal file
@@ -0,0 +1,44 @@
|
||||
From 70a5e9e2e12d0a7225c26f272765c0ba8e2bc2aa Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
|
||||
Date: Mon, 29 Nov 2021 18:26:02 +0100
|
||||
Subject: Build fix
|
||||
|
||||
|
||||
diff --git a/include/portable-endian.h b/include/portable-endian.h
|
||||
index 0d2f180..68a863b 100644
|
||||
--- a/include/portable-endian.h
|
||||
+++ b/include/portable-endian.h
|
||||
@@ -65,7 +65,7 @@
|
||||
# define htole64(x) (x)
|
||||
# define le64toh(x) (x)
|
||||
|
||||
-#elif defined(__linux__) || defined(__CYGWIN__)
|
||||
+#elif defined(__linux__) || defined(__CYGWIN__) || defined(__HAIKU__)
|
||||
|
||||
# include <endian.h>
|
||||
|
||||
--
|
||||
2.30.2
|
||||
|
||||
|
||||
From 8be829cd60ae1ffc7020ac935e4bd97077af9509 Mon Sep 17 00:00:00 2001
|
||||
From: begasus <begasus@gmail.com>
|
||||
Date: Sun, 5 Dec 2021 12:54:59 +0000
|
||||
Subject: Fix install path
|
||||
|
||||
|
||||
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
|
||||
index abc9b59..9023d6e 100644
|
||||
--- a/lib/CMakeLists.txt
|
||||
+++ b/lib/CMakeLists.txt
|
||||
@@ -62,5 +62,5 @@ endif()
|
||||
|
||||
install(TARGETS smb2 EXPORT smb2
|
||||
RUNTIME DESTINATION bin
|
||||
- ARCHIVE DESTINATION lib${LIB_SUFFIX}
|
||||
- LIBRARY DESTINATION lib${LIB_SUFFIX})
|
||||
+ ARCHIVE DESTINATION ${INSTALL_LIB_DIR}
|
||||
+ LIBRARY DESTINATION ${INSTALL_LIB_DIR})
|
||||
--
|
||||
2.30.2
|
||||
|
||||
Reference in New Issue
Block a user