Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Dec 2013 02:47:06 +0900
From:      KATO Tsuguru <tkato432@yahoo.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/184898: devel/cccc: Support CXX/CXXFLAGS properly
Message-ID:  <20131217024706.d618c032afdafd115747675a@yahoo.com>
Resent-Message-ID: <201312161810.rBGIASas016627@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         184898
>Category:       ports
>Synopsis:       devel/cccc: Support CXX/CXXFLAGS properly
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec 16 18:10:28 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     KATO Tsuguru
>Release:        FreeBSD 8.4-RELEASE-p4 i386
>Organization:
>Environment:
>Description:
- Support CXX/CXXFLAGS properly
- Remove unnecessary BUILD_DEPENDS
- Add LICENSE

Remove file:
files/patch-makefile
files/patch-pccts_makefile

>How-To-Repeat:
>Fix:

diff -urN /usr/ports/devel/cccc/Makefile devel/cccc/Makefile
--- /usr/ports/devel/cccc/Makefile	2013-11-16 18:14:47.000000000 +0900
+++ devel/cccc/Makefile	2013-12-17 00:00:00.000000000 +0900
@@ -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 -urN /usr/ports/devel/cccc/files/patch-makefile devel/cccc/files/patch-makefile
--- /usr/ports/devel/cccc/files/patch-makefile	2013-11-06 21:51:00.000000000 +0900
+++ devel/cccc/files/patch-makefile	1970-01-01 09:00:00.000000000 +0900
@@ -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 -urN /usr/ports/devel/cccc/files/patch-pccts_makefile devel/cccc/files/patch-pccts_makefile
--- /usr/ports/devel/cccc/files/patch-pccts_makefile	2013-11-06 21:51:00.000000000 +0900
+++ devel/cccc/files/patch-pccts_makefile	1970-01-01 09:00:00.000000000 +0900
@@ -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 -urN /usr/ports/devel/cccc/pkg-descr devel/cccc/pkg-descr
--- /usr/ports/devel/cccc/pkg-descr	2013-11-06 21:51:00.000000000 +0900
+++ devel/cccc/pkg-descr	2013-12-17 00:00:00.000000000 +0900
@@ -1,6 +1,4 @@
-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.
-
-WWW: http://cccc.sourceforge.net/
+to Lines of Code and McCabe, module Fan-In and Fan-Out
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20131217024706.d618c032afdafd115747675a>