aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils
diff options
context:
space:
mode:
authordanfe <danfe@FreeBSD.org>2014-08-29 13:29:10 +0800
committerdanfe <danfe@FreeBSD.org>2014-08-29 13:29:10 +0800
commitffc35738513309a3c396b872e6eadce32e7cfa10 (patch)
tree510192ed31b1a6bf967e701f7525cddadcd7a39e /sysutils
parent87dc0542cbc4b884bbbf3e614859419aaff6c01e (diff)
downloadfreebsd-ports-gnome-ffc35738513309a3c396b872e6eadce32e7cfa10.tar.gz
freebsd-ports-gnome-ffc35738513309a3c396b872e6eadce32e7cfa10.tar.zst
freebsd-ports-gnome-ffc35738513309a3c396b872e6eadce32e7cfa10.zip
- Use EXTRACT_SUFX instead of setting DISTNAME and WRKSRC
- Allow to build optional PyGTK-based GUI (GameConqueror) - Now because package list can be long, utilize pkg-plist - Provide better sounding COMMENT; amend port description
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/scanmem/Makefile16
-rw-r--r--sysutils/scanmem/files/patch-gui-GameConqueror.py30
-rw-r--r--sysutils/scanmem/files/patch-gui-gameconqueror.in18
-rw-r--r--sysutils/scanmem/pkg-descr20
-rw-r--r--sysutils/scanmem/pkg-plist19
5 files changed, 93 insertions, 10 deletions
diff --git a/sysutils/scanmem/Makefile b/sysutils/scanmem/Makefile
index 5edf21c5f12c..4b310a0bfa3c 100644
--- a/sysutils/scanmem/Makefile
+++ b/sysutils/scanmem/Makefile
@@ -5,10 +5,10 @@ PORTNAME= scanmem
PORTVERSION= 0.13
CATEGORIES= sysutils
MASTER_SITES= GOOGLE_CODE
-DISTNAME= ${PORTNAME}-${PORTVERSION}_
+EXTRACT_SUFX= _.tar.gz
MAINTAINER= danfe@FreeBSD.org
-COMMENT= Locate and modify a variable in an executing process
+COMMENT= Locate and modify various data in an executing process
LICENSE= GPLv3
@@ -18,14 +18,16 @@ ONLY_FOR_ARCHS_REASON= requires linprocfs(5)
USES= readline
GNU_CONFIGURE= yes
-WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
+OPTIONS_DEFINE= X11 DOCS
+OPTIONS_SUB= yes
-PLIST_FILES= bin/scanmem man/man1/scanmem.1.gz
-PORTDOCS= README
-
-OPTIONS_DEFINE= DOCS
+X11_DESC= Install PyGTK-based GUI (GameConqueror)
+X11_CATEGORIES= python
+X11_RUN_DEPENDS= ${LOCALBASE}/libdata/pkgconfig/pygtk-2.0.pc:${PORTSDIR}/x11-toolkits/py-gtk2
+X11_CONFIGURE_ON= --enable-gui
post-patch:
@${REINPLACE_CMD} -e 's,/proc/,/compat/linux&,' ${WRKSRC}/configure
+ @${REINPLACE_CMD} -e 's, COPYING,,' ${WRKSRC}/gui/Makefile.in
.include <bsd.port.mk>
diff --git a/sysutils/scanmem/files/patch-gui-GameConqueror.py b/sysutils/scanmem/files/patch-gui-GameConqueror.py
new file mode 100644
index 000000000000..1a3efbd6de87
--- /dev/null
+++ b/sysutils/scanmem/files/patch-gui-GameConqueror.py
@@ -0,0 +1,30 @@
+--- gui/GameConqueror.py.orig 2011-12-02 14:22:35 UTC
++++ gui/GameConqueror.py
+@@ -749,7 +749,7 @@ class GameConqueror():
+ self.cheatlist_liststore.prepend(['=', False, description, addr, vt, value, True])
+
+ def get_process_list(self):
+- return [map(str.strip, e.strip().split(' ',2)) for e in os.popen('ps -wweo pid=,user=,command= --sort=-pid').readlines()]
++ return [map(str.strip, e.strip().split(' ',2)) for e in reversed(os.popen('ps -axww -o pid= -o user= -o command=').readlines())]
+
+ def select_process(self, pid, process_name):
+ # ask backend for attaching the target process
+@@ -778,7 +778,7 @@ class GameConqueror():
+ self.cheatlist_liststore[i][1] = False
+
+ def read_maps(self):
+- lines = open('/proc/%d/maps' % (self.pid,)).readlines()
++ lines = open('/compat/linux/proc/%d/maps' % (self.pid,)).readlines()
+ self.maps = []
+ for l in lines:
+ item = {}
+@@ -980,7 +980,9 @@ class GameConqueror():
+ gtk.main_quit()
+
+ def main(self):
++ gtk.threads_enter()
+ gtk.main()
++ gtk.threads_leave()
+
+ def check_backend_version(self):
+ if self.backend.version != VERSION:
diff --git a/sysutils/scanmem/files/patch-gui-gameconqueror.in b/sysutils/scanmem/files/patch-gui-gameconqueror.in
new file mode 100644
index 000000000000..313202046b18
--- /dev/null
+++ b/sysutils/scanmem/files/patch-gui-gameconqueror.in
@@ -0,0 +1,18 @@
+--- gui/gameconqueror.in.orig 2012-09-02 15:26:56 UTC
++++ gui/gameconqueror.in
+@@ -1,13 +1,5 @@
+-#!/bin/bash
++#!/bin/sh
+
+ DATADIR=@PKGDATADIR@
+
+-if [[ "$(id -u)" != "0" ]]; then
+- if [ -e "/usr/bin/gksu" ]; then
+- exec gksu --description "GameConqueror" "python -OO $DATADIR/GameConqueror.py"
+- else
+- exec beesu - "python -OO $DATADIR/GameConqueror.py"
+- fi
+-else
+- exec python -OO "$DATADIR/GameConqueror.py"
+-fi
++exec python -OO "$DATADIR/GameConqueror.py"
diff --git a/sysutils/scanmem/pkg-descr b/sysutils/scanmem/pkg-descr
index e00296cc151e..d931e2fc030e 100644
--- a/sysutils/scanmem/pkg-descr
+++ b/sysutils/scanmem/pkg-descr
@@ -1,7 +1,21 @@
Scanmem is a simple interactive debugging utility for Linux, used to locate
-the address of a variable in an executing process. This can be used for the
-analysis or modification of a hostile process on a compromised machine,
-reverse engineering, or as a "pokefinder" to cheat at video games.
+various data in an executing process. This can be used for the analysis or
+modification of a hostile process on a compromised machine, help in reverse
+engineering, or to cheat at video games. Brief list of its features:
+
+ - Interactive command mode, with internal help
+ - Efficient and easy-to-use syntax
+ - Support for different data types: integers, floats, bytearrays, strings
+ - Support for different scan (comparison) types: equal, greater/less than,
+ changed, unchanged, increased/decreased
+ - Set any variable to any value
+ - Detailed information about mappings, allow users to eliminate regions
+
+More in GameConqueror, optional PyGTK-based GUI:
+
+ - User-friendly CheatEngline-alike interface
+ - Modify and lock (freeze) variables
+ - Memory viewer/editor
It requires linprocfs(5) to be mounted under /compat/linux/proc to operate.
diff --git a/sysutils/scanmem/pkg-plist b/sysutils/scanmem/pkg-plist
new file mode 100644
index 000000000000..db699ef72379
--- /dev/null
+++ b/sysutils/scanmem/pkg-plist
@@ -0,0 +1,19 @@
+%%X11%%bin/gameconqueror
+bin/scanmem
+%%X11%%man/man1/gameconqueror.1.gz
+man/man1/scanmem.1.gz
+%%X11%%share/applications/GameConqueror.desktop
+%%X11%%share/gameconqueror/GameConqueror.py
+%%X11%%share/gameconqueror/GameConqueror.xml
+%%X11%%share/gameconqueror/GameConqueror_128x128.png
+%%X11%%share/gameconqueror/GameConqueror_72x72.png
+%%X11%%share/gameconqueror/backend.py
+%%X11%%share/gameconqueror/consts.py
+%%X11%%share/gameconqueror/hexview.py
+%%X11%%share/gameconqueror/misc.py
+%%X11%%share/pixmaps/GameConqueror_128x128.png
+%%X11%%share/pixmaps/GameConqueror_72x72.png
+%%X11%%@dirrm share/gameconqueror
+%%PORTDOCS%%%%DOCSDIR%%/README
+%%X11%%%%PORTDOCS%%%%DOCSDIR%%/TODO
+%%PORTDOCS%%@dirrm %%DOCSDIR%%