aboutsummaryrefslogtreecommitdiff
path: root/devel/cccc/Makefile
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/Makefile
parent270ddb684b1544fc93fd0b94bf296e25145752a0 (diff)
downloadports-f1d41d9a0cae59cb061c112eac21ffb9d7751500.tar.gz
ports-f1d41d9a0cae59cb061c112eac21ffb9d7751500.zip
- Respect CXX/CXXFLAGS (fixes build with clang)
- Remove unnecessary BUILD_DEPENDS - Add LICENSE PR: ports/184898 Submitted by: KATO Tsuguru <tkato432@yahoo.com>
Notes
Notes: svn path=/head/; revision=337352
Diffstat (limited to 'devel/cccc/Makefile')
-rw-r--r--devel/cccc/Makefile29
1 files changed, 23 insertions, 6 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>