summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO19
-rw-r--r--.gitignore5
-rw-r--r--PKGBUILD36
-rw-r--r--build-fix.patch71
4 files changed, 131 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..d8bbde2977c9
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = xmon
+ pkgdesc = X11 protocol tracer, akin to strace
+ pkgver = 1.5.6
+ pkgrel = 1
+ url = https://www.chiark.greenend.org.uk/~sgtatham/xtruss/
+ arch = x86_64
+ license = MIT
+ depends = libxaw
+ depends = libxt
+ depends = libxmu
+ depends = libxext
+ depends = libx11
+ source = ftp://ftp.gwdg.de/pub/x11/x.org/contrib/devel_tools/xmon.1.5.6.tar.gz
+ source = build-fix.patch
+ sha256sums = f920f0916a087a857ae8ec1c805f1590ba8c74d6629d1da15e84c00fc01ca5f0
+ sha256sums = 93811af55f5d365ae9be45f3f85963dc2be9768de77b2a287500e2d58f7e4b7c
+
+pkgname = xmon
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..bd5002f5fe36
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+*
+!.gitignore
+!PKGBUILD
+!.SRCINFO
+!build-fix.patch
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..87f2d5700367
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,36 @@
+# Maintainer: Eric Engestrom <aur [at] engestrom [dot] ch>
+
+pkgname=xmon
+pkgver=1.5.6
+pkgrel=1
+pkgdesc="X11 protocol tracer, akin to strace"
+arch=(x86_64)
+url="https://www.chiark.greenend.org.uk/~sgtatham/xtruss/"
+license=(MIT)
+source=("ftp://ftp.gwdg.de/pub/x11/x.org/contrib/devel_tools/xmon.$pkgver.tar.gz"
+ 'build-fix.patch')
+sha256sums=('f920f0916a087a857ae8ec1c805f1590ba8c74d6629d1da15e84c00fc01ca5f0'
+ '93811af55f5d365ae9be45f3f85963dc2be9768de77b2a287500e2d58f7e4b7c')
+depends=(libxaw libxt libxmu libxext libx11)
+
+prepare() {
+ cd xmon.$pkgver
+ patch -sp1 -i ../build-fix.patch
+}
+
+build() {
+ cd xmon.$pkgver
+ make -f Makefile.std
+}
+
+package() {
+ cd xmon.$pkgver
+
+ install -d "$pkgdir"/usr/bin
+ install -m755 xmon{d,ui} "$pkgdir"/usr/bin
+
+ install -d "$pkgdir"/usr/share/man/man1
+ install -m644 xmon.man "$pkgdir"/usr/share/man/man1/xmon.1
+ ln -s xmon.1 "$pkgdir"/usr/share/man/man1/xmond.1
+ ln -s xmon.1 "$pkgdir"/usr/share/man/man1/xmonui.1
+}
diff --git a/build-fix.patch b/build-fix.patch
new file mode 100644
index 000000000000..249989033c1c
--- /dev/null
+++ b/build-fix.patch
@@ -0,0 +1,71 @@
+--- a/Makefile.std
++++ b/Makefile.std
+@@ -15,17 +15,8 @@ CDEBUGFLAGS = -O
+ # sys/select.h
+ # DEFINES = -D_BSD
+
+-# The libraries required for sockets
+-SOCKLIBS = -lsocket -lnsl
+-
+-# The location of the X include files
+-XINCDIRS = -I/usr/openwin/include
+-
+-# Where your X libraries are
+-XLDFLAGS = -L/usr/dt/lib -L/usr/openwin/lib
+-
+ # The libraries required for Athena widgets
+-XLIBS = -lXaw -lXt -lXm -lXmu -lXext -lX11
++XLIBS = -lXaw -lXt -lXmu -lXext -lX11
+
+ # ----------------------------------------------------------------------------
+
+--- a/decode11.c
++++ b/decode11.c
+@@ -25,6 +25,10 @@
+
+ #include "xmond.h"
+
++struct TypeDef TD[MaxTypes];
++unsigned char RBf[2];
++unsigned char SBf[2];
++
+ #define MAX_REQUEST 127
+ #define MAX_EXT_REQUEST 255
+ #define MAX_EVENT 34
+--- a/main.c
++++ b/main.c
+@@ -75,9 +75,6 @@ static void SignalTERM P((int n ));
+ static Bool ANYSET P((long *src));
+ #endif
+
+-extern char *getenv();
+-extern int gethostname P((char *name, int namelen ));
+-
+ /* end function prototypes */
+
+ Global Bool ignore_bytes;
+--- a/x11.h
++++ b/x11.h
+@@ -312,19 +312,19 @@ struct TypeDef
+
+ typedef struct TypeDef *TYPE;
+
+-struct TypeDef TD[MaxTypes];
++extern struct TypeDef TD[MaxTypes];
+
+
+ /* Reply Buffer: Pseudo-buffer used to provide the opcode for the
+ request to which this is a reply: Set by DecodeReply
+ and used in the PrintField of the Reply procedure */
+-unsigned char RBf[2];
++extern unsigned char RBf[2];
+
+
+ /* Sequence Buffer: Pseudo-buffer used to provide the sequence number for a
+ request: Set by DecodeReply and used in a PrintField of
+ the Request procedure */
+-unsigned char SBf[2];
++extern unsigned char SBf[2];
+
+
+ #define PRINTSERVER 4 /* indent output as if it comes from server */