office/lotus123: Added (Lotus 1-2-3 for Linux).

Signed-off-by: Andrew Clemons <andrew.clemons@gmail.com>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Andrew Clemons 2023-06-17 11:41:47 +09:00 committed by Willy Sudiarto Raharjo
parent 5a4cc7ea08
commit e316e5d509
No known key found for this signature in database
GPG key ID: 3F617144D7238786
13 changed files with 240 additions and 0 deletions

22
office/lotus123/README Normal file
View file

@ -0,0 +1,22 @@
lotus123 (Lotus 1-2-3 for Linux)
This is a native port of Lotus 1-2-3 Release 3 to Linux.
There's an article documenting how this is possible here:
https://lock.cmpxchg8b.com/linux123.html
The executable and man page are called "123", since this is the
traditional name for Lotus 1-2-3 on UNIX. The keyedit(1) and
setup123(1) commands mentioned in the man page have not been
ported yet.
This software hasn't been maintained in 30 years, so it's a good idea
to *never* run it as root.
Since this is based on a binary i386 release of 1-2-3, it only builds
on 32-bit x86. You *might* be able to build in on x86_64 if you have
AlienBOB's multilib packages installed, but the SlackBuild author
hasn't tested this. If it won't build on multilib, you can still build
it on a 32-bit Slackware system, then install the package on multilib
(it should run just fine).
This will *not* build on ARM or any other non-x86 CPU.

View file

@ -0,0 +1,9 @@
if [ -x /usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
fi
if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
if [ -x /usr/bin/gtk-update-icon-cache ]; then
/usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1
fi
fi

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

View file

@ -0,0 +1,160 @@
#!/bin/bash
# Slackware build script for lotus123
# Written by B. Watson (urchlay@slackware.uk)
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
# This is a very cool hack, though I'm not sure about my own sanity in
# wanting to package it...
# Purists take note: this really is i386, but since Slackware no
# longer supports i386 or i486, ARCH is set to i586. That's the
# minimum Slackware-supported ARCH this will run on.
# I thought about creating and hosting a static binary for x86_64, but
# statify doesn't support newer kernels (like, the one in Slack 15.0),
# and Slackware doesn't ship static libraries except libc, so there's
# no way to statically link ncurses (unless I build static ncurses
# myself, which I don't much want to do).
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=lotus123
SRCNAM=123elf
DISKNAM=123UNIX
VERSION=${VERSION:-1.0.0rc4}
BINUTVER=${BINUTVER:-2.38}
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
# Don't exit on bad arch/etc here, we want PRINT_PACKAGE_NAME to work.
# Note that if ARCH=x86_64 or i686, we change it to i586 before
# printing the package name.
case "$ARCH" in
i?86) ARCH=i586 ;;
x86_64)
if [ "$( /bin/ls /lib/ld-*.so 2>/dev/null )" = "" ]; then
MULTI=fail
else
MULTI=ok
ARCH=i586
fi ;;
*) BADARCH=yes ;;
esac
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
fi
if [ "$BADARCH" = "yes" ]; then
cat <<EOF
***********************************************************************
Unsupported architecture: $ARCH
This can only be built on i586, i686, and (maybe) x86_64 with multilib.
***********************************************************************
EOF
exit 1
elif [ "$MULTI" = "fail" ]; then
cat <<EOF
***********************************************************************
Building on x86_64 is unsupported, and you don't have multilib, so
it's actually impossible.
***********************************************************************
EOF
exit 1
elif [ "$MULTI" = "ok" ]; then
# I haven't tested on multilib (I don't use it). Good luck.
cat <<EOF
***********************************************************************
Building on x86_64 is unsupported, but you have multilib, so we'll try.
If it doesn't work, fix it and send the maintainer a patch, or else
build the package on 32-bit x86 and install it on multilib x86_64.
***********************************************************************
EOF
sleep 3
fi
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $SRCNAM-$VERSION
tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
cd $SRCNAM-$VERSION
cp $CWD/$DISKNAM?.IMG .
tar xvf $CWD/binutils-$BINUTVER.tar.xz
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 {} \+
# Fix hardcoded man page install path.
ln -s share/man man
sed -i 's,share/man,man,g' Makefile
# Our binutils doesn't support COFF, so we have to use this:
sh binutils.sh
# Extract the files from the disk images.
sh extract.sh
# Rest of the build is simple from our POV.
make
make install prefix=$PKG/usr
strip $PKG/usr/bin/123
gzip -9 $PKG/usr/man/man*/*
# Icon downloaded from:
# https://www.deviantart.com/dharmapoa/art/Lotus-1-2-3-Icon-881499542
# ...and resized with ImageMagick's convert.
HICOLOR=$PKG/usr/share/icons/hicolor
for i in $CWD/icons/*.png; do
px="$( basename $i .png )"
sz="${px}x${px}"
dir=$HICOLOR/$sz/apps
mkdir -p $dir
cat $i > $dir/$PRGNAM.png
done
mkdir -p $PKG/usr/share/pixmaps
ln -s ../icons/hicolor/48x48/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png
# .desktop file by SlackBuild author.
mkdir -p $PKG/usr/share/applications
cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
mkdir -p $PKGDOC
cp -a *.md $PKGDOC
cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE

View file

@ -0,0 +1,8 @@
[Desktop Entry]
Type=Application
Name=Lotus 1-2-3
Comment=Spreadsheet
Exec=123
Icon=lotus123
Terminal=true
Categories=Office;Spreadsheet;

View file

@ -0,0 +1,22 @@
PRGNAM="lotus123"
VERSION="1.0.0rc4"
HOMEPAGE="https://github.com/taviso/123elf"
DOWNLOAD="https://github.com/taviso/123elf/archive/v1.0.0rc4/123elf-1.0.0rc4.tar.gz \
https://archive.org/download/123-unix/123UNIX1.IMG \
https://archive.org/download/123-unix/123UNIX2.IMG \
https://archive.org/download/123-unix/123UNIX3.IMG \
https://archive.org/download/123-unix/123UNIX4.IMG \
https://archive.org/download/123-unix/123UNIX5.IMG \
https://ftp.gnu.org/gnu/binutils/binutils-2.38.tar.xz"
MD5SUM="c1d56afbf72353cfc8b1e478dbbb5bb2 \
b759a30d019b5c7ae221f6119ff6c821 \
d0dba12e243b6d1f2ee8f27cb0a5c986 \
aaf8adb12d5915f443b0754ebf0a98d3 \
1752432abf4951589386db4f8ace4c92 \
0965e866b299af5046ec7973e7157211 \
6e39cad1bb414add02b5b1169c18fdc5"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
MAINTAINER="B. Watson"
EMAIL="urchlay@slackware.uk"

View file

@ -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------------------------------------------------------|
lotus123: lotus123 (Lotus 1-2-3 for Linux)
lotus123:
lotus123: This is a native port of Lotus 1-2-3 Release 3 to Linux.
lotus123: There's an article documenting how this is possible here:
lotus123: https://lock.cmpxchg8b.com/linux123.html
lotus123:
lotus123: The executable and man page are called "123", since this is the
lotus123: traditional name for Lotus 1-2-3 on UNIX.
lotus123:
lotus123:
lotus123: