main/libgit2: upgrade to 0.27.0

This commit is contained in:
Jakub Jirutka 2018-04-28 20:54:54 +02:00
parent 8441638df3
commit 656d0b047d
3 changed files with 29 additions and 35 deletions

View File

@ -3,8 +3,8 @@
# Contributor: Pierre-Gilas MILLON <pgmillon@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libgit2
pkgver=0.26.3
pkgrel=1
pkgver=0.27.0
pkgrel=0
pkgdesc="A linkable library for Git"
url="https://libgit2.github.com/"
arch="all"
@ -15,8 +15,8 @@ subpackages="$pkgname-dev $pkgname-tests::noarch"
provides="$pkgname-libs" # for backward compatibility with v3.4
replaces="$pkgname-libs" # for backward compatibility with v3.4
source="$pkgname-$pkgver.tar.gz::https://github.com/$pkgname/$pkgname/archive/v$pkgver.tar.gz
build-both-static-dynamic.patch
libressl-2.7.patch
build-both-static-dynamic.patch
"
options="!check" # FIXME some tests fails
builddir="$srcdir/$pkgname-$pkgver"
@ -58,6 +58,6 @@ tests() {
cp -a "$builddir"/tests "$subpkgdir"/usr/src/$pkgname/
}
sha512sums="abcd3a904bed05c1f200be2ffbc2c44cebd1b548459ee834d5635c5eaf7bcd551a4993bcc1cb9fbeae9ea990c5ebc07655007ff4e623fa7c697f326c0ce12c3e libgit2-0.26.3.tar.gz
6817cae286f663c6ceb890576c491d89ffe0cf57b96a7340b8b4ef2c021a35d7672ce76b6e875ed72155e960455d29973329782850bd9cca543c6f74a9a6f93f build-both-static-dynamic.patch
02c167b55daa5045486662f628c53e5affd636043f95551b1349de8c2e643c98432c8b7bb73e8301c1f1c51248a7bf16e920ed759a349c0701e6f185f763078e libressl-2.7.patch"
sha512sums="1304f0b6182e1e6e7fccbec1a568aefb662e144a1aea4fff5901f3c012ff0f3d28720f17d19b9a1bc6c892c32fe602766fe98a15538a94a468d65d3e4a1680ca libgit2-0.27.0.tar.gz
274746c3ba20309a1d4a53e9843fd411abb06e7dbc5a16c179757522c395f11f54d49358e73513be3fe7e857b5b547cf6c4cfaf79963518e75c8849a41f2cfef libressl-2.7.patch
dab2acb9a2e8a2d372ed3819edf939445a7ed626a17eec613aeb827835703f37311c4136863605b547960d10844a753a3106f5ad22a20e0aee9f2b14f4ddf5eb build-both-static-dynamic.patch"

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Build both static and dynamic library
This is very hack-ish, it makes option BUILD_SHARED_LIBS unusable.
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -28,7 +28,6 @@
@@ -39,7 +39,6 @@
# Build options
#
OPTION( SONAME "Set the (SO)VERSION of the target" ON )
@ -13,36 +13,32 @@ This is very hack-ish, it makes option BUILD_SHARED_LIBS unusable.
OPTION( THREADSAFE "Build libgit2 as threadsafe" ON )
OPTION( BUILD_CLAR "Build Tests using the Clar suite" ON )
OPTION( BUILD_EXAMPLES "Build library usage example apps" OFF )
@@ -45,6 +44,8 @@
OPTION( CURL "Use curl for HTTP if available" ON)
@@ -58,6 +57,8 @@
OPTION( DEBUG_POOL "Enable debug pool allocator" OFF )
+SET( BUILD_SHARED_LIBS ON )
OPTION( ENABLE_WERROR "Enable compilation with -Werror" OFF )
OPTION( USE_BUNDLED_ZLIB "Use the bundled version of zlib" OFF )
+
IF(DEBUG_POOL)
ADD_DEFINITIONS(-DGIT_DEBUG_POOL)
ENDIF()
@@ -609,7 +610,8 @@
ENDIF()
+SET( BUILD_SHARED_LIBS ON )
IF (UNIX AND NOT APPLE)
OPTION( ENABLE_REPRODUCIBLE_BUILDS "Enable reproducible builds" OFF )
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -415,9 +415,12 @@
# Compile and link libgit2
-ADD_LIBRARY(git2 ${SRC_H} ${SRC_GIT2} ${SRC_OS} ${SRC_ZLIB} ${SRC_HTTP} ${SRC_REGEX} ${SRC_SSH} ${SRC_SHA1} ${WIN_RC})
+ADD_LIBRARY(objlib OBJECT ${SRC_H} ${SRC_GIT2} ${SRC_OS} ${SRC_ZLIB} ${SRC_HTTP} ${SRC_REGEX} ${SRC_SSH} ${SRC_SHA1} ${WIN_RC})
+ADD_LIBRARY(git2 SHARED $<TARGET_OBJECTS:objlib>)
TARGET_LINK_LIBRARIES(git2 ${SECURITY_DIRS})
TARGET_LINK_LIBRARIES(git2 ${COREFOUNDATION_DIRS})
TARGET_LINK_LIBRARIES(git2 ${SSL_LIBRARIES})
@@ -618,6 +620,9 @@
TARGET_LINK_LIBRARIES(git2 ${ICONV_LIBRARIES})
TARGET_OS_LIBRARIES(git2)
LINK_DIRECTORIES(${LIBGIT2_LIBDIRS})
-ADD_LIBRARY(git2 ${WIN_RC} ${LIBGIT2_OBJECTS})
+ADD_LIBRARY(git2 SHARED ${WIN_RC} ${LIBGIT2_OBJECTS})
TARGET_LINK_LIBRARIES(git2 ${LIBGIT2_LIBS})
+ADD_LIBRARY(git2_static STATIC $<TARGET_OBJECTS:objlib>)
+ADD_LIBRARY(git2_static STATIC ${WIN_RC} ${LIBGIT2_OBJECTS})
+SET_TARGET_PROPERTIES(git2_static PROPERTIES OUTPUT_NAME git2 CLEAN_DIRECT_OUTPUT 1)
+
# Workaround for Cmake bug #0011240 (see http://public.kitware.com/Bug/view.php?id=11240)
# Win64+MSVC+static libs = linker error
IF(MSVC AND GIT_ARCH_64 AND NOT BUILD_SHARED_LIBS)
@@ -646,7 +651,7 @@
SET_TARGET_PROPERTIES(git2 PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${libgit2_BINARY_DIR})
SET_TARGET_PROPERTIES(git2 PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${libgit2_BINARY_DIR})
SET_TARGET_PROPERTIES(git2 PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${libgit2_BINARY_DIR})
@@ -453,7 +457,7 @@
ENDIF ()
# Install

View File

@ -1,8 +1,6 @@
diff --git a/src/openssl_stream.h b/src/openssl_stream.h
index f5e59da..b769437 100644
--- a/src/openssl_stream.h
+++ b/src/openssl_stream.h
@@ -27,7 +27,7 @@ extern int git_openssl_stream_new(git_stream **out, const char *host, const char
--- a/src/streams/openssl.h
+++ b/src/streams/openssl.h
@@ -31,7 +31,7 @@