aboutsummaryrefslogtreecommitdiff
path: root/devel/cccc
diff options
context:
space:
mode:
authorPawel Pekala <pawel@FreeBSD.org>2013-12-24 13:26:57 +0000
committerPawel Pekala <pawel@FreeBSD.org>2013-12-24 13:26:57 +0000
commitf1d41d9a0cae59cb061c112eac21ffb9d7751500 (patch)
tree19cd85c4eacbbfa64eeaa09d625d37cd973db9a1 /devel/cccc
parent270ddb684b1544fc93fd0b94bf296e25145752a0 (diff)
downloadports-f1d41d9a0cae59cb061c112eac21ffb9d7751500.tar.gz
ports-f1d41d9a0cae59cb061c112eac21ffb9d7751500.zip
Notes
Diffstat (limited to 'devel/cccc')
-rw-r--r--devel/cccc/Makefile29
-rw-r--r--devel/cccc/files/patch-makefile25
-rw-r--r--devel/cccc/files/patch-pccts_makefile23
-rw-r--r--devel/cccc/pkg-descr4
4 files changed, 25 insertions, 56 deletions
diff --git a/devel/cccc/Makefile b/devel/cccc/Makefile
index 1e5b1f001ffc..68e8a05a1f05 100644
--- a/devel/cccc/Makefile
+++ b/devel/cccc/Makefile
@@ -3,28 +3,45 @@
PORTNAME= cccc
PORTVERSION= 3.1.4
+PORTREVISION= 1
CATEGORIES= devel textproc www
MASTER_SITES= SF
MAINTAINER= ports@FreeBSD.org
COMMENT= C and C++ Code Counter
-BUILD_DEPENDS= antlr:${PORTSDIR}/devel/pccts \
- dlg:${PORTSDIR}/devel/pccts
+LICENSE= GPLv2 # (or later)
USES= gmake
MAKEFILE= makefile
+MAKE_ENV= CCC="${CXX}" LD="${CXX}" CFLAGS_DEBUG="${CXXFLAGS}"
MAKE_JOBS_UNSAFE= yes
-MAKE_ARGS= CCC="${CXX}"
PORTDOCS= readme.txt changes.txt
PLIST_FILES= bin/cccc
+post-patch:
+ @${REINPLACE_CMD} -e \
+ '/^all/s|install|| ; \
+ s| make| $$(MAKE)| ; \
+ s|su root -c|| ; \
+ s|"make|"$$(MAKE)|' ${WRKSRC}/makefile
+ @${REINPLACE_CMD} -e \
+ 's|^CCC=|CCC?=| ; \
+ s|^LD=|LD?=|' ${WRKSRC}/cccc/posixgcc.mak
+ @${REINPLACE_CMD} -e \
+ 's| make| $$(MAKE)|' ${WRKSRC}/pccts/makefile
+.for i in antlr dlg
+ @${REINPLACE_CMD} -e \
+ 's|^CC=|CC?=| ; \
+ s|^CFLAGS= -O |CFLAGS +=|' ${WRKSRC}/pccts/${i}/makefile
+.endfor
+
do-install:
- @${INSTALL_PROGRAM} ${WRKSRC}/cccc/cccc ${STAGEDIR}${PREFIX}/bin
+ (cd ${WRKSRC}/cccc && ${INSTALL_PROGRAM} cccc ${STAGEDIR}${PREFIX}/bin)
@${MKDIR} ${STAGEDIR}${DOCSDIR}
-.for f in ${PORTDOCS}
- @${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR}
+.for i in ${PORTDOCS}
+ (cd ${WRKSRC} && ${INSTALL_DATA} ${i} ${STAGEDIR}${DOCSDIR})
.endfor
.include <bsd.port.mk>
diff --git a/devel/cccc/files/patch-makefile b/devel/cccc/files/patch-makefile
deleted file mode 100644
index 1b339190112a..000000000000
--- a/devel/cccc/files/patch-makefile
+++ /dev/null
@@ -1,25 +0,0 @@
---- ./makefile.orig 2001-04-25 18:30:29.000000000 +0200
-+++ ./makefile 2011-07-01 03:41:44.000000000 +0200
-@@ -8,17 +8,17 @@
-
- .PHONY : pccts cccc test install
-
--all : pccts cccc test install
-+all : pccts cccc test
-
- pccts :
-- cd pccts ; make
-+ cd pccts ; gmake
-
- cccc :
-- cd cccc ; make -f posixgcc.mak
-+ cd cccc ; gmake -f posixgcc.mak
-
- test :
-- cd test ; make -f posix.mak
-+ cd test ; gmake -f posix.mak
-
- install :
-- cd install ; su root -c "make -f install.mak"
-+ cd install ; gmake -f install.mak
-
diff --git a/devel/cccc/files/patch-pccts_makefile b/devel/cccc/files/patch-pccts_makefile
deleted file mode 100644
index c57645ec4570..000000000000
--- a/devel/cccc/files/patch-pccts_makefile
+++ /dev/null
@@ -1,23 +0,0 @@
---- pccts/makefile.orig Mon Sep 4 21:13:16 2006
-+++ pccts/makefile Mon Sep 4 21:13:28 2006
-@@ -41,16 +41,16 @@
- #
- if [ ! -d $(BINDIR) ] ; then mkdir $(BINDIR) ; fi
- echo Making executables...
-- (cd antlr; make -s)
-+ (cd antlr; gmake -s)
- echo antlr executable now in $(BINDIR)
-- (cd dlg; make -s)
-+ (cd dlg; gmake -s)
- echo dlg executable now in $(BINDIR)
- echo
- echo " PCCTS 1.33MR20 installation complete"
-
- clean:
-- (cd antlr; make -s clean)
-- (cd dlg; make -s clean)
-+ (cd antlr; gmake -s clean)
-+ (cd dlg; gmake -s clean)
-
-
- manpages:
diff --git a/devel/cccc/pkg-descr b/devel/cccc/pkg-descr
index fe87be5ca680..b5319b33ff84 100644
--- a/devel/cccc/pkg-descr
+++ b/devel/cccc/pkg-descr
@@ -1,6 +1,6 @@
-Source code metric analyser for C, C++ and Java.
+Source code metric analyser for C, C++, Java and Ada
Presents a report in HTML with figures for
Lines of Code, McCabes Complexity, Ratio of Comments
-to Lines of Code and McCabe, module Fan-In and Fan-Out.
+to Lines of Code and McCabe, module Fan-In and Fan-Out
WWW: http://cccc.sourceforge.net/