commit:     8f2a9d1543a9652dda7ad4aad44dcbce3b731bfc
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Sat Oct  7 10:19:41 2017 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Sat Oct  7 10:20:00 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8f2a9d15

net-misc/ipsorcery: EAPI bump. Add USE=gtk.

Package-Manager: Portage-2.3.11, Repoman-2.3.3

 .../files/ipsorcery-2.0.9-_BSD_SOURCE.patch        | 13 +++++++
 .../ipsorcery/files/ipsorcery-2.0.9-gentoo.patch   | 21 +++++++++++
 net-misc/ipsorcery/ipsorcery-2.0.9-r2.ebuild       | 41 ++++++++++++++++++++++
 3 files changed, 75 insertions(+)

diff --git a/net-misc/ipsorcery/files/ipsorcery-2.0.9-_BSD_SOURCE.patch 
b/net-misc/ipsorcery/files/ipsorcery-2.0.9-_BSD_SOURCE.patch
new file mode 100644
index 00000000000..ef0fca666f6
--- /dev/null
+++ b/net-misc/ipsorcery/files/ipsorcery-2.0.9-_BSD_SOURCE.patch
@@ -0,0 +1,13 @@
+--- a/wand.h
++++ b/wand.h
+@@ -19,8 +19,8 @@
+ #ifndef _WAND_H
+ #define _WAND_H
+ 
+-#ifndef _BSD_SOURCE
+-#define _BSD_SOURCE
++#ifndef _DEFAULT_SOURCE
++#define _DEFAULT_SOURCE
+ #endif
+ 
+ #ifndef __FAVOR_BSD

diff --git a/net-misc/ipsorcery/files/ipsorcery-2.0.9-gentoo.patch 
b/net-misc/ipsorcery/files/ipsorcery-2.0.9-gentoo.patch
new file mode 100644
index 00000000000..6a0932c84e2
--- /dev/null
+++ b/net-misc/ipsorcery/files/ipsorcery-2.0.9-gentoo.patch
@@ -0,0 +1,21 @@
+--- a/Makefile
++++ b/Makefile
+@@ -12,15 +12,15 @@
+ all:    con gtk
+ 
+ con:
+-      $(CC) -g -O2 -Wall -ansi -D_VERSION_=\"2.0.9\" -D_CON_ $(CON) -o ipmagic
++      $(CC) $(LDFLAGS) $(CFLAGS) -Wall -ansi -D_VERSION_=\"2.0.9\" -D_CON_ 
$(CON) -o ipmagic
+       
+ 
+ gtk:
+-      $(CC) -g -O2 -Wall -ansi -D_GTK_ -DGTK_ENABLE_BROKEN $(SRC) -o $(SPELL) 
`pkg-config --libs gtk+-2.0` `pkg-config --cflags gtk+-2.0` 
++      $(CC) $(LDFLAGS) $(CFLAGS) $(shell $(PKG_CONFIG) --cflags gtk+-2.0) 
-Wall -ansi -D_GTK_ -DGTK_ENABLE_BROKEN $(SRC) -o $(SPELL) $(shell 
$(PKG_CONFIG) --libs gtk+-2.0)
+ 
+ 
+ solaris:     
+-      $(CC) -g -O2 -Wall -ansi  -D_CON_  $(CON) -o $(SPELL)  -lsocket -lnsl
++      $(CC) $(LDFLAGS) $(CFLAGS) -Wall -ansi  -D_CON_  $(CON) -o $(SPELL)  
-lsocket -lnsl
+ 
+ 
+ install: con-install

diff --git a/net-misc/ipsorcery/ipsorcery-2.0.9-r2.ebuild 
b/net-misc/ipsorcery/ipsorcery-2.0.9-r2.ebuild
new file mode 100644
index 00000000000..ca13bb0f66c
--- /dev/null
+++ b/net-misc/ipsorcery/ipsorcery-2.0.9-r2.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit toolchain-funcs
+
+DESCRIPTION="Ipsorcery allows you to generate IP, TCP, UDP, ICMP, and IGMP 
packets"
+HOMEPAGE="https://www.gentoo.org/";
+SRC_URI="mirror://gentoo/ipsorc-${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+IUSE="gtk"
+
+DEPEND="
+       gtk? (
+               dev-libs/glib:2=
+               x11-libs/gtk+:2=
+       )
+"
+RDEPEND="
+       ${DEPEND}
+"
+S=${WORKDIR}/ipsorc-${PV}
+PATCHES=(
+       "${FILESDIR}"/${P}-_BSD_SOURCE.patch
+       "${FILESDIR}"/${P}-gentoo.patch
+)
+
+src_compile() {
+       emake \
+               CC="$(tc-getCC)" \
+               PKG_CONFIG=$(tc-getPKG_CONFIG) \
+               con $(usex gtk gtk '')
+}
+
+src_install() {
+       dosbin ipmagic $(usex gtk magic '')
+       dodoc BUGS changelog HOWTO README
+}

Reply via email to