parlay

yet another gentoo overlay
git clone https://git.parazyd.org/parlay
Log | Files | Refs | README

commit 3b9a371beaa89917cde49c35297823c2094a9933
parent 5e489fe40912ca2395bddb56803afd1aedfec479
Author: parazyd <parazyd@dyne.org>
Date:   Wed,  5 Oct 2016 10:34:31 +0200

net-misc/bridge-utils: Add 1.5-r99 with musl-libc support.

Diffstat:
Anet-misc/bridge-utils/Manifest | 1+
Anet-misc/bridge-utils/bridge-utils-1.5-r99.ebuild | 50++++++++++++++++++++++++++++++++++++++++++++++++++
Anet-misc/bridge-utils/files/bridge-utils-1.5-linux-3.8.patch | 18++++++++++++++++++
Anet-misc/bridge-utils/files/musl-headers.patch | 54++++++++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 123 insertions(+), 0 deletions(-)

diff --git a/net-misc/bridge-utils/Manifest b/net-misc/bridge-utils/Manifest @@ -0,0 +1 @@ +DIST bridge-utils-1.5.tar.gz 33243 SHA256 42f9e5fb8f6c52e63a98a43b81bd281c227c529f194913e1c51ec48a393b6688 SHA512 4e525fbd3defb509664ef3b728d9e5edfb92beaebdb5d7733d8203fb38cb3f4bb54d02dc1e28813889a2ee19c78b9b47da6d99c8032481a7fd7f104658dea7c3 WHIRLPOOL f11eb95ae9b562cb301bb1f657d87878f0a0729a2129b90fa5957747f078f3afe2ebdadd1eb7ea4a59e544acc8194cf1744126db9ba3f3704210bc18ee3480fa diff --git a/net-misc/bridge-utils/bridge-utils-1.5-r99.ebuild b/net-misc/bridge-utils/bridge-utils-1.5-r99.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +inherit autotools eutils linux-info toolchain-funcs + +DESCRIPTION="Tools for configuring the Linux kernel 802.1d Ethernet Bridge" +HOMEPAGE="http://bridge.sourceforge.net/" +SRC_URI="mirror://sourceforge/bridge/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 sparc x86" +IUSE="selinux" + +DEPEND="virtual/os-headers" +RDEPEND="selinux? ( sec-policy/selinux-brctl )" + +CONFIG_CHECK="~BRIDGE" +WARNING_BRIDGE="CONFIG_BRIDGE is required to get bridge devices in the kernel" + +get_headers() { + CTARGET=${CTARGET:-${CHOST}} + dir=/usr/include + tc-is-cross-compiler && dir=/usr/${CTARGET}/usr/include + echo "${dir}" +} + +src_prepare() { + epatch "${FILESDIR}"/${P}-linux-3.8.patch + eautoreconf +} + +src_configure() { + # use santitized headers and not headers from /usr/src + econf \ + --prefix=/ \ + --libdir=/usr/$(get_libdir) \ + --includedir=/usr/include \ + --with-linux-headers="$(get_headers)" +} + +src_install () { + emake install DESTDIR="${D}" + dodoc AUTHORS ChangeLog README THANKS TODO \ + doc/{FAQ,FIREWALL,HOWTO,PROJECTS,RPM-GPG-KEY,SMPNOTES,WISHLIST} + [ -f "${D}"/sbin/brctl ] || die "upstream makefile failed to install binary" +} diff --git a/net-misc/bridge-utils/files/bridge-utils-1.5-linux-3.8.patch b/net-misc/bridge-utils/files/bridge-utils-1.5-linux-3.8.patch @@ -0,0 +1,18 @@ +unfortunately if_bridge.h from Linux 3.8+ is not self-contained and the struct +for ip6 is missing + +http://bugs.gentoo.org/460262 + +this is not unheard of with Linux headers, for example, <linux/cdrom.h> needs +<limits.h> to get INT_MAX + +--- libbridge/libbridge.h ++++ libbridge/libbridge.h +@@ -20,6 +20,7 @@ + #define _LIBBRIDGE_H + + #include <sys/socket.h> ++#include <netinet/ip6.h> + #include <linux/if.h> + #include <linux/if_bridge.h> + diff --git a/net-misc/bridge-utils/files/musl-headers.patch b/net-misc/bridge-utils/files/musl-headers.patch @@ -0,0 +1,54 @@ +diff --git a/brctl/brctl.c b/brctl/brctl.c +index 454b8dd..8a7f095 100644 +--- a/brctl/brctl.c ++++ b/brctl/brctl.c +@@ -19,7 +19,7 @@ + #include <stdio.h> + #include <stdlib.h> + #include <string.h> +-#include <sys/errno.h> ++#include <errno.h> + #include <getopt.h> + + #include "libbridge.h" +diff --git a/libbridge/libbridge.h b/libbridge/libbridge.h +index 39964f2..73de4fb 100644 +--- a/libbridge/libbridge.h ++++ b/libbridge/libbridge.h +@@ -23,6 +23,9 @@ + #include <linux/if.h> + #include <linux/if_bridge.h> + ++#include <sys/types.h> ++#include <sys/time.h> ++ + /* defined in net/if.h but that conflicts with linux/if.h... */ + extern unsigned int if_nametoindex (const char *__ifname); + extern char *if_indextoname (unsigned int __ifindex, char *__ifname); +diff --git a/libbridge/libbridge_devif.c b/libbridge/libbridge_devif.c +index aa8bc36..1da3549 100644 +--- a/libbridge/libbridge_devif.c ++++ b/libbridge/libbridge_devif.c +@@ -23,7 +23,7 @@ + #include <errno.h> + #include <string.h> + #include <dirent.h> +-#include <sys/fcntl.h> ++#include <fcntl.h> + + #include "libbridge.h" + #include "libbridge_private.h" +diff --git a/libbridge/libbridge_if.c b/libbridge/libbridge_if.c +index 77d3f8a..9cf4bac 100644 +--- a/libbridge/libbridge_if.c ++++ b/libbridge/libbridge_if.c +@@ -20,7 +20,7 @@ + #include <stdlib.h> + #include <errno.h> + #include <string.h> +-#include <sys/fcntl.h> ++#include <fcntl.h> + #include <sys/ioctl.h> + + #include "libbridge.h" +