X-Original-To: alpine-aports@lists.alpinelinux.org Received: from mail.infogroup.kiev.ua (tera.infogroup.kiev.ua [195.144.25.26]) by lists.alpinelinux.org (Postfix) with ESMTP id F22F65C4524 for ; Mon, 20 Mar 2017 09:29:48 +0000 (GMT) Received: from ost.org.ua ([195.144.25.230] helo=alpine.ost.org.ua) by mail.infogroup.kiev.ua with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.80.1) (envelope-from ) id 1cptdL-0002kh-PO for alpine-aports@lists.alpinelinux.org; Mon, 20 Mar 2017 11:29:47 +0200 From: Valery Kartel To: alpine-aports@lists.alpinelinux.org Subject: [alpine-aports] [PATCH] testing/libnsl: new aport Date: Mon, 20 Mar 2017 11:29:35 +0200 Message-Id: <20170320092935.28575-1-valery.kartel@gmail.com> X-Mailer: git-send-email 2.11.1 Sender: droid@infogroup.kiev.ua X-Mailinglist: alpine-aports Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: http://www.linux-nis.org https://github.com/thkukuk/libnsl This library contains the public client interface for NIS(YP) and NIS+ in a IPv6 ready version --- testing/libnsl/APKBUILD | 47 +++++++++++++++++++++++++++++++++++++++++ testing/libnsl/cdefs.patch | 30 ++++++++++++++++++++++++++ testing/libnsl/nis_h.patch | 45 +++++++++++++++++++++++++++++++++++++++ testing/libnsl/tirpc_hack.patch | 13 ++++++++++++ 4 files changed, 135 insertions(+) create mode 100644 testing/libnsl/APKBUILD create mode 100644 testing/libnsl/cdefs.patch create mode 100644 testing/libnsl/nis_h.patch create mode 100644 testing/libnsl/tirpc_hack.patch diff --git a/testing/libnsl/APKBUILD b/testing/libnsl/APKBUILD new file mode 100644 index 0000000000..277caa6813 --- /dev/null +++ b/testing/libnsl/APKBUILD @@ -0,0 +1,47 @@ +# Contributor: Valery Kartel +# Maintainer: Valery Kartel +pkgname=libnsl +pkgver=1.0.5 +pkgrel=0 +pkgdesc="Public client interface for NIS(YP) and NIS+ in a IPv6 ready version" +url="http://www.linux-nis.org | https://github.com/thkukuk/libnsl" +arch="all" +license="LGPL2+" +options="!check" +depends= +depends_dev= +makedepends="autoconf automake libtool libc-dev gettext-dev libtirpc-dev" +install= +subpackages="$pkgname-dev" +source="https://github.com/thkukuk/$pkgname/archive/$pkgname-$pkgver.tar.gz + nis_h.patch + cdefs.patch + tirpc_hack.patch + " +builddir="$srcdir/$pkgname-$pkgname-$pkgver" + +prepare() { + default_prepare || return 1 + + cd "$builddir" + ./autogen.sh +} + +build() { + cd "$builddir" + ./configure LIBS="-lintl" \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix=/usr \ + || return 1 + make +} + +package() { + make -C "$builddir" DESTDIR="$pkgdir" install +} + +sha512sums="ce0423042d372a9f800738480d222164e7ad2e09c9efa80d4845b9a06b78f478c395a65a4c175dd708d01f0bb9be9514526c44df48990221fd6d28c785767c49 libnsl-1.0.5.tar.gz +6c555a8efab74eb55e0aaa2bef97d8ab14e382afaec59b99b47ff6f9abf4d33881f20543f88d41beabddfe934c368c4340c7254354fa9680120c0cc021df3468 nis_h.patch +a0a761a50d611207cae4ad8e46b5b61fed498fe8c094841de99a550b43a0f95febcbccfafcd9568622abeb6e822f4bd9a21ecb261cb86fd8f4e601ce60749a9d cdefs.patch +a2a0a7bb3f23bb65c6f4d80dc74c629d2a14a70832f7779f122ce07420ffe240e38df4f0d5b157a812d86538c929fa62ee536ee59b9b19f6b2aa26d8bbc20cf1 tirpc_hack.patch" diff --git a/testing/libnsl/cdefs.patch b/testing/libnsl/cdefs.patch new file mode 100644 index 0000000000..dbbe800a34 --- /dev/null +++ b/testing/libnsl/cdefs.patch @@ -0,0 +1,30 @@ +--- a/src/rpcsvc/nislib.h ++++ b/src/rpcsvc/nislib.h +@@ -19,6 +19,7 @@ + #ifndef __RPCSVC_NISLIB_H__ + #define __RPCSVC_NISLIB_H__ + ++#include + #include + + __BEGIN_DECLS +--- a/src/rpcsvc/ypclnt.h ++++ b/src/rpcsvc/ypclnt.h +@@ -20,6 +20,7 @@ + #ifndef __RPCSVC_YPCLNT_H__ + #define __RPCSVC_YPCLNT_H__ + ++#include + #include + + /* Some defines */ +--- a/src/rpcsvc/ypupd.h ++++ b/src/rpcsvc/ypupd.h +@@ -33,6 +33,7 @@ + #ifndef __RPCSVC_YPUPD_H__ + #define __RPCSVC_YPUPD_H__ + ++#include + #include + + #include diff --git a/testing/libnsl/nis_h.patch b/testing/libnsl/nis_h.patch new file mode 100644 index 0000000000..199259df2e --- /dev/null +++ b/testing/libnsl/nis_h.patch @@ -0,0 +1,45 @@ +--- a/src/rpcsvc/nis.h ++++ b/src/rpcsvc/nis.h +@@ -32,6 +32,7 @@ + #ifndef _RPCSVC_NIS_H + #define _RPCSVC_NIS_H 1 + ++#include + #include + #include + #include +@@ -56,6 +57,34 @@ + * + */ + ++#ifndef rawmemchr ++#define rawmemchr(s,c) memchr((s),(size_t)-1,(c)) ++#endif ++ ++#ifndef __asprintf ++#define __asprintf asprintf ++#endif ++ ++#ifndef __mempcpy ++#define __mempcpy mempcpy ++#endif ++ ++#ifndef __strtok_r ++#define __strtok_r strtok_r ++#endif ++ ++#ifndef __always_inline ++#define __always_inline __attribute__((__always_inline__)) ++#endif ++ ++#ifndef TEMP_FAILURE_RETRY ++#define TEMP_FAILURE_RETRY(exp) ({ \ ++typeof (exp) _rc; \ ++ do { \ ++ _rc = (exp); \ ++ } while (_rc == -1 && errno == EINTR); \ ++ _rc; }) ++#endif + + #ifndef __nis_object_h + #define __nis_object_h diff --git a/testing/libnsl/tirpc_hack.patch b/testing/libnsl/tirpc_hack.patch new file mode 100644 index 0000000000..7d994aa10f --- /dev/null +++ b/testing/libnsl/tirpc_hack.patch @@ -0,0 +1,13 @@ +For some reason tirpc library does not provide 'key_secretkey_is_set' + +--- a/src/nisplus/nis_callback.c ++++ b/src/nisplus/nis_callback.c +@@ -295,7 +295,7 @@ + cb->callback = callback; + cb->userdata = userdata; + +- if ((flags & NO_AUTHINFO) || !key_secretkey_is_set ()) ++ if (flags & NO_AUTHINFO) + { + cb->serv->key_type = NIS_PK_NONE; + cb->serv->pkey.n_bytes = NULL; -- 2.11.1 --- Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org Help: alpine-aports+help@lists.alpinelinux.org ---