ports/146605: [patch] devel/git make python dep optional, make /etc/shells modification optional

Alex Kozlov spam at rm-rf.kiev.ua
Sat May 15 02:40:05 UTC 2010


>Number:         146605
>Category:       ports
>Synopsis:       [patch] devel/git make python dep optional, make /etc/shells modification optional
>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:   Sat May 15 02:40:05 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Alex Kozlov
>Release:        RELENG_8
>Organization:
private
>Environment:
>Description:
-make python depemdemcy optional, it's only used in p4 and contrib scripts
-make /etc/shells modification optional.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

Index: devel/git/Makefile
@@ -173,9 +173,7 @@
 USE_BZIP2=	yes
 GNU_CONFIGURE=	yes
 USE_GMAKE=	yes
-USE_PYTHON=	yes
 CFLAGS+=	-I${LOCALBASE}/include -L${LOCALBASE}/lib
-CONFIGURE_ARGS+=	--with-python=${LOCALBASE}/bin/python
 MAKE_ENV+=	LIBMD_SHA1=yes \
 		V=1
 MAKE_ARGS+=	prefix="${PREFIX}"
@@ -183,8 +181,6 @@
 USE_RC_SUBR=	git_daemon
 WANT_PERL=	yes
 
-SHELLS=		/etc/shells
-
 OPTIONS=	GUI "Enable building of GUI tools" off \
 		SVN "Enable required dependencies for SVN tools" off \
 		GITWEB "Install gitweb" off \
@@ -194,10 +190,19 @@
 		HTMLDOCS "Install additional documentation" off \
 		PERL "Build perl based git tools" on \
 		ICONV "Support for multiple character encodings" on \
-		CURL "Support HTTP push and pull" on
+		CURL "Support HTTP push and pull" on \
+		ETCSHELLS "Modify /etc/shells" on
 
 .include <bsd.port.options.mk>
 
+.ifdef (WITH_P4) || defined (WITH_CONTRIB)
+USE_PYTHON=	yes
+CONFIGURE_ARGS+=	--with-python=${LOCALBASE}/bin/python
+.else
+CONFIGURE_ARGS+=	--without-python
+PLIST_SUB+=	PYTHON_SITELIBDIR="@comment "
+.endif
+
 .ifdef (WITH_PERL)
 USE_PERL5=	yes
 MAKE_ENV+=	PERL_PATH=${PERL}
@@ -297,6 +302,13 @@
 RMMAN7+=	gitcvs-migration.7
 .endif
 
+.ifdef (WITH_ETCSHELLS)
+SHELLS=		/etc/shells
+PLIST_SUB+=	ETCSHELLS=""
+.else
+PLIST_SUB+=	ETCSHELLS="@comment "
+.endif
+
 .if defined(MAINTAINER_MODE)
 DISTFILES+=	${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX}.sign \
 		${PORTNAME}-manpages-${PORTVERSION}${EXTRACT_SUFX}.sign
@@ -386,11 +398,13 @@
 	${INSTALL_SCRIPT} ${WRKSRC}/contrib/p4import/git-p4import ${PREFIX}/bin/
 	${INSTALL_SCRIPT} ${WRKSRC}/contrib/fast-import/git-p4 ${PREFIX}/bin/
 .endif
+.ifdef (WITH_ETCSHELLS)
 	@${ECHO_MSG} "===> Updating ${SHELLS}"
 	@${CP} ${SHELLS} ${SHELLS}.bak
 	@(${GREP} -v ${PREFIX}/libexec/git-core/git-shell ${SHELLS}.bak; \
 	  ${ECHO_CMD} ${PREFIX}/libexec/git-core/git-shell) > ${SHELLS}
 	@${RM} ${SHELLS}.bak
+.endif
 .ifdef (WITH_GITWEB) || defined (WITH_CONTRIB)
 	@${CAT} ${PKGMESSAGE}
 .endif
Index: devel/git/pkg-plist
@@ -140,8 +140,8 @@
 libexec/git-core/git-sh-setup
 libexec/git-core/git-shell
 libexec/git-core/git-stage
- at exec echo "Updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak; echo %D/%F) >/etc/shells; rm -f /etc/shells.bak
- at unexec echo "Updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak) >/etc/shells; rm -f /etc/shells.bak
+%%ETCSHELLS%%@exec echo "Updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak; echo %D/%F) >/etc/shells; rm -f /etc/shells.bak
+%%ETCSHELLS%%@unexec echo "Updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak) >/etc/shells; rm -f /etc/shells.bak
 libexec/git-core/git-shortlog
 libexec/git-core/git-show
 libexec/git-core/git-show-branch
@@ -882,5 +882,5 @@
 %%CONTRIB%%@dirrm share/git-core/contrib/workdir
 %%CONTRIB%%@dirrm share/git-core/contrib
 @dirrm share/git-core
- at dirrm %%PYTHON_SITELIBDIR%%/git_remote_helpers/git
- at dirrm %%PYTHON_SITELIBDIR%%/git_remote_helpers
+ at dirrmtry %%PYTHON_SITELIBDIR%%/git_remote_helpers/git
+ at dirrmtry %%PYTHON_SITELIBDIR%%/git_remote_helpers


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list