summaryrefslogtreecommitdiffstats
path: root/development/THE/THE.SlackBuild
diff options
context:
space:
mode:
author Richard Narron2018-06-19 23:13:11 +0200
committer Willy Sudiarto Raharjo2018-06-23 03:44:00 +0200
commit548fd1f483f6a72fcabbad54442bf323154869d3 (patch)
treecad6507117cf80d0909671d423b93cc51d982117 /development/THE/THE.SlackBuild
parentdd3c763269518668117489c72193c1b28687deec (diff)
downloadslackbuilds-548fd1f483f6a72fcabbad54442bf323154869d3.tar.gz
development/THE: Add optional dep PDCurses.
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'development/THE/THE.SlackBuild')
-rw-r--r--development/THE/THE.SlackBuild57
1 files changed, 44 insertions, 13 deletions
diff --git a/development/THE/THE.SlackBuild b/development/THE/THE.SlackBuild
index 6b0cca20e8..be28c22f41 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