From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 28E8A13832E for ; Mon, 8 Aug 2016 13:10:12 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6722BE0AD7; Mon, 8 Aug 2016 13:10:08 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E7DECE0AD7 for ; Mon, 8 Aug 2016 13:10:07 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 84CA5340C44 for ; Mon, 8 Aug 2016 13:10:06 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 993312424 for ; Mon, 8 Aug 2016 13:10:03 +0000 (UTC) From: "Jeroen Roovers" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Jeroen Roovers" Message-ID: <1470661801.3dadd237dced7b2750ddcebf7921a1011170e5f0.jer@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/libnet/, net-libs/libnet/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-libs/libnet/files/libnet-1.1.6-_SOURCE.patch net-libs/libnet/files/libnet-1.1.6-musl.patch net-libs/libnet/files/libnet-1.2-_SOURCE.patch net-libs/libnet/files/libnet-1.2-sizeof.patch net-libs/libnet/files/libnet-1.2-socklen_t.patch net-libs/libnet/libnet-1.1.6-r1.ebuild net-libs/libnet/libnet-1.2_rc3-r1.ebuild X-VCS-Directories: net-libs/libnet/files/ net-libs/libnet/ X-VCS-Committer: jer X-VCS-Committer-Name: Jeroen Roovers X-VCS-Revision: 3dadd237dced7b2750ddcebf7921a1011170e5f0 X-VCS-Branch: master Date: Mon, 8 Aug 2016 13:10:03 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 8d07f02f-3245-4f34-a6ae-f3ccb0f60943 X-Archives-Hash: 08c2f3f62a535594148f38695a0d3b6a commit: 3dadd237dced7b2750ddcebf7921a1011170e5f0 Author: Jeroen Roovers gentoo org> AuthorDate: Mon Aug 8 13:09:23 2016 +0000 Commit: Jeroen Roovers gentoo org> CommitDate: Mon Aug 8 13:10:01 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3dadd237 net-libs/libnet: Fix building against sys-libs/musl by Petr Vaněk (bug #590738). Package-Manager: portage-2.3.0 net-libs/libnet/files/libnet-1.1.6-_SOURCE.patch | 20 ++++++++++ net-libs/libnet/files/libnet-1.1.6-musl.patch | 29 ++++++++++++++ net-libs/libnet/files/libnet-1.2-_SOURCE.patch | 20 ++++++++++ net-libs/libnet/files/libnet-1.2-sizeof.patch | 11 +++++ net-libs/libnet/files/libnet-1.2-socklen_t.patch | 11 +++++ net-libs/libnet/libnet-1.1.6-r1.ebuild | 51 ++++++++++++++++++++++++ net-libs/libnet/libnet-1.2_rc3-r1.ebuild | 51 ++++++++++++++++++++++++ 7 files changed, 193 insertions(+) diff --git a/net-libs/libnet/files/libnet-1.1.6-_SOURCE.patch b/net-libs/libnet/files/libnet-1.1.6-_SOURCE.patch new file mode 100644 index 0000000..25ddbc7 --- /dev/null +++ b/net-libs/libnet/files/libnet-1.1.6-_SOURCE.patch @@ -0,0 +1,20 @@ +--- a/configure.in ++++ b/configure.in +@@ -157,14 +157,14 @@ + case "$target_os" in + + *linux*) +- AC_DEFINE(_BSD_SOURCE, 1, ++ AC_DEFINE(_DEFAULT_SOURCE, 1, + [Define as necessary to "unhide" header symbols.]) +- AC_DEFINE(__BSD_SOURCE, 1, ++ AC_DEFINE(__DEFAULT_SOURCE, 1, + [Define as necessary to "unhide" header symbols.]) + AC_DEFINE(__FAVOR_BSD, 1, + [Define if we should favor the BSD APIs when possible in Linux.]) + +- LIBNET_CONFIG_DEFINES="-D_BSD_SOURCE -D__BSD_SOURCE -D__FAVOR_BSD" ++ LIBNET_CONFIG_DEFINES="-D_DEFAULT_SOURCE -D__DEFAULT_SOURCE -D__FAVOR_BSD" + AC_CHECK_HEADERS(net/ethernet.h, \ + LIBNET_CONFIG_DEFINES="$LIBNET_CONFIG_DEFINES -DHAVE_NET_ETHERNET_H") + ;; diff --git a/net-libs/libnet/files/libnet-1.1.6-musl.patch b/net-libs/libnet/files/libnet-1.1.6-musl.patch new file mode 100644 index 0000000..238fb8a --- /dev/null +++ b/net-libs/libnet/files/libnet-1.1.6-musl.patch @@ -0,0 +1,29 @@ +--- a/src/libnet_link_linux.c ++++ b/src/libnet_link_linux.c +@@ -30,26 +30,15 @@ + #include + + #include +-#if (__GLIBC__) + #include + #include +-#else +-#include +-#include +-#endif + + #if (HAVE_PACKET_SOCKET) + #ifndef SOL_PACKET + #define SOL_PACKET 263 + #endif /* SOL_PACKET */ +-#if __GLIBC__ >= 2 && __GLIBC_MINOR >= 1 + #include + #include /* the L2 protocols */ +-#else +-#include +-#include +-#include /* The L2 protocols */ +-#endif + #endif /* HAVE_PACKET_SOCKET */ + + #include "../include/libnet.h" diff --git a/net-libs/libnet/files/libnet-1.2-_SOURCE.patch b/net-libs/libnet/files/libnet-1.2-_SOURCE.patch new file mode 100644 index 0000000..d9c74f4 --- /dev/null +++ b/net-libs/libnet/files/libnet-1.2-_SOURCE.patch @@ -0,0 +1,20 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -157,14 +157,14 @@ + case "$target_os" in + + *linux*) +- AC_DEFINE(_BSD_SOURCE, 1, ++ AC_DEFINE(_DEFAULT_SOURCE, 1, + [Define as necessary to "unhide" header symbols.]) +- AC_DEFINE(__BSD_SOURCE, 1, ++ AC_DEFINE(__DEFAULT_SOURCE, 1, + [Define as necessary to "unhide" header symbols.]) + AC_DEFINE(__FAVOR_BSD, 1, + [Define if we should favor the BSD APIs when possible in Linux.]) + +- LIBNET_CONFIG_DEFINES="-D_BSD_SOURCE -D__BSD_SOURCE -D__FAVOR_BSD" ++ LIBNET_CONFIG_DEFINES="-D_DEFAULT_SOURCE -D__DEFAULT_SOURCE -D__FAVOR_BSD" + AC_CHECK_HEADERS(net/ethernet.h, \ + LIBNET_CONFIG_DEFINES="$LIBNET_CONFIG_DEFINES -DHAVE_NET_ETHERNET_H") + ;; diff --git a/net-libs/libnet/files/libnet-1.2-sizeof.patch b/net-libs/libnet/files/libnet-1.2-sizeof.patch new file mode 100644 index 0000000..e06dbb5 --- /dev/null +++ b/net-libs/libnet/files/libnet-1.2-sizeof.patch @@ -0,0 +1,11 @@ +--- a/sample/sebek.c ++++ b/sample/sebek.c +@@ -167,7 +167,7 @@ + + if (payload_flag) + { +- memset(cmd, 0, sizeof(cmd)); ++ memset(cmd, 0, sizeof(*cmd)); + memcpy(cmd, payload, (payload_s < 12 ? payload_s : 12)); + length = payload_s; + } diff --git a/net-libs/libnet/files/libnet-1.2-socklen_t.patch b/net-libs/libnet/files/libnet-1.2-socklen_t.patch new file mode 100644 index 0000000..bce3670 --- /dev/null +++ b/net-libs/libnet/files/libnet-1.2-socklen_t.patch @@ -0,0 +1,11 @@ +--- a/src/libnet_raw.c ++++ b/src/libnet_raw.c +@@ -77,7 +77,7 @@ + #else + BOOL n; + #endif +- int len; ++ socklen_t len; + + #ifdef SO_SNDBUF + diff --git a/net-libs/libnet/libnet-1.1.6-r1.ebuild b/net-libs/libnet/libnet-1.1.6-r1.ebuild new file mode 100644 index 0000000..0144fd4 --- /dev/null +++ b/net-libs/libnet/libnet-1.1.6-r1.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 +inherit autotools eutils + +DESCRIPTION="library providing an API for commonly used low-level network functions" +HOMEPAGE="http://libnet-dev.sourceforge.net/" +SRC_URI="mirror://sourceforge/project/${PN}-dev/${P}.tar.gz" + +LICENSE="BSD BSD-2 HPND" +SLOT="1.1" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" +IUSE="doc static-libs" + +DEPEND="sys-devel/autoconf" + +DOCS=( + README doc/{CHANGELOG,CONTRIB,DESIGN_NOTES,MIGRATION} + doc/{PACKET_BUILDING,PORTED,RAWSOCKET_NON_SEQUITUR,TODO} +) +PATCHES=( + "${FILESDIR}"/${PN}-1.1.6-_SOURCE.patch + "${FILESDIR}"/${PN}-1.1.6-musl.patch + "${FILESDIR}"/${PN}-1.2-sizeof.patch +) + +src_prepare() { + default + + mv configure{.in,.ac} || die + eautoreconf +} + +src_configure() { + econf $(use_enable static-libs static) +} + +src_install() { + default + + if use doc ; then + dodoc -r doc/html + + docinto sample + dodoc sample/*.[ch] + fi + + prune_libtool_files +} diff --git a/net-libs/libnet/libnet-1.2_rc3-r1.ebuild b/net-libs/libnet/libnet-1.2_rc3-r1.ebuild new file mode 100644 index 0000000..305d02d --- /dev/null +++ b/net-libs/libnet/libnet-1.2_rc3-r1.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 +inherit autotools eutils + +DESCRIPTION="library providing an API for commonly used low-level network functions" +HOMEPAGE="http://libnet-dev.sourceforge.net/" +SRC_URI="mirror://sourceforge/project/${PN}-dev/${P/_/-}.tar.gz" + +LICENSE="BSD BSD-2 HPND" +SLOT="1.1" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" +IUSE="doc static-libs" + +DOCS=( + README doc/{CHANGELOG,CONTRIB,DESIGN_NOTES,MIGRATION} + doc/{PACKET_BUILDING,PORTED,RAWSOCKET_NON_SEQUITUR,TODO} +) + +S=${WORKDIR}/${P/_/-} +PATCHES=( + "${FILESDIR}"/${PN}-1.1.6-musl.patch + "${FILESDIR}"/${PN}-1.2-_SOURCE.patch + "${FILESDIR}"/${PN}-1.2-rc.patch + "${FILESDIR}"/${PN}-1.2-sizeof.patch + "${FILESDIR}"/${PN}-1.2-socklen_t.patch +) + +src_prepare() { + default + + eautoreconf +} +src_configure() { + econf $(use_enable static-libs static) +} + +src_install() { + default + + if use doc ; then + docinto html + dodoc -r doc/html/* + docinto sample + dodoc sample/*.[ch] + fi + + prune_libtool_files +}