diff options
-rw-r--r-- | development/bless/README | 8 | ||||
-rw-r--r-- | development/bless/bless.1 | 32 | ||||
-rw-r--r-- | development/bless/bless.SlackBuild | 130 | ||||
-rw-r--r-- | development/bless/bless.info | 10 | ||||
-rw-r--r-- | development/bless/doinst.sh | 3 | ||||
-rw-r--r-- | development/bless/help_script.sh | 39 | ||||
-rw-r--r-- | development/bless/patches/default_overwrite.patch | 12 | ||||
-rw-r--r-- | development/bless/patches/fix_save.patch | 12 | ||||
-rw-r--r-- | development/bless/patches/fixxmltextwriter.patch | 31 | ||||
-rw-r--r-- | development/bless/patches/force_gtk_action_namespace.patch | 72 | ||||
-rw-r--r-- | development/bless/slack-desc | 19 |
11 files changed, 368 insertions, 0 deletions
diff --git a/development/bless/README b/development/bless/README new file mode 100644 index 0000000000..1b7ad457f2 --- /dev/null +++ b/development/bless/README @@ -0,0 +1,8 @@ +bless (GUI hex editor) + +bless is a full featured hexadecimal editor, written in C#, using Gtk# +for the user interface. + +Its purpose is to edit files as a sequence of bytes, allowing read/write, +search, pattern finding, efficient query-replace, multi-tabbing, +customized data-views, plug‐ins, and many other features. diff --git a/development/bless/bless.1 b/development/bless/bless.1 new file mode 100644 index 0000000000..89669c0632 --- /dev/null +++ b/development/bless/bless.1 @@ -0,0 +1,32 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" 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 BLESS 1 "June 2007" bless "User Commands" +.\" 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 +bless \- graphical hexadecimal Gtk# editor +.SH SYNOPSIS +.B bless +[\fFFILE\fP]... +.br +.SH DESCRIPTION +.\" Add any additional description here +Edit the FILEs as a sequence of bytes, allowing read/write, search, +pattern finding, efficient query-replace, multi-tabbing, customized +data-views, plugins, and many other features. +.SH REPORTING BUGS +Report bugs to Alexandros Frantzis <alf82@freemail.gr>. +.SH AUTHOR +Copyright \(co 2004-2007, Alexandros Frantzis. diff --git a/development/bless/bless.SlackBuild b/development/bless/bless.SlackBuild new file mode 100644 index 0000000000..207854b161 --- /dev/null +++ b/development/bless/bless.SlackBuild @@ -0,0 +1,130 @@ +#!/bin/sh + +# Slackware build script for bless + +# Written by B. Watson (yalhcru@gmail.com) + +# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. + +PRGNAM=bless +VERSION=${VERSION:-0.6.0} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +# Compiled .net code is "anycpu" by default. +# I see no reason to use lib64 for this. It would mean having separate +# 32-bit and 64-bit packages, even though the actual object code is +# noarch. Also, no CFLAGS because, no C... since I'm not a mono/C# +# expert, I dunno what the equivalent optimization flags should be +# (or if they even exist) so we'll go with whatever upstream does. + +ARCH=noarch + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/${PRGNAM}_$VERSION.orig.tar.gz +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 {} \+ + +# Begin rant. FWIW, I'm not very impressed with bless: +# - It has show-stopper bugs that were left in place when the maintainer +# abandoned it a few years ago (others have fixed the worst of them +# by now, patches included here). +# - It starts up in Insert mode which definitely violates the principle +# of least surprise (in normal hex editors, overwrite is generally the +# default and often only mode). This is so annoying that I patched it. +# Even in overwrite mode, it'll let you append bytes to the end of +# the file, which a hex editor shouldn't do in its default mode. +# - It ships with 3 .layout files that get installed in /usr/share, but +# the layout dialog is broken: you can't choose between the +# "system" layouts, though you can load them if you copy them to +# ~/.config/bless/layouts. (But, they don't appear to *do* anything...) +# - Finally, and maybe this is just my own personal bias, I don't see an +# obvious way to change the white background to black (if the .layout +# files are capable of it, great, but I tried really hard to get them +# to work and they don't seem to behave the way the docs say they do). +# This means I won't be using this application very much, as it hurts +# my eyes to look at it for more than a few minutes. +# If it's so awful, why am I writing a SlackBuild for it? Because it's +# a GUI hex editor that (a) uses GTK, and (b) doesn't require KDE and +# its horde of daemons. Someone is going to be glad it's here. People +# who grew up using GUIs are going to prefer this to a textmode app. +# Here endeth the rant. + +# Patch from Debian. Might not be needed with newer versions of mono, +# but no harm done. +patch -p1 < $CWD/patches/force_gtk_action_namespace.patch + +# Patch from dead gna.org site: +# http://web.archive.org/web/20170205194531/http://gna.org/bugs/?14878 +# Fixes "not enough space" error when trying to save. +patch -p1 < $CWD/patches/fix_save.patch + +# Patch from: https://bugs.launchpad.net/ubuntu/+source/bless/+bug/1622951 +# Fixes broken preferences saving. +patch -p1 < $CWD/patches/fixxmltextwriter.patch + +# Make bless act like all other hex editors on the planet by NOT starting +# up in Insert mode. I wouldn't have patched this, except that bless +# doesn't auto-save the Insert/Overwrite state across sessions. You can +# set the default via Edit/Preferences, but it doesn't remember the last +# state if you just press Insert to toggle it. +patch -p1 < $CWD/patches/default_overwrite.patch + +# Grr. The configure script doesn't allow setting CS or MCS or CSC or +# anything to override the compiler (like normal stuff does with CC). +# FFS, it's even hardcoded in C# code... +sed -i 's,gmcs,mcs,g' configure builder/ModuleBuilder.cs + +./configure \ + --without-scrollkeeper \ + --prefix=/usr \ + --libdir=/usr/lib \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --mandir=/usr/man \ + --docdir=/usr/doc/$PRGNAM-$VERSION + +# GRR. Even with --without-scrollkeeper we have to fake it out. I +# could look into using rarian, but I'm not sure what good it would +# do: the .xml and .html help files are already installed in the right +# places, and help_script.sh knows how to display them when you click +# Help/Contents or press F1. +cp doc/user/bless-manual.omf.in doc/user/bless-manual.omf + +make +make install DESTDIR=$PKG + +# --docdir is ignored. +mkdir -p $PKG/usr/doc/ +mv $PKG/usr/share/doc/$PRGNAM $PKG/usr/doc/$PRGNAM-$VERSION +rm -rf $PKG/usr/share/doc + +# The help script needed help. +PKGHELP=$PKG/usr/share/$PRGNAM/help_script.sh +sed "s/@VERSION@/$VERSION/g" $CWD/help_script.sh > $PKGHELP +chmod 755 $PKGHELP + +# Man page from Debian. Not much to it, but not much was needed. +mkdir -p $PKG/usr/man/man1 +gzip -9c < $CWD/$PRGNAM.1 > $PKG/usr/man/man1/$PRGNAM.1.gz + +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +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/bless/bless.info b/development/bless/bless.info new file mode 100644 index 0000000000..e6b9baf111 --- /dev/null +++ b/development/bless/bless.info @@ -0,0 +1,10 @@ +PRGNAM="bless" +VERSION="0.6.0" +HOMEPAGE="https://packages.debian.org/sid/bless" +DOWNLOAD="http://http.debian.net/debian/pool/main/b/bless/bless_0.6.0.orig.tar.gz" +MD5SUM="b4c20d113281dfedb67d9f3ff8b174e3" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="gtk-sharp" +MAINTAINER="B. Watson" +EMAIL="yalhcru@gmail.com" diff --git a/development/bless/doinst.sh b/development/bless/doinst.sh new file mode 100644 index 0000000000..5fb28930db --- /dev/null +++ b/development/bless/doinst.sh @@ -0,0 +1,3 @@ +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 +fi diff --git a/development/bless/help_script.sh b/development/bless/help_script.sh new file mode 100644 index 0000000000..f841e96e7d --- /dev/null +++ b/development/bless/help_script.sh @@ -0,0 +1,39 @@ +#!/bin/sh + +# Script that loads help for Bless. Modified by B. Watson for +# slackbuilds.org. No idea if the gnome-help or yelp stuff really works, +# I haven't got either one installed. At least the user manual opens +# in an actual browser with this version of the script. + +xml_help="/usr/doc/bless-@VERSION@/user/bless-manual.xml" +html_help="/usr/doc/bless-@VERSION@/user/index.html" + +# try to get default browsers from GConf +GCONFTOOL=`which gconftool-2 2> /dev/null` + +if [[ -n $GCONFTOOL ]]; +then + help_browser=`$GCONFTOOL --get "/desktop/gnome/url-handlers/ghelp/command"` + if [[ -n "$help_browser" ]]; + then + help_browser=`echo "$help_browser" | cut -d' ' -f1` + fi + + http_browser=`$GCONFTOOL --get "/desktop/gnome/url-handlers/http/command"` + + if [[ -n "$http_browser" ]]; + then + http_browser=`echo "$http_browser" | cut -d' ' -f1` + fi +fi + +# some other browsers +yelp_browser=`which yelp 2> /dev/null` +firefox_browser=`which firefox 2> /dev/null` +mozilla_browser=`which mozilla 2> /dev/null` + +([[ -n $help_browser ]] && $help_browser $xml_help) || +([[ -n $yelp_browser ]] && $yelp_browser $xml_help) || +([[ -n $http_browser ]] && $http_browser $html_help) || +([[ -n $firefox_browser ]] && $firefox_browser $html_help) || +([[ -n $mozilla_browser ]] && $mozilla_browser $html_help) diff --git a/development/bless/patches/default_overwrite.patch b/development/bless/patches/default_overwrite.patch new file mode 100644 index 0000000000..5eec4ba1a3 --- /dev/null +++ b/development/bless/patches/default_overwrite.patch @@ -0,0 +1,12 @@ +diff -Naur bless-0.6.0/data/default-preferences.xml bless-0.6.0.patched/data/default-preferences.xml +--- bless-0.6.0/data/default-preferences.xml 2008-06-07 08:18:12.000000000 -0400 ++++ bless-0.6.0.patched/data/default-preferences.xml 2018-08-12 12:36:21.800800175 -0400 +@@ -1,7 +1,7 @@ + <preferences> + <pref name="Session.RememberCursorPosition">True</pref> + <pref name="Tools.ConversionTable.LEDecoding">False</pref> +- <pref name="Default.EditMode">Insert</pref> ++ <pref name="Default.EditMode">Overwrite</pref> + <pref name="Tools.ConversionTable.Show">True</pref> + <pref name="Tools.Statistics.Show">False</pref> + <pref name="Session.RememberWindowGeometry">True</pref> diff --git a/development/bless/patches/fix_save.patch b/development/bless/patches/fix_save.patch new file mode 100644 index 0000000000..45e85b932b --- /dev/null +++ b/development/bless/patches/fix_save.patch @@ -0,0 +1,12 @@ +diff -Naur bless-0.6.0/src/buffers/ByteBuffer.cs bless-0.6.0-fixed/src/buffers/ByteBuffer.cs +--- bless-0.6.0/src/buffers/ByteBuffer.cs 2008-06-07 21:59:25.000000000 +0700 ++++ bless-0.6.0-fixed/src/buffers/ByteBuffer.cs 2009-12-11 20:07:42.000000000 +0600 +@@ -957,7 +957,7 @@ + ///</summary> + public string TempDir { + get { return tempDir; } +- set { tempDir = value;} ++ set { if(value != "") tempDir = value; } + } + + ///<summary> diff --git a/development/bless/patches/fixxmltextwriter.patch b/development/bless/patches/fixxmltextwriter.patch new file mode 100644 index 0000000000..2b241d5525 --- /dev/null +++ b/development/bless/patches/fixxmltextwriter.patch @@ -0,0 +1,31 @@ +diff --git a/src/tools/Preferences.cs b/src/tools/Preferences.cs +index 192bf14..775a83e 100644 +--- a/src/tools/Preferences.cs ++++ b/src/tools/Preferences.cs +@@ -132,6 +132,7 @@ public class Preferences + xml.Indentation = 1; + xml.IndentChar = '\t'; + ++ xml.WriteStartDocument(true); + xml.WriteStartElement(null, "preferences", null); + + foreach (DictionaryEntry entry in prefs) { +diff --git a/src/tools/Session.cs b/src/tools/Session.cs +index 7980cc0..5184632 100644 +--- a/src/tools/Session.cs ++++ b/src/tools/Session.cs +@@ -77,6 +77,7 @@ public class Session + xml.Indentation = 1; + xml.IndentChar = '\t'; + ++ xml.WriteStartDocument(true); + xml.WriteStartElement(null, "session", null); + + xml.WriteStartElement(null, "windowheight", null); +@@ -194,4 +195,4 @@ public class SessionFileInfo + } + } + +-} // end namespace +\ No newline at end of file ++} // end namespace diff --git a/development/bless/patches/force_gtk_action_namespace.patch b/development/bless/patches/force_gtk_action_namespace.patch new file mode 100644 index 0000000000..fe722129dc --- /dev/null +++ b/development/bless/patches/force_gtk_action_namespace.patch @@ -0,0 +1,72 @@ +diff -urNad bless-0.5.2.orig/src/gui/plugins/BitwiseOperationsPlugin.cs bless-0.5.2/src/gui/plugins/BitwiseOperationsPlugin.cs +--- bless-0.5.2.orig/src/gui/plugins/BitwiseOperationsPlugin.cs 2008-04-10 03:50:32.000000000 +0100 ++++ bless-0.5.2/src/gui/plugins/BitwiseOperationsPlugin.cs 2008-04-10 03:51:45.000000000 +0100 +@@ -30,6 +30,8 @@ + using Bless.Buffers; + using Mono.Unix; + ++using Action = Gtk.Action; ++ + namespace Bless.Gui.Plugins { + + ///<summary> +diff -urNad bless-0.5.2.orig/src/gui/plugins/EditOperationsPlugin.cs bless-0.5.2/src/gui/plugins/EditOperationsPlugin.cs +--- bless-0.5.2.orig/src/gui/plugins/EditOperationsPlugin.cs 2008-04-10 03:50:32.000000000 +0100 ++++ bless-0.5.2/src/gui/plugins/EditOperationsPlugin.cs 2008-04-10 03:52:06.000000000 +0100 +@@ -27,6 +27,8 @@ + using Bless.Gui.Dialogs; + using Bless.Tools; + ++using Action = Gtk.Action; ++ + namespace Bless.Gui.Plugins { + + public class EditOperationsPlugin : GuiPlugin +diff -urNad bless-0.5.2.orig/src/gui/plugins/FileOperationsPlugin.cs bless-0.5.2/src/gui/plugins/FileOperationsPlugin.cs +--- bless-0.5.2.orig/src/gui/plugins/FileOperationsPlugin.cs 2008-04-10 03:50:32.000000000 +0100 ++++ bless-0.5.2/src/gui/plugins/FileOperationsPlugin.cs 2008-04-10 03:52:26.000000000 +0100 +@@ -29,6 +29,8 @@ + using Gtk; + using Mono.Unix; + ++using Action = Gtk.Action; ++ + namespace Bless.Gui.Plugins { + + public class FileOperationsPlugin : GuiPlugin +diff -urNad bless-0.5.2.orig/src/gui/plugins/FindReplacePlugin.cs bless-0.5.2/src/gui/plugins/FindReplacePlugin.cs +--- bless-0.5.2.orig/src/gui/plugins/FindReplacePlugin.cs 2008-04-10 03:50:32.000000000 +0100 ++++ bless-0.5.2/src/gui/plugins/FindReplacePlugin.cs 2008-04-10 03:51:21.000000000 +0100 +@@ -31,6 +31,8 @@ + using Bless.Plugins; + using Mono.Unix; + ++using Action = Gtk.Action; ++ + namespace Bless.Gui.Plugins { + + public class FindReplacePlugin : GuiPlugin +diff -urNad bless-0.5.2.orig/src/gui/plugins/HistoryPlugin.cs bless-0.5.2/src/gui/plugins/HistoryPlugin.cs +--- bless-0.5.2.orig/src/gui/plugins/HistoryPlugin.cs 2008-04-10 03:50:32.000000000 +0100 ++++ bless-0.5.2/src/gui/plugins/HistoryPlugin.cs 2008-04-10 03:53:22.000000000 +0100 +@@ -26,6 +26,8 @@ + using Bless.Gui; + using Bless.Tools; + ++using Action = Gtk.Action; ++ + namespace Bless.Gui.Plugins { + + public class HistoryPlugin : GuiPlugin +diff -urNad bless-0.5.2.orig/src/gui/plugins/InfobarPlugin.cs bless-0.5.2/src/gui/plugins/InfobarPlugin.cs +--- bless-0.5.2.orig/src/gui/plugins/InfobarPlugin.cs 2008-04-10 03:50:32.000000000 +0100 ++++ bless-0.5.2/src/gui/plugins/InfobarPlugin.cs 2008-04-10 03:52:48.000000000 +0100 +@@ -28,6 +28,8 @@ + using Bless.Tools; + using Mono.Unix; + ++using Action = Gtk.Action; ++ + namespace Bless.Gui.Plugins { + + public class InfobarPlugin : GuiPlugin diff --git a/development/bless/slack-desc b/development/bless/slack-desc new file mode 100644 index 0000000000..ef53391a8a --- /dev/null +++ b/development/bless/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------------------------------------------------------| +bless: bless (GUI hex editor) +bless: +bless: bless is a full featured hexadecimal editor, written in C#, using Gtk# +bless: for the user interface. +bless: +bless: Its purpose is to edit files as a sequence of bytes, allowing +bless: read/write, search, pattern finding, efficient query-replace, +bless: multi-tabbing, customized data-views, plug‐ins, and many other +bless: features. +bless: +bless: |