X-Original-To: alpine-aports@lists.alpinelinux.org Received: from fx.arvanta.net (static-213-198-238-194.adsl.eunet.rs [213.198.238.194]) by lists.alpinelinux.org (Postfix) with ESMTP id 43C8CF84DC4 for ; Sat, 29 Dec 2018 17:44:58 +0000 (UTC) Received: from arya.arvanta.net (arya.arvanta.net [10.5.1.6]) by fx.arvanta.net (Postfix) with ESMTP id AC3DB19A42; Sat, 29 Dec 2018 18:44:56 +0100 (CET) From: =?UTF-8?q?Milan=20P=2E=20Stani=C4=87?= To: alpine-aports@lists.alpinelinux.org Cc: =?UTF-8?q?Milan=20P=2E=20Stani=C4=87?= Subject: [alpine-aports] [PATCH] community/libzip: build static libzip.a and add it to -dev apk Date: Sat, 29 Dec 2018 18:44:54 +0100 Message-Id: <20181229174454.32162-1-mps@arvanta.net> X-Mailer: git-send-email 2.18.1 X-Mailinglist: alpine-aports Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: build static version of libzip in two pass because upstream made switch which allows build only shared or static in single compile/build invocation add static libzip.a to libzip-dev with hackish cp/mv --- community/libzip/APKBUILD | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/community/libzip/APKBUILD b/community/libzip/APKBUILD index 0272295d83..1d0fa8d098 100644 --- a/community/libzip/APKBUILD +++ b/community/libzip/APKBUILD @@ -3,7 +3,7 @@ # Maintainer: Carlo Landmeter pkgname=libzip pkgver=1.5.1 -pkgrel=2 +pkgrel=3 pkgdesc="C library for manipulating zip archives" url="http://www.nih.at/libzip/index.html" arch="all" @@ -20,6 +20,17 @@ builddir="$srcdir/$pkgname-$pkgver" build() { cd "$builddir" + cmake \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DBUILD_SHARED_LIBS=False \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_FLAGS="$CXXFLAGS" \ + -DCMAKE_C_FLAGS="$CFLAGS" + make + + mkdir -p "$pkgdir"/tmp + cp "$builddir"/lib/libzip.a "$pkgdir"/tmp cmake \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_LIBDIR=lib \ @@ -28,6 +39,8 @@ build() { -DCMAKE_CXX_FLAGS="$CXXFLAGS" \ -DCMAKE_C_FLAGS="$CFLAGS" make + mv "$pkgdir"/tmp/libzip.a "$builddir"/lib/libzip.a + rm -rf "$pkgdir"/tmp } check() { @@ -38,6 +51,7 @@ check() { package() { cd "$builddir" make DESTDIR="$pkgdir" -j1 install + cp "$builddir"/lib/libzip.a "$pkgdir"/usr/lib } tools() { -- 2.18.1 --- Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org Help: alpine-aports+help@lists.alpinelinux.org ---