From owner-freebsd-ports-bugs@FreeBSD.ORG Mon Oct 26 17:40:02 2009 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4DB5A106568B for ; Mon, 26 Oct 2009 17:40:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id B70718FC15 for ; Mon, 26 Oct 2009 17:40:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n9QHe1LL087836 for ; Mon, 26 Oct 2009 17:40:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n9QHe1kS087835; Mon, 26 Oct 2009 17:40:01 GMT (envelope-from gnats) Resent-Date: Mon, 26 Oct 2009 17:40:01 GMT Resent-Message-Id: <200910261740.n9QHe1kS087835@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Stef Walter Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 65AA4106566C for ; Mon, 26 Oct 2009 17:37:36 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 542A18FC16 for ; Mon, 26 Oct 2009 17:37:36 +0000 (UTC) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n9QHbZTr003884 for ; Mon, 26 Oct 2009 17:37:35 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id n9QHbZk8003883; Mon, 26 Oct 2009 17:37:35 GMT (envelope-from nobody) Message-Id: <200910261737.n9QHbZk8003883@www.freebsd.org> Date: Mon, 26 Oct 2009 17:37:35 GMT From: Stef Walter To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/139993: [patch] Make git dependencies optional. X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2009 17:40:02 -0000 >Number: 139993 >Category: ports >Synopsis: [patch] Make git dependencies optional. >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 Oct 26 17:40:01 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Stef Walter >Release: 7.2-RELEASE >Organization: >Environment: FreeBSD dev-test2.ws.local 7.2-RELEASE-p4 FreeBSD 7.2-RELEASE-p4 #2: Sat Oct 3 02:36:12 UTC 2009 root@dev-test2.ws.local:/usr/obj/usr/src/sys/DEVTEST2 amd64 >Description: When using git as a deployment mechanism, I'd like to be able to have minimal dependencies installed on the production system. The git developers have made git so every dependency is optional. This patch adds options to the port, so that with 'make config' you can choose to not install any dependencies. The following options were added: PERL "Build perl based git tools" on \ ICONV "Support for multiple character encodings" on \ CURL "Support HTTP push and pull" on \ The options default to the previous state of affairs, so ports users will by default get a git that works exactly like before. Thanks in advance for considering this patch. Please let me know if additional changes are necessary. I'd love to help you get this into FreeBSD ports. Some points about the patch: * When git is built without perl support, stubs are installed for all perl dependent commands, so the packaging does not change greatly with or without perl. * When git is built without curl support, three commands are not installed. Packaging changes slightly. * When git is built without curl support, the expat dependency is no longer needed. * When git is built without iconv support, nothing changes in the packaging. And obviously UTF-8 support is still present. >How-To-Repeat: >Fix: Patch attached with submission follows: --- ./Makefile.orig 2009-10-26 17:01:23.000000000 +0000 +++ ./Makefile 2009-10-26 17:17:18.000000000 +0000 @@ -20,11 +20,4 @@ COMMENT= Distributed source code management tool -BUILD_DEPENDS= curl:${PORTSDIR}/ftp/curl \ - ${SITE_PERL}/Error.pm:${PORTSDIR}/lang/p5-Error -RUN_DEPENDS= curl:${PORTSDIR}/ftp/curl \ - ${SITE_PERL}/Error.pm:${PORTSDIR}/lang/p5-Error \ - ${SITE_PERL}/Net/SMTP/SSL.pm:${PORTSDIR}/mail/p5-Net-SMTP-SSL -LIB_DEPENDS= expat.6:${PORTSDIR}/textproc/expat2 - MAKE_JOBS_SAFE= yes @@ -154,5 +147,4 @@ git-whatchanged.1 \ git-write-tree.1 -MAN3= Git.3 MAN5= gitattributes.5 \ githooks.5 \ @@ -171,14 +163,7 @@ USE_BZIP2= yes -USE_PERL5= yes -USE_ICONV= yes USE_GMAKE= yes CFLAGS+= -I${LOCALBASE}/include -L${LOCALBASE}/lib -MAKE_ENV+= CURLDIR=${LOCALBASE} \ - NEEDS_LIBICONV=yes \ - OLD_ICONV=yes \ - PERL_PATH=${PERL} \ - LIBMD_SHA1=yes \ - ICONVDIR=${LOCALBASAE} \ +MAKE_ENV+= LIBMD_SHA1=yes \ V=1 MAKE_ARGS+= prefix="${PREFIX}" @@ -188,5 +173,8 @@ SHELLS= /etc/shells -OPTIONS= GUI "Enable building of GUI tools" off \ +OPTIONS= PERL "Build perl based git tools" on \ + ICONV "Support for multiple character encodings" on \ + CURL "Support HTTP push and pull" on \ + GUI "Enable building of GUI tools" off \ SVN "Enable required dependencies for SVN tools" off \ GITWEB "Install gitweb" off \ @@ -197,4 +185,37 @@ .include +.ifdef (WITH_PERL) +USE_PERL5= yes +MAKE_ENV+= PERL_PATH=${PERL} +BUILD_DEPENDS+= ${SITE_PERL}/Error.pm:${PORTSDIR}/lang/p5-Error +RUN_DEPENDS+= ${SITE_PERL}/Error.pm:${PORTSDIR}/lang/p5-Error \ + ${SITE_PERL}/Net/SMTP/SSL.pm:${PORTSDIR}/mail/p5-Net-SMTP-SSL +MAN3= Git.3 +.else +MAKE_ENV+= NO_PERL=1 +PLIST_SUB+= SITE_PERL="@comment " +.endif + +.ifdef (WITH_ICONV) +USE_ICONV= yes +MAKE_ENV+= NEEDS_LIBICONV=yes \ + OLD_ICONV=yes \ + ICONVDIR=${LOCALBASE} +.else +MAKE_ENV+= NO_ICONV=1 +.endif + +.ifdef (WITH_CURL) +MAKE_ENV+= CURLDIR=${LOCALBASE} +BUILD_DEPENDS+= curl:${PORTSDIR}/ftp/curl +RUN_DEPENDS+= curl:${PORTSDIR}/ftp/curl +LIB_DEPENDS+= expat.6:${PORTSDIR}/textproc/expat2 +PLIST_SUB+= CURL="" +.else +MAKE_ENV+= NO_CURL=1 \ + NO_EXPAT=1 +PLIST_SUB+= CURL="@comment " +.endif + .ifdef (WITH_HTMLDOCS) RUN_DEPENDS+= ${LOCALBASE}/bin/asciidoc:${PORTSDIR}/textproc/asciidoc \ --- ./pkg-plist.orig 2009-10-26 17:17:24.000000000 +0000 +++ ./pkg-plist 2009-10-26 17:22:50.000000000 +0000 @@ -63,6 +63,6 @@ libexec/git-core/git-hash-object libexec/git-core/git-help -libexec/git-core/git-http-fetch -libexec/git-core/git-http-push +%%CURL%%libexec/git-core/git-http-fetch +%%CURL%%libexec/git-core/git-http-push libexec/git-core/git-imap-send libexec/git-core/git-index-pack @@ -112,5 +112,5 @@ libexec/git-core/git-relink libexec/git-core/git-remote -libexec/git-core/git-remote-curl +%%CURL%%libexec/git-core/git-remote-curl libexec/git-core/git-repack libexec/git-core/git-repo-config @@ -738,5 +738,5 @@ %%HTMLDOCS%%@dirrm %%DOCSDIR%% @dirrm libexec/git-core -@dirrm share/git-core/templates/branches +@dirrmtry share/git-core/templates/branches @dirrmtry share/git-core/templates/hooks @dirrm share/git-core/templates/info >Release-Note: >Audit-Trail: >Unformatted: