net-misc/ubridge: Version bump to 0.9.16
authorYury Martynov <email@linxon.ru>
Fri, 17 May 2019 17:01:27 +0000 (20:01 +0300)
committerMichał Górny <mgorny@gentoo.org>
Sat, 6 Jul 2019 10:27:36 +0000 (12:27 +0200)
Package-Manager: Portage-2.3.62, Repoman-2.3.11
Signed-off-by: Yury Martynov <email@linxon.ru>
Closes: https://github.com/gentoo/gentoo/pull/12030
Signed-off-by: Michał Górny <mgorny@gentoo.org>
net-misc/ubridge/Manifest
net-misc/ubridge/files/ubridge-0.9.16_add_slotted_iniparser-4.1+_support.patch [new file with mode: 0644]
net-misc/ubridge/ubridge-0.9.16.ebuild [new file with mode: 0644]

index 9af6c7d67bd0c0d07ceb085866d80fafffbbb756..0cdb14492f916845f4e2a62d33c89e5ce96922ec 100644 (file)
@@ -1 +1,2 @@
 DIST ubridge-0.9.14.tar.gz 63492 BLAKE2B 4c19bb79c264c9bec2ca39fea8b386817f6eb41d23b35f9fbd0a1407b45398ad5362bd76cbb81597438367a2af8d80308f13d3e8faa4e75c6173bbeb23da177d SHA512 7e92ca6ee8dd5815991c5d157278487cfad69710f0a63fc217d5d0e61678d272bf5a0d31b6afe25b1060df1ad13e229f1d573c03fecb1453167a9ff364283a5f
+DIST ubridge-0.9.16.tar.gz 64106 BLAKE2B ea5292bb7895034f18fde2c78e6ec22a043d3f712af0f699240073778bf72ade4ba9fc9be56d5ff13ce4119c6d90265daf86e84405597483c07c900e80b4e579 SHA512 409b5705e178d0edda17f5a321bc28a4a03d417c59893228e022a88025a51e4d4f9a18e548ec71f1b36df24b204cfdf73bc2efb8fe9e39893d29c16b3695380c
diff --git a/net-misc/ubridge/files/ubridge-0.9.16_add_slotted_iniparser-4.1+_support.patch b/net-misc/ubridge/files/ubridge-0.9.16_add_slotted_iniparser-4.1+_support.patch
new file mode 100644 (file)
index 0000000..4d4825f
--- /dev/null
@@ -0,0 +1,36 @@
+diff -ur a/Makefile b/Makefile
+--- a/Makefile 2019-05-20 10:02:14.000000000 +0300
++++ b/Makefile 2019-05-20 10:32:04.972039000 +0300
+@@ -67,7 +67,7 @@
+ ifeq ($(SYSTEM_INIPARSER),1)
+     CFLAGS += -DUSE_SYSTEM_INIPARSER
+-    LIBS += -liniparser
++    LIBS += -liniparser4
+ else
+     SRC += src/iniparser/iniparser.c   \
+          src/iniparser/dictionary.c
+diff -ur a/src/parse.h b/src/parse.h
+--- a/src/parse.h      2019-05-20 10:02:14.000000000 +0300
++++ b/src/parse.h      2019-05-20 10:32:04.968039000 +0300
+@@ -24,7 +24,7 @@
+ #include "ubridge.h"
+ #ifdef USE_SYSTEM_INIPARSER
+-#include <iniparser.h>
++#include <iniparser4/iniparser.h>
+ #else
+ #include "iniparser/iniparser.h"
+ #endif
+diff -ur a/src/ubridge.c b/src/ubridge.c
+--- a/src/ubridge.c    2019-05-20 10:02:14.000000000 +0300
++++ b/src/ubridge.c    2019-05-20 10:32:04.968039000 +0300
+@@ -26,7 +26,7 @@
+ #include <pthread.h>
+ #ifdef USE_SYSTEM_INIPARSER
+-#include <iniparser.h>
++#include <iniparser4/iniparser.h>
+ #else
+ #include "iniparser/iniparser.h"
+ #endif
diff --git a/net-misc/ubridge/ubridge-0.9.16.ebuild b/net-misc/ubridge/ubridge-0.9.16.ebuild
new file mode 100644 (file)
index 0000000..b09d2fd
--- /dev/null
@@ -0,0 +1,50 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit fcaps toolchain-funcs user
+
+DESCRIPTION="Bridge for UDP tunnels, Ethernet, TAP and VMnet interfaces"
+HOMEPAGE="https://github.com/GNS3/ubridge"
+SRC_URI="https://github.com/GNS3/ubridge/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+LICENSE="GPL-3"
+
+RDEPEND="
+       net-libs/libpcap
+       dev-libs/iniparser:4="
+
+DEPEND="${RDEPEND}"
+
+# Bugs: https://bugs.gentoo.org/647588
+#       https://github.com/GNS3/ubridge/issues/60
+PATCHES=( "${FILESDIR}/${P}_add_slotted_iniparser-4.1+_support.patch" )
+
+pkg_setup() {
+       enewgroup ubridge
+}
+
+src_compile() {
+       emake \
+               CC="$(tc-getCC)" \
+               SYSTEM_INIPARSER=1
+}
+
+src_install() {
+       exeinto /usr/bin
+       exeopts -m 710 -g ubridge
+       doexe ubridge
+
+       dodoc README.rst
+}
+
+pkg_postinst() {
+       fcaps -g ubridge -m 4710 -M 0710 cap_net_raw,cap_net_admin \
+               "${EROOT}"/usr/bin/ubridge
+
+       einfo "\nNOTE: To read packets from the network interfaces with ubridge as"
+       einfo "normal user you have to add trusted users to the \"ubridge\" group.\n"
+}