Package: vpnc / 0.5.3+git20210125-1

cross.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
From: Helmut Grohne <helmut@subdivi.de>
Date: Wed, 23 Nov 2016 21:19:38 +0100
Subject: cross compilation support

* Make pkg-config substitutable to provision it as <triplet>-pkg-config.
* Make the vpnc used by makeman.pl substitutable to use the build arch tool.
---
 Makefile   | 8 +++++---
 makeman.pl | 2 +-
 2 files changed, 6 insertions(+), 4 deletions(-)

--- a/Makefile
+++ b/Makefile
@@ -44,8 +44,9 @@
 # GPL incompliant though.
 #OPENSSL_GPL_VIOLATION=yes
 
-CRYPTO_LDADD = $(shell pkg-config --libs gnutls)
-CRYPTO_CFLAGS = $(shell pkg-config --cflags gnutls) -DCRYPTO_GNUTLS
+PKG_CONFIG ?= pkg-config
+CRYPTO_LDADD = $(shell $(PKG_CONFIG) --libs gnutls)
+CRYPTO_CFLAGS = $(shell $(PKG_CONFIG) --cflags gnutls) -DCRYPTO_GNUTLS
 CRYPTO_SRCS = src/crypto-gnutls.c
 
 ifeq ($(OPENSSL_GPL_VIOLATION), yes)
@@ -76,6 +77,7 @@
 CPPFLAGS += -DVERSION=\"$(VERSION)\" -DSCRIPT_PATH=\"$(SCRIPT_PATH)\"
 LDFLAGS ?= -g
 LIBS += $(shell libgcrypt-config --libs) $(CRYPTO_LDADD)
+VPNC ?= $(BUILDDIR)/vpnc
 
 ifeq ($(shell uname -s), SunOS)
 LIBS += -lnsl -lresolv -lsocket
@@ -94,7 +96,7 @@
 	$(CC) $(LDFLAGS) -o $(BUILDDIR)/$@ $^ $(LIBS)
 
 vpnc.8: src/vpnc.8.template src/makeman.pl vpnc
-	./src/makeman.pl $(BUILDDIR)/vpnc
+	./src/makeman.pl $(VPNC)
 
 cisco-decrypt: src/cisco-decrypt.o src/decrypt-utils.o
 	$(CC) $(LDFLAGS) -o $(BUILDDIR)/$@ $^ $(LIBS)