From nobody@FreeBSD.org  Mon Jun  3 10:16:34 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115])
	by hub.freebsd.org (Postfix) with ESMTP id E04CA979
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  3 Jun 2013 10:16:34 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121])
	by mx1.freebsd.org (Postfix) with ESMTP id C12FC11B5
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  3 Jun 2013 10:16:34 +0000 (UTC)
Received: from oldred.freebsd.org ([127.0.1.6])
	by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r53AGXEN009695
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 3 Jun 2013 10:16:33 GMT
	(envelope-from nobody@oldred.freebsd.org)
Received: (from nobody@localhost)
	by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r53AGWe1009684;
	Mon, 3 Jun 2013 10:16:32 GMT
	(envelope-from nobody)
Message-Id: <201306031016.r53AGWe1009684@oldred.freebsd.org>
Date: Mon, 3 Jun 2013 10:16:32 GMT
From: John Marino <draco@marino.st>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [PATCH] devel/cgit: several problems with recent update, fixed
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         179257
>Category:       ports
>Synopsis:       [PATCH] devel/cgit: several problems with recent update, fixed
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bapt
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jun 03 10:20:00 UTC 2013
>Closed-Date:    Mon Jun 03 10:49:12 UTC 2013
>Last-Modified:  Mon Jun  3 10:50:00 UTC 2013
>Originator:     John Marino
>Release:        
>Organization:
>Environment:
>Description:
There are a number of issues with the recent update of cgit.

1) the CFLAGS are overridden in the git makefile
2) The LDFLAGS are overridden in the git makefile
3) gettext is required for libintl, but not specified
4) the LDFLAGS aren't complete (missing both -liconv and -lintl) - affects dragonfly and modern binutils
5) due to shebang fix, an errant markdown.pl.bak file was being installed
6) The plist had two dirrm directory entries that did not exist (missing "filters")
7) The port had a few files that were being installed but weren't on plist
8) The pkg-plist wasn't in alphabetical order
9) the bad dirrm entries on pkg-plist had trailing slashes (not sure if this is problem or not)

Fix attached -- this is what dports uses to resolve all these issues.

This did not pass DEVELOPER_MODE=1 on pkg, btw.  some of these errors could have been caught with that.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

--- Makefile.orig	2013-06-03 09:23:52.000000000 +0000
+++ Makefile
@@ -19,14 +19,14 @@ PROJECTHOST=	git-core
 GIT_VERSION=	1.8.2.3
 USE_BZIP2=	yes
 USE_GMAKE=	yes
-USES=		iconv shebangfix
+USES=		iconv shebangfix gettext
 SHEBANG_FILES=	filters/html-converters/resources/markdown.pl
 USE_GMAKE=	yes
 USE_OPENSSL=	yes
 CFLAGS+=	-I${LOCALBASE}/include
 MAKE_ARGS+=	CGIT_SCRIPT_PATH=${WWWDIR} \
 		CGIT_CONFIG=${PREFIX}/etc/cgitrc
-LDFLAGS+=	-L${LOCALBASE}/lib
+LDFLAGS+=	-L${LOCALBASE}/lib -liconv -lintl
 MAKE_JOBS_SAFE=	yes
 
 SUB_FILES=	pkg-message
@@ -40,9 +40,11 @@ post-extract:
 	@${MV} ${WRKDIR}/git-${GIT_VERSION} ${WRKSRC}/git
 
 post-patch:
-	@${REINPLACE_CMD} -e '/^CC =/d' ${WRKSRC}/git/Makefile
+	@${REINPLACE_CMD} -e '/^CC =/d' -e '/^CFLAGS =/d' \
+		-e '/^LDFLAGS =/d' ${WRKSRC}/git/Makefile
 	@${REINPLACE_CMD} -e 's,/usr,${PREFIX},g' \
 		-e 's,-Igit,-I.,g' ${WRKSRC}/Makefile
+	@cd ${WRKSRC}; ${RM} ${SHEBANG_FILES}.bak
 
 post-install:
 	@${MKDIR} /var/cache/${PORTNAME}
--- pkg-plist.orig	2013-06-03 09:23:52.000000000 +0000
+++ pkg-plist
@@ -3,18 +3,18 @@
 %%WWWDIR%%/cgit.png
 %%PORTDOCS%%%%DOCSDIR%%/cgitrc.5.txt
 %%PORTDOCS%%@dirrm %%DOCSDIR%%
+lib/cgit/filters/about-formatting.sh
 lib/cgit/filters/commit-links.sh
-lib/cgit/filters/syntax-highlighting.sh
-lib/cgit/filters/html-converters/resources/markdown.pl
-lib/cgit/filters/html-converters/resources/rst-template.txt
 lib/cgit/filters/html-converters/man2html
 lib/cgit/filters/html-converters/md2html
+lib/cgit/filters/html-converters/resources/markdown.pl
+lib/cgit/filters/html-converters/resources/rst-template.txt
 lib/cgit/filters/html-converters/rst2html
 lib/cgit/filters/html-converters/txt2html
 lib/cgit/filters/syntax-highlighting.py
-lib/cgit/filters/about-formatting.sh
-@dirrm lib/cgit/html-converters/resources/
-@dirrm lib/cgit/html-converters/
+lib/cgit/filters/syntax-highlighting.sh
+@dirrm lib/cgit/filters/html-converters/resources
+@dirrm lib/cgit/filters/html-converters
 @dirrm lib/cgit/filters
 @dirrm lib/cgit
 @dirrm %%WWWDIR%%


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->bapt 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Mon Jun 3 10:20:13 UTC 2013 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=179257 
State-Changed-From-To: open->closed 
State-Changed-By: bapt 
State-Changed-When: Mon Jun 3 10:49:12 UTC 2013 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=179257 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/179257: commit references a PR
Date: Mon,  3 Jun 2013 10:49:22 +0000 (UTC)

 Author: bapt
 Date: Mon Jun  3 10:49:00 2013
 New Revision: 319767
 URL: http://svnweb.freebsd.org/changeset/ports/319767
 
 Log:
   Make bundle git respect CFLAGS/LDFLAGS
   Alway build the bundle git without gettext
   fix plist
   sort plist
   
   PR:		ports/179257
   Submitted by:	John Marino <draco@marino.st>
 
 Modified:
   head/devel/cgit/Makefile
   head/devel/cgit/pkg-plist
 
 Modified: head/devel/cgit/Makefile
 ==============================================================================
 --- head/devel/cgit/Makefile	Mon Jun  3 10:34:44 2013	(r319766)
 +++ head/devel/cgit/Makefile	Mon Jun  3 10:49:00 2013	(r319767)
 @@ -3,7 +3,7 @@
  
  PORTNAME=	cgit
  PORTVERSION=	0.9.2
 -PORTREVISION=	1
 +PORTREVISION=	2
  CATEGORIES=	devel www
  MASTER_SITES=	http://git.zx2c4.com/cgit/snapshot/:cgit \
  		GOOGLE_CODE:git
 @@ -23,7 +23,7 @@ USES=		iconv shebangfix
  SHEBANG_FILES=	filters/html-converters/resources/markdown.pl
  USE_GMAKE=	yes
  USE_OPENSSL=	yes
 -CFLAGS+=	-I${LOCALBASE}/include
 +CFLAGS+=	-I${LOCALBASE}/include -DNO_GETTEXT=1
  MAKE_ARGS+=	CGIT_SCRIPT_PATH=${WWWDIR} \
  		CGIT_CONFIG=${PREFIX}/etc/cgitrc
  LDFLAGS+=	-L${LOCALBASE}/lib
 @@ -40,7 +40,9 @@ post-extract:
  	@${MV} ${WRKDIR}/git-${GIT_VERSION} ${WRKSRC}/git
  
  post-patch:
 -	@${REINPLACE_CMD} -e '/^CC =/d' ${WRKSRC}/git/Makefile
 +	@${REINPLACE_CMD} -e '/^CC =/d' -e '/^CFLAGS =/d' \
 +		-e '/^LDFLAGS =/d' ${WRKSRC}/git/Makefile \
 +		${WRKSRC}/git/Makefile
  	@${REINPLACE_CMD} -e 's,/usr,${PREFIX},g' \
  		-e 's,-Igit,-I.,g' ${WRKSRC}/Makefile
  
 
 Modified: head/devel/cgit/pkg-plist
 ==============================================================================
 --- head/devel/cgit/pkg-plist	Mon Jun  3 10:34:44 2013	(r319766)
 +++ head/devel/cgit/pkg-plist	Mon Jun  3 10:49:00 2013	(r319767)
 @@ -3,21 +3,22 @@
  %%WWWDIR%%/cgit.png
  %%PORTDOCS%%%%DOCSDIR%%/cgitrc.5.txt
  %%PORTDOCS%%@dirrm %%DOCSDIR%%
 +lib/cgit/filters/about-formatting.sh
  lib/cgit/filters/commit-links.sh
 -lib/cgit/filters/syntax-highlighting.sh
 -lib/cgit/filters/html-converters/resources/markdown.pl
 -lib/cgit/filters/html-converters/resources/rst-template.txt
  lib/cgit/filters/html-converters/man2html
  lib/cgit/filters/html-converters/md2html
 +lib/cgit/filters/html-converters/resources/markdown.pl
 +lib/cgit/filters/html-converters/resources/rst-template.txt
  lib/cgit/filters/html-converters/rst2html
  lib/cgit/filters/html-converters/txt2html
  lib/cgit/filters/syntax-highlighting.py
 +lib/cgit/filters/syntax-highlighting.sh
  lib/cgit/filters/about-formatting.sh
 -@dirrm lib/cgit/html-converters/resources/
 -@dirrm lib/cgit/html-converters/
 +@dirrm lib/cgit/filters/html-converters/resources/
 +@dirrm lib/cgit/filters/html-converters/
  @dirrm lib/cgit/filters
  @dirrm lib/cgit
  @dirrm %%WWWDIR%%
  @exec mkdir -p /var/cache/%%PORTNAME%%
  @dirrmtry /var/cache/%%PORTNAME%%
 -@dirrmtry /var/cache/
 +@dirrmtry /var/cache
 _______________________________________________
 svn-ports-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-ports-all
 To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
 
>Unformatted:
