diff options
author | Dave Cobbley <david.j.cobbley@linux.intel.com> | 2018-08-14 20:05:37 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-08-23 04:26:31 +0300 |
commit | eb8dc40360f0cfef56fb6947cc817a547d6d9bc6 (patch) | |
tree | de291a73dc37168da6370e2cf16c347d1eba9df8 /poky/meta/recipes-support/libbsd | |
parent | 9c3cf826d853102535ead04cebc2d6023eff3032 (diff) | |
download | openbmc-eb8dc40360f0cfef56fb6947cc817a547d6d9bc6.tar.xz |
[Subtree] Removing import-layers directory
As part of the move to subtrees, need to bring all the import layers
content to the top level.
Change-Id: I4a163d10898cbc6e11c27f776f60e1a470049d8f
Signed-off-by: Dave Cobbley <david.j.cobbley@linux.intel.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'poky/meta/recipes-support/libbsd')
4 files changed, 511 insertions, 0 deletions
diff --git a/poky/meta/recipes-support/libbsd/libbsd/0001-Replace-__BEGIN_DECLS-and-__END_DECLS.patch b/poky/meta/recipes-support/libbsd/libbsd/0001-Replace-__BEGIN_DECLS-and-__END_DECLS.patch new file mode 100644 index 000000000..54617b506 --- /dev/null +++ b/poky/meta/recipes-support/libbsd/libbsd/0001-Replace-__BEGIN_DECLS-and-__END_DECLS.patch @@ -0,0 +1,376 @@ +From 88adbe1a855b7aa95bd925c80ed83c86f3fc42e3 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sun, 6 Nov 2016 09:39:31 -0800 +Subject: [PATCH 1/3] Replace __BEGIN_DECLS and __END_DECLS + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Signed-off-by: Yi Zhao <yi.zhao@windriver.com> +--- +Upstream-Status: Pending + + include/bsd/err.h | 10 ++++++++-- + include/bsd/libutil.h | 10 ++++++++-- + include/bsd/md5.h | 10 ++++++++-- + include/bsd/nlist.h | 10 ++++++++-- + include/bsd/readpassphrase.h | 10 ++++++++-- + include/bsd/stdio.h | 10 ++++++++-- + include/bsd/stdlib.h | 12 +++++++++--- + include/bsd/string.h | 12 +++++++++--- + include/bsd/stringlist.h | 10 ++++++++-- + include/bsd/unistd.h | 10 ++++++++-- + include/bsd/vis.h | 10 ++++++++-- + include/bsd/wchar.h | 10 ++++++++-- + src/hash/sha512.h | 10 ++++++++-- + 13 files changed, 106 insertions(+), 28 deletions(-) + +diff --git a/include/bsd/err.h b/include/bsd/err.h +index 12fd051..43dfc32 100644 +--- a/include/bsd/err.h ++++ b/include/bsd/err.h +@@ -42,7 +42,10 @@ + + #include <stdarg.h> + +-__BEGIN_DECLS ++/* __BEGIN_DECLS */ ++#ifdef __cplusplus ++extern "C" { ++#endif + void warnc(int code, const char *format, ...) + __printflike(2, 3); + void vwarnc(int code, const char *format, va_list ap) +@@ -51,6 +54,9 @@ void errc(int status, int code, const char *format, ...) + __printflike(3, 4); + void verrc(int status, int code, const char *format, va_list ap) + __printflike(3, 0); +-__END_DECLS ++#ifdef __cplusplus ++} ++#endif ++/* __END_DECLS */ + + #endif +diff --git a/include/bsd/libutil.h b/include/bsd/libutil.h +index 45b3b15..9c936e5 100644 +--- a/include/bsd/libutil.h ++++ b/include/bsd/libutil.h +@@ -53,7 +53,10 @@ struct pidfh { + ino_t pf_ino; + }; + +-__BEGIN_DECLS ++/* __BEGIN_DECLS */ ++#ifdef __cplusplus ++extern "C" { ++#endif + int humanize_number(char *buf, size_t len, int64_t bytes, + const char *suffix, int scale, int flags); + int expand_number(const char *_buf, uint64_t *_num); +@@ -66,7 +69,10 @@ int pidfile_close(struct pidfh *pfh); + int pidfile_remove(struct pidfh *pfh); + + char *fparseln(FILE *, size_t *, size_t *, const char[3], int); +-__END_DECLS ++#ifdef __cplusplus ++} ++#endif ++/* __END_DECLS */ + + /* humanize_number(3) */ + #define HN_DECIMAL 0x01 +diff --git a/include/bsd/md5.h b/include/bsd/md5.h +index 5f3ae46..5d80e5c 100644 +--- a/include/bsd/md5.h ++++ b/include/bsd/md5.h +@@ -30,7 +30,10 @@ typedef struct MD5Context { + #include <sys/cdefs.h> + #include <sys/types.h> + +-__BEGIN_DECLS ++/* __BEGIN_DECLS */ ++#ifdef __cplusplus ++extern "C" { ++#endif + void MD5Init(MD5_CTX *); + void MD5Update(MD5_CTX *, const uint8_t *, size_t) + __attribute__((__bounded__(__string__,2,3))); +@@ -49,6 +52,9 @@ char *MD5FileChunk(const char *, char *, off_t, off_t) + char *MD5Data(const uint8_t *, size_t, char *) + __attribute__((__bounded__(__string__,1,2))) + __attribute__((__bounded__(__minbytes__,3,MD5_DIGEST_STRING_LENGTH))); +-__END_DECLS ++#ifdef __cplusplus ++} ++#endif ++/* __END_DECLS */ + + #endif /* LIBBSD_MD5_H */ +diff --git a/include/bsd/nlist.h b/include/bsd/nlist.h +index cb297e8..e63bbbd 100644 +--- a/include/bsd/nlist.h ++++ b/include/bsd/nlist.h +@@ -88,8 +88,14 @@ struct nlist { + + #define N_FORMAT "%08x" /* namelist value format; XXX */ + +-__BEGIN_DECLS ++/* __BEGIN_DECLS */ ++#ifdef __cplusplus ++extern "C" { ++#endif + extern int nlist(const char *filename, struct nlist *list); +-__END_DECLS ++#ifdef __cplusplus ++} ++#endif ++/* __END_DECLS */ + + #endif +diff --git a/include/bsd/readpassphrase.h b/include/bsd/readpassphrase.h +index 14744b8..fa73361 100644 +--- a/include/bsd/readpassphrase.h ++++ b/include/bsd/readpassphrase.h +@@ -34,8 +34,14 @@ + #include <sys/cdefs.h> + #include <sys/types.h> + +-__BEGIN_DECLS ++/* __BEGIN_DECLS */ ++#ifdef __cplusplus ++extern "C" { ++#endif + char * readpassphrase(const char *, char *, size_t, int); +-__END_DECLS ++#ifdef __cplusplus ++} ++#endif ++/* __END_DECLS */ + + #endif /* !LIBBSD_READPASSPHRASE_H */ +diff --git a/include/bsd/stdio.h b/include/bsd/stdio.h +index 4b69983..18645b7 100644 +--- a/include/bsd/stdio.h ++++ b/include/bsd/stdio.h +@@ -45,7 +45,10 @@ + #endif + #include <sys/types.h> + +-__BEGIN_DECLS ++/* __BEGIN_DECLS */ ++#ifdef __cplusplus ++extern "C" { ++#endif + const char *fmtcheck(const char *, const char *); + + /* XXX: The function requires cooperation from the system libc to store the +@@ -73,7 +76,10 @@ FILE *funopen(const void *cookie, + #define fwopen(cookie, fn) funopen(cookie, NULL, fn, NULL, NULL) + + int fpurge(FILE *fp); +-__END_DECLS ++#ifdef __cplusplus ++} ++#endif ++/* __END_DECLS */ + + #endif + #endif +diff --git a/include/bsd/stdlib.h b/include/bsd/stdlib.h +index ebc9638..c4b54b6 100644 +--- a/include/bsd/stdlib.h ++++ b/include/bsd/stdlib.h +@@ -46,7 +46,10 @@ + #include <sys/stat.h> + #include <stdint.h> + +-__BEGIN_DECLS ++/* __BEGIN_DECLS */ ++#ifdef __cplusplus ++extern "C" { ++#endif + uint32_t arc4random(void); + void arc4random_stir(void); + void arc4random_addrandom(unsigned char *dat, int datlen); +@@ -67,7 +70,7 @@ int sradixsort(const unsigned char **base, int nmemb, + const unsigned char *table, unsigned endbyte); + + void *reallocf(void *ptr, size_t size); +-#if defined(_GNU_SOURCE) && defined(__GLIBC__) && !__GLIBC_PREREQ(2, 26) ++#if defined(_GNU_SOURCE) && defined(__GLIBC__) + void *reallocarray(void *ptr, size_t nmemb, size_t size); + #endif + +@@ -75,6 +78,9 @@ long long strtonum(const char *nptr, long long minval, long long maxval, + const char **errstr); + + char *getbsize(int *headerlenp, long *blocksizep); +-__END_DECLS ++#ifdef __cplusplus ++} ++#endif ++/* __END_DECLS */ + + #endif +diff --git a/include/bsd/string.h b/include/bsd/string.h +index 6798bf6..fa1193f 100644 +--- a/include/bsd/string.h ++++ b/include/bsd/string.h +@@ -36,15 +36,21 @@ + #include <sys/cdefs.h> + #include <sys/types.h> + +-__BEGIN_DECLS ++/* __BEGIN_DECLS */ ++#ifdef __cplusplus ++extern "C" { ++#endif + size_t strlcpy(char *dst, const char *src, size_t siz); + size_t strlcat(char *dst, const char *src, size_t siz); + char *strnstr(const char *str, const char *find, size_t str_len); + void strmode(mode_t mode, char *str); + +-#if defined(_GNU_SOURCE) && defined(__GLIBC__) && !__GLIBC_PREREQ(2, 25) ++#if defined(_GNU_SOURCE) && defined(__GLIBC__) + void explicit_bzero(void *buf, size_t len); + #endif +-__END_DECLS ++#ifdef __cplusplus ++} ++#endif ++/* __END_DECLS */ + + #endif +diff --git a/include/bsd/stringlist.h b/include/bsd/stringlist.h +index ff30cac..4600f6b 100644 +--- a/include/bsd/stringlist.h ++++ b/include/bsd/stringlist.h +@@ -43,12 +43,18 @@ typedef struct _stringlist { + size_t sl_cur; + } StringList; + +-__BEGIN_DECLS ++/* __BEGIN_DECLS */ ++#ifdef __cplusplus ++extern "C" { ++#endif + StringList *sl_init(void); + int sl_add(StringList *, char *); + void sl_free(StringList *, int); + char *sl_find(StringList *, const char *); + int sl_delete(StringList *, const char *, int); +-__END_DECLS ++#ifdef __cplusplus ++} ++#endif ++/* __END_DECLS */ + + #endif /* LIBBSD_STRINGLIST_H */ +diff --git a/include/bsd/unistd.h b/include/bsd/unistd.h +index 1f9c5f8..5b2f4c7 100644 +--- a/include/bsd/unistd.h ++++ b/include/bsd/unistd.h +@@ -45,7 +45,10 @@ + #define S_ISTXT S_ISVTX + #endif + +-__BEGIN_DECLS ++/* __BEGIN_DECLS */ ++#ifdef __cplusplus ++extern "C" { ++#endif + extern int optreset; + + #ifdef LIBBSD_OVERLAY +@@ -68,6 +71,9 @@ void setproctitle(const char *fmt, ...) + __printflike(1, 2); + + int getpeereid(int s, uid_t *euid, gid_t *egid); +-__END_DECLS ++#ifdef __cplusplus ++} ++#endif ++/* __END_DECLS */ + + #endif +diff --git a/include/bsd/vis.h b/include/bsd/vis.h +index 970dfdd..621d3c6 100644 +--- a/include/bsd/vis.h ++++ b/include/bsd/vis.h +@@ -74,7 +74,10 @@ + + #include <sys/cdefs.h> + +-__BEGIN_DECLS ++/* __BEGIN_DECLS */ ++#ifdef __cplusplus ++extern "C" { ++#endif + char *vis(char *, int, int, int); + int strvis(char *, const char *, int); + int strvisx(char *, const char *, size_t, int); +@@ -83,6 +86,9 @@ int strunvis(char *, const char *); + int strunvisx(char *, const char *, int); + ssize_t strnunvis(char *, const char *, size_t); + int unvis(char *, int, int *, int); +-__END_DECLS ++#ifdef __cplusplus ++} ++#endif ++/* __END_DECLS */ + + #endif /* !LIBBSD_VIS_H */ +diff --git a/include/bsd/wchar.h b/include/bsd/wchar.h +index 33a500e..aa70742 100644 +--- a/include/bsd/wchar.h ++++ b/include/bsd/wchar.h +@@ -43,12 +43,18 @@ + #include <sys/cdefs.h> + #include <sys/types.h> + +-__BEGIN_DECLS ++/* __BEGIN_DECLS */ ++#ifdef __cplusplus ++extern "C" { ++#endif + wchar_t *fgetwln(FILE *stream, size_t *len); + + size_t wcslcat(wchar_t *dst, const wchar_t *src, size_t size); + size_t wcslcpy(wchar_t *dst, const wchar_t *src, size_t size); +-__END_DECLS ++#ifdef __cplusplus ++} ++#endif ++/* __END_DECLS */ + + #endif + #endif +diff --git a/src/hash/sha512.h b/src/hash/sha512.h +index 4f368a1..27ddc24 100644 +--- a/src/hash/sha512.h ++++ b/src/hash/sha512.h +@@ -39,7 +39,10 @@ typedef struct SHA512Context { + unsigned char buf[128]; + } SHA512_CTX; + +-__BEGIN_DECLS ++/* __BEGIN_DECLS */ ++#ifdef __cplusplus ++extern "C" { ++#endif + + void SHA512_Init(SHA512_CTX *); + void SHA512_Update(SHA512_CTX *, const void *, size_t); +@@ -48,6 +51,9 @@ char *SHA512_End(SHA512_CTX *, char *); + char *SHA512_File(const char *, char *); + char *SHA512_FileChunk(const char *, char *, off_t, off_t); + char *SHA512_Data(const void *, unsigned int, char *); +-__END_DECLS ++#ifdef __cplusplus ++} ++#endif ++/* __END_DECLS */ + + #endif /* !_SHA512_H_ */ +-- +1.9.1 + diff --git a/poky/meta/recipes-support/libbsd/libbsd/0001-src-libbsd-overlay.pc.in-Set-Cflags-to-use-I-instead.patch b/poky/meta/recipes-support/libbsd/libbsd/0001-src-libbsd-overlay.pc.in-Set-Cflags-to-use-I-instead.patch new file mode 100644 index 000000000..7e3a5b3be --- /dev/null +++ b/poky/meta/recipes-support/libbsd/libbsd/0001-src-libbsd-overlay.pc.in-Set-Cflags-to-use-I-instead.patch @@ -0,0 +1,33 @@ +From b6972f1c29ebf073cbe19a4a669ee093259792a0 Mon Sep 17 00:00:00 2001 +From: Fabio Berton <fabio.berton@ossystems.com.br> +Date: Mon, 30 Jan 2017 12:00:33 -0200 +Subject: [PATCH] src/libbsd-overlay.pc.in: Set Cflags to use -I instead of + -isystem +Organization: O.S. Systems Software LTDA. + +pkg-config currently only handles -I and -L correctly, but misses +-isystem, so we need to do this workaround to fix this issue. + +There's a open bug in: +https://bugzilla.freedesktop.org/show_bug.cgi?id=99516 + +Upstream-Status: Pending + +Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br> +--- + src/libbsd-overlay.pc.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/libbsd-overlay.pc.in b/src/libbsd-overlay.pc.in +index ac8bf89..65dc3ae 100644 +--- a/src/libbsd-overlay.pc.in ++++ b/src/libbsd-overlay.pc.in +@@ -8,4 +8,4 @@ Description: Utility functions from BSD systems (overlay) + Version: @VERSION@ + URL: https://libbsd.freedesktop.org/ + Libs: -L${libdir} -lbsd +-Cflags: -isystem ${includedir}/bsd -DLIBBSD_OVERLAY ++Cflags: -I${includedir}/bsd -DLIBBSD_OVERLAY +-- +2.11.0 + diff --git a/poky/meta/recipes-support/libbsd/libbsd/0002-Remove-funopen.patch b/poky/meta/recipes-support/libbsd/libbsd/0002-Remove-funopen.patch new file mode 100644 index 000000000..60da15eb8 --- /dev/null +++ b/poky/meta/recipes-support/libbsd/libbsd/0002-Remove-funopen.patch @@ -0,0 +1,52 @@ +From 28fc66e8b848709a2e69dba7f07694248e0154e8 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sun, 6 Nov 2016 09:40:43 -0800 +Subject: [PATCH 2/3] Remove funopen() + +Musl doesnt have prerequisites for it. + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Inappropriate [musl specific] + + man/Makefile.am | 1 - + src/Makefile.am | 1 - + test/Makefile.am | 1 - + 3 files changed, 3 deletions(-) + +diff --git a/man/Makefile.am b/man/Makefile.am +index 28192c0..a22787d 100644 +--- a/man/Makefile.am ++++ b/man/Makefile.am +@@ -168,7 +168,6 @@ dist_man_MANS = \ + fmtcheck.3bsd \ + fparseln.3bsd \ + fpurge.3bsd \ +- funopen.3bsd \ + getbsize.3bsd \ + getmode.3bsd \ + getpeereid.3bsd \ +diff --git a/src/Makefile.am b/src/Makefile.am +index ad83dbf..13225a3 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -76,7 +76,6 @@ libbsd_la_SOURCES = \ + fmtcheck.c \ + fparseln.c \ + fpurge.c \ +- funopen.c \ + getbsize.c \ + getpeereid.c \ + hash/md5.c \ +diff --git a/test/Makefile.am b/test/Makefile.am +index d86539a..b32ed2e 100644 +--- a/test/Makefile.am ++++ b/test/Makefile.am +@@ -36,7 +36,6 @@ check_PROGRAMS = \ + endian \ + humanize \ + fgetln \ +- funopen \ + fparseln \ + fpurge \ + md5 \ diff --git a/poky/meta/recipes-support/libbsd/libbsd_0.8.7.bb b/poky/meta/recipes-support/libbsd/libbsd_0.8.7.bb new file mode 100644 index 000000000..552a85c4d --- /dev/null +++ b/poky/meta/recipes-support/libbsd/libbsd_0.8.7.bb @@ -0,0 +1,50 @@ +# Copyright (C) 2013 Khem Raj <raj.khem@gmail.com> +# Released under the MIT license (see COPYING.MIT for the terms) + +SUMMARY = "Library of utility functions from BSD systems" +DESCRIPTION = "This library provides useful functions commonly found on BSD systems, \ + and lacking on others like GNU systems, thus making it easier to port \ + projects with strong BSD origins, without needing to embed the same \ + code over and over again on each project." + +HOMEPAGE = "http://libbsd.freedesktop.org/wiki/" +# There seems to be more licenses used in the code, I don't think we want to list them all here, complete list: +# OE @ ~/projects/libbsd $ grep ^License: COPYING | sort +# License: BSD-2-clause +# License: BSD-2-clause +# License: BSD-2-clause-NetBSD +# License: BSD-2-clause-author +# License: BSD-2-clause-verbatim +# License: BSD-3-clause +# License: BSD-3-clause +# License: BSD-3-clause +# License: BSD-3-clause-Peter-Wemm +# License: BSD-3-clause-Regents +# License: BSD-4-clause-Christopher-G-Demetriou +# License: BSD-4-clause-Niels-Provos +# License: BSD-5-clause-Peter-Wemm +# License: Beerware +# License: Expat +# License: ISC +# License: ISC-Original +# License: public-domain +# License: public-domain-Colin-Plumb +LICENSE = "BSD-4-Clause & ISC & PD" +LIC_FILES_CHKSUM = "file://COPYING;md5=08fc4e66be4526715dab09c5fba5e9e8" +SECTION = "libs" + +SRC_URI = " \ + http://libbsd.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ + file://0001-src-libbsd-overlay.pc.in-Set-Cflags-to-use-I-instead.patch \ +" +SRC_URI_append_libc-musl = " \ + file://0001-Replace-__BEGIN_DECLS-and-__END_DECLS.patch \ + file://0002-Remove-funopen.patch \ +" + +SRC_URI[md5sum] = "d9e6980fbfe44f94fd92b89a33cce67d" +SRC_URI[sha256sum] = "f548f10e5af5a08b1e22889ce84315b1ebe41505b015c9596bad03fd13a12b31" + +inherit autotools pkgconfig + +BBCLASSEXTEND = "native nativesdk" |