mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
libgit2, bump version, drop patchset (#7059)
This commit is contained in:
@@ -13,17 +13,23 @@ DESCRIPTION="The library provides:
|
||||
* descriptive and detailed error messages
|
||||
* ...and more (over 175 different API calls)"
|
||||
HOMEPAGE="https://libgit2.github.com/"
|
||||
COPYRIGHT="2005-2018 libgit2 project"
|
||||
COPYRIGHT="2005-2022 libgit2 project"
|
||||
LICENSE="GNU LGPL v2"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/libgit2/libgit2/archive/v$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="f48b961e463a9e4e7e7e58b21a0fb5a9b2a1d24d9ba4d15870a0c9b8ad965163"
|
||||
CHECKSUM_SHA256="8de872a0f201b33d9522b817c92e14edb4efad18dae95cf156cf240b2efff93e"
|
||||
SOURCE_FILENAME="libgit2-$portVersion.tar.gz"
|
||||
PATCHES="libgit2-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
commandBinDir=$binDir
|
||||
commandSuffix=$secondaryArchSuffix
|
||||
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
||||
commandSuffix=
|
||||
commandBinDir=$prefix/bin
|
||||
fi
|
||||
|
||||
libVersion="$portVersion"
|
||||
libVersionCompat="$libVersion compat >= ${libVersion%.*}"
|
||||
|
||||
@@ -49,6 +55,20 @@ REQUIRES_devel="
|
||||
libgit2$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
|
||||
PROVIDES_tools="
|
||||
libgit2${secondaryArchSuffix}_tools
|
||||
cmd:git2_cli$commandSuffix = $portVersion
|
||||
"
|
||||
REQUIRES_tools="
|
||||
libgit2$secondaryArchSuffix == $portVersion base
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libcrypto$secondaryArchSuffix
|
||||
lib:libiconv$secondaryArchSuffix
|
||||
lib:libpcre$secondaryArchSuffix
|
||||
lib:libssh2$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libcrypto$secondaryArchSuffix
|
||||
@@ -71,38 +91,36 @@ BUILD_PREREQUIRES="
|
||||
defineDebugInfoPackage libgit2$secondaryArchSuffix \
|
||||
"$libDir"/libgit2.so.$libVersion
|
||||
|
||||
|
||||
BUILD()
|
||||
{
|
||||
mkdir -p build && cd build
|
||||
|
||||
OPTIONS=
|
||||
if [ $effectiveTargetArchitecture = x86_gcc2 ] ; then
|
||||
OPTIONS=-DTHREADSAFE=OFF \
|
||||
-DBUILD_TESTS=OFF -L
|
||||
fi
|
||||
|
||||
cmake .. \
|
||||
cmake -Bbuild -S. \
|
||||
$cmakeDirArgs \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_BINDIR=$commandBinDir \
|
||||
-DBUILD_CLAR=OFF \
|
||||
-DBUILD_EXAMPLES=OFF $OPTIONS
|
||||
-DUSE_ICONV=ON \
|
||||
-DUSE_SSH=ON \
|
||||
-DBUILD_EXAMPLES=OFF
|
||||
|
||||
make $jobArgs
|
||||
make -C build $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd build
|
||||
make install
|
||||
make -C build install
|
||||
|
||||
prepareInstalledDevelLib libgit2
|
||||
fixPkgconfig
|
||||
|
||||
packageEntries devel $developDir
|
||||
packageEntries devel \
|
||||
$developDir
|
||||
|
||||
packageEntries tools \
|
||||
$commandBinDir
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
# See tests/README.md
|
||||
true
|
||||
make VERBOSE=1 test -C build
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
From 081229d6e982bbe309fe26e5ffe197df2d5d5d7d Mon Sep 17 00:00:00 2001
|
||||
From: Niels Sascha Reedijk <niels.reedijk@gmail.com>
|
||||
Date: Thu, 2 Jun 2022 10:27:55 +0200
|
||||
Subject: libgit2, import PR by nielx
|
||||
|
||||
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index e7b54d0..65e830d 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -57,6 +57,8 @@ check_function_exists(qsort_s GIT_QSORT_S)
|
||||
|
||||
check_function_exists(getentropy GIT_RAND_GETENTROPY)
|
||||
|
||||
+check_function_exists(getloadavg GIT_RAND_GETLOADAVG)
|
||||
+
|
||||
# Find required dependencies
|
||||
|
||||
if(WIN32)
|
||||
@@ -65,8 +67,8 @@ elseif(CMAKE_SYSTEM_NAME MATCHES "(Solaris|SunOS)")
|
||||
list(APPEND LIBGIT2_SYSTEM_LIBS socket nsl)
|
||||
list(APPEND LIBGIT2_PC_LIBS "-lsocket" "-lnsl")
|
||||
elseif(CMAKE_SYSTEM_NAME MATCHES "Haiku")
|
||||
- list(APPEND LIBGIT2_SYSTEM_LIBS network)
|
||||
- list(APPEND LIBGIT2_PC_LIBS "-lnetwork")
|
||||
+ list(APPEND LIBGIT2_SYSTEM_LIBS gnu network)
|
||||
+ list(APPEND LIBGIT2_PC_LIBS "-lgnu -lnetwork")
|
||||
endif()
|
||||
|
||||
check_library_exists(rt clock_gettime "time.h" NEED_LIBRT)
|
||||
diff --git a/src/features.h.in b/src/features.h.in
|
||||
index f920135..4f9ee13 100644
|
||||
--- a/src/features.h.in
|
||||
+++ b/src/features.h.in
|
||||
@@ -49,5 +49,6 @@
|
||||
#cmakedefine GIT_SHA1_MBEDTLS 1
|
||||
|
||||
#cmakedefine GIT_RAND_GETENTROPY 1
|
||||
+#cmakedefine GIT_RAND_GETLOADAVG 1
|
||||
|
||||
#endif
|
||||
diff --git a/src/rand.c b/src/rand.c
|
||||
index 0a20813..23d72c6 100644
|
||||
--- a/src/rand.c
|
||||
+++ b/src/rand.c
|
||||
@@ -106,7 +106,13 @@ GIT_INLINE(int) getseed(uint64_t *seed)
|
||||
return -1;
|
||||
}
|
||||
|
||||
+# if defined(GIT_RAND_GETLOADAVG)
|
||||
getloadavg(loadavg, 3);
|
||||
+# else
|
||||
+ loadavg[0] = drand48();
|
||||
+ loadavg[1] = drand48();
|
||||
+ loadavg[2] = drand48();
|
||||
+# endif
|
||||
|
||||
*seed = 0;
|
||||
*seed |= ((uint64_t)tv.tv_usec << 40);
|
||||
--
|
||||
2.36.1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user