summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Roovers <jer@gentoo.org>2017-10-07 12:19:41 +0200
committerJeroen Roovers <jer@gentoo.org>2017-10-07 12:20:00 +0200
commit8f2a9d1543a9652dda7ad4aad44dcbce3b731bfc (patch)
treebdc21f26091ede696926ab45091d59295fae8c74 /net-misc
parentdev-lang/swi-prolog: version bump (diff)
downloadgentoo-8f2a9d1543a9652dda7ad4aad44dcbce3b731bfc.tar.gz
gentoo-8f2a9d1543a9652dda7ad4aad44dcbce3b731bfc.tar.bz2
gentoo-8f2a9d1543a9652dda7ad4aad44dcbce3b731bfc.zip
net-misc/ipsorcery: EAPI bump. Add USE=gtk.
Package-Manager: Portage-2.3.11, Repoman-2.3.3
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/ipsorcery/files/ipsorcery-2.0.9-_BSD_SOURCE.patch13
-rw-r--r--net-misc/ipsorcery/files/ipsorcery-2.0.9-gentoo.patch21
-rw-r--r--net-misc/ipsorcery/ipsorcery-2.0.9-r2.ebuild41
3 files changed, 75 insertions, 0 deletions
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 000000000000..ef0fca666f6c
--- /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 000000000000..6a0932c84e2f
--- /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 000000000000..ca13bb0f66ce
--- /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
+}