diff options
author | 2008-03-24 00:05:02 +0000 | |
---|---|---|
committer | 2008-03-24 00:05:02 +0000 | |
commit | 66276f5fff131508ad26afa73378fb6265496b71 (patch) | |
tree | cd5a802b6b54f21ff92c9d34bf92ea6478b704fc /dev-util/git | |
parent | Add gnome-base/gvfs to GNOME-2.22 mask (diff) | |
download | historical-66276f5fff131508ad26afa73378fb6265496b71.tar.gz historical-66276f5fff131508ad26afa73378fb6265496b71.tar.bz2 historical-66276f5fff131508ad26afa73378fb6265496b71.zip |
Per bug 214168, some users are really picky about wanting a Perl-free Git. This new revision makes that a possibility, and now also introduces most of the dependancies that were only previously stated in the pkg_postinst phase. The following arch keywords have been dropped per bug 214464 until the arches can keyword the dependancies: arm, ia64, s390, sh.
Package-Manager: portage-2.1.4.4
Diffstat (limited to 'dev-util/git')
-rw-r--r-- | dev-util/git/ChangeLog | 12 | ||||
-rw-r--r-- | dev-util/git/Manifest | 14 | ||||
-rw-r--r-- | dev-util/git/files/20080322-git-1.5.5.4-noperl.patch | 335 | ||||
-rw-r--r-- | dev-util/git/git-1.5.4.4-r1.ebuild | 270 |
4 files changed, 619 insertions, 12 deletions
diff --git a/dev-util/git/ChangeLog b/dev-util/git/ChangeLog index 3790c5b2cb1d..b8c63e156e35 100644 --- a/dev-util/git/ChangeLog +++ b/dev-util/git/ChangeLog @@ -1,6 +1,16 @@ # ChangeLog for dev-util/git # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-util/git/ChangeLog,v 1.262 2008/03/20 19:59:38 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-util/git/ChangeLog,v 1.263 2008/03/24 00:05:01 robbat2 Exp $ + +*git-1.5.4.4-r1 (24 Mar 2008) + + 24 Mar 2008; Robin H. Johnson <robbat2@gentoo.org> + +files/20080322-git-1.5.5.4-noperl.patch, +git-1.5.4.4-r1.ebuild: + Per bug 214168, some users are really picky about wanting a Perl-free Git. + This new revision makes that a possibility, and now also introduces most + of the dependancies that were only previously stated in the pkg_postinst + phase. The following arch keywords have been dropped per bug 214464 until + the arches can keyword the dependancies: arm, ia64, s390, sh. 20 Mar 2008; Mike Frysinger <vapier@gentoo.org> git-1.5.4.4.ebuild: Add support for USE=xinetd #213014. diff --git a/dev-util/git/Manifest b/dev-util/git/Manifest index 0f1febb8f957..f5f00d8413c5 100644 --- a/dev-util/git/Manifest +++ b/dev-util/git/Manifest @@ -1,6 +1,4 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - +AUX 20080322-git-1.5.5.4-noperl.patch 11055 RMD160 a184a12108077bbb44ccce42da2b5f603fdc27d8 SHA1 1437ecf11405109d38fe63a4ab29fbed55eb0b60 SHA256 76c706775095987ca073bb0229c93d7a972d61ddebeed598fbba4bc15112a60f AUX 70git-gentoo.el 88 RMD160 fe9b87bdbe14141580745063092a5d08924f23fd SHA1 332f9cbf5a1dbb176e54646fa23aa140aee917f7 SHA256 7589206de5ea91e912e0332f7dc503689d348cb752e17ba84a724987c4bbe04a AUX 71git-gentoo.el 265 RMD160 c7284b9b210e631c91c4d5a6849e7e43be16d3c9 SHA1 da4a1ea75804fff4d54d34f072478e5ad1a49088 SHA256 930a56df44a3fc9ceb16304b7b53d87bc736708c1a34f4b46f21a128314b5066 AUX 72git-gentoo.el 337 RMD160 644e711f842f0947592fbc9e58f9f3ea2f085229 SHA1 33d594c19a5f5e7147719b61573505076a3c4984 SHA256 b022fdc82776c869c8e573c154fb0ff9ac748f0b6f4fbcd2f28618e3b946412f @@ -41,14 +39,8 @@ EBUILD git-1.5.3.7-r1.ebuild 6371 RMD160 847ed38b63b34256ce17991dc6c4dbd34c20795 EBUILD git-1.5.3.8.ebuild 6388 RMD160 a76f9cc851a04c6b898f7f34d85b5433e28cfe2a SHA1 d10fbe86d2825b563025c0014db93cbbfd57d47c SHA256 13dc2bf683b369d4b61016587072db9c6b6af54ff0aa32ff2a542ec968a42b84 EBUILD git-1.5.4.2.ebuild 6456 RMD160 67839a8bc0b973305569c4b2a14489ccf9171c43 SHA1 c1e4ebe62bc94eee12b222ecc891b9aebbd09383 SHA256 ef53e4d404725c06a0326ae5b77539363d146ae6b2c1d7a38d00f190e0f65a61 EBUILD git-1.5.4.3.ebuild 6458 RMD160 281145d4c0fac156ca62722b23ba602d1737955c SHA1 a8418ded18c3de325888fb42a3dcc2844a264f52 SHA256 e8d4a7cab34ff64b6d9995840e8ac278ba010d5c76d6cb409a4bc1920268856e +EBUILD git-1.5.4.4-r1.ebuild 7831 RMD160 1421858c206662b776b5979338038f6b9b6baf17 SHA1 858c29240e9de2db58ed0407ff3d8b08363c8c7a SHA256 8fd591cbea8e4a8d25778668e3a28d7adb58d29d560727d2fc04e6d219c25cf0 EBUILD git-1.5.4.4.ebuild 6565 RMD160 60bcf79bd993f95d038921fd8e83dc1289f5c958 SHA1 1197a2cbdce0658199407f07292c8b15689dbdb5 SHA256 b8d304b4c09311ea7fc2adc86fb352a69a7c37d83f98c573015fb8c979074817 EBUILD git-1.5.4.ebuild 6565 RMD160 17d6172114dcbbc24d390b93fc9598318e0b4906 SHA1 3a7b86bacacb291fccdde45b7cd1832bc7cdda35 SHA256 8ba59eba4f2377e33302bf9830657c68f3c6fec3b600e234a5b1a4b36e0bee15 -MISC ChangeLog 38431 RMD160 2ea2d643d688267e072b69f7ccec42cf99e28924 SHA1 f291f1f5043b99bc87efaababb1fdda9f691ffe6 SHA256 e04f4af59998f86b7b3718ec28b0df7e747d151030afeacfc5c0ebbfc7cbefe0 +MISC ChangeLog 38952 RMD160 2f6edc9a726b4ae742eb3c783c535724d747a37b SHA1 ffdf726a0979c42583671b561ef596b02c37f0bb SHA256 22fa682349566d65d5689368b64ccc2498ef25f29059394e0fe1053284dd54b0 MISC metadata.xml 1029 RMD160 f44ab0f6f9566b2cdb37f6cdd094e163c94e7d11 SHA1 88453257ccbedf4166357c262f49b0731cc45448 SHA256 2aa15da3001de8d8182ee9c8289cdefae84652b78ccc4cf35b2394f07edc352f ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.7 (GNU/Linux) - -iD8DBQFH4sKkj9hvisErhMIRAm3uAJ9SSTZHXUWRvORZj9um69L77BYOsgCeNbBd -zDohkPhOi3RQvSqDrayQs9A= -=H82Y ------END PGP SIGNATURE----- diff --git a/dev-util/git/files/20080322-git-1.5.5.4-noperl.patch b/dev-util/git/files/20080322-git-1.5.5.4-noperl.patch new file mode 100644 index 000000000000..bf5e8306fe5c --- /dev/null +++ b/dev-util/git/files/20080322-git-1.5.5.4-noperl.patch @@ -0,0 +1,335 @@ +Implement 95% of the NO_PERL functionality, to build Git without any Perl +support, because some Gentoo users want a Git without any Perl whatesoever +(Gentoo bug #214168). + +Remaining bits are doing configure.ac as well as git-remote usage in: +t5502-quickfetch.sh +t5512-ls-remote.sh +t5520-pull.sh + +Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> +Bugzilla-URL: http://bugs.gentoo.org/show_bug.cgi?id=214168 + +diff -Nuar --exclude gitweb.cgi --exclude config.mak.in --exclude configure.ac git-1.5.4.4.orig/Makefile git-1.5.4.4/Makefile +--- git-1.5.4.4.orig/Makefile 2008-03-22 15:25:24.986081000 -0700 ++++ git-1.5.4.4/Makefile 2008-03-22 16:46:04.612806869 -0700 +@@ -123,6 +123,8 @@ + # + # Define NO_PERL_MAKEMAKER if you cannot use Makefiles generated by perl's + # MakeMaker (e.g. using ActiveState under Cygwin). ++ ++# Define NO_PERL if you do not want Perl scripts at all. + # + # Define NO_TCLTK if you do not want Tcl/Tk GUI. + # +@@ -233,15 +235,18 @@ + git-stash.sh \ + git-help--browse.sh + ++SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) ++ifndef NO_PERL + SCRIPT_PERL = \ + git-add--interactive.perl \ + git-archimport.perl git-cvsimport.perl git-relink.perl \ + git-cvsserver.perl git-remote.perl git-cvsexportcommit.perl \ + git-send-email.perl git-svn.perl +- +-SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) \ +- $(patsubst %.perl,%,$(SCRIPT_PERL)) \ +- git-instaweb ++SCRIPTS += $(patsubst %.perl,%,$(SCRIPT_PERL)) \ ++ git-instaweb ++else ++SCRIPT_PERL = ++endif + + # ... and all the rest that could be moved out of bindir to gitexecdir + PROGRAMS = \ +@@ -276,7 +281,10 @@ + ALL_PROGRAMS += git-merge-subtree$X + + # what 'all' will build but not install in gitexecdir +-OTHER_PROGRAMS = git$X gitweb/gitweb.cgi ++OTHER_PROGRAMS = git$X ++ifndef NO_PERL ++OTHER_PROGRAMS += gitweb/gitweb.cgi ++endif + + # Set paths to tools early so that they can be used for version tests. + ifndef SHELL_PATH +@@ -570,6 +578,10 @@ + endif + endif + ++ifdef NO_PERL ++ BASIC_CFLAGS += -DNO_PERL ++endif ++ + ifdef ZLIB_PATH + BASIC_CFLAGS += -I$(ZLIB_PATH)/include + EXTLIBS += -L$(ZLIB_PATH)/$(lib) $(CC_LD_DYNPATH)$(ZLIB_PATH)/$(lib) +@@ -731,6 +743,11 @@ + ifeq ($(TCLTK_PATH),) + NO_TCLTK=NoThanks + endif ++ifeq ($(PERL_PATH),) ++NO_PERL=NoThanks ++export NO_PERL ++export NO_PERL_MAKEMAKER ++endif + + QUIET_SUBDIR0 = +$(MAKE) -C # space to separate -C and subdir + QUIET_SUBDIR1 = +@@ -803,7 +820,9 @@ + $(QUIET_SUBDIR0)git-gui $(QUIET_SUBDIR1) all + $(QUIET_SUBDIR0)gitk-git $(QUIET_SUBDIR1) all + endif ++ifndef NO_PERL + $(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' all ++endif + $(QUIET_SUBDIR0)templates $(QUIET_SUBDIR1) + + strip: $(PROGRAMS) git$X +@@ -844,6 +863,7 @@ + chmod +x $@+ && \ + mv $@+ $@ + ++ifndef NO_PERL + $(patsubst %.perl,%,$(SCRIPT_PERL)): perl/perl.mak + + perl/perl.mak: GIT-CFLAGS perl/Makefile perl/Makefile.PL +@@ -902,6 +922,7 @@ + $@.sh > $@+ && \ + chmod +x $@+ && \ + mv $@+ $@ ++endif # NO_PERL + + configure: configure.ac + $(QUIET_GEN)$(RM) $@ $<+ && \ +@@ -1052,7 +1073,9 @@ + $(INSTALL) $(ALL_PROGRAMS) '$(DESTDIR_SQ)$(gitexecdir_SQ)' + $(INSTALL) git$X '$(DESTDIR_SQ)$(bindir_SQ)' + $(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install ++ifndef NO_PERL + $(MAKE) -C perl prefix='$(prefix_SQ)' DESTDIR='$(DESTDIR_SQ)' install ++endif + ifndef NO_TCLTK + $(MAKE) -C gitk-git install + $(MAKE) -C git-gui install +@@ -1141,9 +1164,11 @@ + $(RM) -r $(GIT_TARNAME) .doc-tmp-dir + $(RM) $(GIT_TARNAME).tar.gz git-core_$(GIT_VERSION)-*.tar.gz + $(RM) $(htmldocs).tar.gz $(manpages).tar.gz +- $(RM) gitweb/gitweb.cgi + $(MAKE) -C Documentation/ clean ++ifndef NO_PERL ++ $(RM) gitweb/gitweb.cgi + $(MAKE) -C perl clean ++endif + $(MAKE) -C templates/ clean + $(MAKE) -C t/ clean + ifndef NO_TCLTK +diff -Nuar --exclude gitweb.cgi --exclude config.mak.in --exclude configure.ac git-1.5.4.4.orig/builtin-add.c git-1.5.4.4/builtin-add.c +--- git-1.5.4.4.orig/builtin-add.c 2008-03-09 03:18:13.000000000 -0700 ++++ git-1.5.4.4/builtin-add.c 2008-03-22 15:57:31.759925335 -0700 +@@ -135,6 +135,7 @@ + free(seen); + } + ++#ifndef NO_PERL + static const char **validate_pathspec(int argc, const char **argv, const char *prefix) + { + const char **pathspec = get_pathspec(prefix, argv); +@@ -170,6 +171,7 @@ + free(args); + return status; + } ++#endif + + static struct lock_file lock_file; + +@@ -182,8 +184,10 @@ + OPT__DRY_RUN(&show_only), + OPT__VERBOSE(&verbose), + OPT_GROUP(""), ++#ifndef NO_PERL + OPT_BOOLEAN('i', "interactive", &add_interactive, "interactive picking"), + OPT_BOOLEAN('p', "patch", &patch_interactive, "interactive patching"), ++#endif + OPT_BOOLEAN('f', NULL, &ignored_too, "allow adding otherwise ignored files"), + OPT_BOOLEAN('u', NULL, &take_worktree_changes, "update tracked files"), + OPT_BOOLEAN( 0 , "refresh", &refresh_only, "don't add, only refresh the index"), +@@ -198,10 +202,12 @@ + + argc = parse_options(argc, argv, builtin_add_options, + builtin_add_usage, 0); ++#ifndef NO_PERL + if (patch_interactive) + add_interactive = 1; + if (add_interactive) + exit(interactive_add(argc, argv, prefix)); ++#endif + + git_config(git_default_config); + +diff -Nuar --exclude gitweb.cgi --exclude config.mak.in --exclude configure.ac git-1.5.4.4.orig/builtin-commit.c git-1.5.4.4/builtin-commit.c +--- git-1.5.4.4.orig/builtin-commit.c 2008-03-09 03:18:13.000000000 -0700 ++++ git-1.5.4.4/builtin-commit.c 2008-03-22 15:58:41.139317545 -0700 +@@ -96,7 +96,9 @@ + OPT_GROUP("Commit contents options"), + OPT_BOOLEAN('a', "all", &all, "commit all changed files"), + OPT_BOOLEAN('i', "include", &also, "add specified files to index for commit"), ++#ifndef NO_PERL + OPT_BOOLEAN(0, "interactive", &interactive, "interactively add files"), ++#endif + OPT_BOOLEAN('o', "only", &only, ""), + OPT_BOOLEAN('n', "no-verify", &no_verify, "bypass pre-commit hook"), + OPT_BOOLEAN(0, "amend", &amend, "amend previous commit"), +@@ -213,11 +215,13 @@ + struct path_list partial; + const char **pathspec = NULL; + ++#ifndef NO_PERL + if (interactive) { + interactive_add(argc, argv, prefix); + commit_style = COMMIT_AS_IS; + return get_index_file(); + } ++#endif + + if (read_cache() < 0) + die("index file corrupt"); +diff -Nuar --exclude gitweb.cgi --exclude config.mak.in --exclude configure.ac git-1.5.4.4.orig/t/lib-git-svn.sh git-1.5.4.4/t/lib-git-svn.sh +--- git-1.5.4.4.orig/t/lib-git-svn.sh 2008-03-09 03:18:13.000000000 -0700 ++++ git-1.5.4.4/t/lib-git-svn.sh 2008-03-22 16:02:12.797409374 -0700 +@@ -6,6 +6,12 @@ + test_done + exit + fi ++if test -n "$NO_PERL" ++then ++ test_expect_success 'skipping git-svn tests, NO_PERL defined' : ++ test_done ++ exit ++fi + + GIT_DIR=$PWD/.git + GIT_SVN_DIR=$GIT_DIR/svn/git-svn +diff -Nuar --exclude gitweb.cgi --exclude config.mak.in --exclude configure.ac git-1.5.4.4.orig/t/t5505-remote.sh git-1.5.4.4/t/t5505-remote.sh +--- git-1.5.4.4.orig/t/t5505-remote.sh 2008-03-09 03:18:13.000000000 -0700 ++++ git-1.5.4.4/t/t5505-remote.sh 2008-03-22 16:22:58.012694493 -0700 +@@ -3,6 +3,12 @@ + test_description='git remote porcelain-ish' + + . ./test-lib.sh ++if test -n "$NO_PERL" ++then ++ test_expect_success 'skipping git-cvsimport tests, NO_PERL defined' : ++ test_done ++ exit ++fi + + setup_repository () { + mkdir "$1" && ( +diff -Nuar --exclude gitweb.cgi --exclude config.mak.in --exclude configure.ac git-1.5.4.4.orig/t/t7501-commit.sh git-1.5.4.4/t/t7501-commit.sh +--- git-1.5.4.4.orig/t/t7501-commit.sh 2008-03-09 03:18:13.000000000 -0700 ++++ git-1.5.4.4/t/t7501-commit.sh 2008-03-22 16:14:25.513913653 -0700 +@@ -38,7 +38,7 @@ + "echo King of the bongo >file && + git-commit -m foo -a file" + +-test_expect_failure \ ++[ -z "$NO_PERL" ] && test_expect_failure \ + "using paths with --interactive" \ + "echo bong-o-bong >file && + echo 7 | git-commit -m foo --interactive file" +@@ -119,7 +119,7 @@ + "echo 'gak' >file && \ + git-commit -m 'author' --author 'Rubber Duck <rduck@convoy.org>' -a" + +-test_expect_success \ ++[ -z "$NO_PERL" ] && test_expect_success \ + "interactive add" \ + "echo 7 | git-commit --interactive | grep 'What now'" + +diff -Nuar --exclude gitweb.cgi --exclude config.mak.in --exclude configure.ac git-1.5.4.4.orig/t/t9001-send-email.sh git-1.5.4.4/t/t9001-send-email.sh +--- git-1.5.4.4.orig/t/t9001-send-email.sh 2008-03-09 03:18:13.000000000 -0700 ++++ git-1.5.4.4/t/t9001-send-email.sh 2008-03-22 16:03:58.490510442 -0700 +@@ -2,6 +2,12 @@ + + test_description='git-send-email' + . ./test-lib.sh ++if test -n "$NO_PERL" ++then ++ test_expect_success 'skipping git-send-email tests, NO_PERL defined' : ++ test_done ++ exit ++fi + + PROG='git send-email' + test_expect_success \ +diff -Nuar --exclude gitweb.cgi --exclude config.mak.in --exclude configure.ac git-1.5.4.4.orig/t/t9200-git-cvsexportcommit.sh git-1.5.4.4/t/t9200-git-cvsexportcommit.sh +--- git-1.5.4.4.orig/t/t9200-git-cvsexportcommit.sh 2008-03-09 03:18:13.000000000 -0700 ++++ git-1.5.4.4/t/t9200-git-cvsexportcommit.sh 2008-03-22 16:04:12.535965488 -0700 +@@ -13,6 +13,12 @@ + test_done + exit + fi ++if test -n "$NO_PERL" ++then ++ test_expect_success 'skipping git-cvsexportcommit tests, NO_PERL defined' : ++ test_done ++ exit ++fi + + CVSROOT=$(pwd)/cvsroot + CVSWORK=$(pwd)/cvswork +diff -Nuar --exclude gitweb.cgi --exclude config.mak.in --exclude configure.ac git-1.5.4.4.orig/t/t9400-git-cvsserver-server.sh git-1.5.4.4/t/t9400-git-cvsserver-server.sh +--- git-1.5.4.4.orig/t/t9400-git-cvsserver-server.sh 2008-03-09 03:18:13.000000000 -0700 ++++ git-1.5.4.4/t/t9400-git-cvsserver-server.sh 2008-03-22 16:04:20.038686248 -0700 +@@ -17,6 +17,12 @@ + test_done + exit + fi ++if test -n "$NO_PERL" ++then ++ test_expect_success 'skipping git-cvsserver tests, NO_PERL defined' : ++ test_done ++ exit ++fi + perl -e 'use DBI; use DBD::SQLite' >/dev/null 2>&1 || { + test_expect_success 'skipping git-cvsserver tests, Perl SQLite interface unavailable' : + test_done +diff -Nuar --exclude gitweb.cgi --exclude config.mak.in --exclude configure.ac git-1.5.4.4.orig/t/t9500-gitweb-standalone-no-errors.sh git-1.5.4.4/t/t9500-gitweb-standalone-no-errors.sh +--- git-1.5.4.4.orig/t/t9500-gitweb-standalone-no-errors.sh 2008-03-09 03:18:13.000000000 -0700 ++++ git-1.5.4.4/t/t9500-gitweb-standalone-no-errors.sh 2008-03-22 16:17:00.350148743 -0700 +@@ -67,6 +67,13 @@ + } + + . ./test-lib.sh ++if test -n "$NO_PERL" ++then ++ test_expect_success 'skipping gitweb-standalone-no-errors tests, NO_PERL defined' : ++ test_done ++ exit ++fi ++ + + perl -MEncode -e 'decode_utf8("", Encode::FB_CROAK)' >/dev/null 2>&1 || { + test_expect_success 'skipping gitweb tests, perl version is too old' : +diff -Nuar --exclude gitweb.cgi --exclude config.mak.in --exclude configure.ac git-1.5.4.4.orig/t/t9600-cvsimport.sh git-1.5.4.4/t/t9600-cvsimport.sh +--- git-1.5.4.4.orig/t/t9600-cvsimport.sh 2008-03-09 03:18:13.000000000 -0700 ++++ git-1.5.4.4/t/t9600-cvsimport.sh 2008-03-22 16:04:28.501086452 -0700 +@@ -9,6 +9,12 @@ + test_done + exit + fi ++if test -n "$NO_PERL" ++then ++ test_expect_success 'skipping git-cvsimport tests, NO_PERL defined' : ++ test_done ++ exit ++fi + + cvsps_version=`cvsps -h 2>&1 | sed -ne 's/cvsps version //p'` + case "$cvsps_version" in diff --git a/dev-util/git/git-1.5.4.4-r1.ebuild b/dev-util/git/git-1.5.4.4-r1.ebuild new file mode 100644 index 000000000000..2baea8f740f9 --- /dev/null +++ b/dev-util/git/git-1.5.4.4-r1.ebuild @@ -0,0 +1,270 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-util/git/git-1.5.4.4-r1.ebuild,v 1.1 2008/03/24 00:05:01 robbat2 Exp $ + +inherit toolchain-funcs eutils elisp-common perl-module bash-completion + +MY_PV="${PV/_rc/.rc}" +MY_P="${PN}-${MY_PV}" + +DOC_VER=${MY_PV} + +DESCRIPTION="GIT - the stupid content tracker, the revision control system heavily used by the Linux kernel team" +HOMEPAGE="http://git.or.cz/" +SRC_URI="mirror://kernel/software/scm/git/${MY_P}.tar.bz2 + mirror://kernel/software/scm/git/${PN}-manpages-${DOC_VER}.tar.bz2 + doc? ( mirror://kernel/software/scm/git/${PN}-htmldocs-${DOC_VER}.tar.bz2 )" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~hppa ~mips ~ppc ~ppc64 ~sparc ~sparc-fbsd ~x86 ~x86-fbsd" +IUSE="curl cgi doc emacs gtk iconv mozsha1 perl ppcsha1 tk threads webdav xinetd cvs subversion" + +DEPEND=" + !app-misc/git + dev-libs/openssl + sys-libs/zlib + app-arch/cpio + perl? ( dev-lang/perl ) + tk? ( dev-lang/tk ) + curl? ( net-misc/curl ) + webdav? ( dev-libs/expat ) + emacs? ( virtual/emacs )" +# dev-perl/{Authen-SASL,Net-SMTP-SSL} are used by git-send-email + +RDEPEND="${DEPEND} + perl? ( dev-perl/Error + dev-perl/Net-SMTP-SSL + dev-perl/Authen-SASL + cgi? ( virtual/perl-CGI ) + cvs? ( >=dev-util/cvsps-2.1 dev-perl/DBI dev-perl/DBD-SQLite ) + subversion? ( dev-util/subversion dev-perl/libwww-perl dev-perl/TermReadKey ) + ) + gtk? ( >=dev-python/pygtk-2.8 )" + +SITEFILE=72${PN}-gentoo.el +S="${WORKDIR}/${MY_P}" + +pkg_setup() { + if ! use perl ; then + if use cgi || use cvs || use subversion ; then + eerror "You must built dev-util/git with USE=perl and the" + eerror "applicable USE flag to use any of the following:" + eerror "gitweb, git-cvs*, git-svn, git-archimport, git-quiltimport" + die "You need USE=perl to satisfy your other USE= requests!" + fi + fi +} + +# This is needed because for some obscure reasons future calls to make don't +# pick up these exports if we export them in src_unpack() +exportmakeopts() { + local myopts + + if use mozsha1 ; then + myopts="${myopts} MOZILLA_SHA1=YesPlease" + elif use ppcsha1 ; then + myopts="${myopts} PPC_SHA1=YesPlease" + fi + + if use curl ; then + use webdav || myopts="${myopts} NO_EXPAT=YesPlease" + else + myopts="${myopts} NO_CURL=YesPlease" + use webdav && ewarn "USE=webdav only matters with USE=curl. Ignoring." + fi + + use iconv || myopts="${myopts} NO_ICONV=YesPlease" + use tk || myopts="${myopts} NO_TCLTK=YesPlease" + use perl || myopts="${myopts} NO_PERL=YesPlease" + use threads && myopts="${myopts} THREADED_DELTA_SEARCH=YesPlease" + use subversion || myopts="${myopts} NO_SVN_TESTS=YesPlease" + + export MY_MAKEOPTS="${myopts}" +} + +src_unpack() { + unpack ${MY_P}.tar.bz2 + cd "${S}" + unpack ${PN}-manpages-${DOC_VER}.tar.bz2 + use doc && cd "${S}"/Documentation && unpack ${PN}-htmldocs-${DOC_VER}.tar.bz2 + cd "${S}" + + epatch "${FILESDIR}"/${PN}-1.5.3-symlinks.patch + epatch "${FILESDIR}"/20080322-${PN}-1.5.5.4-noperl.patch + + sed -i \ + -e "s:^\(CFLAGS =\).*$:\1 ${CFLAGS} -Wall:" \ + -e "s:^\(LDFLAGS =\).*$:\1 ${LDFLAGS}:" \ + -e "s:^\(CC = \).*$:\1$(tc-getCC):" \ + -e "s:^\(AR = \).*$:\1$(tc-getAR):" \ + -e 's:ln :ln -s :g' \ + Makefile || die "sed failed" + + exportmakeopts +} + +src_compile() { + emake ${MY_MAKEOPTS} DESTDIR="${D}" prefix=/usr || die "make failed" + + if use emacs ; then + elisp-compile contrib/emacs/{,vc-}git.el || die "emacs modules failed" + fi + if use perl && use cgi ; then + emake ${MY_MAKEOPTS} \ + DESTDIR="${D}" \ + prefix=/usr \ + gitweb/gitweb.cgi || die "make gitweb/gitweb.cgi failed" + fi +} + +src_install() { + emake ${MY_MAKEOPTS} DESTDIR="${D}" prefix=/usr install || \ + die "make install failed" + + doman man?/* + + dodoc README Documentation/{SubmittingPatches,CodingGuidelines} + use doc && dodir /usr/share/doc/${PF}/html + for d in / /howto/ /technical/ ; do + docinto ${d} + dodoc Documentation${d}*.txt + use doc && dohtml -p ${d} Documentation${d}*.html + done + docinto / + + dobashcompletion contrib/completion/git-completion.bash ${PN} + + if use emacs ; then + elisp-install ${PN} contrib/emacs/{,vc-}git.el* || \ + die "elisp-install failed" + elisp-site-file-install "${FILESDIR}"/${SITEFILE} + # don't add automatically to the load-path, so the sitefile + # can do a conditional loading + touch "${D}"/"${SITELISP}"/${PN}/.nosearch + fi + + if use gtk ; then + dobin "${S}"/contrib/gitview/gitview + dodoc "${S}"/contrib/gitview/gitview.txt + fi + + dobin contrib/fast-import/git-p4 + dodoc contrib/fast-import/git-p4.txt + newbin contrib/fast-import/import-tars.perl import-tars + + dodir /usr/share/${PN}/contrib + # The following are excluded: + # svnimport - use git-svn + # p4import - excluded because fast-import has a better one + # examples - these are stuff that is not used in Git anymore actually + # patches - stuff the Git guys made to go upstream to other places + for i in continuous fast-import hg-to-git \ + hooks remotes2config.sh vim stats \ + workdir convert-objects blameview ; do + cp -rf \ + "${S}"/contrib/${i} \ + "${D}"/usr/share/${PN}/contrib \ + || die "Failed contrib ${i}" + done + + if use perl && use cgi ; then + dodir /usr/share/${PN}/gitweb + insinto /usr/share/${PN}/gitweb + doins "${S}"/gitweb/gitweb.{cgi,css} + doins "${S}"/gitweb/git-{favicon,logo}.png + docinto / + # INSTALL discusses configuration issues, not just installation + newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb + newdoc "${S}"/gitweb/README README.gitweb + fi + + if use xinetd ; then + insinto /etc/xinetd.d + newins "${FILESDIR}"/git-daemon.xinetd git-daemon + fi + + newinitd "${FILESDIR}"/git-daemon.initd git-daemon + newconfd "${FILESDIR}"/git-daemon.confd git-daemon + + fixlocalpod +} + +src_test() { + local disabled="" + local tests_cvs="t9200-git-cvsexportcommit.sh \ + t9400-git-cvsserver-server.sh \ + t9600-cvsimport.sh" + local tests_perl="t5502-quickfetch.sh \ + t5512-ls-remote.sh \ + t5520-pull.sh" + + # Unzip is used only for the testcase code, not by any normal parts of Git. + has_version app-arch/unzip || \ + einfo "Disabling tar-tree tests" && \ + disabled="${disabled} \ + t5000-tar-tree.sh" + + if ! has userpriv "${FEATURES}"; then + ewarn "Skipping CVS tests because CVS does not work as root!" + ewarn "You should retest with FEATURES=userpriv!" + disabled="${disabled} \ + ${tests_cvs}" + fi + + use cvs && \ + has_version dev-util/cvs && \ + built_with_use dev-util/cvs server || \ + einfo "Disabling CVS tests (needs dev-util/cvs[USE=server])" && \ + disabled="${disabled} \ + ${tests_cvs}" + + use perl || \ + einfo "Disabling tests that need Perl" && \ + disabled="${disabled} \ + ${tests_perl}" + + # Reset all previously disabled tests + cd "${S}/t" + for i in *.sh.DISABLED ; do + [[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}" + done + einfo "Disabled tests:" + for i in ${disabled} ; do + [[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo "Disabled $i" + done + cd "${S}" + # Now run the tests + einfo "Start test run" + emake ${MY_MAKEOPTS} DESTDIR="${D}" prefix=/usr test || die "tests failed" +} + +showpkgdeps() { + local pkg=$1 + shift + elog " $(printf "%-17s:" ${pkg}) ${@}" +} + +pkg_postinst() { + if use emacs ; then + elisp-site-regen + elog "GNU Emacs has built-in Git support in versions greater 22.1." + elog "You can disable the emacs USE flag for dev-util/git" + elog "if you are using such a version." + fi + if use subversion && ! built_with_use dev-util/subversion perl ; then + ewarn "You must build dev-util/subversion with USE=perl" + ewarn "to get the full functionality of git-svn!" + fi + elog "These additional scripts need some dependencies:" + echo + showpkgdeps git-archimport "dev-util/tla" + showpkgdeps git-quiltimport "dev-util/quilt" + showpkgdeps git-instaweb \ + "|| ( www-servers/lighttpd www-servers/apache )" + echo +} + +pkg_postrm() { + use emacs && elisp-site-regen +} |