summaryrefslogtreecommitdiffstats
path: root/development/bcpp
diff options
context:
space:
mode:
Diffstat (limited to 'development/bcpp')
-rw-r--r--development/bcpp/README12
-rw-r--r--development/bcpp/bcpp.SlackBuild91
-rw-r--r--development/bcpp/bcpp.info10
-rw-r--r--development/bcpp/slack-desc19
4 files changed, 132 insertions, 0 deletions
diff --git a/development/bcpp/README b/development/bcpp/README
new file mode 100644
index 0000000000..c66f74c86b
--- /dev/null
+++ b/development/bcpp/README
@@ -0,0 +1,12 @@
+bcpp (C/C++ source beautifier)
+
+bcpp indents C/C++ source programs, replacing tabs with spaces or the
+reverse. Unlike indent, it does (by design) not attempt to wrap long
+statements. It supports quite a few options to control the output; see
+the man page for details.
+
+Note that bcpp looks in the current directory for bcpp.cfg, by default
+(there is no system-wide config file in /etc). Two sample config files
+are installed in the documentation directory. These can be used with
+the -fnc option, and should be used as templates for creating your own
+project-specific config files.
diff --git a/development/bcpp/bcpp.SlackBuild b/development/bcpp/bcpp.SlackBuild
new file mode 100644
index 0000000000..967c55ad32
--- /dev/null
+++ b/development/bcpp/bcpp.SlackBuild
@@ -0,0 +1,91 @@
+#!/bin/bash
+
+# Slackware build script for bcpp
+
+# Written by B. Watson (urchlay@slackware.uk)
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+# 20240312 bkw: update for v20240111.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=bcpp
+VERSION=${VERSION:-20240111}
+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 {} \+
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --disable-static \
+ --build=$ARCH-slackware-linux
+
+make
+make install DESTDIR=$PKG
+strip $PKG/usr/bin/$PRGNAM
+gzip -9 $PKG/usr/man/*/*
+
+# stuff in txtdocs/: hirachy.txt documents internals, for hacking
+# bcpp's code (not needed in a SBo package), and manual.txt is just
+# a preformatted copy of the man page. wpdocs/ are the same, in
+# WordPerfect 5.1 format (do not package).
+PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $PKGDOC
+cp -a CHANGES COPYING README *.cfg $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
diff --git a/development/bcpp/bcpp.info b/development/bcpp/bcpp.info
new file mode 100644
index 0000000000..7a3dca246c
--- /dev/null
+++ b/development/bcpp/bcpp.info
@@ -0,0 +1,10 @@
+PRGNAM="bcpp"
+VERSION="20240111"
+HOMEPAGE="https://invisible-island.net/bcpp/bcpp.html"
+DOWNLOAD="https://invisible-island.net/archives/bcpp/bcpp-20240111.tgz"
+MD5SUM="151d44c39c0573c8da58196f4caf2b84"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="B. Watson"
+EMAIL="urchlay@slackware.uk"
diff --git a/development/bcpp/slack-desc b/development/bcpp/slack-desc
new file mode 100644
index 0000000000..39039539ad
--- /dev/null
+++ b/development/bcpp/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------------------------------------------------------|
+bcpp: bcpp (indent C/C++ source)
+bcpp:
+bcpp: bcpp indents C/C++ source programs, replacing tabs with spaces or the
+bcpp: reverse. Unlike indent, it does (by design) not attempt to wrap long
+bcpp: statements.
+bcpp:
+bcpp:
+bcpp:
+bcpp:
+bcpp:
+bcpp: