diff options
-rw-r--r-- | testing/libgit2/10-qsort_r.patch | 28 | ||||
-rw-r--r-- | testing/libgit2/APKBUILD | 46 |
2 files changed, 74 insertions, 0 deletions
diff --git a/testing/libgit2/10-qsort_r.patch b/testing/libgit2/10-qsort_r.patch new file mode 100644 index 0000000000..056b733f4e --- /dev/null +++ b/testing/libgit2/10-qsort_r.patch @@ -0,0 +1,28 @@ +diff --git a/src/util.c b/src/util.c +index b3929bc..fe9af6f 100644 +--- a/src/util.c ++++ b/src/util.c +@@ -628,22 +628,7 @@ static int GIT_STDLIB_CALL git__qsort_r_glue_cmp( + void git__qsort_r( + void *els, size_t nel, size_t elsize, git__sort_r_cmp cmp, void *payload) + { +-#if defined(__MINGW32__) || defined(AMIGA) || \ +- defined(__OpenBSD__) || defined(__NetBSD__) || \ +- defined(__gnu_hurd__) || defined(__ANDROID_API__) || \ +- defined(__sun) || defined(__CYGWIN__) || \ +- (__GLIBC__ == 2 && __GLIBC_MINOR__ < 8) || \ +- (defined(_MSC_VER) && _MSC_VER < 1500) + git__insertsort_r(els, nel, elsize, NULL, cmp, payload); +-#elif defined(GIT_WIN32) +- git__qsort_r_glue glue = { cmp, payload }; +- qsort_s(els, nel, elsize, git__qsort_r_glue_cmp, &glue); +-#elif defined(BSD) +- git__qsort_r_glue glue = { cmp, payload }; +- qsort_r(els, nel, elsize, &glue, git__qsort_r_glue_cmp); +-#else +- qsort_r(els, nel, elsize, cmp, payload); +-#endif + } + + void git__insertsort_r( + diff --git a/testing/libgit2/APKBUILD b/testing/libgit2/APKBUILD new file mode 100644 index 0000000000..db3e4b4bd8 --- /dev/null +++ b/testing/libgit2/APKBUILD @@ -0,0 +1,46 @@ +# Contributor: Pierre-Gilas MILLON <pgmillon@gmail.com> +# Maintainer: +pkgname=libgit2 +pkgver=0.23.2 +pkgrel=0 +pkgdesc=" The Library http://libgit2.github.com" +url="https://libgit2.github.com/" +arch="all" +license="GPLv2" +depends="" +depends_dev="" +makedepends="$depends_dev python cmake zlib-dev curl-dev libssh2-dev" +install="" +subpackages="$pkgname-dev" +source=" + saveas-https://github.com/$pkgname/$pkgname/archive/v${pkgver}.tar.gz/$pkgname-${pkgver}.tar.gz + 10-qsort_r.patch + " + +_builddir="$srcdir/$pkgname-$pkgver" +prepare() { + local i + cd "$_builddir" + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done +} + +build() { + cd "$_builddir" + cmake -DCMAKE_INSTALL_PREFIX=/usr "$_srcdir" || return 1 +} + +package() { + cd "$_builddir" + make DESTDIR="$pkgdir" install || return 1 +} + +md5sums="ade3b85d759866c03b6188e397b652fa libgit2-0.23.2.tar.gz +280b532b905ca3360f262df2d847197c 10-qsort_r.patch" +sha256sums="20c0a6ee92c0e19207dac6ddc336b4ae4a1c4ddf91be0891e4b6e6ccba16df0b libgit2-0.23.2.tar.gz +2967ecb60cd4eb72bfd3bf9f096dab84e11587a2a9b6a49133a09acf0d68b496 10-qsort_r.patch" +sha512sums="aa11be93a135eeddd07d2f2a4cba019d42e33f185141caac1d0f89083652aa612f1381e3011396c6078b46f8bbeea894eb5fc25fcebbe13cb14dd9dfd8f40240 libgit2-0.23.2.tar.gz +23aba3338c4b9f96b34d23b7207181481edad5f7342540aa70f3667ba1771246081b035d36e5aab443cad25dec3e588ca22bdd4f6b39b8e3886b530ebd92ff12 10-qsort_r.patch" |