mirror of
https://git.yoctoproject.org/poky
synced 2026-06-02 13:29:49 +00:00
fts: Switch SRC_URI to github
Use the package maintained by voidlinux Drop local patches (From OE-Core rev: d7a38c46753d5c9692d67a923351d9d6b2e80c3b) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -3,38 +3,18 @@
|
||||
|
||||
SUMMARY = "POSIX file tree stream operations library"
|
||||
HOMEPAGE = "https://sites.google.com/a/bostic.com/keithbostic"
|
||||
LICENSE = "BSD-4-Clause"
|
||||
LIC_FILES_CHKSUM = "file://fts.h;beginline=1;endline=36;md5=2532eddb3d1a21905723a4011ec4e085"
|
||||
LICENSE = "BSD-3-Clause"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=5ffe358174aad383f1b69ce3b53da982"
|
||||
SECTION = "libs"
|
||||
|
||||
SRC_URI = "https://sites.google.com/a/bostic.com/keithbostic/files/fts.tar.gz \
|
||||
file://fts-header-correctness.patch \
|
||||
file://fts-uclibc.patch \
|
||||
file://remove_cdefs.patch \
|
||||
file://stdint.patch \
|
||||
file://gcc5.patch \
|
||||
SRCREV = "944333aed9dc24cfa76cc64bfe70c75d25652753"
|
||||
PV = "1.2+git${SRCPV}"
|
||||
|
||||
SRC_URI = "git://github.com/voidlinux/musl-fts \
|
||||
"
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
SRC_URI[md5sum] = "120c14715485ec6ced14f494d059d20a"
|
||||
SRC_URI[sha256sum] = "3df9b9b5a45aeaf16f33bb84e692a10dc662e22ec8a51748f98767d67fb6f342"
|
||||
|
||||
S = "${WORKDIR}/${BPN}"
|
||||
|
||||
do_configure[noexec] = "1"
|
||||
|
||||
HASHSTYLE_mipsarch = "sysv"
|
||||
HASHSTYLE = "gnu"
|
||||
|
||||
VER = "0"
|
||||
do_compile () {
|
||||
${CC} -I${S} -fPIC -shared -Wl,--hash-style=${HASHSTYLE} -o libfts.so.${VER} -Wl,-soname,libfts.so.${VER} ${S}/fts.c
|
||||
}
|
||||
|
||||
do_install() {
|
||||
install -Dm755 ${B}/libfts.so.${VER} ${D}${libdir}/libfts.so.${VER}
|
||||
ln -sf libfts.so.${VER} ${D}${libdir}/libfts.so
|
||||
install -Dm644 ${S}/fts.h ${D}${includedir}/fts.h
|
||||
}
|
||||
inherit autotools pkgconfig
|
||||
#
|
||||
# We will skip parsing for non-musl systems
|
||||
#
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
Included needed headers for compiling with musl
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
Upstream-Status: Inappropriate
|
||||
|
||||
--- fts.orig/fts.h
|
||||
+++ fts/fts.h
|
||||
@@ -38,6 +38,17 @@
|
||||
#ifndef _FTS_H_
|
||||
#define _FTS_H_
|
||||
|
||||
+#include <sys/types.h>
|
||||
+#include <sys/param.h>
|
||||
+#include <sys/stat.h>
|
||||
+
|
||||
+#include <dirent.h>
|
||||
+#include <errno.h>
|
||||
+#include <fcntl.h>
|
||||
+#include <stdlib.h>
|
||||
+#include <string.h>
|
||||
+#include <unistd.h>
|
||||
+
|
||||
typedef struct {
|
||||
struct _ftsent *fts_cur; /* current node */
|
||||
struct _ftsent *fts_child; /* linked list of children */
|
||||
@@ -1,50 +0,0 @@
|
||||
Add missing defines for uclibc
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
Upstream-Status: Inappropriate
|
||||
|
||||
--- fts.orig/fts.c
|
||||
+++ fts/fts.c
|
||||
@@ -31,6 +31,10 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
+#define alignof(TYPE) ((int) &((struct { char dummy1; TYPE dummy2; } *) 0)->dummy2)
|
||||
+#define ALIGNBYTES (alignof(long double) - 1)
|
||||
+#define ALIGN(p) (((uintptr_t)(p) + ALIGNBYTES) & ~ALIGNBYTES)
|
||||
+
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
static char sccsid[] = "@(#)fts.c 8.6 (Berkeley) 8/14/94";
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
@@ -652,10 +656,10 @@
|
||||
if (!ISSET(FTS_SEEDOT) && ISDOT(dp->d_name))
|
||||
continue;
|
||||
|
||||
- if ((p = fts_alloc(sp, dp->d_name, (int)dp->d_namlen)) == NULL)
|
||||
+ if ((p = fts_alloc(sp, dp->d_name, (int)dp->d_reclen)) == NULL)
|
||||
goto mem1;
|
||||
- if (dp->d_namlen > maxlen) {
|
||||
- if (fts_palloc(sp, (size_t)dp->d_namlen)) {
|
||||
+ if (dp->d_reclen > maxlen) {
|
||||
+ if (fts_palloc(sp, (size_t)dp->d_reclen)) {
|
||||
/*
|
||||
* No more memory for path or structures. Save
|
||||
* errno, free up the current structure and the
|
||||
@@ -675,7 +679,7 @@
|
||||
maxlen = sp->fts_pathlen - sp->fts_cur->fts_pathlen - 1;
|
||||
}
|
||||
|
||||
- p->fts_pathlen = len + dp->d_namlen + 1;
|
||||
+ p->fts_pathlen = len + dp->d_reclen + 1;
|
||||
p->fts_parent = sp->fts_cur;
|
||||
p->fts_level = level;
|
||||
|
||||
@@ -784,7 +788,7 @@
|
||||
/* If user needs stat info, stat buffer already allocated. */
|
||||
sbp = ISSET(FTS_NOSTAT) ? &sb : p->fts_statp;
|
||||
|
||||
-#ifdef DT_WHT
|
||||
+#ifdef S_IFWHT
|
||||
/*
|
||||
* Whited-out files don't really exist. However, there's stat(2) file
|
||||
* mask for them, so we set it so that programs (i.e., find) don't have
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,69 +0,0 @@
|
||||
Replace use of macros from sys/cdefs.h since cdefs.h is missing on musl
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
Upstream-Status: Inappropriate
|
||||
|
||||
Index: fts/fts.h
|
||||
===================================================================
|
||||
--- fts.orig/fts.h
|
||||
+++ fts/fts.h
|
||||
@@ -126,15 +126,21 @@ typedef struct _ftsent {
|
||||
char fts_name[1]; /* file name */
|
||||
} FTSENT;
|
||||
|
||||
-#include <sys/cdefs.h>
|
||||
+#ifdef __cplusplus
|
||||
+extern "C" {
|
||||
+#endif
|
||||
|
||||
-__BEGIN_DECLS
|
||||
-FTSENT *fts_children __P((FTS *, int));
|
||||
-int fts_close __P((FTS *));
|
||||
-FTS *fts_open __P((char * const *, int,
|
||||
- int (*)(const FTSENT **, const FTSENT **)));
|
||||
-FTSENT *fts_read __P((FTS *));
|
||||
-int fts_set __P((FTS *, FTSENT *, int));
|
||||
-__END_DECLS
|
||||
+#ifndef __P
|
||||
+#define __P
|
||||
+#endif
|
||||
+FTSENT *fts_children (FTS *p, int opts);
|
||||
+int fts_close (FTS *p);
|
||||
+FTS *fts_open (char * const * path, int opts,
|
||||
+ int (*compfn)(const FTSENT **, const FTSENT **));
|
||||
+FTSENT *fts_read (FTS *p);
|
||||
+int fts_set (FTS *p, FTSENT *f, int opts);
|
||||
|
||||
+#ifdef __cplusplus
|
||||
+}
|
||||
+#endif
|
||||
#endif /* !_FTS_H_ */
|
||||
Index: fts/fts.c
|
||||
===================================================================
|
||||
--- fts.orig/fts.c
|
||||
+++ fts/fts.c
|
||||
@@ -50,15 +50,15 @@ static char sccsid[] = "@(#)fts.c 8.6 (B
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
-static FTSENT *fts_alloc __P((FTS *, char *, int));
|
||||
-static FTSENT *fts_build __P((FTS *, int));
|
||||
-static void fts_lfree __P((FTSENT *));
|
||||
-static void fts_load __P((FTS *, FTSENT *));
|
||||
-static size_t fts_maxarglen __P((char * const *));
|
||||
-static void fts_padjust __P((FTS *, void *));
|
||||
-static int fts_palloc __P((FTS *, size_t));
|
||||
-static FTSENT *fts_sort __P((FTS *, FTSENT *, int));
|
||||
-static u_short fts_stat __P((FTS *, struct dirent *, FTSENT *, int));
|
||||
+static FTSENT *fts_alloc __P(FTS *, char *, int);
|
||||
+static FTSENT *fts_build __P(FTS *, int);
|
||||
+static void fts_lfree __P(FTSENT *);
|
||||
+static void fts_load __P(FTS *, FTSENT *);
|
||||
+static size_t fts_maxarglen __P(char * const *);
|
||||
+static void fts_padjust __P(FTS *, void *);
|
||||
+static int fts_palloc __P(FTS *, size_t);
|
||||
+static FTSENT *fts_sort __P(FTS *, FTSENT *, int);
|
||||
+static u_short fts_stat __P(FTS *, struct dirent *, FTSENT *, int);
|
||||
|
||||
#define ISDOT(a) (a[0] == '.' && (!a[1] || a[1] == '.' && !a[2]))
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
Include stdint.h for u_* typedefs
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
Upstream-Status: Inappropriate
|
||||
|
||||
--- ./fts.c.orig
|
||||
+++ ./fts.c
|
||||
@@ -46,6 +46,7 @@
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <fts.h>
|
||||
+#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
Reference in New Issue
Block a user