summaryrefslogtreecommitdiffstats
path: root/development/astyle
diff options
context:
space:
mode:
Diffstat (limited to 'development/astyle')
-rw-r--r--development/astyle/astyle.1127
-rw-r--r--development/astyle/astyle.SlackBuild69
-rw-r--r--development/astyle/astyle.info8
-rw-r--r--development/astyle/privacy.patch48
4 files changed, 47 insertions, 205 deletions
diff --git a/development/astyle/astyle.1 b/development/astyle/astyle.1
deleted file mode 100644
index 3fa39edd8c..0000000000
--- a/development/astyle/astyle.1
+++ /dev/null
@@ -1,127 +0,0 @@
-.TH ASTYLE 1 @DATE@ @VERSION@ "SlackBuilds.org"
-.SH NAME
-astyle \- multi-language indentation and reformatting filters
-
-.SH SYNOPSIS
-.B astyle
-
-\fBastyle\fR [\fIoptions\fR] \fIFile1\fR [\fIFile2\fR] [\fI...\fR]
-
-.SH DESCRIPTION
-\fBArtistic Style\fR (or \fBastyle\fR) is a source code indenter, formatter
-and beautifier, written in C++. It handles the following programming languages:
-
-.RS
-.IP \(bu 3
-C
-.IP \(bu 3
-C++
-.IP \(bu 3
-C++/CLI
-.IP \(bu 3
-Objective-C
-.IP \(bu 3
-C#
-.IP \(bu 3
-Java
-.RE
-
-.SH USAGE
-For the full usage, please refer to the HTML documentation provided with this
-distribution in \fI/usr/doc/astyle\-@VERSION@/html/astyle.html\fR.
-
-.P
-.B astyle
-has \fImany\fR command\-line options.
-For a summary, run "\fBastyle \-\-help | less\fR".
-
-.P
-Please note that when indenting a specific file the newly indented file retains
-the original filename, while a copy of the original file is created, with a
-suffix of ".orig" added to the original filename.
-
-.SH OPTIONS
-
-Here is a brief list of options, copied from the HTML documentation. Most
-of these can appear either as command line options (with \-\- prefixed)
-or option file directives.
-
-.nf
-.eo
-
-Brace Style Options
-
- default brace style style=allman style=java style=kr
- style=stroustrup style=whitesmith style=vtk style=ratliff style=gnu
- style=linux style=horstmann style=1tbs style=google style=mozilla
- style=pico style=lisp
-
-Tab Options
-
- default indent indent=spaces indent=tab indent=force-tab
- --indent=force-tab-x
-
- Brace Modify Options
-
- attach-namespaces attach-classes attach-inlines attach-extern-c
- attach-closing-while
-
-Indentation Options
-
- indent-classes indent-modifiers indent-switches indent-cases
- indent-namespaces indent-after-parens indent-continuation
- indent-labels indent-preproc-block indent-preproc-define
- indent-preproc-cond indent-col1-comments min-conditional-indent
- max-continuation-indent
-
-Padding Options
-
- break-blocks break-blocks=all pad-oper pad-comma pad-paren
- pad-paren-out pad-first-paren-out pad-paren-in pad-header
- unpad-paren delete-empty-lines fill-empty-lines align-pointer
- align-reference
-
-Formatting Options
-
- break-closing-braces break-elseifs break-one-line-headers add-braces
- add-one-line-braces remove-braces break-return-type attach-return-type
- keep-one-line-blocks keep-one-line-statements convert-tabs
- close-templates remove-comment-prefix max-code-length
- break-after-logical mode
-
-Objective-C Options
-
- pad-method-prefix unpad-method-prefix pad-return-type
- unpad-return-type pad-param-type unpad-param-type align-method-colon
- pad-method-colon
-
-Other Options
-
- suffix suffix=none recursive dry-run exclude
- ignore-exclude-errors ignore-exclude-errors-x errors-to-stdout
- preserve-date verbose formatted quiet lineend
-
-Command Line Only
-
- options project ascii version help html html= stdin=
- stdout=
-
-.ec
-.fi
-
-.SH "SEE ALSO"
-.BR indent(1)
-
-.I http://astyle.sourceforge.net/
-.br
-.I http://www.sourceforge.net/projects/astyle/
-.br
-.I /usr/doc/astyle\-3.1/html/astyle.html
-
-.SH AUTHOR
-Artistic Style was originally written by Tal Davidson <davidsont@bigfoot.com>
-and is currently maintained by Jim Pattee <jimp03@email.com>.
-
-This stub manual page was written by Matteo Cypriani <mcy@lm7.fr>
-for the Debian project, and modified by B. Watson <urchlay@slackware.uk>
-for the SlackBuilds.org project.
diff --git a/development/astyle/astyle.SlackBuild b/development/astyle/astyle.SlackBuild
index d5ccfdf860..b903f559e0 100644
--- a/development/astyle/astyle.SlackBuild
+++ b/development/astyle/astyle.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for Artistic Style
-# Copyright 2020 B. Watson <urchlay@slackware.uk>
+# Copyright 2020-2023 B. Watson <urchlay@slackware.uk>
# Copyright 2017,2018 Nate Bargmann <email removed>
@@ -34,6 +34,17 @@
# along with this program (most likely, a file named COPYING). If
# not, see <http://www.gnu.org/licenses/>.
+# 20240313 bkw: update for v3.4.13.
+# 20231101 bkw: update for v3.4.10.
+# 20230918 bkw: update for v3.4.6, fix zsh completion.
+
+# 20230818 bkw:
+# - Update for v3.4.
+# - Upstream includes a man page now, use it instead of Debian's.
+# - Use sed instead of a patch, for privacy in the HTML files.
+# - Move the .ini files to /usr/share/astyle.
+# - Install the shell completions (new in 3.4).
+
# 20200113 bkw:
# - Take over maintenance.
# - Add man page and privacy patch, BUILD=2.
@@ -49,13 +60,11 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=astyle
-VERSION=${VERSION:-3.1}
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-3.4.13}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
-TARBALL="astyle_${VERSION}_linux.tar.gz"
-
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i586 ;;
@@ -75,16 +84,12 @@ 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
@@ -92,37 +97,49 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM
-tar xvf $CWD/$TARBALL
-cd $PRGNAM
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
+cd $PRGNAM-$VERSION
chown -R root:root .
# Don't change this back to template please. Every file in the tarball
# is +x, and *none* of them need to be.
-find -L . -type d -a -exec chmod 755 {} \+ -o \
- -type f -a -exec chmod 644 {} \+
+find -L . -type d -a -exec chmod 755 {} + -o \
+ -type f -a -exec chmod 644 {} +
DOCDIR=$PKG/usr/doc/$PRGNAM-$VERSION
-# This patch (from Debian) prevents the user's browser from trying to
-# load images from sourceforge, when viewing the *local* HTML docs in
-# a browser.
-patch -p1 < $CWD/privacy.patch
+# This prevents the user's browser from trying to load images from
+# sourceforge, when viewing the *local* HTML docs in a browser. It's
+# based on a patch from Debian.
+sed -i 's,<img[^>]*sflogo\.[^>]*>,Artistic Style on SourceForge.net,' doc/*.html
CFLAGS="$SLKCFLAGS -Wl,-s" \
CXXFLAGS="$SLKCFLAGS -Wl,-s" \
make -C build/gcc release
make -C build/gcc install prefix=$PKG/usr SYSCONF_PATH=$DOCDIR
-# Man page borrowed from Debian. It's kind of a placeholder, will
-# expand it someday.
mkdir -p $PKG/usr/man/man1
-sed -e "s|@VERSION@|$VERSION|" \
- -e "s|@DATE@|$( date +"%B %e, %Y" )|" \
- $CWD/$PRGNAM.1 | \
- gzip -9c > $PKG/usr/man/man1/$PRGNAM.1.gz
-
-cp -a *.md file $DOCDIR
+gzip -9c < man/$PRGNAM.1 > $PKG/usr/man/man1/$PRGNAM.1.gz
+
+# 20230818 bkw: this stuff used to be in the doc dir. Makes more sense
+# to keep it in /usr/share... though I'll keep a symlink in the doc dir
+# for users of the old package.
+mkdir -p $PKG/usr/share/$PRGNAM
+cp -a file/* $PKG/usr/share/$PRGNAM
+ln -s ../../share/$PRGNAM $DOCDIR/file
+
+# 20230820 bkw: upstream added shell completion support.
+# 20230918 bkw: the zsh completion is broken, fix it.
+sed -i 's,"\(mode\[\),"--\1,' sh-completion/astyle.zsh
+mkdir -p $PKG/usr/share/bash-completion/completions \
+ $PKG/usr/share/zsh/site-functions \
+ $PKG/etc/fish/completions
+install -m0644 sh-completion/astyle.bash $PKG/usr/share/bash-completion/completions/astyle
+install -m0644 sh-completion/astyle.zsh $PKG/usr/share/zsh/site-functions/_astyle
+install -m0644 sh-completion/astyle.fish $PKG/etc/fish/completions
+
+cp -a *.md $DOCDIR
sed -i 's,\r,,' $DOCDIR/file/*
cat $CWD/$PRGNAM.SlackBuild > $DOCDIR/$PRGNAM.SlackBuild
diff --git a/development/astyle/astyle.info b/development/astyle/astyle.info
index 9dad65ab0d..ba47f7c3db 100644
--- a/development/astyle/astyle.info
+++ b/development/astyle/astyle.info
@@ -1,8 +1,8 @@
PRGNAM="astyle"
-VERSION="3.1"
-HOMEPAGE="http://astyle.sourceforge.net/"
-DOWNLOAD="https://downloads.sourceforge.net/astyle/astyle_3.1_linux.tar.gz"
-MD5SUM="7712622f62661b1d8cb1062d7fedc390"
+VERSION="3.4.13"
+HOMEPAGE="https://astyle.sourceforge.net/"
+DOWNLOAD="https://downloads.sourceforge.net/project/astyle/astyle/astyle%203.4/astyle-3.4.13.tar.bz2"
+MD5SUM="963a5ec41031e78237dec4d0aa843b31"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
diff --git a/development/astyle/privacy.patch b/development/astyle/privacy.patch
deleted file mode 100644
index 6a7a930a03..0000000000
--- a/development/astyle/privacy.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-Description: Remove SourceForge logo privacy breach
-Author: Matteo Cypriani <mcy@lm7.fr>
-Forwarded: not-needed
-Last-Update: 2018-03-18
---- a/doc/astyle.html
-+++ b/doc/astyle.html
-@@ -2465,7 +2465,7 @@
-
- <p style="margin-left: -0.4in; text-align: center;">
- <a href="http://sourceforge.net/projects/astyle">
-- <img src="http://sflogo.sourceforge.net/sflogo.php?group_id=2319&type=16" alt="" />
-+ Artistic Style on SourceForge.net
- </a></p>
-
- <p>
---- a/doc/install.html
-+++ b/doc/install.html
-@@ -567,7 +567,7 @@
-
- <p style="margin-left: -0.4in; text-align: center;">
- <a href="http://sourceforge.net/projects/astyle">
-- <img src="http://sflogo.sourceforge.net/sflogo.php?group_id=2319&type=16" alt="" />
-+ Artistic Style on SourceForge.net
- </a></p>
-
- <p>
---- a/doc/news.html
-+++ b/doc/news.html
-@@ -731,7 +731,7 @@
-
- <p style="margin-left: -0.4in; text-align: center;">
- <a href="http://sourceforge.net/projects/astyle">
-- <img src="http://sflogo.sourceforge.net/sflogo.php?group_id=2319&type=16" alt="" /></a></p>
-+ Artistic Style on SourceForge.net</a></p>
-
- <p>
- &nbsp;</p>
---- a/doc/notes.html
-+++ b/doc/notes.html
-@@ -391,7 +391,7 @@
-
- <p style="margin-left: -0.4in; text-align: center;">
- <a href="http://sourceforge.net/projects/astyle">
-- <img src="http://sflogo.sourceforge.net/sflogo.php?group_id=2319&type=16" alt="" /></a></p>
-+ Artistic Style on SourceForge.net</a></p>
-
- <p>
- &nbsp;</p>