diff --git a/net-analyzer/arpantispoofer/Manifest b/net-analyzer/arpantispoofer/Manifest index 38bf312fa..d0e915ceb 100644 --- a/net-analyzer/arpantispoofer/Manifest +++ b/net-analyzer/arpantispoofer/Manifest @@ -1 +1 @@ -DIST arpantispoofer-linux-1.0.1.32.tar.bz2 31181 SHA256 68997e42fd93e75e6f8f5de8ca4677621c7b51bf6c511804d0fbf7335d9516bf SHA512 91723e59f3eac0095752aa5231d474c2641f069337848969296a49131768612baf2ff1692329a5aaee49c07f478b029bd9d35affa9d7db4dbcb2784dec64f33d WHIRLPOOL 2258f15eb2ccc27bd0effd1e89bafc9e1d3f30bbd180a510ef17b29d20d5fbee0b4e0f39296e2905846f4253a2c1d5442f67efcad7f88d721778c2d0066bab8f +DIST arpantispoofer-linux-1.0.1.32.tar.bz2 31181 BLAKE2B 941f9ea843012773add6e4ec2463a9ee6f880128f2958539c13c7fcf2e32f602db832126161c0411b71104c3cd80468a5a4721cd30d69740283d277888dbc526 SHA512 91723e59f3eac0095752aa5231d474c2641f069337848969296a49131768612baf2ff1692329a5aaee49c07f478b029bd9d35affa9d7db4dbcb2784dec64f33d diff --git a/net-analyzer/arpantispoofer/arpantispoofer-1.0.1.32.ebuild b/net-analyzer/arpantispoofer/arpantispoofer-1.0.1.32.ebuild index d85dfc9e6..4a06520e3 100644 --- a/net-analyzer/arpantispoofer/arpantispoofer-1.0.1.32.ebuild +++ b/net-analyzer/arpantispoofer/arpantispoofer-1.0.1.32.ebuild @@ -1,29 +1,57 @@ -# Copyright 1999-2013 Gentoo Foundation +# Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -# $Header: $ -EAPI="4" +EAPI=7 + +inherit desktop toolchain-funcs xdg-utils DESCRIPTION="An utility to detect and resist arp spoofing" -HOMEPAGE="http://sourceforge.net/projects/arpantispoofer/" +HOMEPAGE="https://sourceforge.net/projects/arpantispoofer/" SRC_URI="mirror://sourceforge/$PN/$PN-linux-$PV.tar.bz2" +KEYWORDS="~amd64 ~x86" LICENSE="GPL-3" SLOT="0" -KEYWORDS="" -IUSE="" + +RDEPEND=" + gnome-base/libgnomeui + gnome-base/libbonoboui + net-libs/libpcap + x11-libs/gtk+:2 + x11-libs/libnotify" DEPEND="${RDEPEND}" -RDEPEND="gnome-base/libgnomeui" +BDEPEND="virtual/pkgconfig" + +PATCHES=( + "${FILESDIR}/fix_errors_while_building.patch" + "${FILESDIR}/update_Makefile.patch" +) S="${WORKDIR}" -src_prepare() { - sed -i "s|-O2|$CFLAGS|g" Makefile || die "sed failed" +src_compile() { + emake CPPC=$(tc-getCXX) } src_install() { - emake DESTDIR="${D}" install - # remove broken symlink - rm -rf "${D}"/usr/bin + emake DESTDIR="${D}" install || die + dosym ../sbin/arpas /usr/bin/arpas + + make_desktop_entry arpas \ + "ARP AntiSpoofer" \ + "arpas" "Network" + + newdoc readme.txt README + dodoc ChangeLog +} + +pkg_postinst() { + xdg_icon_cache_update + xdg_desktop_database_update +} + +pkg_postrm() { + xdg_icon_cache_update + xdg_desktop_database_update } diff --git a/net-analyzer/arpantispoofer/files/fix_errors_while_building.patch b/net-analyzer/arpantispoofer/files/fix_errors_while_building.patch new file mode 100644 index 000000000..99989e5ca --- /dev/null +++ b/net-analyzer/arpantispoofer/files/fix_errors_while_building.patch @@ -0,0 +1,28 @@ +diff -ur a/antispoof/platform.h b/antispoof/platform.h +--- a/antispoof/platform.h 2009-10-12 06:52:32.000000000 +0400 ++++ b/antispoof/platform.h 2019-10-26 22:56:23.156330627 +0300 +@@ -31,9 +31,9 @@ + typedef pthread_t Thread_h; + typedef CALL_BACK (*StartRoutine)( void* arg ); + +-typedef int SOCKET; ++typedef int SOCKET_LOC; + +-#define INVALID_SOCKET (SOCKET)(~0) ++#define INVALID_SOCKET (SOCKET_LOC)(~0) + + #define SOCKET_ERROR (-1) + +diff -ur a/linux-ui/entry.cpp b/linux-ui/entry.cpp +--- a/linux-ui/entry.cpp 2009-11-20 07:28:28.000000000 +0300 ++++ b/linux-ui/entry.cpp 2019-10-26 22:57:50.596142449 +0300 +@@ -118,8 +118,7 @@ + sprintf( buff + i, "%02X-%02X-%02X-%02X-%02X-%02X is spoofing!\nStart anti-spoofing.", + mac->addr[0], mac->addr[1], mac->addr[2], mac->addr[3], mac->addr[4], mac->addr[5] ); + +- notify = notify_notification_new_with_status_icon( "ARP spoofing detected!", buff, +- GTK_STOCK_DIALOG_WARNING, trayicon ); ++ notify = notify_notification_new( "ARP spoofing detected!", buff, NULL ); + notify_notification_set_timeout( notify, 5000 ); + notify_notification_set_urgency( notify, NOTIFY_URGENCY_NORMAL ); + g_signal_connect( notify, "closed", G_CALLBACK(g_object_unref), NULL ); diff --git a/net-analyzer/arpantispoofer/files/update_Makefile.patch b/net-analyzer/arpantispoofer/files/update_Makefile.patch new file mode 100755 index 000000000..353792e4f --- /dev/null +++ b/net-analyzer/arpantispoofer/files/update_Makefile.patch @@ -0,0 +1,35 @@ +diff -ur a/Makefile b/Makefile +--- a/Makefile 2009-10-24 14:01:57.000000000 +0400 ++++ b/Makefile 2019-10-26 23:14:50.410300745 +0300 +@@ -16,7 +16,7 @@ + LOGFILE = /var/log/$(APP).log + + CPPC = g++ +-CPPARGS = -pipe -Wall `pkg-config --cflags --libs gtk+-2.0 gdk-2.0 gthread-2.0 libgnome-2.0 libgnomeui-2.0 libnotify` -lpcap -O2 -Xlinker -s ++CXXFLAGS += `pkg-config --cflags --libs gtk+-2.0 gdk-2.0 gthread-2.0 libgnome-2.0 libgnomeui-2.0 libnotify` -lpcap + + HDR = antispoof/arpdef.h antispoof/antispoof.h antispoof/config.h antispoof/platform.h antispoof/protector.h antispoof/arpreplier.h antispoof/reply4hosts.h antispoof/common.h linux-ui/dialogs.h linux-ui/configdlg.h linux-ui/uicommon.h + +@@ -25,7 +25,7 @@ + all: $(HDR) $(SRC) + echo "#define APP \"$(APP)\"" > config.h;\ + echo "#define PREFIX \"$(prefix)\"" >> config.h;\ +- $(CPPC) $(CPPARGS) $(SRC) -o $(APP);\ ++ $(CPPC) $(CXXFLAGS) $(SRC) -o $(APP);\ + echo "#%PAM-1.0" > $(TPAMD);\ + echo "auth include config-util" >> $(TPAMD);\ + echo "account include config-util" >> $(TPAMD);\ +@@ -40,13 +40,6 @@ + mkdir -p $(DESTDIR)$(datadir)/pixmaps/$(APP);\ + cp pixmaps/*.svg $(DESTDIR)$(datadir)/pixmaps/$(APP);\ + ln -s $(datadir)/pixmaps/$(APP)/icon.svg $(DESTDIR)$(datadir)/pixmaps/arpas.svg;\ +- mkdir -p $(DESTDIR)$(datadir)/applications;\ +- cp arpas.desktop $(DESTDIR)$(datadir)/applications/;\ +- mkdir -p $(DESTDIR)$(DOCDIR);\ +- cp ChangeLog $(DESTDIR)$(DOCDIR);\ +- cp readme.txt $(DESTDIR)$(DOCDIR)/README;\ +- mkdir -p $(DESTDIR)$(bindir);\ +- ln -s $(CONHELP) $(DESTDIR)$(bindir)/$(APP);\ + mkdir -p $(DESTDIR)$(PAMD);\ + cp $(TPAMD) $(DESTDIR)$(PAMD)/$(APP);\ + mkdir -p $(DESTDIR)$(CONSAPP);\