aboutsummaryrefslogtreecommitdiff
path: root/development/bcpp
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2023-03-12 07:19:50 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2023-03-12 07:19:50 +0700
commit7a804b8134dfec27f083e03955f688312c469c4c (patch)
treea722e710bd92e6da2398c7323ad745fc8c8cd436 /development/bcpp
parentb2cdbf956a90a8423d377ef772eb6a6f2ee09f5c (diff)
development/bcpp: Added (indent C/C++ source).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development/bcpp')
-rw-r--r--development/bcpp/README12
-rw-r--r--development/bcpp/bcpp.SlackBuild89
-rw-r--r--development/bcpp/bcpp.info10
-rw-r--r--development/bcpp/slack-desc19
4 files changed, 130 insertions, 0 deletions
diff --git a/development/bcpp/README b/development/bcpp/README
new file mode 100644
index 000000000000..c66f74c86b22
--- /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 000000000000..0200d0d84b54
--- /dev/null
+++ b/development/bcpp/bcpp.SlackBuild
@@ -0,0 +1,89 @@
+#!/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.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=bcpp
+VERSION=${VERSION:-20230130}
+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 000000000000..8977b3b40ba6
--- /dev/null
+++ b/development/bcpp/bcpp.info
@@ -0,0 +1,10 @@
+PRGNAM="bcpp"
+VERSION="20230130"
+HOMEPAGE="https://invisible-island.net/bcpp/bcpp.html"
+DOWNLOAD="https://invisible-island.net/archives/bcpp/bcpp-20230130.tgz"
+MD5SUM="da9ba740760c3d15c54c8fb2e8d21a9e"
+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 000000000000..39039539ad5a
--- /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: