From 6a7a82e663d642693ba39500d1c8f3395ea3b708 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Tue, 16 Apr 2019 12:24:20 -0400 Subject: [PATCH] libgit2 & pygit2: update --- sr.ht/libgit2/APKBUILD | 6 +-- sr.ht/libgit2/build-both-static-dynamic.patch | 49 ----------------- sr.ht/py-pygit2/APKBUILD | 53 +++++++++++++++++++ 3 files changed, 55 insertions(+), 53 deletions(-) delete mode 100644 sr.ht/libgit2/build-both-static-dynamic.patch create mode 100644 sr.ht/py-pygit2/APKBUILD diff --git a/sr.ht/libgit2/APKBUILD b/sr.ht/libgit2/APKBUILD index 52b6dee..4da2557 100644 --- a/sr.ht/libgit2/APKBUILD +++ b/sr.ht/libgit2/APKBUILD @@ -3,7 +3,7 @@ # Contributor: Pierre-Gilas MILLON # Maintainer: Natanael Copa pkgname=libgit2 -pkgver=0.27.8 +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 handle-crlf-in-parse_header_start.patch " options="!check" # FIXME some tests fails @@ -63,6 +62,5 @@ tests() { cp -a "$builddir"/tests "$subpkgdir"/usr/src/$pkgname/ } -sha512sums="53ab69a0687afd315029fdbe0ce8192b7e88f7f1ff6bc9c4875718e638cecd64755a9942ad605e6c388c58c6b892b351d54c5405de8e0d5ba90406055a25ffaa libgit2-0.27.8.tar.gz -268e24554282666900a2179a368dc2569cb3bce60ffea187fd53de1bc119a85abc02cddd8be2ab607d44db793c4807acdbb49fc5d1badfc08bf382fa511d7b3e build-both-static-dynamic.patch +sha512sums="5a1bc5c6af6ad25cb8b2c446e75a774d2a615d4999ec3223d681c7b120d83e7cecd94f1ca549bac0802f5324e27e73cc5a6483ad410636c2f06f098b30b1b647 libgit2-0.28.1.tar.gz c55455c9548c01cda77641ce4c0b328c9cb8fc1b5b6dd8401b50ee7665034c8382cd651db27272931f169b898de36d1cb1b6d0266369cd63664505d881e25317 handle-crlf-in-parse_header_start.patch" diff --git a/sr.ht/libgit2/build-both-static-dynamic.patch b/sr.ht/libgit2/build-both-static-dynamic.patch deleted file mode 100644 index 9912727..0000000 --- a/sr.ht/libgit2/build-both-static-dynamic.patch +++ /dev/null @@ -1,49 +0,0 @@ -From: Jakub Jirutka -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} diff --git a/sr.ht/py-pygit2/APKBUILD b/sr.ht/py-pygit2/APKBUILD new file mode 100644 index 0000000..baff181 --- /dev/null +++ b/sr.ht/py-pygit2/APKBUILD @@ -0,0 +1,53 @@ +# Contributor: Pierre-Gildas MILLON +# Maintainer: +pkgname=py-pygit2 +_pkgname=pygit2 +pkgver=0.28.0 +pkgrel=0 +pkgdesc="Python bindings for libgit2" +url="https://github.com/libgit2/pygit2" +arch="all" +license="GPL-2.0-only-WITH-GCC-exception-2.0" +depends="py-cffi py-six" +makedepends="python2-dev python3-dev py-setuptools libgit2-dev" +subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3" +source="https://pypi.io/packages/source/p/$_pkgname/$_pkgname-$pkgver.tar.gz" +builddir="$srcdir/$_pkgname-$pkgver" + +build() { + cd "$builddir" + python2 setup.py build + python3 setup.py build +} + +check() { + cd "$builddir" + python2 setup.py check + python3 setup.py check +} + +package() { + mkdir -p "$pkgdir" +} + +_py2() { + replaces="$pkgname" + depends="${depends//py-/py2-}" + _py python2 +} + +_py3() { + depends="${depends//py-/py3-}" + _py python3 +} + +_py() { + local python="$1" + pkgdesc="$pkgdesc (for $python)" + install_if="$pkgname=$pkgver-r$pkgrel $python" + + cd "$builddir" + $python setup.py install --prefix=/usr --root="$subpkgdir" +} + +sha512sums="a14751708873559ca653fda7c63dee47e4e7086c61c64b139c0dae0d1c66ea2ef3fd74afb774aa03f64aae34168828dd0c2b4533e137bd8bdc22a4104bb3e79e pygit2-0.28.0.tar.gz" -- 2.45.2