mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-05-09 05:49:23 +00:00
vpnc: Update to build from github SRC_URI
Fix build for musl add packageconfig for crypto selection Fix build with externalsrc Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
This commit is contained in:
+26
@@ -0,0 +1,26 @@
|
|||||||
|
From 48e16e9ae7d8e4c42282bd82cbbd9a6d346a5c00 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Martin Jansa <Martin.Jansa@gmail.com>
|
||||||
|
Date: Sun, 2 Dec 2012 02:16:54 +0100
|
||||||
|
Subject: [PATCH 1/8] search for log-help in build dir
|
||||||
|
|
||||||
|
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||||
|
---
|
||||||
|
makeman.pl | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/makeman.pl b/makeman.pl
|
||||||
|
index cf241a1..2d73432 100755
|
||||||
|
--- a/makeman.pl
|
||||||
|
+++ b/makeman.pl
|
||||||
|
@@ -30,7 +30,7 @@ my $vpnc = './vpnc';
|
||||||
|
# indenting lists (those originally starting with an asterisk). I hope
|
||||||
|
# this pays off when converting the manpage to HTML or such.
|
||||||
|
|
||||||
|
-open my $LONGHELP, '-|', "$vpnc --long-help";
|
||||||
|
+open my $LONGHELP, '-|', "cat ./long-help";
|
||||||
|
my $vpnc_options = '';
|
||||||
|
my $relative_indent = 0;
|
||||||
|
my $indent_needed = 0;
|
||||||
|
--
|
||||||
|
2.12.1
|
||||||
|
|
||||||
+17
-3
@@ -1,6 +1,17 @@
|
|||||||
--- a/Makefile~ 2009-01-20 18:44:30.000000000 +0100
|
From d565b4a5e0045f1e40e0e462920ed5b8faca9eec Mon Sep 17 00:00:00 2001
|
||||||
+++ b/Makefile 2009-01-20 18:44:30.000000000 +0100
|
From: Martin Jansa <Martin.Jansa@gmail.com>
|
||||||
@@ -119,21 +119,21 @@
|
Date: Sun, 2 Dec 2012 02:16:54 +0100
|
||||||
|
Subject: [PATCH 2/8] Fix vpnc install for cross compile
|
||||||
|
|
||||||
|
---
|
||||||
|
Makefile | 22 +++++++++++-----------
|
||||||
|
1 file changed, 11 insertions(+), 11 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/Makefile b/Makefile
|
||||||
|
index 69f5aca..a15782e 100644
|
||||||
|
--- a/Makefile
|
||||||
|
+++ b/Makefile
|
||||||
|
@@ -133,21 +133,21 @@ install-common: all
|
||||||
else \
|
else \
|
||||||
install vpnc-script $(DESTDIR)$(ETCDIR); \
|
install vpnc-script $(DESTDIR)$(ETCDIR); \
|
||||||
fi
|
fi
|
||||||
@@ -33,3 +44,6 @@
|
|||||||
|
|
||||||
uninstall :
|
uninstall :
|
||||||
rm -f $(DESTDIR)$(SBINDIR)/vpnc \
|
rm -f $(DESTDIR)$(SBINDIR)/vpnc \
|
||||||
|
--
|
||||||
|
2.12.1
|
||||||
|
|
||||||
+30
@@ -0,0 +1,30 @@
|
|||||||
|
From 6b49020893f999df56392b49b1a289cb96a113a1 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Khem Raj <raj.khem@gmail.com>
|
||||||
|
Date: Wed, 29 Mar 2017 22:08:17 -0700
|
||||||
|
Subject: [PATCH 3/8] error.h is specific to glibc on linux
|
||||||
|
|
||||||
|
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||||
|
---
|
||||||
|
sysdep.h | 5 +++--
|
||||||
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/sysdep.h b/sysdep.h
|
||||||
|
index 137bf6d..6a323f0 100644
|
||||||
|
--- a/sysdep.h
|
||||||
|
+++ b/sysdep.h
|
||||||
|
@@ -37,9 +37,10 @@ int tun_read(int fd, unsigned char *buf, int len);
|
||||||
|
int tun_get_hwaddr(int fd, char *dev, uint8_t *hwaddr);
|
||||||
|
|
||||||
|
/***************************************************************************/
|
||||||
|
-#if defined(__linux__) || defined(__GLIBC__)
|
||||||
|
+#if defined(__linux__)
|
||||||
|
+#if defined(__GLIBC__)
|
||||||
|
#include <error.h>
|
||||||
|
-
|
||||||
|
+#endif
|
||||||
|
#define HAVE_VASPRINTF 1
|
||||||
|
#define HAVE_ASPRINTF 1
|
||||||
|
#define HAVE_ERROR 1
|
||||||
|
--
|
||||||
|
2.12.1
|
||||||
|
|
||||||
+30
@@ -0,0 +1,30 @@
|
|||||||
|
From 4d1dd61c04f52a7c796debbdea5fc9139ffa271d Mon Sep 17 00:00:00 2001
|
||||||
|
From: Khem Raj <raj.khem@gmail.com>
|
||||||
|
Date: Wed, 29 Mar 2017 22:45:05 -0700
|
||||||
|
Subject: [PATCH 4/8] Use pkgconfig instead of libgcrypt-config
|
||||||
|
|
||||||
|
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||||
|
---
|
||||||
|
Makefile | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/Makefile b/Makefile
|
||||||
|
index a15782e..b537046 100644
|
||||||
|
--- a/Makefile
|
||||||
|
+++ b/Makefile
|
||||||
|
@@ -63,10 +63,10 @@ RELEASE_VERSION := $(shell cat VERSION)
|
||||||
|
CC ?= gcc
|
||||||
|
CFLAGS ?= -O3 -g
|
||||||
|
CFLAGS += -W -Wall -Wmissing-declarations -Wwrite-strings
|
||||||
|
-CFLAGS += $(shell libgcrypt-config --cflags) $(CRYPTO_CFLAGS)
|
||||||
|
+CFLAGS += $(shell pkg-config libgcrypt --cflags) $(CRYPTO_CFLAGS)
|
||||||
|
CPPFLAGS += -DVERSION=\"$(VERSION)\"
|
||||||
|
LDFLAGS ?= -g
|
||||||
|
-LIBS += $(shell libgcrypt-config --libs) $(CRYPTO_LDADD)
|
||||||
|
+LIBS += $(shell pkg-config libgcrypt --libs) $(CRYPTO_LDADD)
|
||||||
|
|
||||||
|
ifeq ($(shell uname -s), SunOS)
|
||||||
|
LIBS += -lnsl -lresolv -lsocket
|
||||||
|
--
|
||||||
|
2.12.1
|
||||||
|
|
||||||
+30
@@ -0,0 +1,30 @@
|
|||||||
|
From 1947ea776dc38c3377702dd89bd229670f4d948d Mon Sep 17 00:00:00 2001
|
||||||
|
From: Khem Raj <raj.khem@gmail.com>
|
||||||
|
Date: Wed, 29 Mar 2017 23:06:52 -0700
|
||||||
|
Subject: [PATCH 5/8] include sys/ttydefaults.h for CEOT definition
|
||||||
|
|
||||||
|
Fixes
|
||||||
|
|
||||||
|
config.c:146:25: error: use of undeclared identifier 'CEOT'
|
||||||
|
if (llen == 0 && c == CEOT)
|
||||||
|
|
||||||
|
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||||
|
---
|
||||||
|
config.c | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/config.c b/config.c
|
||||||
|
index 804faa7..1883d12 100644
|
||||||
|
--- a/config.c
|
||||||
|
+++ b/config.c
|
||||||
|
@@ -31,6 +31,7 @@
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/utsname.h>
|
||||||
|
#include <sys/wait.h>
|
||||||
|
+#include <sys/ttydefaults.h>
|
||||||
|
|
||||||
|
#include <gcrypt.h>
|
||||||
|
|
||||||
|
--
|
||||||
|
2.12.1
|
||||||
|
|
||||||
+40
@@ -0,0 +1,40 @@
|
|||||||
|
From 56768fc0c2cbd6abcf28c9805ab516db8a0548d4 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Khem Raj <raj.khem@gmail.com>
|
||||||
|
Date: Wed, 29 Mar 2017 23:09:47 -0700
|
||||||
|
Subject: [PATCH 6/8] sysdep: Add header include sequence to adjust for musl
|
||||||
|
|
||||||
|
---
|
||||||
|
sysdep.h | 10 +++++++---
|
||||||
|
1 file changed, 7 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/sysdep.h b/sysdep.h
|
||||||
|
index 6a323f0..0122b95 100644
|
||||||
|
--- a/sysdep.h
|
||||||
|
+++ b/sysdep.h
|
||||||
|
@@ -17,16 +17,20 @@
|
||||||
|
* __SKYOS__
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
+/* hack to make sure kernel headers understand that libc (musl)
|
||||||
|
+ * does define IFF_LOWER_UP et al.
|
||||||
|
+ */
|
||||||
|
+#define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 0
|
||||||
|
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/socket.h>
|
||||||
|
-#include <netinet/in.h>
|
||||||
|
|
||||||
|
#if !defined(__CYGWIN__)
|
||||||
|
-#include <net/if.h>
|
||||||
|
-#include <net/if_arp.h>
|
||||||
|
+//#include <linux/if.h>
|
||||||
|
+//#include <net/if_arp.h>
|
||||||
|
#include <netinet/if_ether.h>
|
||||||
|
#endif
|
||||||
|
+#include <netinet/in.h>
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
|
--
|
||||||
|
2.12.1
|
||||||
|
|
||||||
+66
@@ -0,0 +1,66 @@
|
|||||||
|
From b6a027fe4da6f66552b533f1314e5005b16c5455 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Khem Raj <raj.khem@gmail.com>
|
||||||
|
Date: Wed, 29 Mar 2017 23:52:36 -0700
|
||||||
|
Subject: [PATCH 7/8] add error() API when error.h is not on platform
|
||||||
|
|
||||||
|
sign-off-by: Khem Raj <raj.khem@gmail.com>
|
||||||
|
---
|
||||||
|
sysdep.c | 24 ++++++++++++++++++++++++
|
||||||
|
sysdep.h | 2 ++
|
||||||
|
2 files changed, 26 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/sysdep.c b/sysdep.c
|
||||||
|
index d8f181d..2518ec1 100644
|
||||||
|
--- a/sysdep.c
|
||||||
|
+++ b/sysdep.c
|
||||||
|
@@ -17,6 +17,7 @@
|
||||||
|
GNU General Public License for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
+#define _GNU_SOURCE
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
@@ -794,3 +795,26 @@ int setenv(const char *name, const char *value, int overwrite)
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
+
|
||||||
|
+#ifndef _ERROR_H_
|
||||||
|
+#define _ERROR_H_
|
||||||
|
+#include <stdarg.h>
|
||||||
|
+#include <stdio.h>
|
||||||
|
+#include <errno.h>
|
||||||
|
+
|
||||||
|
+void error(int status, int errnum, const char* format, ...)
|
||||||
|
+{
|
||||||
|
+ va_list ap;
|
||||||
|
+
|
||||||
|
+ fflush(stdout);
|
||||||
|
+ fprintf(stderr, "%s: ", program_invocation_name);
|
||||||
|
+ va_start(ap, format);
|
||||||
|
+ vfprintf(stderr, format, ap);
|
||||||
|
+ va_end(ap);
|
||||||
|
+ if (errnum)
|
||||||
|
+ fprintf(stderr, ":%d", errnum);
|
||||||
|
+ if (status)
|
||||||
|
+ exit(status);
|
||||||
|
+}
|
||||||
|
+#endif /* _ERROR_H_ */
|
||||||
|
+
|
||||||
|
diff --git a/sysdep.h b/sysdep.h
|
||||||
|
index 0122b95..4e60064 100644
|
||||||
|
--- a/sysdep.h
|
||||||
|
+++ b/sysdep.h
|
||||||
|
@@ -44,6 +44,8 @@ int tun_get_hwaddr(int fd, char *dev, uint8_t *hwaddr);
|
||||||
|
#if defined(__linux__)
|
||||||
|
#if defined(__GLIBC__)
|
||||||
|
#include <error.h>
|
||||||
|
+#else
|
||||||
|
+void error(int status, int errnum, const char* format, ...);
|
||||||
|
#endif
|
||||||
|
#define HAVE_VASPRINTF 1
|
||||||
|
#define HAVE_ASPRINTF 1
|
||||||
|
--
|
||||||
|
2.12.1
|
||||||
|
|
||||||
+36
@@ -0,0 +1,36 @@
|
|||||||
|
From 7f01847d14a1a3af50f49499743b0551ddef1311 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Khem Raj <raj.khem@gmail.com>
|
||||||
|
Date: Wed, 29 Mar 2017 23:54:01 -0700
|
||||||
|
Subject: [PATCH 8/8] include sysdep.h before net/if_tun.h
|
||||||
|
|
||||||
|
Fixes duplicate defines in header errors
|
||||||
|
|
||||||
|
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||||
|
---
|
||||||
|
sysdep.c | 3 ++-
|
||||||
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/sysdep.c b/sysdep.c
|
||||||
|
index 2518ec1..5624ef1 100644
|
||||||
|
--- a/sysdep.c
|
||||||
|
+++ b/sysdep.c
|
||||||
|
@@ -57,6 +57,8 @@
|
||||||
|
#include <sys/cygwin.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+#include "sysdep.h"
|
||||||
|
+
|
||||||
|
#if defined(__DragonFly__)
|
||||||
|
#include <net/tun/if_tun.h>
|
||||||
|
#elif defined(__linux__)
|
||||||
|
@@ -69,7 +71,6 @@
|
||||||
|
#include <net/if_tun.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-#include "sysdep.h"
|
||||||
|
|
||||||
|
#if !defined(HAVE_VASPRINTF) || !defined(HAVE_ASPRINTF) || !defined(HAVE_ERROR)
|
||||||
|
#include <stdarg.h>
|
||||||
|
--
|
||||||
|
2.12.1
|
||||||
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
--- vpnc-0.5.1/makeman.pl.old 2008-03-16 02:17:59.000000000 -0500
|
|
||||||
+++ vpnc-0.5.1/makeman.pl 2008-03-16 02:29:34.000000000 -0500
|
|
||||||
@@ -29,7 +29,7 @@ my $vpnc = './vpnc';
|
|
||||||
# indenting lists (those originally starting with an asterisk). I hope
|
|
||||||
# this pays off when converting the manpage to HTML or such.
|
|
||||||
|
|
||||||
-open my $LONGHELP, '-|', "$vpnc --long-help";
|
|
||||||
+open my $LONGHELP, '-|', "cat ../long-help";
|
|
||||||
my $vpnc_options = '';
|
|
||||||
my $relative_indent = 0;
|
|
||||||
my $indent_needed = 0;
|
|
||||||
@@ -4,17 +4,39 @@ AUTHOR = "Maurice Massar vpnc@unix-ag.uni-kl.de"
|
|||||||
SECTION = "net"
|
SECTION = "net"
|
||||||
LICENSE = "GPL-2.0+"
|
LICENSE = "GPL-2.0+"
|
||||||
LIC_FILES_CHKSUM = "file://COPYING;md5=173b74cb8ac640a9992c03f3bce22a33"
|
LIC_FILES_CHKSUM = "file://COPYING;md5=173b74cb8ac640a9992c03f3bce22a33"
|
||||||
DEPENDS = "libgcrypt"
|
|
||||||
|
|
||||||
inherit perlnative
|
DEPENDS += "libgcrypt"
|
||||||
|
|
||||||
EXTRA_OEMAKE = "-e MAKEFLAGS="
|
PV .= "r550-2jnpr1"
|
||||||
CFLAGS_append = ' -DVERSION=\\"${PV}\\"'
|
SRCREV = "b1243d29e0c00312ead038b04a2cf5e2fa31d740"
|
||||||
LDFLAGS_append = " -lgcrypt -lgpg-error"
|
SRC_URI = "git://github.com/ndpgroup/vpnc \
|
||||||
|
file://long-help \
|
||||||
|
file://default.conf \
|
||||||
|
file://0001-search-for-log-help-in-build-dir.patch \
|
||||||
|
file://0002-Fix-vpnc-install-for-cross-compile.patch \
|
||||||
|
file://0003-error.h-is-specific-to-glibc-on-linux.patch \
|
||||||
|
file://0004-Use-pkgconfig-instead-of-libgcrypt-config.patch \
|
||||||
|
file://0005-include-sys-ttydefaults.h-for-CEOT-definition.patch \
|
||||||
|
file://0006-sysdep-Add-header-include-sequence-to-adjust-for-mus.patch \
|
||||||
|
file://0007-add-error-API-when-error.h-is-not-on-platform.patch \
|
||||||
|
file://0008-include-sysdep.h-before-net-if_tun.h.patch \
|
||||||
|
"
|
||||||
|
|
||||||
|
PACKAGECONFIG ?= "gnutls"
|
||||||
|
|
||||||
|
PACKAGECONFIG[gnutls] = ",,gnutls"
|
||||||
|
PACKAGECONFIG[openssl] = ",,openssl"
|
||||||
|
|
||||||
|
S = "${WORKDIR}/git"
|
||||||
|
|
||||||
|
inherit perlnative pkgconfig
|
||||||
|
|
||||||
|
#EXTRA_OEMAKE = "-e MAKEFLAGS="
|
||||||
|
|
||||||
do_configure_append () {
|
do_configure_append () {
|
||||||
# Make sure we use our nativeperl wrapper
|
# Make sure we use our nativeperl wrapper
|
||||||
sed -i "1s:#!.*:#!/usr/bin/env nativeperl:" ${S}/*.pl
|
sed -i "1s:#!.*:#!/usr/bin/env nativeperl:" ${S}/*.pl
|
||||||
|
cp ${WORKDIR}/long-help ${S}
|
||||||
}
|
}
|
||||||
|
|
||||||
do_install () {
|
do_install () {
|
||||||
@@ -34,12 +56,3 @@ vpnc_sysroot_preprocess () {
|
|||||||
CONFFILES_${PN} = "${sysconfdir}/vpnc/default.conf"
|
CONFFILES_${PN} = "${sysconfdir}/vpnc/default.conf"
|
||||||
RDEPENDS_${PN} = "perl-module-io-file"
|
RDEPENDS_${PN} = "perl-module-io-file"
|
||||||
RRECOMMENDS_${PN} = "kernel-module-tun"
|
RRECOMMENDS_${PN} = "kernel-module-tun"
|
||||||
|
|
||||||
SRC_URI = "http://www.unix-ag.uni-kl.de/~massar/vpnc/vpnc-${PV}.tar.gz \
|
|
||||||
file://makeman.patch \
|
|
||||||
file://vpnc-install.patch \
|
|
||||||
file://long-help \
|
|
||||||
file://default.conf"
|
|
||||||
|
|
||||||
SRC_URI[md5sum] = "4378f9551d5b077e1770bbe09995afb3"
|
|
||||||
SRC_URI[sha256sum] = "46cea3bd02f207c62c7c6f2f22133382602baeda1dc320747809e94881414884"
|
|
||||||
|
|||||||
Reference in New Issue
Block a user