diff options
author | Leo <thinkabit.ukim@gmail.com> | 2019-08-23 16:25:46 -0300 |
---|---|---|
committer | Leonardo Arena <rnalrd@alpinelinux.org> | 2019-08-28 14:11:10 +0000 |
commit | 8722a87ad0984a568e9c1b0862ed4e0c2b837d86 (patch) | |
tree | fe09df22ac0ce22f5898b842581f96c3d3520a09 /main | |
parent | da2ac80bb19479cfd7d771c119f5aa55249c1721 (diff) | |
download | aports-8722a87ad0984a568e9c1b0862ed4e0c2b837d86.tar.bz2 aports-8722a87ad0984a568e9c1b0862ed4e0c2b837d86.tar.xz |
main/libgit2: build static library
Required for cargo static
Diffstat (limited to 'main')
-rw-r--r-- | main/libgit2/APKBUILD | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/main/libgit2/APKBUILD b/main/libgit2/APKBUILD index b4d39fcdf3..edb2135574 100644 --- a/main/libgit2/APKBUILD +++ b/main/libgit2/APKBUILD @@ -4,16 +4,14 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=libgit2 pkgver=0.28.2 -pkgrel=0 +pkgrel=1 pkgdesc="A linkable library for Git" url="https://libgit2.org/" arch="all" license="GPL-2.0-only WITH GCC-exception-2.0" depends_dev="curl-dev libssh2-dev" makedepends="$depends_dev python2 cmake zlib-dev openssl-dev" -subpackages="$pkgname-dev $pkgname-tests::noarch" -provides="$pkgname-libs" # for backward compatibility with v3.4 -replaces="$pkgname-libs" # for backward compatibility with v3.4 +subpackages="$pkgname-static $pkgname-dev $pkgname-tests::noarch" source="$pkgname-$pkgver.tar.gz::https://github.com/$pkgname/$pkgname/archive/v$pkgver.tar.gz " options="!check" # FIXME some tests fails @@ -41,6 +39,17 @@ build() { -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_C_FLAGS="$CFLAGS" make + + # Build static library + mkdir -p "$builddir"/build-static + cd "$builddir"/build-static + + cmake .. \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_C_FLAGS="$CFLAGS" \ + -DBUILD_SHARED_LIBS=OFF + make } check() { @@ -49,8 +58,8 @@ check() { } package() { - cd "$builddir"/build - make DESTDIR="$pkgdir" install + make -C build DESTDIR="$pkgdir" install + make -C build-static DESTDIR="$pkgdir" install } tests() { |