development/bless: Updated for version 0.6.3.
Signed-off-by: B. Watson <urchlay@slackware.uk> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
02ff565a8b
commit
1b8a2960cd
|
@ -6,6 +6,8 @@
|
|||
|
||||
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
|
||||
|
||||
# 20230819 bkw: update for v0.6.3.
|
||||
|
||||
# 20230102 bkw: BUILD=3
|
||||
# - get rid of useless junk from doc dir.
|
||||
|
||||
|
@ -20,8 +22,8 @@
|
|||
cd $(dirname $0) ; CWD=$(pwd)
|
||||
|
||||
PRGNAM=bless
|
||||
VERSION=${VERSION:-0.6.0}
|
||||
BUILD=${BUILD:-3}
|
||||
VERSION=${VERSION:-0.6.3}
|
||||
BUILD=${BUILD:-1}
|
||||
TAG=${TAG:-_SBo}
|
||||
PKGTYPE=${PKGTYPE:-tgz}
|
||||
|
||||
|
@ -52,111 +54,47 @@ 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... now I've fixed this, at least.
|
||||
# - 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, (b) doesn't suck quite
|
||||
# as hard as ghex, and (c) 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
|
||||
|
||||
# Similar-named patch from Debian. This one fixes saving preferences.
|
||||
patch -p1 < $CWD/patches/fix_save_behaviour.patch
|
||||
|
||||
# Patch from: https://bugs.launchpad.net/ubuntu/+source/bless/+bug/1622951
|
||||
# Fixes broken preferences saving.
|
||||
patch -p1 < $CWD/patches/fixxmltextwriter.patch
|
||||
find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \
|
||||
\! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} +
|
||||
|
||||
# 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
|
||||
sed -i '/Default\.Editmode/s,Insert,Overwrite,' data/default-preferences.xml
|
||||
|
||||
patch -p1 < $CWD/patches/disambiguate-system.range-and-gtk.range.patch
|
||||
|
||||
# 20211210 bkw: make it look in the right place for its own layout files.
|
||||
# 20230819 bkw: make it look in the right place for its own layout files.
|
||||
# Debian does this with a patch (it's their only patch for 0.6.3) but I
|
||||
# prefer to use sed.
|
||||
sed -i '/FileResourcePath\.GetDataPath("data")/s,"data",".",' \
|
||||
src/gui/dialogs/LayoutSelectionDialog.cs
|
||||
|
||||
# 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
|
||||
meson setup build -Dprefix=/usr -Dtests=false
|
||||
ninja -C build
|
||||
DESTDIR=$PKG ninja -C build install
|
||||
|
||||
./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.
|
||||
PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
|
||||
mkdir -p $PKG/usr/doc/
|
||||
mv $PKG/usr/share/doc/$PRGNAM $PKGDOC
|
||||
rm -rf $PKG/usr/share/{doc,omf} $PKGDOC/{INSTALL,README.packaging,bless.spec}
|
||||
mkdir -p $PKGDOC
|
||||
ln -s ../../share/help/C/bless $PKGDOC/html
|
||||
cp -a AUTHORS COPYING NEWS README $PKGDOC
|
||||
|
||||
# The help script needed help.
|
||||
PKGHELP=$PKG/usr/share/$PRGNAM/help_script.sh
|
||||
sed "s/@VERSION@/$VERSION/g" $CWD/help_script.sh > $PKGHELP
|
||||
cat $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
|
||||
|
||||
HICOLOR=$PKG/usr/share/icons/hicolor/48x48/apps
|
||||
PIXMAPS=$PKG/usr/share/pixmaps
|
||||
rm -f $PIXMAPS/*
|
||||
mkdir -p $HICOLOR
|
||||
mv $PKG/usr/share/$PRGNAM/bless-48x48.png $HICOLOR/$PRGNAM.png
|
||||
ln -s ../icons/hicolor/48x48/apps/$PRGNAM.png $PKG/usr/share/$PRGNAM/bless-48x48.png
|
||||
mkdir -p $PIXMAPS
|
||||
ln -s ../icons/hicolor/48x48/apps/$PRGNAM.png $PIXMAPS/$PRGNAM.png
|
||||
|
||||
sed -i '/Icon=/s,=.*,=bless,' $PKG/usr/share/applications/$PRGNAM.desktop
|
||||
# 20230819 bkw: dup icon
|
||||
rm -f $PKG/usr/share/bless/bless-48x48.png
|
||||
ln -s ../icons/hicolor/48x48/apps/$PRGNAM.png $PKG/usr/share/bless/bless-48x48.png
|
||||
|
||||
cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
PRGNAM="bless"
|
||||
VERSION="0.6.0"
|
||||
VERSION="0.6.3"
|
||||
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="http://http.debian.net/debian/pool/main/b/bless/bless_0.6.3.orig.tar.gz"
|
||||
MD5SUM="93d4420f40c3af703269f1e965b62ee2"
|
||||
DOWNLOAD_x86_64=""
|
||||
MD5SUM_x86_64=""
|
||||
REQUIRES="gtk-sharp"
|
||||
|
|
|
@ -5,4 +5,4 @@
|
|||
# and just use xdg-open for the HTML help in the user's default
|
||||
# browser.
|
||||
|
||||
exec xdg-open /usr/doc/bless-@VERSION@/user/index.html
|
||||
exec xdg-open /usr/share/help/C/bless/index.html
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
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>
|
|
@ -1,92 +0,0 @@
|
|||
Index: bless/src/buffers/ByteBuffer.cs
|
||||
===================================================================
|
||||
--- bless.orig/src/buffers/ByteBuffer.cs
|
||||
+++ bless/src/buffers/ByteBuffer.cs
|
||||
@@ -26,6 +26,8 @@ using System.Threading;
|
||||
using Bless.Util;
|
||||
using Bless.Tools;
|
||||
|
||||
+using Range=Bless.Util.Range;
|
||||
+
|
||||
namespace Bless.Buffers {
|
||||
|
||||
///<summary>
|
||||
Index: bless/src/tools/find/IFindStrategy.cs
|
||||
===================================================================
|
||||
--- bless.orig/src/tools/find/IFindStrategy.cs
|
||||
+++ bless/src/tools/find/IFindStrategy.cs
|
||||
@@ -23,6 +23,8 @@ using System;
|
||||
using Bless.Util;
|
||||
using Bless.Buffers;
|
||||
|
||||
+using Range=Bless.Util.Range;
|
||||
+
|
||||
namespace Bless.Tools.Find {
|
||||
|
||||
public interface IFindStrategy
|
||||
@@ -40,4 +42,4 @@ public interface IFindStrategy
|
||||
bool Cancelled { get; set; }
|
||||
}
|
||||
|
||||
-} // end namespace
|
||||
\ No newline at end of file
|
||||
+} // end namespace
|
||||
Index: bless/src/tools/find/IFinder.cs
|
||||
===================================================================
|
||||
--- bless.orig/src/tools/find/IFinder.cs
|
||||
+++ bless/src/tools/find/IFinder.cs
|
||||
@@ -23,6 +23,8 @@ using System;
|
||||
using Bless.Util;
|
||||
using Bless.Buffers;
|
||||
|
||||
+using Range=Bless.Util.Range;
|
||||
+
|
||||
namespace Bless.Tools.Find {
|
||||
|
||||
public delegate void FirstFindHandler();
|
||||
@@ -41,4 +43,4 @@ public interface IFinder
|
||||
IAsyncResult ReplaceAll(byte[] ba, AsyncCallback ac);
|
||||
}
|
||||
|
||||
-} // end namespace
|
||||
\ No newline at end of file
|
||||
+} // end namespace
|
||||
Index: bless/src/tools/find/FindOperations.cs
|
||||
===================================================================
|
||||
--- bless.orig/src/tools/find/FindOperations.cs
|
||||
+++ bless/src/tools/find/FindOperations.cs
|
||||
@@ -24,6 +24,8 @@ using System.IO;
|
||||
using System.Threading;
|
||||
using Bless.Util;
|
||||
|
||||
+using Range=Bless.Util.Range;
|
||||
+
|
||||
namespace Bless.Tools.Find {
|
||||
|
||||
///<summary>
|
||||
Index: bless/src/gui/areas/AreaGroup.cs
|
||||
===================================================================
|
||||
--- bless.orig/src/gui/areas/AreaGroup.cs
|
||||
+++ bless/src/gui/areas/AreaGroup.cs
|
||||
@@ -25,6 +25,8 @@ using Bless.Buffers;
|
||||
using Bless.Util;
|
||||
using Bless.Gui.Drawers;
|
||||
|
||||
+using Range=Bless.Util.Range;
|
||||
+
|
||||
namespace Bless.Gui.Areas
|
||||
{
|
||||
|
||||
Index: bless/src/gui/DataBookFinder.cs
|
||||
===================================================================
|
||||
--- bless.orig/src/gui/DataBookFinder.cs
|
||||
+++ bless/src/gui/DataBookFinder.cs
|
||||
@@ -26,6 +26,8 @@ using Bless.Util;
|
||||
using Bless.Buffers;
|
||||
using Bless.Tools.Find;
|
||||
|
||||
+using Range=Bless.Util.Range;
|
||||
+
|
||||
namespace Bless.Gui {
|
||||
|
||||
public class DataBookFinder : IFinder
|
|
@ -1,12 +0,0 @@
|
|||
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>
|
|
@ -1,36 +0,0 @@
|
|||
diff -Naurd bless-0.6.0.orig/src/tools/Preferences.cs bless-0.6.0/src/tools/Preferences.cs
|
||||
--- bless-0.6.0.orig/src/tools/Preferences.cs 2008-06-07 14:18:14.000000000 +0200
|
||||
+++ bless-0.6.0/src/tools/Preferences.cs 2016-10-28 22:47:50.000000000 +0200
|
||||
@@ -127,10 +127,10 @@
|
||||
///</summary>
|
||||
public void Save(string path)
|
||||
{
|
||||
- XmlTextWriter xml = new XmlTextWriter(path, null);
|
||||
- xml.Formatting = Formatting.Indented;
|
||||
- xml.Indentation = 1;
|
||||
- xml.IndentChar = '\t';
|
||||
+ XmlWriterSettings settings = new XmlWriterSettings();
|
||||
+ settings.Indent = true;
|
||||
+ settings.IndentChars = ("\t");
|
||||
+ XmlWriter xml = XmlWriter.Create(path, settings);
|
||||
|
||||
xml.WriteStartElement(null, "preferences", null);
|
||||
|
||||
diff -Naurd bless-0.6.0.orig/src/tools/Session.cs bless-0.6.0/src/tools/Session.cs
|
||||
--- bless-0.6.0.orig/src/tools/Session.cs 2008-06-07 14:18:14.000000000 +0200
|
||||
+++ bless-0.6.0/src/tools/Session.cs 2017-01-08 15:21:29.000000000 +0100
|
||||
@@ -72,10 +72,10 @@
|
||||
|
||||
public void Save(string path)
|
||||
{
|
||||
- XmlTextWriter xml = new XmlTextWriter(path, null);
|
||||
- xml.Formatting = Formatting.Indented;
|
||||
- xml.Indentation = 1;
|
||||
- xml.IndentChar = '\t';
|
||||
+ XmlWriterSettings settings = new XmlWriterSettings();
|
||||
+ settings.Indent = true;
|
||||
+ settings.IndentChars = ("\t");
|
||||
+ XmlWriter xml = XmlWriter.Create(path, settings);
|
||||
|
||||
xml.WriteStartElement(null, "session", null);
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
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
|
|
@ -1,72 +0,0 @@
|
|||
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
|
Loading…
Reference in New Issue