diff options
author | B. Watson <urchlay@slackware.uk> | 2025-02-20 23:59:48 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2025-02-21 00:24:32 +0700 |
commit | 836e703d798914a9bac209efc00adb4172ab5029 (patch) | |
tree | 6fb6c066ccda8af79a6b9d9bca5cf8136b20154a | |
parent | 943980d2a3ce425043b32ea134ae07a19d2dfa94 (diff) |
misc/duhdraw: Added (ASCII Art Editor).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r-- | misc/duhdraw/README | 19 | ||||
-rw-r--r-- | misc/duhdraw/duhdraw.SlackBuild | 76 | ||||
-rw-r--r-- | misc/duhdraw/duhdraw.info | 10 | ||||
-rw-r--r-- | misc/duhdraw/fix_scary_warning.diff | 12 | ||||
-rw-r--r-- | misc/duhdraw/slack-desc | 19 |
5 files changed, 136 insertions, 0 deletions
diff --git a/misc/duhdraw/README b/misc/duhdraw/README new file mode 100644 index 0000000000..ef75099f19 --- /dev/null +++ b/misc/duhdraw/README @@ -0,0 +1,19 @@ +duhdraw (ASCII/ANSI art editor) + +DuhDraw, written by Ben Fowler and maintained by Pekka Enberg, is a +Linux based Open Source clone of TheDRAW, an MS-DOS ASCII/ANSI art +editor. + +The package includes 3 executables: + +duhdraw - the editor. Press Alt-H to see the built-in help screen. +ansi - a viewer for the ASCII/ANSI art files created by duhdraw. +ansitoc - converts an ASCII/ANSI art file to a C char array. + +Also there are some example art files in: + /usr/doc/duhdraw-$VERSION/examples + +Optional: misb/cp437. Since most BBS ANSI art files are actually +in MS-DOS codepage 437 encoding, they'll look more correct in UTF-8 +terminals if run as e.g.: + $ cp437 duhdraw filename.ans diff --git a/misc/duhdraw/duhdraw.SlackBuild b/misc/duhdraw/duhdraw.SlackBuild new file mode 100644 index 0000000000..d558735e4c --- /dev/null +++ b/misc/duhdraw/duhdraw.SlackBuild @@ -0,0 +1,76 @@ +#!/bin/bash + +# Slackware build script for duhdraw + +# Written by B. Watson (urchlay@slackware.uk) + +# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. + +cd $(dirname $0) ; CWD=$(pwd) + +PRGNAM=duhdraw +VERSION=${VERSION:-2.8.13} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" +else + SLKCFLAGS="-O2" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +find -L . -perm /111 -a \! -perm 755 -a -exec chmod -h 755 {} + -o \ + \! -perm /111 -a \! -perm 644 -a -exec chmod -h 644 {} + + +# ansi.c:505:33: warning: argument 1 value ‘18446744073709547616’ exceeds +# maximum object size 9223372036854775807 [-Walloc-size-larger-than=] +# WTF? +patch -p1 < $CWD/fix_scary_warning.diff + +make CC="${CC:-gcc} -Wall $SLKCFLAGS" + +mkdir -p $PKG/usr/bin +install -s $PRGNAM ansi ansitoc $PKG/usr/bin + +PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION +mkdir -p $PKGDOC/examples +cp -a CREDITS HISTORY LICENSE README *.lsm $PKGDOC +cp -a *.ans $PKGDOC/examples +cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/misc/duhdraw/duhdraw.info b/misc/duhdraw/duhdraw.info new file mode 100644 index 0000000000..47c1162b29 --- /dev/null +++ b/misc/duhdraw/duhdraw.info @@ -0,0 +1,10 @@ +PRGNAM="duhdraw" +VERSION="2.8.13" +HOMEPAGE="https://www.cs.helsinki.fi/u/penberg/duhdraw/" +DOWNLOAD="https://www.cs.helsinki.fi/u/penberg/duhdraw/duhdraw-2.8.13.tar.gz" +MD5SUM="70211aa3ea927704ffeb9093e4f433b9" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="B. Watson" +EMAIL="urchlay@slackware.uk" diff --git a/misc/duhdraw/fix_scary_warning.diff b/misc/duhdraw/fix_scary_warning.diff new file mode 100644 index 0000000000..88766e40f3 --- /dev/null +++ b/misc/duhdraw/fix_scary_warning.diff @@ -0,0 +1,12 @@ +diff -Naur duhdraw-2.8.13/ansi.c duhdraw-2.8.13.patched/ansi.c +--- duhdraw-2.8.13/ansi.c 2005-03-02 03:22:46.000000000 -0500 ++++ duhdraw-2.8.13.patched/ansi.c 2025-02-20 04:20:49.445520477 -0500 +@@ -502,7 +502,7 @@ + pos = 0; + splos = 0; + +- editbuffer = (unsigned int *) malloc(sizeof(unsigned int) * cols * EDIT_BUFFER_HEIGHT); ++ editbuffer = (unsigned int *) malloc(sizeof(unsigned int) * (unsigned int)cols * EDIT_BUFFER_HEIGHT); + if (NULL == editbuffer) + { + fprintf (stderr, "Could not allocate memory for buffer.\n"); diff --git a/misc/duhdraw/slack-desc b/misc/duhdraw/slack-desc new file mode 100644 index 0000000000..b4e3a16443 --- /dev/null +++ b/misc/duhdraw/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------------------------------------------------------| +duhdraw: duhdraw (ASCII/ANSI art editor) +duhdraw: +duhdraw: DuhDraw, written by Ben Fowler and maintained by Pekka Enberg, is a +duhdraw: Linux based Open Source clone of TheDRAW, an MS-DOS ASCII/ANSI art +duhdraw: editor. +duhdraw: +duhdraw: +duhdraw: +duhdraw: +duhdraw: +duhdraw: |