diff options
author | Daniel Jordan <daniel dot budd dot j at gmail dot com> | 2013-03-16 15:37:52 -0400 |
---|---|---|
committer | dsomero <xgizzmo@slackbuilds.org> | 2013-03-22 07:16:48 -0400 |
commit | c2a57f882ce5d2e4060356e2f272c710dfed96fe (patch) | |
tree | f3239d7f25be8bd5a3673616d3ac833bddc65780 /development/astyle | |
parent | 1828f35dd38c740ab23af91951099fce8fc3f547 (diff) |
development/astyle: Added (Artistic Style code beautifier)
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'development/astyle')
-rw-r--r-- | development/astyle/README | 5 | ||||
-rw-r--r-- | development/astyle/astyle.SlackBuild | 82 | ||||
-rw-r--r-- | development/astyle/astyle.info | 10 | ||||
-rw-r--r-- | development/astyle/slack-desc | 19 |
4 files changed, 116 insertions, 0 deletions
diff --git a/development/astyle/README b/development/astyle/README new file mode 100644 index 000000000000..2bd1e94e4b66 --- /dev/null +++ b/development/astyle/README @@ -0,0 +1,5 @@ +astyle (Artistic Style code beautifier) + +Artistic Style is a code indenter, beautifier and formatter for C, C++, C#, +and Java. It can be used from the command-line or linked into other programs. +Complete documentation is included. diff --git a/development/astyle/astyle.SlackBuild b/development/astyle/astyle.SlackBuild new file mode 100644 index 000000000000..af6fef63a289 --- /dev/null +++ b/development/astyle/astyle.SlackBuild @@ -0,0 +1,82 @@ +#!/bin/sh + +# Slackware build script for Artistic Style + +# Maintained by Daniel Jordan, daniel.budd.j@gmail.com +# - updated version number +# - added default variable options +# - auto detect ARCH +# - build and install shared libraries +# +# Originally by Dugan Chen (dugan_c@fastmail.fm) + + +PRGNAM=${PRGNAM:-astyle} +VERSION=${VERSION:-2.02.1} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +SRCPK=astyle_$VERSION\_linux.tar.gz + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -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 +tar -xzvf $CWD/$SRCPK +cd $PRGNAM +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +cd build/gcc +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +make release shared + +install -D -m0755 bin/astyle $PKG/usr/bin/astyle +install -D -m0755 bin/libastyle.so $PKG/usr/lib$LIBDIRSUFFIX/libastyle.so + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a $TMP/$PRGNAM/doc/* $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$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.tgz diff --git a/development/astyle/astyle.info b/development/astyle/astyle.info new file mode 100644 index 000000000000..aa1c831f9bab --- /dev/null +++ b/development/astyle/astyle.info @@ -0,0 +1,10 @@ +PRGNAM="astyle" +VERSION="2.02.1" +HOMEPAGE="http://astyle.sourceforge.net/" +DOWNLOAD="http://downloads.sourceforge.net/astyle/astyle_2.02.1_linux.tar.gz" +MD5SUM="3e3ef8024c175ef4e1720b7aa4c75202" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="Daniel Jordan" +EMAIL="daniel dot budd dot j at gmail dot com" diff --git a/development/astyle/slack-desc b/development/astyle/slack-desc new file mode 100644 index 000000000000..3b4a779dcc57 --- /dev/null +++ b/development/astyle/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------------------------------------------------------| +astyle: astyle (Artistic Style code beautifier) +astyle: +astyle: Artistic Style is a code indenter, beautifier and formatter for C, +astyle: C++, C# and Java. It can be used from the command-line or +astyle: linked into other programs. +astyle: +astyle: Complete documentation is included. +astyle: +astyle: Visit the Artistic Style project online: +astyle: http://astyle.sourceforge.net/ +astyle: |