~alpine/aports

[alpine-aports] [PATCH 1/2] main/libgit2: update to 0.28.1

Details
Message ID
<20190416224257.23630-1-sir@cmpwn.com>
Sender timestamp
1555454576
DKIM signature
missing
Download raw message
Patch: +2 -53
---
 main/libgit2/APKBUILD                        |  6 +--
 main/libgit2/build-both-static-dynamic.patch | 49 --------------------
 2 files changed, 2 insertions(+), 53 deletions(-)
 delete mode 100644 main/libgit2/build-both-static-dynamic.patch

diff --git a/main/libgit2/APKBUILD b/main/libgit2/APKBUILD
index e3734a5ae9..fb4f4b3b6a 100644
--- a/main/libgit2/APKBUILD
+++ b/main/libgit2/APKBUILD
@@ -3,7 +3,7 @@
# Contributor: Pierre-Gilas MILLON <pgmillon@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libgit2
pkgver=0.27.7
pkgver=0.28.1
pkgrel=0
pkgdesc="A linkable library for Git"
url="https://libgit2.org/"
@@ -15,7 +15,6 @@ 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
	"
options="!check" # FIXME some tests fails
builddir="$srcdir/$pkgname-$pkgver"
@@ -62,5 +61,4 @@ tests() {
	cp -a "$builddir"/tests "$subpkgdir"/usr/src/$pkgname/
}

sha512sums="de2e266939bd40bc580603539e1156906b97299523336ddc6a66c3bec26729495bef2daa2d240b83b7e011e93852381e95a4407132b0440a5aa1e1b7642c0011  libgit2-0.27.7.tar.gz
268e24554282666900a2179a368dc2569cb3bce60ffea187fd53de1bc119a85abc02cddd8be2ab607d44db793c4807acdbb49fc5d1badfc08bf382fa511d7b3e  build-both-static-dynamic.patch"
sha512sums="5a1bc5c6af6ad25cb8b2c446e75a774d2a615d4999ec3223d681c7b120d83e7cecd94f1ca549bac0802f5324e27e73cc5a6483ad410636c2f06f098b30b1b647  libgit2-0.28.1.tar.gz"
diff --git a/main/libgit2/build-both-static-dynamic.patch b/main/libgit2/build-both-static-dynamic.patch
deleted file mode 100644
index 9912727a6b..0000000000
--- a/main/libgit2/build-both-static-dynamic.patch
@@ -1,49 +0,0 @@
From: Jakub Jirutka <jakub@jirutka.cz>
Date: Mon, 11 Apr 2017 3:23:00 +0200
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
@@ -39,7 +39,6 @@
 # Build options
 #
 OPTION( SONAME				"Set the (SO)VERSION of the target"		ON  )
-OPTION( BUILD_SHARED_LIBS	"Build Shared Library (OFF for Static)"	ON  )
 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 )
@@ -58,6 +57,8 @@
 OPTION( DEBUG_POOL			"Enable debug pool allocator"			OFF )
 OPTION( ENABLE_WERROR			"Enable compilation with -Werror"		OFF )
 OPTION( USE_BUNDLED_ZLIB    "Use the bundled version of zlib"       OFF )
+
+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
@@ -407,9 +407,12 @@
 ENDIF()
 
 # Compile and link libgit2
-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 ${WIN_RC} ${LIBGIT2_OBJECTS})
+SET_TARGET_PROPERTIES(git2_static PROPERTIES OUTPUT_NAME git2 CLEAN_DIRECT_OUTPUT 1)
+
 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})
@@ -445,7 +448,7 @@
 ENDIF ()
 
 # Install
-INSTALL(TARGETS git2
+INSTALL(TARGETS git2 git2_static
 	RUNTIME DESTINATION ${BIN_INSTALL_DIR}
 	LIBRARY DESTINATION ${LIB_INSTALL_DIR}
 	ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
-- 
2.21.0



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---
Reply to thread Export thread (mbox)