development/THE: Add optional dep PDCurses.

Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
This commit is contained in:
Richard Narron 2018-06-19 22:13:11 +01:00 committed by Willy Sudiarto Raharjo
parent dd3c763269
commit 548fd1f483
No known key found for this signature in database
GPG Key ID: 887B8374D7333381
6 changed files with 91 additions and 19 deletions

View File

@ -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.

View File

@ -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"

View File

@ -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--)
;
}
/*

View File

@ -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
*/

View File

@ -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

View File

@ -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: