devel/astyle: Respect CXX for Clang
- Convert to options target helper - Update pkg-descr - Take maintainership
This commit is contained in:
parent
fa61b7123e
commit
5997ddbef8
3 changed files with 42 additions and 8 deletions
|
@ -4,10 +4,10 @@ PORTNAME= astyle
|
||||||
PORTVERSION= 3.1
|
PORTVERSION= 3.1
|
||||||
PORTREVISION= 3
|
PORTREVISION= 3
|
||||||
CATEGORIES= devel textproc
|
CATEGORIES= devel textproc
|
||||||
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}%20${PORTVERSION}
|
MASTER_SITES= SF/astyle/astyle/astyle%20${PORTVERSION}
|
||||||
DISTNAME= ${PORTNAME}_${PORTVERSION}_linux
|
DISTNAME= ${PORTNAME}_${PORTVERSION}_linux
|
||||||
|
|
||||||
MAINTAINER= ports@FreeBSD.org
|
MAINTAINER= sunpoet@FreeBSD.org
|
||||||
COMMENT= Source code indenter and formatter for C, C++, C\#, and Java
|
COMMENT= Source code indenter and formatter for C, C++, C\#, and Java
|
||||||
|
|
||||||
LICENSE= MIT
|
LICENSE= MIT
|
||||||
|
@ -16,19 +16,23 @@ LICENSE_FILE= ${WRKDIR}/astyle/LICENSE.md
|
||||||
USES= compiler:c++11-lang dos2unix gmake
|
USES= compiler:c++11-lang dos2unix gmake
|
||||||
|
|
||||||
ALL_TARGET= astyle
|
ALL_TARGET= astyle
|
||||||
DOS2UNIX_GLOB= *.ini
|
|
||||||
WRKSRC= ${WRKDIR}/astyle/build/${CHOSEN_COMPILER_TYPE}
|
WRKSRC= ${WRKDIR}/astyle/build/${CHOSEN_COMPILER_TYPE}
|
||||||
|
|
||||||
|
DOS2UNIX_GLOB= *.ini
|
||||||
|
|
||||||
OPTIONS_DEFINE= DOCS EXAMPLES
|
OPTIONS_DEFINE= DOCS EXAMPLES
|
||||||
|
|
||||||
do-configure:
|
post-patch:
|
||||||
@${REINPLACE_CMD} -e "s:%%CXX%%:${CXX}:" \
|
@${REINPLACE_CMD} -e 's|%%CXX%%|${CXX}|' ${WRKSRC}/${MAKEFILE}
|
||||||
${WRKSRC}/${MAKEFILE}
|
|
||||||
|
|
||||||
do-install:
|
do-install:
|
||||||
${INSTALL_PROGRAM} ${WRKSRC}/bin/astyle ${STAGEDIR}${PREFIX}/bin
|
${INSTALL_PROGRAM} ${WRKSRC}/bin/astyle ${STAGEDIR}${PREFIX}/bin
|
||||||
|
|
||||||
|
do-install-DOCS-on:
|
||||||
${MKDIR} ${STAGEDIR}${DOCSDIR}
|
${MKDIR} ${STAGEDIR}${DOCSDIR}
|
||||||
${INSTALL_DATA} ${WRKDIR}/astyle/doc/* ${STAGEDIR}${DOCSDIR}
|
${INSTALL_DATA} ${WRKDIR}/astyle/doc/* ${STAGEDIR}${DOCSDIR}
|
||||||
|
|
||||||
|
do-install-EXAMPLES-on:
|
||||||
${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
|
${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
|
||||||
${INSTALL_DATA} ${WRKDIR}/astyle/file/* ${STAGEDIR}${EXAMPLESDIR}
|
${INSTALL_DATA} ${WRKDIR}/astyle/file/* ${STAGEDIR}${EXAMPLESDIR}
|
||||||
|
|
||||||
|
|
11
devel/astyle/files/patch-build_clang_Makefile
Normal file
11
devel/astyle/files/patch-build_clang_Makefile
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
--- ../../build/clang/Makefile.orig 2018-01-11 17:18:18 UTC
|
||||||
|
+++ ../../build/clang/Makefile
|
||||||
|
@@ -37,7 +37,7 @@ objdir = obj
|
||||||
|
ipath=$(prefix)/bin
|
||||||
|
CBASEFLAGS = -Wall -Wextra -fno-rtti -fno-exceptions -std=c++11
|
||||||
|
JAVAINCS = -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux
|
||||||
|
-CXX = clang++
|
||||||
|
+CXX = %%CXX%%
|
||||||
|
INSTALL=install -o $(USER) -g $(USER)
|
||||||
|
|
||||||
|
# Library's major version number -- Increment in case of incompatible API
|
|
@ -1,5 +1,24 @@
|
||||||
Artistic Style is a source code indenter, formatter, and beautifier for the C,
|
Artistic Style is a source code indenter, formatter, and beautifier for the C,
|
||||||
C++, C# and Java programming languages. It automatically re-indents and
|
C++, C++/CLI, Objective-C, C# and Java programming languages.
|
||||||
re-formats source files and can be used from a command line.
|
|
||||||
|
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. 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 code that up to now used only tabs for indentation.
|
||||||
|
|
||||||
|
The NUMBER of spaces for each tab character in the source code can change
|
||||||
|
between editors (unless the user sets up the number to his liking...). One of
|
||||||
|
the standard problems programmers face when moving from one editor to another is
|
||||||
|
that code containing both spaces and tabs, which was perfectly indented,
|
||||||
|
suddenly becomes a mess to look at. Even if you as a programmer take care to
|
||||||
|
ONLY use spaces or tabs, looking at other people's source code can still be
|
||||||
|
problematic.
|
||||||
|
|
||||||
|
To address this problem, Artistic Style was created -- a filter written in C++
|
||||||
|
that automatically re-indents and re-formats C / C++ / Objective-C / C++/CLI / C#
|
||||||
|
/ Java source files. It can be used from a command line, or it can be
|
||||||
|
incorporated as a library in another program.
|
||||||
|
|
||||||
WWW: http://astyle.sourceforge.net/
|
WWW: http://astyle.sourceforge.net/
|
||||||
|
|
Loading…
Reference in a new issue