From 2cf5b33f06810ec513cda7596db978b27ac56e71 Mon Sep 17 00:00:00 2001 From: hubertf Date: Thu, 15 Mar 2001 13:06:40 +0000 Subject: Add astyle-1.13.6.1: 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, suddently 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. Submitted in PR 12402 by Thomas Runge --- textproc/astyle/Makefile | 24 ++++++++++++++++++++++++ textproc/astyle/files/md5 | 3 +++ textproc/astyle/files/patch-sum | 3 +++ textproc/astyle/patches/patch-aa | 24 ++++++++++++++++++++++++ textproc/astyle/pkg/DESCR | 22 ++++++++++++++++++++++ textproc/astyle/pkg/PLIST | 6 ++++++ 6 files changed, 82 insertions(+) create mode 100644 textproc/astyle/Makefile create mode 100644 textproc/astyle/files/md5 create mode 100644 textproc/astyle/files/patch-sum create mode 100644 textproc/astyle/patches/patch-aa create mode 100644 textproc/astyle/pkg/DESCR create mode 100644 textproc/astyle/pkg/PLIST (limited to 'textproc') diff --git a/textproc/astyle/Makefile b/textproc/astyle/Makefile new file mode 100644 index 00000000000..b7974216642 --- /dev/null +++ b/textproc/astyle/Makefile @@ -0,0 +1,24 @@ +# $NetBSD: Makefile,v 1.1.1.1 2001/03/15 13:06:40 hubertf Exp $ +# + +DISTNAME= astyle_1.13.6.1 +PKGNAME= astyle-1.13.6.1 +CATEGORIES= textproc +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=astyle/} +EXTRACT_SUFX= .zip + +MAINTAINER= packages@netbsd.org +HOMEPAGE= http://astyle.sourceforge.net/ +COMMENT= reindenter and reformatter of C++, C and Java source code + +HTMLDIR= ${PREFIX}/share/doc/html/astyle + +post-extract: + ${MV} -f ${WRKSRC}/makefile ${WRKSRC}/Makefile + +post-install: + ${INSTALL_DATA_DIR} ${HTMLDIR} + cd ${WRKSRC}; ${INSTALL_DATA} astyle.html astyle_release_notes.html\ + license.html ${HTMLDIR} + +.include "../../mk/bsd.pkg.mk" diff --git a/textproc/astyle/files/md5 b/textproc/astyle/files/md5 new file mode 100644 index 00000000000..96380ebae97 --- /dev/null +++ b/textproc/astyle/files/md5 @@ -0,0 +1,3 @@ +$NetBSD: md5,v 1.1.1.1 2001/03/15 13:06:40 hubertf Exp $ + +SHA1 (astyle_1.13.6.1.zip) = 4e0172fe30986d68c61b4a7c1638a1fc42ea0675 diff --git a/textproc/astyle/files/patch-sum b/textproc/astyle/files/patch-sum new file mode 100644 index 00000000000..fa471ff4fdc --- /dev/null +++ b/textproc/astyle/files/patch-sum @@ -0,0 +1,3 @@ +$NetBSD: patch-sum,v 1.1.1.1 2001/03/15 13:06:40 hubertf Exp $ + +SHA1 (patch-aa) = 963338c21b5015fd7a5284a57419557026ee8093 diff --git a/textproc/astyle/patches/patch-aa b/textproc/astyle/patches/patch-aa new file mode 100644 index 00000000000..98398f137ec --- /dev/null +++ b/textproc/astyle/patches/patch-aa @@ -0,0 +1,24 @@ +$NetBSD: patch-aa,v 1.1.1.1 2001/03/15 13:06:40 hubertf Exp $ + +--- Makefile.orig Fri Feb 11 12:02:10 2000 ++++ Makefile Tue Mar 13 14:58:01 2001 +@@ -1,7 +1,12 @@ + # "Artistic Style" Makefile + + CPPFLAGS = -Wall -Wno-sign-compare -O2 +-OBJS = ASResource.o ASBeautifier.o ASFormatter.o astyle_main.o ++OBJS = asresource.o asbeautifier.o asformatter.o astyle_main.o ++ ++all: astyle ++ ++install: ++ install -s -c astyle ${LOCALBASE}/bin/ + + astyle: $(OBJS) + g++ $(CPPFLAGS) -o astyle $(OBJS) +@@ -11,4 +16,4 @@ + .SUFFIXES: .cpp .c .o + + clean: +- rm *.o ++ rm *.o astyle diff --git a/textproc/astyle/pkg/DESCR b/textproc/astyle/pkg/DESCR new file mode 100644 index 00000000000..ad4bb342019 --- /dev/null +++ b/textproc/astyle/pkg/DESCR @@ -0,0 +1,22 @@ +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, suddently 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. diff --git a/textproc/astyle/pkg/PLIST b/textproc/astyle/pkg/PLIST new file mode 100644 index 00000000000..df8ebb2a54f --- /dev/null +++ b/textproc/astyle/pkg/PLIST @@ -0,0 +1,6 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2001/03/15 13:06:40 hubertf Exp $ +bin/astyle +share/doc/html/astyle/astyle.html +share/doc/html/astyle/astyle_release_notes.html +share/doc/html/astyle/license.html +@dirrm share/doc/html/astyle -- cgit v1.2.3