From: Grazvydas Ignotas Date: Sat, 4 Jul 2015 15:39:58 +0000 (+0300) Subject: netcat: add patches from newer oe X-Git-Tag: sz_173~46 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=40476576dcab1ce88253f86484e1f3298ed8d1ed;p=openembedded.git netcat: add patches from newer oe --- diff --git a/recipes/netcat/netcat.inc b/recipes/netcat/netcat.inc new file mode 100644 index 0000000000..9cb243daab --- /dev/null +++ b/recipes/netcat/netcat.inc @@ -0,0 +1,5 @@ +SECTION = "net" +inherit update-alternatives gettext + +ALTERNATIVE_${PN} = "nc" + diff --git a/recipes/netcat/netcat/make-netcat_flag_count_work.patch b/recipes/netcat/netcat/make-netcat_flag_count_work.patch new file mode 100644 index 0000000000..dd1938a991 --- /dev/null +++ b/recipes/netcat/netcat/make-netcat_flag_count_work.patch @@ -0,0 +1,34 @@ +Make netcat_flag_count() return positive value + +C language has 3 distinct char types: + char + unsigned char + signed char +A char has the same range of values as signed char on X86, +but same as unsigned char on PPC which made netcat_flag_count +return a negative value, now we force variable c as signed char +to make netcat_flag_count return positive value. + +Upstream-Status: Pending + +Signed-off-by: Roy.Li +--- + src/flagset.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/src/flagset.c b/src/flagset.c +index 442b634..54ac898 100644 +--- a/src/flagset.c ++++ b/src/flagset.c +@@ -134,7 +134,7 @@ unsigned short netcat_flag_next(unsigned short port) + + int netcat_flag_count(void) + { +- register char c; ++ register signed char c; + register int i; + int ret = 0; + +-- +1.7.5.4 + diff --git a/recipes/netcat/netcat/netcat-locale_h.patch b/recipes/netcat/netcat/netcat-locale_h.patch new file mode 100644 index 0000000000..5cbcb08e8a --- /dev/null +++ b/recipes/netcat/netcat/netcat-locale_h.patch @@ -0,0 +1,25 @@ +Apparently somewhere along the line HAVE_LOCALE_H was changed to +HAVE_LC_MESSAGES. Adjust netcat to match. + +Upstream-Status: Pending + +Signed-off-by: Mark Hatle + +Index: netcat-0.7.1/src/intl.h +=================================================================== +--- netcat-0.7.1.orig/src/intl.h ++++ netcat-0.7.1/src/intl.h +@@ -25,11 +25,11 @@ + #ifdef ENABLE_NLS + #include + +-#ifdef HAVE_LOCALE_H ++#if defined(HAVE_LC_MESSAGES) || defined(HAVE_LOCALE_H) + #include + #else + #error You must have locale.h in your system +-#endif /* HAVE_LOCALE_H */ ++#endif /* HAVE_LC_MESSAGES || HAVE_LOCALE_H */ + + /* Our dear (and very common) gettext macros */ + #define _(String) gettext(String) diff --git a/recipes/netcat/netcat/obsolete_autoconf_macros.patch b/recipes/netcat/netcat/obsolete_autoconf_macros.patch new file mode 100644 index 0000000000..9b0ed58d66 --- /dev/null +++ b/recipes/netcat/netcat/obsolete_autoconf_macros.patch @@ -0,0 +1,32 @@ +Replace obsoleted AM_CONFIG_HEADER flagged by autoconf 2.69 +locale.h check was picked from old gettext macros but with new aclocal +it picks the right 0.18 gettext.m4 and does not get the check +therefore we explicitly add it to configure.ac + +Upstream-Status: Pending + +Signed-off-by: Khem Raj + +Index: netcat-0.7.1/configure.ac +=================================================================== +--- netcat-0.7.1.orig/configure.ac 2013-01-18 01:30:01.928069739 -0800 ++++ netcat-0.7.1/configure.ac 2013-01-18 01:32:50.568073009 -0800 +@@ -26,8 +26,7 @@ + AC_PREREQ(2.53) + + dnl without this order in this file, automake will be confused! +-AM_CONFIG_HEADER(config.h) +- ++AC_CONFIG_HEADERS(config.h) + dnl check for programs. first the c compiler. + AC_PROG_CC + AC_PROG_CPP +@@ -56,7 +55,7 @@ + AC_LBL_LIBRARY_NET + + dnl Fortunately we have Solaris... +-AC_CHECK_HEADERS(sys/sockio.h) ++AC_CHECK_HEADERS(sys/sockio.h locale.h) + + AC_CHECK_FUNCS(srandom random) + if test $ac_cv_func_srandom = no; then diff --git a/recipes/netcat/netcat_0.7.1.bb b/recipes/netcat/netcat_0.7.1.bb index 7c4dfc5375..8710c36462 100644 --- a/recipes/netcat/netcat_0.7.1.bb +++ b/recipes/netcat/netcat_0.7.1.bb @@ -1,18 +1,24 @@ -DESCRIPTION = "GNU Netcat" +require netcat.inc +SUMMARY = "GNU Netcat" HOMEPAGE = "http://netcat.sourceforge.net" -SECTION = "console/network" LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" + PR = "r3" -SRC_URI = "${SOURCEFORGE_MIRROR}/netcat/netcat-${PV}.tar.bz2" +SRC_URI = "${SOURCEFORGE_MIRROR}/netcat/netcat-${PV}.tar.bz2 \ + file://obsolete_autoconf_macros.patch \ + file://netcat-locale_h.patch \ + file://make-netcat_flag_count_work.patch \ +" + +SRC_URI[md5sum] = "0a29eff1736ddb5effd0b1ec1f6fe0ef" +SRC_URI[sha256sum] = "b55af0bbdf5acc02d1eb6ab18da2acd77a400bafd074489003f3df09676332bb" -inherit autotools update-alternatives +inherit autotools do_install_append() { - mv ${D}${bindir}/nc ${D}${bindir}/nc.${PN} + install -d ${D}${bindir} + mv ${D}${bindir}/nc ${D}${bindir}/nc.${BPN} } - -ALTERNATIVE_NAME = "nc" -ALTERNATIVE_LINK = "${bindir}/nc" -ALTERNATIVE_PATH = "${bindir}/nc.${PN}" ALTERNATIVE_PRIORITY = "100"