diff options
author | B. Watson <yalhcru@gmail.com> | 2020-11-20 13:37:03 +0000 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2020-11-22 01:14:18 +0700 |
commit | 82f096a0907acc367dd9b265398f662027784eb1 (patch) | |
tree | cc0d2fcf1c048e97bdc4a170078e53376ab11775 | |
parent | d4f65e1c70c6243b9bc45f0388bf2cf5c29cff75 (diff) |
development/hexer: Added (hex editor with vi-like UI)
Signed-off-by: Dave Woodfall <dave@slackbuilds.org>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r-- | development/hexer/README | 11 | ||||
-rw-r--r-- | development/hexer/hexer.SlackBuild | 75 | ||||
-rw-r--r-- | development/hexer/hexer.info | 10 | ||||
-rw-r--r-- | development/hexer/manpages_readability.diff | 272 | ||||
-rw-r--r-- | development/hexer/rc/hexerrc.blackonwhite | 2 | ||||
-rw-r--r-- | development/hexer/rc/hexerrc.greenonblack | 2 | ||||
-rw-r--r-- | development/hexer/rc/hexerrc.whiteonblack | 2 | ||||
-rw-r--r-- | development/hexer/slack-desc | 19 |
8 files changed, 393 insertions, 0 deletions
diff --git a/development/hexer/README b/development/hexer/README new file mode 100644 index 0000000000000..1570516a04723 --- /dev/null +++ b/development/hexer/README @@ -0,0 +1,11 @@ +hexer (hex editor with vi-like UI) + +Hexer is a multi-buffer editor for binary files for Unix-like systems +that displays its buffer(s) as a hex dump. The user interface is kept +similar to vi/ex. + +If you don't like the default color scheme, copy one of the +/usr/doc/$VERSION/rc/hexerrc.* files to ~/.hexerrc. + +The package also includes myc, a simple textmode calculator that's +useful for hex <=> decimal conversions and bitwise operations. diff --git a/development/hexer/hexer.SlackBuild b/development/hexer/hexer.SlackBuild new file mode 100644 index 0000000000000..f54c846b31877 --- /dev/null +++ b/development/hexer/hexer.SlackBuild @@ -0,0 +1,75 @@ +#!/bin/sh + +# Slackware build script for hexer + +# Written by B. Watson (yalhcru@gmail.com) + +# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. + +PRGNAM=hexer +VERSION=${VERSION:-1.0.6} +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 {} \+ + +# Add some formatting to the man pages and fix a few typos. +patch -p1 < $CWD/manpages_readability.diff + +# Binaries get installed already stripped. +make all myc PREFIX=/usr CFLAGS="$SLKCFLAGS" LIBTERMCAP=-lncurses +make install PREFIX=/usr DESTDIR=$PKG +gzip -9 $PKG/usr/man/man?/*.? + +# The *.doc files are plain text versions of the man pages, don't bother. +# help.txt actually gets built into the binary for the :help command. +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/rc +cp -a CHANGES COPYRIGHT README TODO $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +# The default color scheme is hard for me to read, so I include a few +# sample rc files with various color schemes. +install -m0644 -oroot -groot $CWD/rc/* $PKG/usr/doc/$PRGNAM-$VERSION/rc + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/development/hexer/hexer.info b/development/hexer/hexer.info new file mode 100644 index 0000000000000..9f0e64b184f10 --- /dev/null +++ b/development/hexer/hexer.info @@ -0,0 +1,10 @@ +PRGNAM="hexer" +VERSION="1.0.6" +HOMEPAGE="http://devel.ringlet.net/editors/hexer/" +DOWNLOAD="https://devel.ringlet.net/files/editors/hexer/hexer-1.0.6.tar.xz" +MD5SUM="516d37a8f027cd556e98c4b81dfcf79a" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="B. Watson" +EMAIL="yalhcru@gmail.com" diff --git a/development/hexer/manpages_readability.diff b/development/hexer/manpages_readability.diff new file mode 100644 index 0000000000000..3afada02c6bae --- /dev/null +++ b/development/hexer/manpages_readability.diff @@ -0,0 +1,272 @@ +diff -Naur hexer-1.0.6/hexer.1 hexer-1.0.6.patched/hexer.1 +--- hexer-1.0.6/hexer.1 2020-04-24 09:06:48.000000000 -0400 ++++ hexer-1.0.6.patched/hexer.1 2020-11-19 15:51:44.118564837 -0500 +@@ -339,7 +339,7 @@ + .BR "REGULAR EXPRESSIONS" ). + .TP + .B ? +-Search reverse using a regular expression. ++Reverse search using a regular expression. + .TP + .B . + Repeat the last change to the buffer +@@ -427,7 +427,7 @@ + or + .BR BackSpace + key deletes the previously inserted byte. If the hex column is active, the +-previously inserted nibble (hex digit) is deleted. It is not possible ++previously inserted nybble (hex digit) is deleted. It is not possible + to delete more bytes than have been inserted in the current insert command. + While in + .BR "Insert Mode" , +@@ -940,7 +940,7 @@ + .B maxmatch + limit by doubling the `*' or `+' operator, e.g. "a.**b" or + "foo\\(bar\\)\\+\\+". +-.br ++.PP + Note that the context specifiers `^'/`$' (beginning/end of a line) and + `\\<'/`\\>' (beginning/end of a word) are available and actually do + what you expect. If you don't want the atoms `.' and `[^...]' to match +@@ -948,13 +948,13 @@ + .B specialnl + option using the + .BR :set -command. +-.br ++.PP + To enter a special character, you can use the standard C `\\'\(hyescape + sequences. To enter a character using its octal code, use a `\\o'\(hyprefix + followed by up to three octal digits. + (C-style octal escapes are not supported, because `\\0', ... `\\9' are + interpreted as back-references to subexpressions of the RE.) +-To enter a character using it's hex code, type a `\\x'-prefix followed ++To enter a character using its hex code, type a `\\x'-prefix followed + by up to two hex digits; decimal codes can be entered using a `\\d'\(hyprefix + followed by up to three decimal digits. It is possible to enter strings + of codes by doubling the base specifier, e.g. "\\xxfe ff 5a 7e" or +@@ -963,7 +963,7 @@ + .BR maxmatch ) + of repetitions of + .BR "ff fe" . +-.br ++.PP + It is possible to use all kinds of character `\\'\(hyescapes (escapes + representing a single character) within `[]'\(hyranges. Within a range, + the `o' selecting an octal base for the escape may be omitted, since +@@ -988,55 +988,80 @@ + .B % + (percent) sign and an expression in infix notation. + It is possible to use parentheses. ++.PP + .B myc + understands the following binary infix operators (from highest priority to + lowest): ++.TP + .B ** + (power), ++.TP + .B * + (multiply), ++.TP + .B / + (divide), ++.TP + .B % + (modulo), ++.TP + .B + + (add), +-.B - ++.TP ++.B \- + (subtract), ++.TP + .B << + (shift left), ++.TP + .B >> + (shift right), ++.TP + .B < + (less), ++.TP + .B <= + (less or equal), ++.TP + .B > + (greater), ++.TP + .B >= + (greater or equal), ++.TP + .B == + (equal), ++.TP + .B != + (not equal), ++.TP + .B & + (arithmetical and), ++.TP + .B | + (arithmetical or), ++.TP + .B ^ + (arithmetical exclusive or), ++.TP + .B && + (logical and), ++.TP + .B || + (logical or), ++.TP + .B = + (assign); and the following unary prefix operators: +-.B - ++.TP ++.B \- + (negate, unary minus), ++.TP + .B ! + (logical not), ++.TP + .B ~ + (bitwise complement). ++.PP + .B myc + knows three data types: + .BR boolean , +@@ -1044,8 +1069,10 @@ + (32 bit), + .B float + (64 bit, equivalent to C double). ++.PP + On some esoteric platforms the precision of integer and float may be + different. ++.PP + As in C the result of a division depends on the data types of the operands. + An integer divided by an integer yields an integer. + If you want the result to be a float, make sure one of the operands is a +@@ -1057,8 +1084,10 @@ + .I a/(b+0.) + instead of + .IR a/b . ++.PP + The power operation returns a float if the result is too large to fit in an + integer. ++.PP + The result of a calculation is stored in the special variables + .B $$ + and +diff -Naur hexer-1.0.6/myc.1 hexer-1.0.6.patched/myc.1 +--- hexer-1.0.6/myc.1 2020-04-24 09:06:48.000000000 -0400 ++++ hexer-1.0.6.patched/myc.1 2020-11-19 15:39:33.189631281 -0500 +@@ -64,67 +64,98 @@ + is specified on the command-line, the result is echoed and + .B myc + exits immediately. ++.PP + If invoked with no arguments, + .B myc + starts reading commands from standard-in. ++.SH OPERATORS + .B myc + understands the following binary infix operators (from highest priority to + lowest): ++.TP + .B ** + (power), ++.TP + .B * + (multiply), ++.TP + .B / + (divide), ++.TP + .B % + (modulo), ++.TP + .B + + (add), +-.B - ++.TP ++.B \- + (subtract), ++.TP + .B << + (shift left), ++.TP + .B >> + (shift right), ++.TP + .B < + (less), ++.TP + .B <= + (less or equal), ++.TP + .B > + (greater), ++.TP + .B >= + (greater or equal), ++.TP + .B == + (equal), ++.TP + .B != + (not equal), ++.TP + .B & + (arithmetical and), ++.TP + .B | + (arithmetical or), ++.TP + .B ^ + (arithmetical exclusive or), ++.TP + .B && + (logical and), ++.TP + .B || + (logical or), ++.TP + .B = + (assign); and the following unary prefix operators: +-.B - ++.TP ++.B \- + (negate, unary minus), ++.TP + .B ! + (logical not), ++.TP + .B ~ + (bitwise complement). ++.SH DATA TYPES + .B myc + knows three data types: ++.TP + .BR boolean , ++.TP + .B integer + (32 bit), ++.TP + .B float + (64 bit, equivalent to C double). ++.SH NOTES + On some esoteric platforms the precision of integer and float may be + different. ++.PP + As in C the result of a division depends on the data types of the operands. + An integer divided by an integer yields an integer. + If you want the result to be a float, make sure one of the operands is a +@@ -138,6 +169,7 @@ + .IR a/b . + The power operation returns a float if the result is too large to fit in an + integer. ++.PP + The result of a calculation is stored in the special variables + .B $$ + and diff --git a/development/hexer/rc/hexerrc.blackonwhite b/development/hexer/rc/hexerrc.blackonwhite new file mode 100644 index 0000000000000..8914c095dd257 --- /dev/null +++ b/development/hexer/rc/hexerrc.blackonwhite @@ -0,0 +1,2 @@ +set bg=7 +set fg=0 diff --git a/development/hexer/rc/hexerrc.greenonblack b/development/hexer/rc/hexerrc.greenonblack new file mode 100644 index 0000000000000..49f42de7585fa --- /dev/null +++ b/development/hexer/rc/hexerrc.greenonblack @@ -0,0 +1,2 @@ +set bg=0 +set fg=2 diff --git a/development/hexer/rc/hexerrc.whiteonblack b/development/hexer/rc/hexerrc.whiteonblack new file mode 100644 index 0000000000000..6ba64321e1a7d --- /dev/null +++ b/development/hexer/rc/hexerrc.whiteonblack @@ -0,0 +1,2 @@ +set bg=0 +set fg=7 diff --git a/development/hexer/slack-desc b/development/hexer/slack-desc new file mode 100644 index 0000000000000..c853016ed69f4 --- /dev/null +++ b/development/hexer/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------------------------------------------------------| +hexer: hexer (hex editor with vi-like UI) +hexer: +hexer: Hexer is a multi-buffer editor for binary files for Unix-like systems +hexer: that displays its buffer(s) as a hex dump. The user interface is kept +hexer: similar to vi/ex. +hexer: +hexer: +hexer: +hexer: +hexer: +hexer: |