pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

wireguard-go: fix NetBSD build



Module Name:	pkgsrc-wip
Committed By:	Benny Siegert <bsiegert%gmail.com@localhost>
Pushed By:	bsiegert
Date:		Sat Sep 19 19:02:27 2020 +0000
Changeset:	d0a852c51b9f5784480ffb83d729794e84658108

Modified Files:
	wireguard-go/Makefile
	wireguard-go/distinfo
Added Files:
	wireguard-go/patches/patch-ipc_uapi__bsd.go

Log Message:
wireguard-go: fix NetBSD build

Note that I haven't tested this, only the build.

- add NetBSD support for ipc and tun subpackages (= openbsd)
- set GO_BUILD_PATTERN so that we don't build all code in all dependencies
- comment out dependency to non-existent wireguard-tools package

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=d0a852c51b9f5784480ffb83d729794e84658108

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 wireguard-go/Makefile                       |  7 ++++++-
 wireguard-go/distinfo                       |  1 +
 wireguard-go/patches/patch-ipc_uapi__bsd.go | 12 ++++++++++++
 3 files changed, 19 insertions(+), 1 deletion(-)

diffs:
diff --git a/wireguard-go/Makefile b/wireguard-go/Makefile
index 8192bf4119..67ad5cfe7c 100644
--- a/wireguard-go/Makefile
+++ b/wireguard-go/Makefile
@@ -10,7 +10,7 @@ HOMEPAGE=	https://www.wireguard.com/
 COMMENT=	Implementation of WireGuard in Go
 LICENSE=	mit
 
-DEPENDS+=	wireguard-tools>=1.0.20200827:../../net/wireguard-tools
+#DEPENDS+=	wireguard-tools>=1.0.20200827:../../net/wireguard-tools
 
 INSTALLATION_DIRS+=	bin
 
@@ -18,6 +18,11 @@ do-install:
 	${INSTALL_PROGRAM} ${WRKDIR}/.gopath/bin/wireguard \
 		${DESTDIR}${PREFIX}/bin/wireguard-go
 
+GO_BUILD_PATTERN=	.
+
+post-patch:
+	cd ${WRKSRC}/tun && ${LN} -sf tun_openbsd.go tun_netbsd.go
+
 .include "go-modules.mk"
 
 .include "../../lang/go/go-module.mk"
diff --git a/wireguard-go/distinfo b/wireguard-go/distinfo
index 9110c48a8a..a1e712f3b4 100644
--- a/wireguard-go/distinfo
+++ b/wireguard-go/distinfo
@@ -64,4 +64,5 @@ SHA1 (wireguard-go-0.0.20200320.tar.xz) = b76f871984b2689d7909eddf73d33a4c7b29c3
 RMD160 (wireguard-go-0.0.20200320.tar.xz) = acb5defeb676ae02cadada7be13d274b1fc4bc83
 SHA512 (wireguard-go-0.0.20200320.tar.xz) = e403b8747ec42f0e34eaedfa54f3fa5b09fb26cf0c7cf6c8f6c7f0edf2b7896f272860ee0561f8ecc051375e61a7b2b8ceb64e1f9a080f16f3c5ceb9e6c0f93b
 Size (wireguard-go-0.0.20200320.tar.xz) = 80556 bytes
+SHA1 (patch-ipc_uapi__bsd.go) = 353120f52a2a9331210221721fd55a9553b9973f
 SHA1 (patch-rwcancel-select_default.go) = b873e0ca032103a32ca31b968f270bc532a2de0d
diff --git a/wireguard-go/patches/patch-ipc_uapi__bsd.go b/wireguard-go/patches/patch-ipc_uapi__bsd.go
new file mode 100644
index 0000000000..ec914b79a2
--- /dev/null
+++ b/wireguard-go/patches/patch-ipc_uapi__bsd.go
@@ -0,0 +1,12 @@
+$NetBSD$
+
+Add NetBSD to the list of OSes for this file.
+
+--- ipc/uapi_bsd.go.orig	2020-03-20 18:00:53.000000000 +0000
++++ ipc/uapi_bsd.go
+@@ -1,4 +1,4 @@
+-// +build darwin freebsd openbsd
++// +build darwin freebsd openbsd netbsd
+ 
+ /* SPDX-License-Identifier: MIT
+  *


Home | Main Index | Thread Index | Old Index