Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Jun 2013 10:16:32 GMT
From:      John Marino <draco@marino.st>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/179257: [PATCH] devel/cgit: several problems with recent update, fixed
Message-ID:  <201306031016.r53AGWe1009684@oldred.freebsd.org>
Resent-Message-ID: <201306031020.r53AK0fw004624@freefall.freebsd.org>

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

>Number:         179257
>Category:       ports
>Synopsis:       [PATCH] devel/cgit: several problems with recent update, fixed
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jun 03 10:20:00 UTC 2013
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:



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