aboutsummaryrefslogtreecommitdiff
path: root/development/THE
diff options
context:
space:
mode:
authorRichard Narron <richard@aaazen.com>2018-06-19 22:13:11 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2018-06-23 08:44:00 +0700
commit548fd1f483f6a72fcabbad54442bf323154869d3 (patch)
treecad6507117cf80d0909671d423b93cc51d982117 /development/THE
parentdd3c763269518668117489c72193c1b28687deec (diff)
development/THE: Add optional dep PDCurses.
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'development/THE')
-rw-r--r--development/THE/README16
-rw-r--r--development/THE/THE-configure.patch11
-rw-r--r--development/THE/THE-file-c.patch11
-rw-r--r--development/THE/THE-xcurses.patch11
-rw-r--r--development/THE/THE.SlackBuild57
-rw-r--r--development/THE/slack-desc4
6 files changed, 91 insertions, 19 deletions
diff --git a/development/THE/README b/development/THE/README
index 956a4ed659c2..4b6ad0b024b3 100644
--- a/development/THE/README
+++ b/development/THE/README
@@ -1,4 +1,12 @@
-The Hessling Editor (THE) is a powerful text editor modelled on the
-VM/CMS text editor XEDIT with the best features of Mansfield Software's
-Kedit. THE uses Regina Rexx as its macro language, which means that
-THE is a highly configurable and versatile editor.
+The Hessling Editor (THE) is a powerful text editor modeled on the
+VM/CMS text editor XEDIT with the best features of
+Mansfield Software's Kedit.
+
+THE uses Regina Rexx as its macro language. It uses a command line,
+key bindings and a prefix area to operate.
+
+
+Optional Dependency
+
+If PDCurses is installed then the X11 version of the program (xthe)
+will be created.
diff --git a/development/THE/THE-configure.patch b/development/THE/THE-configure.patch
new file mode 100644
index 000000000000..3d6434603831
--- /dev/null
+++ b/development/THE/THE-configure.patch
@@ -0,0 +1,11 @@
+--- configure.orig Thu Oct 30 15:13:56 2014
++++ configure Sun Dec 28 17:25:25 2014
+@@ -3381,7 +3381,7 @@
+ osis64bit=yes
+ fi
+ ;;
+- *-freebsd*)
++ *-freebsd* | *-openbsd* | *-bitrig*)
+ mach="`uname -m`"
+ if test "$mach" = "amd64"; then
+ bitflag="64"
diff --git a/development/THE/THE-file-c.patch b/development/THE/THE-file-c.patch
new file mode 100644
index 000000000000..e9a8bbba4252
--- /dev/null
+++ b/development/THE/THE-file-c.patch
@@ -0,0 +1,11 @@
+--- file.c.orig 2013-07-09 17:06:21.000000000 -0700
++++ file.c 2018-06-14 22:20:32.667616957 -0700
+@@ -759,7 +759,7 @@ bool called_from_get_command;
+ if (feof(fp))
+ {
+ eof_reached = TRUE;
+- for (;*(trec+read_start+chars_read-1)==DOSEOF;chars_read--)
++ for (;chars_read>0 && *(trec+read_start+chars_read-1)==DOSEOF;chars_read--)
+ ;
+ }
+ /*
diff --git a/development/THE/THE-xcurses.patch b/development/THE/THE-xcurses.patch
new file mode 100644
index 000000000000..8e79ae6c2726
--- /dev/null
+++ b/development/THE/THE-xcurses.patch
@@ -0,0 +1,11 @@
+--- a//the.c.orig 2013-12-28 20:08:15.000000000 -0800
++++ b/the.c 2018-06-14 14:49:04.152326981 -0700
+@@ -1113,7 +1113,7 @@
+ #endif
+ curses_started = TRUE;
+
+-#if defined(USE_WINGUICURSES) || defined(USE_XCURSES)
++#if defined(USE_WINGUICURSES)
+ /*
+ * Tell PDCurses which key should be returned when the window close button is clicked
+ */
diff --git a/development/THE/THE.SlackBuild b/development/THE/THE.SlackBuild
index 6b0cca20e813..be28c22f4135 100644
--- a/development/THE/THE.SlackBuild
+++ b/development/THE/THE.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for The Hessling Editor
-# Copyright 2012 Richard Narron, California, USA
+# Copyright 2012-2018 Richard Narron, California, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,7 +24,7 @@
PRGNAM=THE
VERSION=${VERSION:-3.3RC4}
-BUILD=${BUILD:-4}
+BUILD=${BUILD:-5}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -66,14 +66,21 @@ tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
- -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \;
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+cat $CWD/THE-file-c.patch | patch -p0
+cat $CWD/THE-xcurses.patch | patch -p1
+
+# make the ncurses version of THE and the documentation
+mkdir ncurses
+cd ncurses
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
-./configure \
+../configure \
--with-ncurses \
--with-rexx=regina \
--build=$ARCH-slackware-linux \
@@ -86,19 +93,43 @@ CXXFLAGS="$SLKCFLAGS" \
make
make install DESTDIR=$PKG
-
make html
-find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-
rm -f $PKG/usr/bin/the ; ln -fs nthe $PKG/usr/bin/the
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/html
-install -m0644 COPYING FAQ HISTORY INSTALL README* THE*spec TODO \
- $PKG/usr/doc/$PRGNAM-$VERSION
install -m0644 *.html $PKG/usr/doc/$PRGNAM-$VERSION/html
install -m0644 the64.png the64.gif $PKG/usr/doc/$PRGNAM-$VERSION/html
+
+cd $TMP/$PRGNAM-$VERSION
+install -m0644 COPYING FAQ HISTORY INSTALL README* THE*spec TODO \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+
+# if PDCurses (XCurses) then make the X11 version
+if ldconfig -p | grep -q libXCurses.so ; then
+ mkdir xcurses
+ cd xcurses
+
+ CFLAGS="$SLKCFLAGS" \
+ CXXFLAGS="$SLKCFLAGS" \
+ ../configure \
+ --with-xcurses \
+ --with-rexx=regina \
+ --build=$ARCH-slackware-linux \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --prefix=/usr \
+ --sysconfdir=/etc
+
+ make xthe
+ install -m0755 xthe $PKG/usr/bin
+fi
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
install -m0644 $CWD/$PRGNAM.SlackBuild $PKG/usr/doc/$PRGNAM-$VERSION
mkdir -p $PKG/install
diff --git a/development/THE/slack-desc b/development/THE/slack-desc
index 1c56e95f754a..5c83c4227fbb 100644
--- a/development/THE/slack-desc
+++ b/development/THE/slack-desc
@@ -12,8 +12,8 @@ THE: The Hessling Editor (THE) is a text editor modelled after the
THE: IBM VM/CMS text editor XEDIT with the best features of
THE: Mansfield Software's Kedit.
THE:
-THE: THE uses Regina Rexx as its macro language, which means
-THE: that THE is a highly configurable and versatile editor.
+THE: THE uses Regina Rexx as its macro language. It uses a command line,
+THE: key bindings and a prefix area to operate.
THE:
THE: Homepage: http://hessling-editor.sourceforge.net/
THE: