development/astyle: Updated for version 3.4.

Signed-off-by: B. Watson <urchlay@slackware.uk>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
B. Watson 2023-08-18 01:09:41 -04:00 committed by Willy Sudiarto Raharjo
parent ad7400c78c
commit b3a3b09e68
No known key found for this signature in database
GPG key ID: 3F617144D7238786
4 changed files with 41 additions and 199 deletions

View file

@ -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.

View file

@ -34,6 +34,13 @@
# along with this program (most likely, a file named COPYING). If
# not, see <http://www.gnu.org/licenses/>.
# 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 +56,11 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=astyle
VERSION=${VERSION:-3.1}
BUILD=${BUILD:-2}
VERSION=${VERSION:-3.4}
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 ;;
@ -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
gzip -9c < man/$PRGNAM.1 > $PKG/usr/man/man1/$PRGNAM.1.gz
cp -a *.md file $DOCDIR
# 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.
# The zsh completion is broken, apparently (doesn't work for me), but
# I don't know (or care) enough about zsh to fix it. Patches welcome.
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

View file

@ -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"
HOMEPAGE="https://astyle.sourceforge.net/"
DOWNLOAD="https://downloads.sourceforge.net/project/astyle/astyle/astyle%203.4/astyle-3.4.tar.bz2"
MD5SUM="65a0a003969603c59629db74a208bb1e"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""

View file

@ -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>