summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-support/netcat
diff options
context:
space:
mode:
authorTudor Florea <tudor.florea@enea.com>2014-10-10 03:20:04 +0200
committerTudor Florea <tudor.florea@enea.com>2014-10-10 03:20:04 +0200
commit1b8dfe266937a37a4c642f96ceb2347bf4c00a17 (patch)
tree0c6aab146bb3c82efd9c7846a9a4e70dcb0ec84f /meta-networking/recipes-support/netcat
downloadmeta-openembedded-daisy-140929.tar.gz
initial commit for Enea Linux 4.0-140929daisy-140929
Migrated from the internal git server on the daisy-enea-point-release branch Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta-networking/recipes-support/netcat')
-rw-r--r--meta-networking/recipes-support/netcat/netcat-openbsd_1.105.bb31
-rw-r--r--meta-networking/recipes-support/netcat/netcat.inc5
-rw-r--r--meta-networking/recipes-support/netcat/netcat/make-netcat_flag_count_work.patch34
-rw-r--r--meta-networking/recipes-support/netcat/netcat/netcat-locale_h.patch25
-rw-r--r--meta-networking/recipes-support/netcat/netcat/obsolete_autoconf_macros.patch32
-rw-r--r--meta-networking/recipes-support/netcat/netcat_0.7.1.bb24
6 files changed, 151 insertions, 0 deletions
diff --git a/meta-networking/recipes-support/netcat/netcat-openbsd_1.105.bb b/meta-networking/recipes-support/netcat/netcat-openbsd_1.105.bb
new file mode 100644
index 0000000000..4474e1d093
--- /dev/null
+++ b/meta-networking/recipes-support/netcat/netcat-openbsd_1.105.bb
@@ -0,0 +1,31 @@
1require netcat.inc
2SUMMARY = "OpenBSD Netcat"
3HOMEPAGE = "http://ftp.debian.org"
4LICENSE = "BSD-3-Clause"
5
6DEPENDS += "glib-2.0 libbsd"
7
8SRC_URI = "${DEBIAN_MIRROR}/main/n/netcat-openbsd/netcat-openbsd_${PV}.orig.tar.gz;name=netcat \
9 ${DEBIAN_MIRROR}/main/n/netcat-openbsd/netcat-openbsd_${PV}-7.debian.tar.gz;name=netcat-patch"
10
11SRC_URI[netcat.md5sum] = "7e67b22f1ad41a1b7effbb59ff28fca1"
12SRC_URI[netcat.sha256sum] = "40653fe66c1516876b61b07e093d826e2a5463c5d994f1b7e6ce328f3edb211e"
13SRC_URI[netcat-patch.md5sum] = "e914f8eb7eda5c75c679dd77787ac76b"
14SRC_URI[netcat-patch.sha256sum] = "eee759327ffea293e81d0dde67921b7fcfcad279ffd7a2c9d037bbc8f882b363"
15
16S = "${WORKDIR}/${BPN}-${PV}"
17
18do_configure[noexec] = "1"
19
20do_compile() {
21 cd ${S}
22 while read line; do patch -p1 < ${WORKDIR}/debian/patches/$line; done < ${WORKDIR}/debian/patches/series
23 pkgrel=4
24 oe_runmake CFLAGS="$CFLAGS -DDEBIAN_VERSION=\"\\\"${pkgrel}\\\"\""
25}
26
27do_install() {
28 install -d ${D}${bindir}
29 install -m 755 ${S}/nc ${D}${bindir}/nc.${BPN}
30}
31ALTERNATIVE_PRIORITY = "50"
diff --git a/meta-networking/recipes-support/netcat/netcat.inc b/meta-networking/recipes-support/netcat/netcat.inc
new file mode 100644
index 0000000000..6c815d97e6
--- /dev/null
+++ b/meta-networking/recipes-support/netcat/netcat.inc
@@ -0,0 +1,5 @@
1SECTION = "console/network"
2inherit update-alternatives gettext
3
4ALTERNATIVE_${PN} = "nc"
5
diff --git a/meta-networking/recipes-support/netcat/netcat/make-netcat_flag_count_work.patch b/meta-networking/recipes-support/netcat/netcat/make-netcat_flag_count_work.patch
new file mode 100644
index 0000000000..dd1938a991
--- /dev/null
+++ b/meta-networking/recipes-support/netcat/netcat/make-netcat_flag_count_work.patch
@@ -0,0 +1,34 @@
1Make netcat_flag_count() return positive value
2
3C language has 3 distinct char types:
4 char
5 unsigned char
6 signed char
7A char has the same range of values as signed char on X86,
8but same as unsigned char on PPC which made netcat_flag_count
9return a negative value, now we force variable c as signed char
10to make netcat_flag_count return positive value.
11
12Upstream-Status: Pending
13
14Signed-off-by: Roy.Li <rongqing.li@windriver.com>
15---
16 src/flagset.c | 2 +-
17 1 files changed, 1 insertions(+), 1 deletions(-)
18
19diff --git a/src/flagset.c b/src/flagset.c
20index 442b634..54ac898 100644
21--- a/src/flagset.c
22+++ b/src/flagset.c
23@@ -134,7 +134,7 @@ unsigned short netcat_flag_next(unsigned short port)
24
25 int netcat_flag_count(void)
26 {
27- register char c;
28+ register signed char c;
29 register int i;
30 int ret = 0;
31
32--
331.7.5.4
34
diff --git a/meta-networking/recipes-support/netcat/netcat/netcat-locale_h.patch b/meta-networking/recipes-support/netcat/netcat/netcat-locale_h.patch
new file mode 100644
index 0000000000..5cbcb08e8a
--- /dev/null
+++ b/meta-networking/recipes-support/netcat/netcat/netcat-locale_h.patch
@@ -0,0 +1,25 @@
1Apparently somewhere along the line HAVE_LOCALE_H was changed to
2HAVE_LC_MESSAGES. Adjust netcat to match.
3
4Upstream-Status: Pending
5
6Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
7
8Index: netcat-0.7.1/src/intl.h
9===================================================================
10--- netcat-0.7.1.orig/src/intl.h
11+++ netcat-0.7.1/src/intl.h
12@@ -25,11 +25,11 @@
13 #ifdef ENABLE_NLS
14 #include <libintl.h>
15
16-#ifdef HAVE_LOCALE_H
17+#if defined(HAVE_LC_MESSAGES) || defined(HAVE_LOCALE_H)
18 #include <locale.h>
19 #else
20 #error You must have locale.h in your system
21-#endif /* HAVE_LOCALE_H */
22+#endif /* HAVE_LC_MESSAGES || HAVE_LOCALE_H */
23
24 /* Our dear (and very common) gettext macros */
25 #define _(String) gettext(String)
diff --git a/meta-networking/recipes-support/netcat/netcat/obsolete_autoconf_macros.patch b/meta-networking/recipes-support/netcat/netcat/obsolete_autoconf_macros.patch
new file mode 100644
index 0000000000..9b0ed58d66
--- /dev/null
+++ b/meta-networking/recipes-support/netcat/netcat/obsolete_autoconf_macros.patch
@@ -0,0 +1,32 @@
1Replace obsoleted AM_CONFIG_HEADER flagged by autoconf 2.69
2locale.h check was picked from old gettext macros but with new aclocal
3it picks the right 0.18 gettext.m4 and does not get the check
4therefore we explicitly add it to configure.ac
5
6Upstream-Status: Pending
7
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9
10Index: netcat-0.7.1/configure.ac
11===================================================================
12--- netcat-0.7.1.orig/configure.ac 2013-01-18 01:30:01.928069739 -0800
13+++ netcat-0.7.1/configure.ac 2013-01-18 01:32:50.568073009 -0800
14@@ -26,8 +26,7 @@
15 AC_PREREQ(2.53)
16
17 dnl without this order in this file, automake will be confused!
18-AM_CONFIG_HEADER(config.h)
19-
20+AC_CONFIG_HEADERS(config.h)
21 dnl check for programs. first the c compiler.
22 AC_PROG_CC
23 AC_PROG_CPP
24@@ -56,7 +55,7 @@
25 AC_LBL_LIBRARY_NET
26
27 dnl Fortunately we have Solaris...
28-AC_CHECK_HEADERS(sys/sockio.h)
29+AC_CHECK_HEADERS(sys/sockio.h locale.h)
30
31 AC_CHECK_FUNCS(srandom random)
32 if test $ac_cv_func_srandom = no; then
diff --git a/meta-networking/recipes-support/netcat/netcat_0.7.1.bb b/meta-networking/recipes-support/netcat/netcat_0.7.1.bb
new file mode 100644
index 0000000000..8710c36462
--- /dev/null
+++ b/meta-networking/recipes-support/netcat/netcat_0.7.1.bb
@@ -0,0 +1,24 @@
1require netcat.inc
2SUMMARY = "GNU Netcat"
3HOMEPAGE = "http://netcat.sourceforge.net"
4LICENSE = "GPLv2"
5LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
6
7PR = "r3"
8
9SRC_URI = "${SOURCEFORGE_MIRROR}/netcat/netcat-${PV}.tar.bz2 \
10 file://obsolete_autoconf_macros.patch \
11 file://netcat-locale_h.patch \
12 file://make-netcat_flag_count_work.patch \
13"
14
15SRC_URI[md5sum] = "0a29eff1736ddb5effd0b1ec1f6fe0ef"
16SRC_URI[sha256sum] = "b55af0bbdf5acc02d1eb6ab18da2acd77a400bafd074489003f3df09676332bb"
17
18inherit autotools
19
20do_install_append() {
21 install -d ${D}${bindir}
22 mv ${D}${bindir}/nc ${D}${bindir}/nc.${BPN}
23}
24ALTERNATIVE_PRIORITY = "100"