libraries/td_lib: Added (ded library).

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
B. Watson 2024-04-17 21:50:46 +07:00 committed by Willy Sudiarto Raharjo
parent 6a1faa5252
commit afdd848417
No known key found for this signature in database
GPG key ID: 3F617144D7238786
4 changed files with 132 additions and 0 deletions

7
libraries/td_lib/README Normal file
View file

@ -0,0 +1,7 @@
td_lib (support library for ded)
This is a common library of procedures which are shared not only among
the CM_TOOLS utilities, but also with other programs which are not
part of CM_TOOLS.
In practice, the only program that uses this library is "ded".

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------------------------------------------------------|
td_lib: td_lib (support library for ded)
td_lib:
td_lib: This is a common library of procedures which are shared not only among
td_lib: the CM_TOOLS utilities, but also with other programs which are not
td_lib: part of CM_TOOLS.
td_lib:
td_lib: In practice, the only program that uses this library is "ded".
td_lib:
td_lib:
td_lib:
td_lib:

View file

@ -0,0 +1,96 @@
#!/bin/bash
# Slackware build script for td_lib
# Written by B. Watson (urchlay@slackware.uk)
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
# For a long time, this was bundled with ded. However, recent versions
# of ded have configure scripts and makefiles that have grown too
# complex to easily force it to find td_lib in a custom directory. The
# path of least resistance is to break this library out into its own
# build, even though nothing else besides ded uses it.
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=td_lib
VERSION=${VERSION:-20230122}
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"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tgz
cd $PRGNAM-$VERSION
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 {} +
# "checking for long filenames" wants to create files in /usr/lib and
# /var/lib. Violates the principle of least surprise: users don't expect
# configure scripts (or SlackBuilds) to touch their system directories.
# We skip this check with an environment variable.
ac_cv_sys_long_file_names="set" \
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
--disable-static \
--build=$ARCH-slackware-linux
# Yes, the -j1's are necessary.
make -j1
make -j1 install DESTDIR=$PKG
PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
mkdir -p $PKGDOC
cp -a CHANGES COPYING README $PKGDOC
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

View file

@ -0,0 +1,10 @@
PRGNAM="td_lib"
VERSION="20230122"
HOMEPAGE="http://invisible-island.net/ded/"
DOWNLOAD="https://invisible-mirror.net/archives/ded/td_lib-20230122.tgz"
MD5SUM="bb6d9f756b77e2c5eaa1260a3f98bd0b"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
MAINTAINER="B. Watson"
EMAIL="urchlay@slackware.uk"