diff options
author | B. Watson <urchlay@slackware.uk> | 2023-08-18 01:09:41 -0400 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2023-08-26 19:07:11 +0700 |
commit | b3a3b09e68fb017e297f16f7c49a19c48e949196 (patch) | |
tree | 4441d00209a08c2541a4401731ba3598b162fbbf /development | |
parent | ad7400c78c2e74d2bfc40d2b5f4e7bf79de40d5d (diff) |
development/astyle: Updated for version 3.4.
Signed-off-by: B. Watson <urchlay@slackware.uk>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development')
-rw-r--r-- | development/astyle/astyle.1 | 127 | ||||
-rw-r--r-- | development/astyle/astyle.SlackBuild | 59 | ||||
-rw-r--r-- | development/astyle/astyle.info | 8 | ||||
-rw-r--r-- | development/astyle/privacy.patch | 48 |
4 files changed, 42 insertions, 200 deletions
diff --git a/development/astyle/astyle.1 b/development/astyle/astyle.1 deleted file mode 100644 index 3fa39edd8cb77..0000000000000 --- 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 d5ccfdf8609d4..4a4f2d269a79c 100644 --- a/development/astyle/astyle.SlackBuild +++ b/development/astyle/astyle.SlackBuild @@ -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 - -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. +# 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 diff --git a/development/astyle/astyle.info b/development/astyle/astyle.info index 9dad65ab0d2c3..cc2ad663fc227 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" +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="" diff --git a/development/astyle/privacy.patch b/development/astyle/privacy.patch deleted file mode 100644 index 6a7a930a038aa..0000000000000 --- 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> - </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> - </p> |