Bug 179599 - [patch] Fix build for devel/cgit on systems with WITHOUT_NLS
Summary: [patch] Fix build for devel/cgit on systems with WITHOUT_NLS
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-15 22:10 UTC by Kevin Zheng
Modified: 2013-06-17 00:20 UTC (History)
0 users

See Also:


Attachments
file.diff (645 bytes, patch)
2013-06-15 22:10 UTC, Kevin Zheng
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Zheng 2013-06-15 22:10:01 UTC
I'm one of those few people who set WITHOUT_NLS (or its modern equivalent) because I simply never use NLS anyways. Unfortunately this means that I run in to a lot of problems with ports that want gettext around anyways.

When "WITHOUT_NLS=yes" is set in 'make.conf', gettext is not installed in my Poudriere cleanroom build. On normal systems, gettext is usually there, and on Redports, NLS is always built. Hence, this issue isn't usually reported until some poor guy like me comes along.

Basically, I can fix the build for me by adding "USES+= gettext" in the port Makefile. Because I am greedy and selfish, I'll do this until I can find a better fix that doesn't require us use something we don't want.

Also, take maintainership because I use this port.

Fix: Apply the attached patch.

Patch attached with submission follows:
How-To-Repeat: Set up a poudriere with "WITHOUT_NLS=yes" set and build cgit. It won't build.
Comment 1 dfilter service freebsd_committer freebsd_triage 2013-06-17 00:14:49 UTC
Author: antoine
Date: Sun Jun 16 23:14:41 2013
New Revision: 321081
URL: http://svnweb.freebsd.org/changeset/ports/321081

Log:
  - Fix build WITHOUT_NLS, NO_GETTEXT must be passed to make
  - Fix plist with pkg_install
  - Pass maintainership to reporter
  
  PR:		ports/179599
  Reported by:	Kevin Zheng

Modified:
  head/devel/cgit/Makefile
  head/devel/cgit/pkg-plist

Modified: head/devel/cgit/Makefile
==============================================================================
--- head/devel/cgit/Makefile	Sun Jun 16 22:42:53 2013	(r321080)
+++ head/devel/cgit/Makefile	Sun Jun 16 23:14:41 2013	(r321081)
@@ -3,15 +3,15 @@
 
 PORTNAME=	cgit
 PORTVERSION=	0.9.2
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	devel www
 MASTER_SITES=	http://git.zx2c4.com/cgit/snapshot/:cgit \
 		GOOGLE_CODE:git
 DISTFILES=	cgit-${PORTVERSION}${EXTRACT_SUFX}:cgit \
 		git-${GIT_VERSION}.tar.gz:git
 
-MAINTAINER=	ports@FreeBSD.org
-COMMENT=	Fast webinterface for git
+MAINTAINER=	kevinz5000@gmail.com
+COMMENT=	Fast web frontend for Git repositories
 
 LICENSE=	GPLv2
 
@@ -23,15 +23,15 @@ USES=		iconv shebangfix
 SHEBANG_FILES=	filters/html-converters/resources/markdown.pl
 USE_GMAKE=	yes
 USE_OPENSSL=	yes
-CFLAGS+=	-I${LOCALBASE}/include -DNO_GETTEXT=1
+CFLAGS+=	-I${LOCALBASE}/include
 MAKE_ARGS+=	CGIT_SCRIPT_PATH=${WWWDIR} \
-		CGIT_CONFIG=${PREFIX}/etc/cgitrc
+		CGIT_CONFIG=${PREFIX}/etc/cgitrc NO_GETTEXT=1
 LDFLAGS+=	-L${LOCALBASE}/lib
 MAKE_JOBS_SAFE=	yes
 
 SUB_FILES=	pkg-message
 SUB_LIST+=	PORTNAME=${PORTNAME}
-PLIST_SUB+=	PORTNAME=${PORTNAME}
+PLIST_SUB+=	PORTNAME=${PORTNAME} WWWOWN=${WWWOWN} WWWGRP=${WWWGRP}
 
 .include <bsd.port.options.mk>
 

Modified: head/devel/cgit/pkg-plist
==============================================================================
--- head/devel/cgit/pkg-plist	Sun Jun 16 22:42:53 2013	(r321080)
+++ head/devel/cgit/pkg-plist	Sun Jun 16 23:14:41 2013	(r321081)
@@ -13,12 +13,11 @@ lib/cgit/filters/html-converters/rst2htm
 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/filters/html-converters/resources/
-@dirrm lib/cgit/filters/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
+@exec chown %%WWWOWN%%:%%WWWGRP%% /var/cache/%%PORTNAME%%
+@unexec rmdir /var/cache/%%PORTNAME%% 2>/dev/null || true
_______________________________________________
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"
Comment 2 Antoine Brodin freebsd_committer freebsd_triage 2013-06-17 00:17:07 UTC
State Changed
From-To: open->closed

The problem has been fixed, thanks for the report!