All of lore.kernel.org
 help / color / mirror / Atom feed
From: Khem Raj <raj.khem@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 02/15] libnsl2: Add recipe
Date: Sun, 21 May 2017 22:00:29 -0700	[thread overview]
Message-ID: <20170522050042.42403-2-raj.khem@gmail.com> (raw)
In-Reply-To: <20170522050042.42403-1-raj.khem@gmail.com>

NIS functionality has been split out into independent
library from glibc

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../0001-include-sys-cdefs.h-explicitly.patch      | 68 ++++++++++++++++++++++
 .../0002-Define-glibc-specific-macros.patch        | 57 ++++++++++++++++++
 meta/recipes-extended/libnsl/libnsl2_git.bb        | 35 +++++++++++
 3 files changed, 160 insertions(+)
 create mode 100644 meta/recipes-extended/libnsl/libnsl2/0001-include-sys-cdefs.h-explicitly.patch
 create mode 100644 meta/recipes-extended/libnsl/libnsl2/0002-Define-glibc-specific-macros.patch
 create mode 100644 meta/recipes-extended/libnsl/libnsl2_git.bb

diff --git a/meta/recipes-extended/libnsl/libnsl2/0001-include-sys-cdefs.h-explicitly.patch b/meta/recipes-extended/libnsl/libnsl2/0001-include-sys-cdefs.h-explicitly.patch
new file mode 100644
index 0000000000..c6c259adb8
--- /dev/null
+++ b/meta/recipes-extended/libnsl/libnsl2/0001-include-sys-cdefs.h-explicitly.patch
@@ -0,0 +1,68 @@
+From 508a0ff690dfebc17c4f55a5f81824ed549bed66 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 18 Apr 2017 09:13:33 -0700
+Subject: [PATCH 1/2] include sys/cdefs.h explicitly
+
+glibc includes this header indirectly but not musl
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream_status: Pending
+
+ src/rpcsvc/nis.h    | 1 +
+ src/rpcsvc/nislib.h | 1 +
+ src/rpcsvc/ypclnt.h | 1 +
+ src/rpcsvc/ypupd.h  | 1 +
+ 4 files changed, 4 insertions(+)
+
+diff --git a/src/rpcsvc/nis.h b/src/rpcsvc/nis.h
+index 933c4d9..88cbca0 100644
+--- a/src/rpcsvc/nis.h
++++ b/src/rpcsvc/nis.h
+@@ -32,6 +32,7 @@
+ #ifndef _RPCSVC_NIS_H
+ #define _RPCSVC_NIS_H 1
+ 
++#include <sys/cdefs.h>
+ #include <features.h>
+ #include <rpc/rpc.h>
+ #include <rpcsvc/nis_tags.h>
+diff --git a/src/rpcsvc/nislib.h b/src/rpcsvc/nislib.h
+index a59c19b..a53fab3 100644
+--- a/src/rpcsvc/nislib.h
++++ b/src/rpcsvc/nislib.h
+@@ -19,6 +19,7 @@
+ #ifndef	__RPCSVC_NISLIB_H__
+ #define	__RPCSVC_NISLIB_H__
+ 
++#include <sys/cdefs.h>
+ #include <features.h>
+ 
+ __BEGIN_DECLS
+diff --git a/src/rpcsvc/ypclnt.h b/src/rpcsvc/ypclnt.h
+index fe43fd4..a686b61 100644
+--- a/src/rpcsvc/ypclnt.h
++++ b/src/rpcsvc/ypclnt.h
+@@ -20,6 +20,7 @@
+ #ifndef	__RPCSVC_YPCLNT_H__
+ #define	__RPCSVC_YPCLNT_H__
+ 
++#include <sys/cdefs.h>
+ #include <features.h>
+ 
+ /* Some defines */
+diff --git a/src/rpcsvc/ypupd.h b/src/rpcsvc/ypupd.h
+index d07fd4d..2c57301 100644
+--- a/src/rpcsvc/ypupd.h
++++ b/src/rpcsvc/ypupd.h
+@@ -33,6 +33,7 @@
+ #ifndef __RPCSVC_YPUPD_H__
+ #define __RPCSVC_YPUPD_H__
+ 
++#include <sys/cdefs.h>
+ #include <features.h>
+ 
+ #include <rpc/rpc.h>
+-- 
+2.12.2
+
diff --git a/meta/recipes-extended/libnsl/libnsl2/0002-Define-glibc-specific-macros.patch b/meta/recipes-extended/libnsl/libnsl2/0002-Define-glibc-specific-macros.patch
new file mode 100644
index 0000000000..68d819c42c
--- /dev/null
+++ b/meta/recipes-extended/libnsl/libnsl2/0002-Define-glibc-specific-macros.patch
@@ -0,0 +1,57 @@
+From 60282514ea01af004d7f9e66dd3929223b7d2e7b Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 18 Apr 2017 09:16:12 -0700
+Subject: [PATCH 2/2] Define glibc specific macros
+
+Check and define
+rawmemchr, __asprintf, __mempcpy, __strtok_r
+__always_inline, TEMP_FAILURE_RETRY
+
+if not existing. Helps compiling with musl
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream_status: Pending
+
+diff --git a/src/rpcsvc/nis.h b/src/rpcsvc/nis.h
+index 88cbca0..23fc20c 100644
+--- a/src/rpcsvc/nis.h
++++ b/src/rpcsvc/nis.h
+@@ -57,6 +57,34 @@ __BEGIN_DECLS
+  *                                              <kukuk@suse.de>
+  */
+ 
++#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
+-- 
+2.12.2
+
diff --git a/meta/recipes-extended/libnsl/libnsl2_git.bb b/meta/recipes-extended/libnsl/libnsl2_git.bb
new file mode 100644
index 0000000000..1698f69edb
--- /dev/null
+++ b/meta/recipes-extended/libnsl/libnsl2_git.bb
@@ -0,0 +1,35 @@
+# Copyright (C) 2017 Khem Raj <raj.khem@gmail.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+SUMMARY = "Library containing NIS functions using TI-RPC (IPv6 enabled)"
+DESCRIPTION = "This library contains the public client interface for NIS(YP) and NIS+\
+               it was part of glibc and now is standalone packages. it also supports IPv6"
+HOMEPAGE = "https://github.com/thkukuk/libnsl"
+LICENSE = "LGPL-2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
+SECTION = "libs"
+DEPENDS = "libtirpc"
+DEPENDS_append_libc-musl = " bsd-headers"
+
+PV = "1.0.5+git${SRCPV}"
+
+SRCREV = "dfa2f313524aff9243c4d8ce1bace73786478356"
+
+SRC_URI = "git://github.com/thkukuk/libnsl \
+           file://0001-include-sys-cdefs.h-explicitly.patch \
+           file://0002-Define-glibc-specific-macros.patch \
+          "
+
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig gettext
+
+EXTRA_OECONF += "--libdir=${libdir}/nsl --includedir=${includedir}/nsl"
+
+do_install_append() {
+	install -d ${D}${libdir}
+	mv ${D}${libdir}/nsl/pkgconfig ${D}${libdir}
+}
+
+FILES_${PN} += "${libdir}/nsl/*.so.*"
+FILES_${PN}-dev += "${includedir}/nsl ${libdir}/nsl/*.so"
-- 
2.13.0



  reply	other threads:[~2017-05-22  5:00 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-22  5:00 [PATCH 01/15] musl: Update to latest master Khem Raj
2017-05-22  5:00 ` Khem Raj [this message]
2017-05-22  5:00 ` [PATCH 03/15] grub: Update to 2.02 Khem Raj
2017-05-22  5:00 ` [PATCH 04/15] glew: Compile with -D_GNU_SOURCE Khem Raj
2017-05-22  5:00 ` [PATCH 05/15] libidn: Fix hardened build with musl Khem Raj
2017-06-02 21:12   ` Khem Raj
2017-05-22  5:00 ` [PATCH 06/15] libgcrypt: Do not restrict to ARM ISA Khem Raj
2017-05-22  5:00 ` [PATCH 07/15] webkitgtk: Fix build for armv5 Khem Raj
2017-05-22  5:00 ` [PATCH 08/15] xkeyboard-config: Enable nls support explicitly Khem Raj
2017-05-23 23:50   ` Khem Raj
2017-05-22  5:00 ` [PATCH 09/15] systemd: Make knobs for compiler specific nn, ar, ranlib Khem Raj
2017-05-22  5:00 ` [PATCH 10/15] db: Add --tag=CC to cross libtool invocation Khem Raj
2017-05-23 13:14   ` Burton, Ross
2017-05-23 14:32     ` Khem Raj
2017-05-23 14:44       ` Burton, Ross
2017-05-23 14:48         ` Khem Raj
2017-05-23 14:54           ` Burton, Ross
2017-05-23 15:02           ` Burton, Ross
2017-05-23 15:10             ` Khem Raj
2017-05-22  5:00 ` [PATCH 11/15] linux-yocto: Enable drm by default Khem Raj
2017-05-22 14:46   ` Bruce Ashfield
2017-05-22 17:06     ` Khem Raj
2017-05-23 19:36       ` Bruce Ashfield
2017-05-25  2:40         ` Bruce Ashfield
2017-05-25  2:46           ` Khem Raj
2017-05-25 12:01             ` Bruce Ashfield
2017-05-22  5:00 ` [PATCH 12/15] iproute2: Fix build error due to missing stdint.h> include Khem Raj
2017-05-22  5:00 ` [PATCH 13/15] nfs-utils: " Khem Raj
2017-05-22  5:00 ` [PATCH 14/15] libtirpc: " Khem Raj
2017-05-22  5:00 ` [PATCH 15/15] nspr: " Khem Raj

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170522050042.42403-2-raj.khem@gmail.com \
    --to=raj.khem@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.