diff options
author | Karl Trygve Kalleberg <karltk@gentoo.org> | 2004-03-28 18:04:06 +0000 |
---|---|---|
committer | Karl Trygve Kalleberg <karltk@gentoo.org> | 2004-03-28 18:04:06 +0000 |
commit | d83c77ae4050e5f046a0b6234c4ae5a654046d59 (patch) | |
tree | 67347b5e87b7e103e2452a717e3322ce87971d22 /dev-util/astyle | |
parent | fixed for gtk2.4 (#45510) (Manifest recommit) (diff) | |
download | gentoo-2-d83c77ae4050e5f046a0b6234c4ae5a654046d59.tar.gz gentoo-2-d83c77ae4050e5f046a0b6234c4ae5a654046d59.tar.bz2 gentoo-2-d83c77ae4050e5f046a0b6234c4ae5a654046d59.zip |
Fixes #43091
Diffstat (limited to 'dev-util/astyle')
-rw-r--r-- | dev-util/astyle/ChangeLog | 35 | ||||
-rw-r--r-- | dev-util/astyle/astyle-1.15.3-r1.ebuild | 32 | ||||
-rw-r--r-- | dev-util/astyle/astyle-1.15.3.ebuild | 7 | ||||
-rw-r--r-- | dev-util/astyle/files/cmd-line-fix.diff | 139 | ||||
-rw-r--r-- | dev-util/astyle/files/digest-astyle-1.15.3-r1 | 1 | ||||
-rw-r--r-- | dev-util/astyle/metadata.xml | 38 |
6 files changed, 224 insertions, 28 deletions
diff --git a/dev-util/astyle/ChangeLog b/dev-util/astyle/ChangeLog index 88fa214969cb..78be742997df 100644 --- a/dev-util/astyle/ChangeLog +++ b/dev-util/astyle/ChangeLog @@ -1,36 +1,17 @@ # ChangeLog for dev-util/astyle # Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-util/astyle/ChangeLog,v 1.5 2003/07/12 13:23:07 aliz Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-util/astyle/ChangeLog,v 1.6 2004/03/28 18:04:06 karltk Exp $ + +*astyle-1.15.3-r1 28 Mar 2004 + + 28 Mar 2004; Karl Trygve Kalleberg <karltk@gentoo.org> + Added patch to fix --force-indent-tab, see #43091, thanks to + Luca Santarelli <hrk@users.sourceforge.net>. 06 Dec 2002; Rodney Rees <manson@gentoo.org> : changed sparc ~sparc keywords *astyle-1.15.3 (24 Apr 2002) 24 Apr 2002; Karl Trygve Kalleberg <karltk@gentoo.org> astyle-1.15.3.ebuild files/digest/astyle-1.15.3 : - - Artistic Style is a reindenter and reformatter of C++, C and Java source - code. - - When indenting source code, we as programmers have a tendency to use both - spaces and tab characters to create the wanted indentation. Moreover, some - editors by default insert spaces instead of tabs when pressing the tab key, - and other editors (Emacs for example) have the ability to "pretty up" lines - by automatically setting up the white space before the code on the line, - possibly inserting spaces in a code that up to now used only tabs for - indentation. - - Since the NUMBER of space characters showed on screen for each tab character - in the source code changes between editors (until the user sets up the - number to his liking...), one of the standard problems facing programmers - when moving from one source code editor to another is that code containing - both spaces and tabs that was up to now perfectly indented, suddenly becomes - a mess to look at when changing to another editor. Even if you as a - programmer take care to ONLY use spaces or tabs, looking at other peoples - source code can still be problematic. - - To address this problem I have created Artistic Style - a series of filters, - written in C++, that automatically reindent & reformat C/C++/Java source - files. These can be used from a command line, or it can be incorporated as - classes in another C++ program. + Initial import. Ebuild submitted by <eyez@infinite.fsw.leidenuniv.nl>. - Ebuild submitted by <eyez@infinite.fsw.leidenuniv.nl>. diff --git a/dev-util/astyle/astyle-1.15.3-r1.ebuild b/dev-util/astyle/astyle-1.15.3-r1.ebuild new file mode 100644 index 000000000000..fa17316a2ae7 --- /dev/null +++ b/dev-util/astyle/astyle-1.15.3-r1.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2004 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-util/astyle/astyle-1.15.3-r1.ebuild,v 1.1 2004/03/28 18:04:06 karltk Exp $ + +ZIP="astyle_${PV}.zip" +S=${WORKDIR} +DESCRIPTION="Artistic Style is a reindenter and reformatter of C++, C and Java +source code." +SRC_URI="mirror://sourceforge/astyle/${ZIP}" +HOMEPAGE="http://astyle.sourceforge.net" + +SLOT="0" +LICENSE="Artistic | GPL-2" +KEYWORDS="x86 sparc " + +DEPEND=">=app-arch/unzip-5.42" + +src_unpack() { + unpack ${A} + epatch ${FILESDIR}/cmd-line-fix.diff +} + +src_compile() { + emake || die +} + +src_install () { + into /usr + dobin astyle + dohtml astyle.html astyle_release_notes.html license.html + dodoc INSTALL.TXT +} diff --git a/dev-util/astyle/astyle-1.15.3.ebuild b/dev-util/astyle/astyle-1.15.3.ebuild index 7453e9aa6b42..15d651ecc98c 100644 --- a/dev-util/astyle/astyle-1.15.3.ebuild +++ b/dev-util/astyle/astyle-1.15.3.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-util/astyle/astyle-1.15.3.ebuild,v 1.9 2004/03/13 01:49:45 mr_bones_ Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-util/astyle/astyle-1.15.3.ebuild,v 1.10 2004/03/28 18:04:06 karltk Exp $ ZIP="astyle_${PV}.zip" S=${WORKDIR} @@ -15,6 +15,11 @@ KEYWORDS="x86 sparc " DEPEND=">=app-arch/unzip-5.42" +src_unpack() { + unpack ${A} + epatch ${FILESDIR}/cmd-line-fix.diff +} + src_compile() { emake || die } diff --git a/dev-util/astyle/files/cmd-line-fix.diff b/dev-util/astyle/files/cmd-line-fix.diff new file mode 100644 index 000000000000..353dfa8d4108 --- /dev/null +++ b/dev-util/astyle/files/cmd-line-fix.diff @@ -0,0 +1,139 @@ +--- astyle_main.cpp 2002-03-07 08:22:30.000000000 +0100 ++++ /root/astyle_main.cpp.fixed 2004-02-25 22:05:13.841700600 +0100 +@@ -267,22 +267,22 @@ + { + manuallySetJavaStyle(formatter); + } +- else if ( IS_OPTIONS(arg, "t", "indent=tab=") )
+- {
+- int spaceNum = 4;
+- string spaceNumParam = GET_PARAMS(arg, "t", "indent=tab=");
+- if (spaceNumParam.length() > 0)
+- spaceNum = atoi(spaceNumParam.c_str());
+- formatter.setTabIndentation(spaceNum, false);
+- }
+- else if ( IS_OPTIONS(arg, "T", "force-indent=tab=") )
+- {
+- int spaceNum = 4;
+- string spaceNumParam = GET_PARAMS(arg, "T", "force-indent=tab=");
+- if (spaceNumParam.length() > 0)
+- spaceNum = atoi(spaceNumParam.c_str());
+- formatter.setTabIndentation(spaceNum, true);
+- }
++ else if ( IS_PARAM_OPTIONS(arg, "t", "indent=tab=") ) ++ { ++ int spaceNum = 4; ++ string spaceNumParam = GET_PARAMS(arg, "t", "indent=tab="); ++ if (spaceNumParam.length() > 0) ++ spaceNum = atoi(spaceNumParam.c_str()); ++ formatter.setTabIndentation(spaceNum, false); ++ } ++ else if ( IS_PARAM_OPTIONS(arg, "T", "force-indent=tab=") ) ++ { ++ int spaceNum = 4; ++ string spaceNumParam = GET_PARAMS(arg, "T", "force-indent=tab="); ++ if (spaceNumParam.length() > 0) ++ spaceNum = atoi(spaceNumParam.c_str()); ++ formatter.setTabIndentation(spaceNum, true); ++ } + else if ( IS_PARAM_OPTION(arg, "indent=tab") ) + { + formatter.setTabIndentation(4); +@@ -343,10 +343,10 @@ + { + formatter.setLabelIndent(true); + } +- else if ( IS_OPTION(arg, "brackets=break-closing-headers") )
+- {
+- formatter.setBreakClosingHeaderBracketsMode(true);
+- }
++ else if ( IS_OPTION(arg, "brackets=break-closing-headers") ) ++ { ++ formatter.setBreakClosingHeaderBracketsMode(true); ++ } + else if ( IS_OPTIONS(arg, "b", "brackets=break") ) + { + formatter.setBracketFormatMode(BREAK_MODE); +@@ -400,10 +400,10 @@ + else if (IS_OPTION(arg, "break-blocks")) + { + formatter.setBreakBlocksMode(true); +- }
+- else if (IS_OPTION(arg, "break-elseifs"))
+- {
+- formatter.setBreakElseIfsMode(true);
++ } ++ else if (IS_OPTION(arg, "break-elseifs")) ++ { ++ formatter.setBreakElseIfsMode(true); + } + else if ( IS_OPTIONS(arg, "X", "errors-to-standard-output") ) + { +@@ -528,20 +528,20 @@ + (*_err) << " -j OR --mode=java\n"; + (*_err) << " Indent a Java(TM) source file\n"; + (*_err) << endl; +- (*_err) << " -s OR -s# OR --indent=spaces=#\n";
+- (*_err) << " Indent using # spaces per indent. Not specifying #\n" ;
+- (*_err) << " will result in a default of 4 spacec per indent.\n" ;
+- (*_err) << endl;
++ (*_err) << " -s OR -s# OR --indent=spaces=#\n"; ++ (*_err) << " Indent using # spaces per indent. Not specifying #\n" ; ++ (*_err) << " will result in a default of 4 spacec per indent.\n" ; ++ (*_err) << endl; + (*_err) << " -t OR -t# OR --indent=tab=#\n"; + (*_err) << " Indent using tab characters, assuming that each\n"; + (*_err) << " tab is # spaces long. Not specifying # will result\n"; + (*_err) << " in a default assumption of 4 spaces per tab.\n" ; +- (*_err) << endl;
+- (*_err) << " -T# OR --force-indent=tab=#";
+- (*_err) << " Indent using tab characters, assuming that each\n";
+- (*_err) << " tab is # spaces long. Force tabs to be used in areas\n";
+- (*_err) << " Astyle would prefer to use spaces.\n" ;
+- (*_err) << endl;
++ (*_err) << endl; ++ (*_err) << " -T# OR --force-indent=tab=#"; ++ (*_err) << " Indent using tab characters, assuming that each\n"; ++ (*_err) << " tab is # spaces long. Force tabs to be used in areas\n"; ++ (*_err) << " Astyle would prefer to use spaces.\n" ; ++ (*_err) << endl; + (*_err) << " -C OR --indent-classes\n"; + (*_err) << " Indent 'class' blocks, so that the inner 'public:',\n"; + (*_err) << " 'protected:' and 'private: headers are indented in\n"; +@@ -596,10 +596,10 @@ + (*_err) << " Break definition-block brackets and attach command-block\n"; + (*_err) << " brackets.\n"; + (*_err) << endl; +- (*_err) << " --brackets=break-closing-headers\n";
+- (*_err) << " Break brackets before closing headers (e.g. 'else', 'catch', ..).\n";
+- (*_err) << " Should be appended to --brackets=attach or --brackets=linux.\n";
+- (*_err) << endl;
++ (*_err) << " --brackets=break-closing-headers\n"; ++ (*_err) << " Break brackets before closing headers (e.g. 'else', 'catch', ..).\n"; ++ (*_err) << " Should be appended to --brackets=attach or --brackets=linux.\n"; ++ (*_err) << endl; + (*_err) << " -o OR --one-line=keep-statements\n"; + (*_err) << " Don't break lines containing multiple statements into\n"; + (*_err) << " multiple single-statement lines.\n"; +@@ -626,9 +626,9 @@ + (*_err) << " Like --break-blocks, except also insert empty lines \n"; + (*_err) << " around closing headers (e.g. 'else', 'catch', ...).\n"; + (*_err) << endl; +- (*_err) << " --break-elseifs\n";
+- (*_err) << " Break 'else if()' statements into two different lines.\n";
+- (*_err) << endl;
++ (*_err) << " --break-elseifs\n"; ++ (*_err) << " Break 'else if()' statements into two different lines.\n"; ++ (*_err) << endl; + (*_err) << "Other options:\n"; + (*_err) << "-------------\n"; + (*_err) << " --suffix=####\n"; +@@ -762,7 +762,7 @@ + + if (shouldPrintHelp) + { +- printHelp();
++ printHelp(); + exit(1); + } + diff --git a/dev-util/astyle/files/digest-astyle-1.15.3-r1 b/dev-util/astyle/files/digest-astyle-1.15.3-r1 new file mode 100644 index 000000000000..ec517fbb7f79 --- /dev/null +++ b/dev-util/astyle/files/digest-astyle-1.15.3-r1 @@ -0,0 +1 @@ +MD5 4d8adbcd8703aea00fcd2670be090ddd astyle_1.15.3.zip 60880 diff --git a/dev-util/astyle/metadata.xml b/dev-util/astyle/metadata.xml new file mode 100644 index 000000000000..a7ec0b429790 --- /dev/null +++ b/dev-util/astyle/metadata.xml @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>no-herd</herd> +<maintainer> + <email>karltk@gentoo.org</email> + <description>Temporary maintainer, looking for replacements</description> +</maintainer> + +<longdescription> + From the web page: + + Artistic Style is a reindenter and reformatter of C++, C and Java source + code. + + When indenting source code, we as programmers have a tendency to use both + spaces and tab characters to create the wanted indentation. Moreover, some + editors by default insert spaces instead of tabs when pressing the tab key, + and other editors (Emacs for example) have the ability to "pretty up" lines + by automatically setting up the white space before the code on the line, + possibly inserting spaces in a code that up to now used only tabs for + indentation. + + Since the NUMBER of space characters showed on screen for each tab character + in the source code changes between editors (until the user sets up the + number to his liking...), one of the standard problems facing programmers + when moving from one source code editor to another is that code containing + both spaces and tabs that was up to now perfectly indented, suddenly becomes + a mess to look at when changing to another editor. Even if you as a + programmer take care to ONLY use spaces or tabs, looking at other peoples + source code can still be problematic. + + To address this problem I have created Artistic Style - a series of filters, + written in C++, that automatically reindent & reformat C/C++/Java source + files. These can be used from a command line, or it can be incorporated as + classes in another C++ program. +</longdescription> +</pkgmetadata> |