summaryrefslogtreecommitdiff
path: root/net/hs-network-info
diff options
context:
space:
mode:
authorpho <pho@pkgsrc.org>2021-05-05 09:29:16 +0000
committerpho <pho@pkgsrc.org>2021-05-05 09:29:16 +0000
commit436e99875205f4d9ebed49d19688e9bfe489f157 (patch)
treed0978504ed649cf175ad210eeeaf03e20d4de78e /net/hs-network-info
parent0b6d53022cf749de382f203e307305125f6eba65 (diff)
downloadpkgsrc-436e99875205f4d9ebed49d19688e9bfe489f157.tar.gz
Import network-info-0.2.0.10
This library provides simple read-only access to the local computer's networking configuration. It is currently capable of getting a list of all the network interfaces and their respective IPv4, IPv6 and MAC addresses.
Diffstat (limited to 'net/hs-network-info')
-rw-r--r--net/hs-network-info/DESCR4
-rw-r--r--net/hs-network-info/Makefile11
-rw-r--r--net/hs-network-info/buildlink3.mk13
-rw-r--r--net/hs-network-info/distinfo7
-rw-r--r--net/hs-network-info/patches/patch-cbits_network-unix.c17
5 files changed, 52 insertions, 0 deletions
diff --git a/net/hs-network-info/DESCR b/net/hs-network-info/DESCR
new file mode 100644
index 00000000000..3ac55c2dc3d
--- /dev/null
+++ b/net/hs-network-info/DESCR
@@ -0,0 +1,4 @@
+This library provides simple read-only access to the local computer's
+networking configuration. It is currently capable of getting a list of
+all the network interfaces and their respective IPv4, IPv6 and MAC
+addresses.
diff --git a/net/hs-network-info/Makefile b/net/hs-network-info/Makefile
new file mode 100644
index 00000000000..bec2de5c719
--- /dev/null
+++ b/net/hs-network-info/Makefile
@@ -0,0 +1,11 @@
+# $NetBSD: Makefile,v 1.1 2021/05/05 09:29:16 pho Exp $
+
+DISTNAME= network-info-0.2.0.10
+CATEGORIES= net
+
+MAINTAINER= pho@cielonegro.org
+COMMENT= Access basic network configuration of the local computer
+LICENSE= modified-bsd
+
+.include "../../mk/haskell.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/net/hs-network-info/buildlink3.mk b/net/hs-network-info/buildlink3.mk
new file mode 100644
index 00000000000..12467a122af
--- /dev/null
+++ b/net/hs-network-info/buildlink3.mk
@@ -0,0 +1,13 @@
+# $NetBSD: buildlink3.mk,v 1.1 2021/05/05 09:29:16 pho Exp $
+
+BUILDLINK_TREE+= hs-network-info
+
+.if !defined(HS_NETWORK_INFO_BUILDLINK3_MK)
+HS_NETWORK_INFO_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.hs-network-info+= hs-network-info>=0.2.0
+BUILDLINK_ABI_DEPENDS.hs-network-info+= hs-network-info>=0.2.0.10
+BUILDLINK_PKGSRCDIR.hs-network-info?= ../../net/hs-network-info
+.endif # HS_NETWORK_INFO_BUILDLINK3_MK
+
+BUILDLINK_TREE+= -hs-network-info
diff --git a/net/hs-network-info/distinfo b/net/hs-network-info/distinfo
new file mode 100644
index 00000000000..92140063383
--- /dev/null
+++ b/net/hs-network-info/distinfo
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.1 2021/05/05 09:29:16 pho Exp $
+
+SHA1 (network-info-0.2.0.10.tar.gz) = a277470d6fbfb56bd0da7f1100017a87c525711a
+RMD160 (network-info-0.2.0.10.tar.gz) = 8f27eb6c92ef8a61a97dfee71df84367372ff669
+SHA512 (network-info-0.2.0.10.tar.gz) = d578f64860fb3c04d11a444d9636bde57402b6728529e73c7741b056ef0d8f68cb0958118212f2d47826dc28ba9b2bfcc9aef8b5b2e9fc3da8eaadc796160895
+Size (network-info-0.2.0.10.tar.gz) = 6278 bytes
+SHA1 (patch-cbits_network-unix.c) = 78769aa78e4e61b3dd9488e5c0d2337d1f69a946
diff --git a/net/hs-network-info/patches/patch-cbits_network-unix.c b/net/hs-network-info/patches/patch-cbits_network-unix.c
new file mode 100644
index 00000000000..70523959be1
--- /dev/null
+++ b/net/hs-network-info/patches/patch-cbits_network-unix.c
@@ -0,0 +1,17 @@
+$NetBSD: patch-cbits_network-unix.c,v 1.1 2021/05/05 09:29:16 pho Exp $
+
+Support NetBSD: https://github.com/jacobstanley/network-info/pull/21
+
+--- cbits/network-unix.c.orig 2021-05-05 09:25:02.528519803 +0000
++++ cbits/network-unix.c
+@@ -36,6 +36,10 @@
+ # include <netinet/in.h>
+ #endif
+
++#ifdef __NetBSD__
++# include <netinet/in.h>
++#endif
++
+ #include "network.h"
+ #include "common.h"
+