diff --git a/recipes/readline/readline-6.2/0000-curses-link.patch b/recipes/readline/readline-7.0/0000-curses-link.patch similarity index 100% rename from recipes/readline/readline-6.2/0000-curses-link.patch rename to recipes/readline/readline-7.0/0000-curses-link.patch diff --git a/recipes/readline/readline-7.0/0001-mingw-patch.patch b/recipes/readline/readline-7.0/0001-mingw-patch.patch new file mode 100644 index 00000000..77ecf66f --- /dev/null +++ b/recipes/readline/readline-7.0/0001-mingw-patch.patch @@ -0,0 +1,159 @@ +From 77f68e56182c4e1f20a00f1dd4b1fcf4a41a1129 Mon Sep 17 00:00:00 2001 +From: Sean Nyekjaer +Date: Thu, 3 Nov 2016 20:17:28 +0100 +Subject: [PATCH] mingw patch + +--- + colors.c | 23 ++++++++++++++++++++--- + posixstat.h | 4 ---- + 2 files changed, 20 insertions(+), 7 deletions(-) + +diff --git a/colors.c b/colors.c +index 7859f5d..605fe27 100644 +--- a/colors.c ++++ b/colors.c +@@ -37,6 +37,10 @@ + #include "posixstat.h" // stat related macros (S_ISREG, ...) + #include // S_ISUID + ++#ifndef S_ISDIR ++#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) ++#endif ++ + // strlen() + #if defined (HAVE_STRING_H) + # include +@@ -153,6 +157,7 @@ _rl_print_color_indicator (const char *f) + { + mode = astat.st_mode; + #if defined (HAVE_LSTAT) ++#ifdef S_ISLNK + if (S_ISLNK (mode)) + { + linkok = stat (name, &linkstat) == 0; +@@ -161,6 +166,7 @@ _rl_print_color_indicator (const char *f) + } + else + #endif ++#endif + linkok = 1; + } + else +@@ -170,8 +176,10 @@ _rl_print_color_indicator (const char *f) + + if (linkok == -1 && _rl_color_indicator[C_MISSING].string != NULL) + colored_filetype = C_MISSING; ++#ifdef S_ISLNK + else if (linkok == 0 && S_ISLNK(mode) && _rl_color_indicator[C_ORPHAN].string != NULL) + colored_filetype = C_ORPHAN; /* dangling symlink */ ++#endif + else if(stat_ok != 0) + { + static enum indicator_no filetype_indicator[] = FILETYPE_INDICATORS; +@@ -182,12 +190,17 @@ _rl_print_color_indicator (const char *f) + if (S_ISREG (mode)) + { + colored_filetype = C_FILE; +- ++#ifdef S_ISUID + if ((mode & S_ISUID) != 0 && is_colored (C_SETUID)) + colored_filetype = C_SETUID; +- else if ((mode & S_ISGID) != 0 && is_colored (C_SETGID)) ++ else ++#endif ++#ifdef S_ISGID ++ if ((mode & S_ISGID) != 0 && is_colored (C_SETGID)) + colored_filetype = C_SETGID; +- else if (is_colored (C_CAP) && 0) //f->has_capability) ++ else ++#endif ++ if (is_colored (C_CAP) && 0) //f->has_capability) + colored_filetype = C_CAP; + else if ((mode & S_IXUGO) != 0 && is_colored (C_EXEC)) + colored_filetype = C_EXEC; +@@ -211,12 +224,16 @@ _rl_print_color_indicator (const char *f) + colored_filetype = C_STICKY; + #endif + } ++#ifdef S_ISLNK + else if (S_ISLNK (mode)) + colored_filetype = C_LINK; ++#endif + else if (S_ISFIFO (mode)) + colored_filetype = C_FIFO; ++#ifdef S_ISSOCK + else if (S_ISSOCK (mode)) + colored_filetype = C_SOCK; ++#endif + else if (S_ISBLK (mode)) + colored_filetype = C_BLK; + else if (S_ISCHR (mode)) +diff --git a/posixstat.h b/posixstat.h +index 3eb7f29..3707f68 100644 +--- a/posixstat.h ++++ b/posixstat.h +@@ -108,14 +108,12 @@ + * POSIX 1003.1 5.6.1.2 File Modes + */ + +-#if !defined (S_IRWXU) + # if !defined (S_IREAD) + # define S_IREAD 00400 + # define S_IWRITE 00200 + # define S_IEXEC 00100 + # endif /* S_IREAD */ + +-# if !defined (S_IRUSR) + # define S_IRUSR S_IREAD /* read, owner */ + # define S_IWUSR S_IWRITE /* write, owner */ + # define S_IXUSR S_IEXEC /* execute, owner */ +@@ -127,12 +125,10 @@ + # define S_IROTH (S_IREAD >> 6) /* read, other */ + # define S_IWOTH (S_IWRITE >> 6) /* write, other */ + # define S_IXOTH (S_IEXEC >> 6) /* execute, other */ +-# endif /* !S_IRUSR */ + + # define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR) + # define S_IRWXG (S_IRGRP | S_IWGRP | S_IXGRP) + # define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH) +-#endif /* !S_IRWXU */ + + /* These are non-standard, but are used in builtins.c$symbolic_umask() */ + #define S_IRUGO (S_IRUSR | S_IRGRP | S_IROTH) +diff --git a/histfile.c b/histfile.c +index 3eb7f29..3707f68 100644 +--- a/histfile.c ++++ b/histfile.c +@@ -606,12 +606,14 @@ + history_lines_written_to_file = 0; + } + ++#if defined (HAVE_CHOWN) + /* Make sure the new filename is owned by the same user as the old. If one + user is running this, it's a no-op. If the shell is running after sudo + with a shared history file, we don't want to leave the history file + owned by root. */ + if (rv == 0 && exists) + r = chown (filename, finfo.st_uid, finfo.st_gid); ++#endif + + xfree (filename); + FREE (tempname); +@@ -753,12 +755,14 @@ + history_lines_written_to_file = 0; + } + ++#if defined (HAVE_CHOWN) + /* Make sure the new filename is owned by the same user as the old. If one + user is running this, it's a no-op. If the shell is running after sudo + with a shared history file, we don't want to leave the history file + owned by root. */ + if (rv == 0 && exists) + mode = chown (histname, finfo.st_uid, finfo.st_gid); ++#endif + + FREE (histname); + FREE (tempname); +-- +2.10.2 + diff --git a/recipes/readline/readline-6.2/patch-shobj-conf.patch b/recipes/readline/readline-7.0/patch-shobj-conf.patch similarity index 100% rename from recipes/readline/readline-6.2/patch-shobj-conf.patch rename to recipes/readline/readline-7.0/patch-shobj-conf.patch diff --git a/recipes/readline/readline.inc b/recipes/readline/readline.inc index e8095c34..4cd80d41 100644 --- a/recipes/readline/readline.inc +++ b/recipes/readline/readline.inc @@ -16,19 +16,15 @@ AUTOCONFDIRS = "/support" EXTRA_OECONF += "${TERMCAP_OECONF}" TERMCAP_OECONF = " ac_cv_lib_ncurses_tgetent=yes bash_cv_termcap_lib=libncurses" -TERMCAP_OECONF:HOST_LIBC_mingw = "" +TERMCAP_OECONF:HOST_LIBC_mingw = " bash_cv_termcap_lib=gnutermcap" inherit auto-package-libs AUTO_PACKAGE_LIBS = "readline history" -AUTO_PACKAGE_LIBS_DEPENDS = "libc ${TERMCAP}" -AUTO_PACKAGE_LIBS_RDEPENDS = "libc ${TERMCAP}" +AUTO_PACKAGE_LIBS_DEPENDS = "libc libtermcap" +AUTO_PACKAGE_LIBS_RDEPENDS = "libc libtermcap" AUTO_PACKAGE_LIBS_DEV_DEPENDS = "${PN}-dev" AUTO_PACKAGE_LIBS_DEV_RDEPENDS = "${PN}-dev" -LIBRARY_VERSION = "6" - SOLIBS:HOST_LIBC_mingw = "${@d.get('PV').split('.')[0]}.dll" -DEPENDS = "${TERMCAP}" -TERMCAP = "libtermcap" -TERMCAP:HOST_LIBC_mingw = "" +DEPENDS = "libtermcap" diff --git a/recipes/readline/readline_6.2.oe.sig b/recipes/readline/readline_6.2.oe.sig deleted file mode 100644 index 7dfa3283..00000000 --- a/recipes/readline/readline_6.2.oe.sig +++ /dev/null @@ -1 +0,0 @@ -a9761cd9c3da485eb354175fcc2fe35856bc43ac readline-6.2.tar.gz diff --git a/recipes/readline/readline_6.2.oe b/recipes/readline/readline_7.0.oe similarity index 82% rename from recipes/readline/readline_6.2.oe rename to recipes/readline/readline_7.0.oe index e94ae2db..eeec346e 100644 --- a/recipes/readline/readline_6.2.oe +++ b/recipes/readline/readline_7.0.oe @@ -10,6 +10,9 @@ LICENSE = "GPL-3.0+" require readline.inc SRC_URI:>TARGET_OS_darwin = " file://patch-shobj-conf.patch" +SRC_URI:>HOST_LIBC_mingw = " file://0001-mingw-patch.patch" + +LIBRARY_VERSION = "6" # Local Variables: # mode: python diff --git a/recipes/readline/readline_7.0.oe.sig b/recipes/readline/readline_7.0.oe.sig new file mode 100644 index 00000000..cc7288bd --- /dev/null +++ b/recipes/readline/readline_7.0.oe.sig @@ -0,0 +1 @@ +d9095fa14a812495052357e1d678b3f2ac635463 readline-7.0.tar.gz diff --git a/recipes/termcap/termcap_1.3.1.oe b/recipes/termcap/termcap_1.3.1.oe new file mode 100644 index 00000000..ef9aa1dd --- /dev/null +++ b/recipes/termcap/termcap_1.3.1.oe @@ -0,0 +1,19 @@ +#We don't want this for anything else than mingw +COMPATIBLE_HOST_ARCHS = ".*-mingw.*" + +inherit autotools library + +SRC_URI += "https://ftp.gnu.org/gnu/termcap/termcap-${PV}.tar.gz" + +do_configure() { + ${CONFIGURE_SCRIPT} \ + --prefix=${prefix} --build=${BUILD_ARCH} --host=${HOST_ARCH} \ + --target=${TARGET_ARCH} +} + +do_install() { + make install prefix=${D}/usr/ + rm -rf ${D}/usr/info/ +} + +PROVIDES_${PN} = "libtermcap" diff --git a/recipes/termcap/termcap_1.3.1.oe.sig b/recipes/termcap/termcap_1.3.1.oe.sig new file mode 100644 index 00000000..2340ad11 --- /dev/null +++ b/recipes/termcap/termcap_1.3.1.oe.sig @@ -0,0 +1 @@ +42dd1e6beee04f336c884f96314f0c96cc2578be termcap-1.3.1.tar.gz