Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 30 additions & 22 deletions libraries/cdk/cdk.SlackBuild
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

# Slackware build script for cdk

# Copyright 2026 Vijay Marcel
# Copyright 2010-2016 Larry Hajali <larryhaja[at]gmail[dot]com>
# All rights reserved.
#
Expand All @@ -11,6 +12,10 @@
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
Expand All @@ -25,7 +30,8 @@
cd $(dirname $0) ; CWD=$(pwd)

PRGNAM=cdk
VERSION=${VERSION:-5.0_20160131}
VERSION=${VERSION:-5.0_20260119}
SRCVER=${SRCVER:-5.0-20260119}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
Expand All @@ -38,9 +44,6 @@ if [ -z "$ARCH" ]; then
esac
fi

# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
# the name of the created package would be, and then exit. This information
# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
Expand All @@ -50,68 +53,73 @@ 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"
if [ "$ARCH" = "i586" -o "$ARCH" = "i686" ]; then
SLKCFLAGS="-march=$ARCH -mtune=i686 -pipe -O2 -fPIC"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
SLKCFLAGS="-march=x86-64 -mtune=generic -pipe -O2 -fPIC"
LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
echo "This SlackBuild will not run on $ARCH" && exit 1
fi

set -e
trap 'echo "$0 FAILED at line $LINENO!" | tee $OUTPUT/error-${PRGNAM}.log' ERR

rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-${VERSION/_/-}
tar xvf $CWD/$PRGNAM-${VERSION/_/-}.tgz
cd $PRGNAM-${VERSION/_/-}
rm -rf $PRGNAM-${SRCVER}
tar xvf $CWD/$PRGNAM-${SRCVER}.tgz
cd $PRGNAM-${SRCVER}
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 \
-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 {} \;
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+

mkdir -pv $PKG/usr/doc/$PRGNAM-$VERSION

CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--mandir=/usr/man \
--enable-pc-files \
--with-ncursesw \
--with-x \
--with-Xaw3d \
--with-Xaw3dxft \
--enable-const \
--with-libtool \
--with-shared \
--build=$ARCH-slackware-linux
--build=$ARCH-slackware-linux \
--host=$ARCH-slackware-linux \
--target=$ARCH-slackware-linux

make
make install DESTDIR=$PKG DOCUMENT_DIR=$PKG/usr/doc/$PRGNAM-$VERSION

rm -vf $PKG/usr/lib${LIBDIRSUFFIX}/*.la

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
| cut -f 1 -d : | xargs strip --strip-unneeded --remove-section=.comment --remove-section=.note 2> /dev/null || true

find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done

# Fix permissions on the dynamic library files.
ABI_VERSION=$($PKG/usr/bin/${PRGNAM}5-config --abi-version)
mv -v $PKG/usr/lib${LIBDIRSUFFIX}/.libs/libcdkw.so.${ABI_VERSION} $PKG/usr/lib${LIBDIRSUFFIX}/libcdkw.so.${ABI_VERSION}
chmod 0755 $PKG/usr/lib${LIBDIRSUFFIX}/libcdkw.so.${ABI_VERSION}
rm -rvf $PKG/usr/lib${LIBDIRSUFFIX}/.libs

cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild

rm -f $PKG/usr/lib*/*.la

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
/sbin/makepkg -l y -c n --remove-rpaths --remove-tmp-rpaths $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
10 changes: 5 additions & 5 deletions libraries/cdk/cdk.info
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
PRGNAM="cdk"
VERSION="5.0_20160131"
VERSION="5.0_20260119"
HOMEPAGE="http://invisible-island.net/cdk/"
DOWNLOAD="http://ponce.cc/slackware/sources/repo/cdk-5.0-20160131.tgz"
MD5SUM="3a519980fd3c5d04ecfc82259586d7c4"
DOWNLOAD="https://invisible-island.net/archives/cdk/cdk-5.0-20260119.tgz"
MD5SUM="fdbb671bec6f620218ae5a1562c0d063"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
MAINTAINER="orphaned - no maintainer"
EMAIL="NOEMAIL"
MAINTAINER="Vijay Marcel"
EMAIL="vijaymarcel@outlook.com"