./configure script checked manually for /usr/lib/libnet.a presence.
That does not work in libdir=lib64 systems like amd64. Let's drop
the check intirely.
Reported-by: Toralf Förster
Bug: https://bugs.gentoo.org/678774
Package-Manager: Portage-2.3.67, Repoman-2.3.14
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Fix icon path and name.
---- gtk.c
-+++ gtk.c
+--- a/gtk.c
++++ b/gtk.c
@@ -24,9 +24,7 @@
gtk_set_locale ();
gtk_init (&_argc, &_argv);
MainWin = create_MainWin();
---- interface.c
-+++ interface.c
+--- a/interface.c
++++ b/interface.c
@@ -102,7 +102,7 @@
gtk_widget_set_size_request (MainWin, 640, 480);
gtk_window_set_title (GTK_WINDOW (MainWin), BANNER);
--- /dev/null
+Don't assume that $(libdir) is lib. Rely on linker defaults instead.
+--- a/configure.ac
++++ b/configure.ac
+@@ -55,13 +55,6 @@ AC_ARG_WITH([libnet-prefix],
+ [ LIBNET_PREFIX=$withval ],
+ [ LIBNET_PREFIX=/usr ])
+
+-AC_CHECK_FILE([$LIBNET_PREFIX/lib/libnet.a],
+- [LDFLAGS="-L$LIBNET_PREFIX/lib"
+- CPPFLAGS="-I$LIBNET_PREFIX/include" ],
+- AC_MSG_ERROR([
+-Libnet-1.1.1 Packet Shaping Library is required!
+-Verify to have installed it and pass --with-libnet-prefix to configure.
+-Or download it from http://www.packetfactory.net/libnet ]))
+
+ AC_CHECK_LIB(net, libnet_name2addr4,,
+ AC_MSG_ERROR([
--- /dev/null
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools eutils
+
+DESCRIPTION="A simple GTK/command line TCP/IP packet generator"
+HOMEPAGE="http://gspoof.sourceforge.net/"
+SRC_URI="http://gspoof.sourceforge.net/src/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+
+IUSE=""
+
+DEPEND="
+ x11-libs/gtk+:2
+ dev-libs/glib:2
+ net-libs/libnet:1.1
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-def-values.patch
+ "${FILESDIR}"/${P}-icon.patch
+ "${FILESDIR}"/${PN}-3.2-libdir.patch
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_compile() {
+ emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}"
+}
+
+src_install() {
+ dobin gspoof
+ newicon pixmap/icon.png ${PN}.png
+ dodoc README CHANGELOG TODO
+}