summaryrefslogtreecommitdiff
path: root/development/ghex
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2020-10-08 20:27:39 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2020-10-10 10:18:44 +0700
commit5a2d9d025550173b699f12ab1c33e688019ba012 (patch)
treebd2edbda92e14333336a108cb748ed5e5eb3f60c /development/ghex
parente6d2e6f808aa807d20fb810cf7bdff9114972bc3 (diff)
downloadslackbuilds-5a2d9d025550173b699f12ab1c33e688019ba012.tar.gz
development/ghex: Added (hex editor with GTK+3 GUI)
Signed-off-by: Dave Woodfall <dave@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development/ghex')
-rw-r--r--development/ghex/README17
-rw-r--r--development/ghex/doinst.sh16
-rw-r--r--development/ghex/ghex.185
-rw-r--r--development/ghex/ghex.SlackBuild98
-rw-r--r--development/ghex/ghex.info10
-rw-r--r--development/ghex/slack-desc19
6 files changed, 245 insertions, 0 deletions
diff --git a/development/ghex/README b/development/ghex/README
new file mode 100644
index 0000000000..0bb79b17b4
--- /dev/null
+++ b/development/ghex/README
@@ -0,0 +1,17 @@
+ghex (hex editor with GTK+3 GUI)
+
+GHex allows the user to load data from any file, view and edit it in
+either hex or ASCII. Useful for debugging problems with object code
+or encodings. Also used by kids who cheat at computer games, by adding
+score or lives to saved games.
+
+Optional dependency: yelp. Required for viewing the built-in help
+(Help->Contents, or F1 key). Alternatively, an HTML version of the
+help is included in /usr/doc/ghex-$VERSION/html/index.html for your
+perusal (in English only, though).
+
+Note: Trying to copy/paste arbitrary binary data into or out of
+ghex isn't going to work very well, because modern GTK+ insists the
+copy buffer has to be UTF-8 encoded Unicode. The result is lots
+of "\Uffffffff" (meaning "Invalid UTF-8") rather than the binary
+data. There's nothing we can do to fix this without major surgery.
diff --git a/development/ghex/doinst.sh b/development/ghex/doinst.sh
new file mode 100644
index 0000000000..9b26fbab9d
--- /dev/null
+++ b/development/ghex/doinst.sh
@@ -0,0 +1,16 @@
+
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
+
+if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
+ if [ -x /usr/bin/gtk-update-icon-cache ]; then
+ /usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1
+ fi
+fi
+
+if [ -e usr/share/glib-2.0/schemas ]; then
+ if [ -x /usr/bin/glib-compile-schemas ]; then
+ /usr/bin/glib-compile-schemas usr/share/glib-2.0/schemas >/dev/null 2>&1
+ fi
+fi
diff --git a/development/ghex/ghex.1 b/development/ghex/ghex.1
new file mode 100644
index 0000000000..c30b0d8c13
--- /dev/null
+++ b/development/ghex/ghex.1
@@ -0,0 +1,85 @@
+.\" Hey, EMACS: -*- nroff -*-
+.\"
+.\" $Id: ghex.1,v 1.1 2001/04/14 19:41:50 epg Exp $
+.\"
+.\" First parameter, NAME, should be all caps
+.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
+.\" other parameters are allowed: see man(7), man(1)
+.TH GHEX 1 "April 14, 2001"
+.\" Please adjust this date whenever revising the manpage.
+.\"
+.\" Some roff macros, for reference:
+.\" .nh disable hyphenation
+.\" .hy enable hyphenation
+.\" .ad l left justify
+.\" .ad b justify to both left and right margins
+.\" .nf disable filling
+.\" .fi enable filling
+.\" .br insert line break
+.\" .sp <n> insert n+1 empty lines
+.\" for manpage-specific macros, see man(7)
+.SH NAME
+ghex \- A GNOME Hex Editor
+.SH SYNOPSIS
+.B ghex
+.RI [ options ] " files" ...
+.SH DESCRIPTION
+This manual page documents briefly the
+.B ghex
+command.
+This manual page was written for the Debian GNU/Linux distribution
+because the original program does not have a manual page.
+Instead, it has documentation in the GNOME help system.
+.PP
+.\" TeX users may be more comfortable with the \fB<whatever>\fP and
+.\" \fI<whatever>\fP escape sequences to invode bold face and italics,
+.\" respectively.
+\fBghex\fP allows the user to load data from any file, view and
+edit it in either hex or ascii. A must for anyone playing games
+that use non-ascii format for saving.
+.SH OPTIONS
+These programs follow the usual GNU command line syntax, with long
+options starting with two dashes (`-').
+A summary of options is included below.
+
+Usage: ghex [OPTION...]
+
+GNOME options
+ --disable-sound Disable sound server usage
+ --enable-sound Enable sound server usage
+ --espeaker=HOSTNAME:PORT Host:port on which the sound server to use is
+ running
+ --version
+
+Help options
+ -?, --help Show this help message
+ --usage Display brief usage message
+
+GTK options
+ --gdk-debug=FLAGS Gdk debugging flags to set
+ --gdk-no-debug=FLAGS Gdk debugging flags to unset
+ --display=DISPLAY X display to use
+ --sync Make X calls synchronous
+ --no-xshm Don't use X shared memory extension
+ --name=NAME Program name as used by the window manager
+ --class=CLASS Program class as used by the window manager
+ --gxid_host=HOST
+ --gxid_port=PORT
+ --xim-preedit=STYLE
+ --xim-status=STYLE
+ --gtk-debug=FLAGS Gtk+ debugging flags to set
+ --gtk-no-debug=FLAGS Gtk+ debugging flags to unset
+ --g-fatal-warnings Make all warnings fatal
+ --gtk-module=MODULE Load an additional Gtk module
+
+GNOME GUI options
+ --disable-crash-dialog
+
+Session management options
+ --sm-client-id=ID Specify session management ID
+ --sm-config-prefix=PREFIX Specify prefix of saved configuration
+ --sm-disable Disable connection to session manager
+
+.SH AUTHOR
+This manual page was written by Eric Gillespie, Jr. <epg@debian.org>,
+for the Debian GNU/Linux system (but may be used by others).
diff --git a/development/ghex/ghex.SlackBuild b/development/ghex/ghex.SlackBuild
new file mode 100644
index 0000000000..5dbc89696d
--- /dev/null
+++ b/development/ghex/ghex.SlackBuild
@@ -0,0 +1,98 @@
+#!/bin/sh
+
+# Slackware build script for ghex
+
+# Written by B. Watson (yalhcru@gmail.com)
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+# Although upstream describes this as "a hex editor for GNOME", it has
+# no gnome dependencies (just GTK3). Previous versions (2.x) did depend
+# on gnome so I never wanted to package them...
+
+PRGNAM=ghex
+VERSION=${VERSION:-3.18.4}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.xz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
+
+# Fix the .docbook help files so they work with 14.2's docbook,
+# and so they don't cause docbook2html to connect to a remote site.
+# DTD may have to change for some future Slackware release.
+DTD="/usr/share/xml/docbook/xml-dtd-4.5/docbookx.dtd"
+sed -i \
+ -e '/<xi:include.*legal/s,.*,\&legal;,' \
+ -e '/docbookx.dtd/a <!ENTITY legal SYSTEM "legal.xml">' \
+ -e 's,"http://www\.oasis.*dtd","'$DTD'",' \
+ help/*/index.docbook
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+meson \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --strip \
+ build
+
+DESTDIR="$PKG" ninja -C build install
+
+PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $PKGDOC
+cp -a AUTHORS COPYING* HACKING NEWS README $PKGDOC
+cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
+
+# Generate the HTML help, for those who don't want to install yelp.
+docbook2html -u -o $PKGDOC/html/ $PKG/usr/share/help/C/$PRGNAM/index.docbook
+ln -s ../../../share/help/C/$PRGNAM/figures $PKGDOC/html/
+
+# Man page is fairly useless, include it anyway (from Debian).
+mkdir -p $PKG/usr/man/man1
+gzip -9c < $CWD/$PRGNAM.1 > $PKG/usr/man/man1/$PRGNAM.1.gz
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/development/ghex/ghex.info b/development/ghex/ghex.info
new file mode 100644
index 0000000000..c9d8b0daaa
--- /dev/null
+++ b/development/ghex/ghex.info
@@ -0,0 +1,10 @@
+PRGNAM="ghex"
+VERSION="3.18.4"
+HOMEPAGE="https://wiki.gnome.org/Apps/Ghex"
+DOWNLOAD="http://ftp.gnome.org/pub/GNOME/sources/ghex/3.18/ghex-3.18.4.tar.xz"
+MD5SUM="7e6ed808766bc18285bdc6999bdf0f15"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="meson"
+MAINTAINER="B. Watson"
+EMAIL="yalhcru@gmail.com"
diff --git a/development/ghex/slack-desc b/development/ghex/slack-desc
new file mode 100644
index 0000000000..b22591eec1
--- /dev/null
+++ b/development/ghex/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+ghex: ghex (hex editor with GTK+3 GUI)
+ghex:
+ghex: GHex allows the user to load data from any file, view and edit it
+ghex: in either hex or ASCII. Useful for debugging problems with object
+ghex: code or encodings. Also used by kids who cheat at computer games,
+ghex: by adding score or lives to saved games.
+ghex:
+ghex:
+ghex:
+ghex:
+ghex: