From 50c93b0f0b6c4c26af68fe6d0fa9d654d4d3ef1d Mon Sep 17 00:00:00 2001 From: "Rick Farina (Zero_Chaos)" Date: Sun, 12 Aug 2018 00:09:17 +0000 Subject: [PATCH] proxmark3: install scripts, fix warnings --- net-wireless/proxmark3/files/cflags.patch | 29 +++++++++++++++++++ ....1-r1.ebuild => proxmark3-3.0.1-r2.ebuild} | 9 ++++++ 2 files changed, 38 insertions(+) create mode 100644 net-wireless/proxmark3/files/cflags.patch rename net-wireless/proxmark3/{proxmark3-3.0.1-r1.ebuild => proxmark3-3.0.1-r2.ebuild} (75%) diff --git a/net-wireless/proxmark3/files/cflags.patch b/net-wireless/proxmark3/files/cflags.patch new file mode 100644 index 000000000..940169528 --- /dev/null +++ b/net-wireless/proxmark3/files/cflags.patch @@ -0,0 +1,29 @@ +diff -Naur proxmark3-3.0.1/client/Makefile proxmark3-3.0.1-fixed/client/Makefile +--- proxmark3-3.0.1/client/Makefile 2017-06-09 13:50:55.000000000 +0000 ++++ proxmark3-3.0.1-fixed/client/Makefile 2018-08-11 23:53:24.594635301 +0000 +@@ -4,9 +4,9 @@ + # the license. + #----------------------------------------------------------------------------- + +-CC = gcc +-CXX = g++ +-LD = g++ ++CC ?= gcc ++CXX ?= g++ ++LD = g++ + TAR = tar + TARFLAGS = -C .. --ignore-failed-read -rvf + RM = rm -f +@@ -18,9 +18,9 @@ + + LDLIBS = -L/opt/local/lib -L/usr/local/lib -lreadline -lpthread -lm + LUALIB = ../liblua/liblua.a +-LDFLAGS = $(COMMON_FLAGS) +-CFLAGS = -std=c99 -D_ISOC99_SOURCE -I. -I../include -I../common -I../zlib -I/opt/local/include -I../liblua -Wall $(COMMON_FLAGS) -g -O3 +-CXXFLAGS = -I../include -Wall -O3 ++#LDFLAGS := $(LDFLAGS) ++CFLAGS := -std=c99 -D_ISOC99_SOURCE -I. -I../include -I../common -I../zlib -I/opt/local/include -I../liblua $(CFLAGS) ++CXXFLAGS := -I../include $(CXXFLAGS) + + LUAPLATFORM = generic + platform = $(shell uname) diff --git a/net-wireless/proxmark3/proxmark3-3.0.1-r1.ebuild b/net-wireless/proxmark3/proxmark3-3.0.1-r2.ebuild similarity index 75% rename from net-wireless/proxmark3/proxmark3-3.0.1-r1.ebuild rename to net-wireless/proxmark3/proxmark3-3.0.1-r2.ebuild index ef0758756..16ab30c44 100644 --- a/net-wireless/proxmark3/proxmark3-3.0.1-r1.ebuild +++ b/net-wireless/proxmark3/proxmark3-3.0.1-r2.ebuild @@ -19,13 +19,17 @@ DEPEND="virtual/libusb:0 dev-qt/qtcore:5 dev-qt/qtwidgets:5 dev-qt/qtgui:5 + sys-libs/readline:= firmware? ( sys-devel/gcc-arm-none-eabi )" RDEPEND="${DEPEND}" src_prepare() { sed -i -e 's/-ltermcap/-ltinfo/g' client/Makefile || die sed -i -e 's/-ltermcap/-ltinfo/g' liblua/Makefile || die + sed -i -e 's#lualibs/#../../usr/share/proxmark3/lualibs/#' client/scripting.h || die + sed -i -e 's#scripts/#../../usr/share/proxmark3/scripts/#' client/scripting.h || die mv driver/77-mm-usb-device-blacklist.rules driver/77-pm3-usb-device-blacklist.rules + eapply "${FILESDIR}/cflags.patch" eapply_user } @@ -39,6 +43,11 @@ src_compile(){ src_install(){ dobin client/{flasher,proxmark3} + #install scripts too + insinto /usr/share/proxmark3/lualibs + doins client/lualibs/* + insinto /usr/share/proxmark3/scripts + doins client/scripts/* if use firmware; then insinto /usr/share/proxmark3 doins armsrc/obj/*.elf