Gentoo Archives: gentoo-commits

From: "Robin H. Johnson (robbat2)" <robbat2@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-util/git/files: 20080626-git-1.5.6.1-noperl.patch
Date: Thu, 26 Jun 2008 21:42:50
Message-Id: E1KBzEq-0001VQ-2W@stork.gentoo.org
1 robbat2 08/06/26 21:42:44
2
3 Added: 20080626-git-1.5.6.1-noperl.patch
4 Log:
5 Version bump.
6 (Portage version: 2.2_rc1/cvs/Linux 2.6.26-rc4-00103-g1beee8d x86_64)
7
8 Revision Changes Path
9 1.1 dev-util/git/files/20080626-git-1.5.6.1-noperl.patch
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/git/files/20080626-git-1.5.6.1-noperl.patch?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/git/files/20080626-git-1.5.6.1-noperl.patch?rev=1.1&content-type=text/plain
13
14 Index: 20080626-git-1.5.6.1-noperl.patch
15 ===================================================================
16 Implement 95% of the NO_PERL functionality, to build Git without any Perl
17 support, because some Gentoo users want a Git without any Perl whatesoever
18 (Gentoo bug #214168).
19
20 Remaining bits are doing configure.ac as well as git-remote usage in:
21 t5502-quickfetch.sh
22 t5512-ls-remote.sh
23 t5520-pull.sh
24
25 Signed-off-by: Robin H. Johnson <robbat2@g.o>
26 Bugzilla-URL: http://bugs.gentoo.org/show_bug.cgi?id=214168
27 Notes: Ported from 20080423-git-1.5.5.1-noperl.patch
28 Notes: Ported from 20080322-git-1.5.4.5-noperl.patch
29 Notes: Ported from 20080528-git-1.5.6.1-noperl.patch
30
31 diff -Nuar --exclude '*.orig' --exclude '*.rej' git-1.5.6.1.orig/builtin-add.c git-1.5.6.1/builtin-add.c
32 --- git-1.5.6.1.orig/builtin-add.c 2008-05-28 00:56:46.000000000 -0700
33 +++ git-1.5.6.1/builtin-add.c 2008-05-28 10:38:12.566970120 -0700
34 @@ -135,6 +135,7 @@
35 free(seen);
36 }
37
38 +#ifndef NO_PERL
39 static const char **validate_pathspec(int argc, const char **argv, const char *prefix)
40 {
41 const char **pathspec = get_pathspec(prefix, argv);
42 @@ -170,6 +171,7 @@
43 free(args);
44 return status;
45 }
46 +#endif
47
48 static struct lock_file lock_file;
49
50 @@ -182,8 +184,10 @@
51 OPT__DRY_RUN(&show_only),
52 OPT__VERBOSE(&verbose),
53 OPT_GROUP(""),
54 +#ifndef NO_PERL
55 OPT_BOOLEAN('i', "interactive", &add_interactive, "interactive picking"),
56 OPT_BOOLEAN('p', "patch", &patch_interactive, "interactive patching"),
57 +#endif
58 OPT_BOOLEAN('f', "force", &ignored_too, "allow adding otherwise ignored files"),
59 OPT_BOOLEAN('u', "update", &take_worktree_changes, "update tracked files"),
60 OPT_BOOLEAN( 0 , "refresh", &refresh_only, "don't add, only refresh the index"),
61 @@ -198,10 +202,12 @@
62
63 argc = parse_options(argc, argv, builtin_add_options,
64 builtin_add_usage, 0);
65 +#ifndef NO_PERL
66 if (patch_interactive)
67 add_interactive = 1;
68 if (add_interactive)
69 exit(interactive_add(argc, argv, prefix));
70 +#endif
71
72 git_config(git_default_config);
73
74 diff -Nuar --exclude '*.orig' --exclude '*.rej' git-1.5.6.1.orig/builtin-commit.c git-1.5.6.1/builtin-commit.c
75 --- git-1.5.6.1.orig/builtin-commit.c 2008-05-28 00:56:46.000000000 -0700
76 +++ git-1.5.6.1/builtin-commit.c 2008-05-28 10:38:25.556703720 -0700
77 @@ -97,7 +97,9 @@
78 OPT_GROUP("Commit contents options"),
79 OPT_BOOLEAN('a', "all", &all, "commit all changed files"),
80 OPT_BOOLEAN('i', "include", &also, "add specified files to index for commit"),
81 +#ifndef NO_PERL
82 OPT_BOOLEAN(0, "interactive", &interactive, "interactively add files"),
83 +#endif
84 OPT_BOOLEAN('o', "only", &only, "commit only specified files"),
85 OPT_BOOLEAN('n', "no-verify", &no_verify, "bypass pre-commit hook"),
86 OPT_BOOLEAN(0, "amend", &amend, "amend previous commit"),
87 @@ -217,6 +219,7 @@
88 struct path_list partial;
89 const char **pathspec = NULL;
90
91 +#ifndef NO_PERL
92 if (interactive) {
93 interactive_add(argc, argv, prefix);
94 if (read_cache() < 0)
95 @@ -224,6 +227,7 @@
96 commit_style = COMMIT_AS_IS;
97 return get_index_file();
98 }
99 +#endif
100
101 if (read_cache() < 0)
102 die("index file corrupt");
103 diff -Nuar --exclude '*.orig' --exclude '*.rej' git-1.5.6.1.orig/Makefile git-1.5.6.1/Makefile
104 --- git-1.5.6.1.orig/Makefile 2008-05-28 10:38:03.608016000 -0700
105 +++ git-1.5.6.1/Makefile 2008-05-28 10:38:12.571288044 -0700
106 @@ -130,6 +130,8 @@
107 #
108 # Define NO_PERL_MAKEMAKER if you cannot use Makefiles generated by perl's
109 # MakeMaker (e.g. using ActiveState under Cygwin).
110 +
111 +# Define NO_PERL if you do not want Perl scripts at all.
112 #
113 # Define NO_TCLTK if you do not want Tcl/Tk GUI.
114 #
115 @@ -255,6 +257,8 @@
116 SCRIPT_SH += git-submodule.sh
117 SCRIPT_SH += git-web--browse.sh
118
119 +SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH))
120 +ifndef NO_PERL
121 SCRIPT_PERL += git-add--interactive.perl
122 SCRIPT_PERL += git-archimport.perl
123 SCRIPT_PERL += git-cvsexportcommit.perl
124 @@ -263,10 +267,11 @@
125 SCRIPT_PERL += git-relink.perl
126 SCRIPT_PERL += git-send-email.perl
127 SCRIPT_PERL += git-svn.perl
128 -
129 -SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) \
130 - $(patsubst %.perl,%,$(SCRIPT_PERL)) \
131 - git-instaweb
132 +SCRIPTS += $(patsubst %.perl,%,$(SCRIPT_PERL)) \
133 + git-instaweb
134 +else
135 +SCRIPT_PERL =
136 +endif
137
138 # Empty...
139 EXTRA_PROGRAMS =
140 @@ -315,7 +320,10 @@
141 ALL_PROGRAMS = $(PROGRAMS) $(SCRIPTS)
142
143 # what 'all' will build but not install in gitexecdir
144 -OTHER_PROGRAMS = git$X gitweb/gitweb.cgi
145 +OTHER_PROGRAMS = git$X
146 +ifndef NO_PERL
147 +OTHER_PROGRAMS += gitweb/gitweb.cgi
148 +endif
149
150 # Set paths to tools early so that they can be used for version tests.
151 ifndef SHELL_PATH
152 @@ -716,6 +724,10 @@
153 endif
154 endif
155
156 +ifdef NO_PERL
157 + BASIC_CFLAGS += -DNO_PERL
158 +endif
159 +
160 ifdef ZLIB_PATH
161 BASIC_CFLAGS += -I$(ZLIB_PATH)/include
162 EXTLIBS += -L$(ZLIB_PATH)/$(lib) $(CC_LD_DYNPATH)$(ZLIB_PATH)/$(lib)
163 @@ -896,6 +908,11 @@
164 ifeq ($(TCLTK_PATH),)
165 NO_TCLTK=NoThanks
166 endif
167 +ifeq ($(PERL_PATH),)
168 +NO_PERL=NoThanks
169 +export NO_PERL
170 +export NO_PERL_MAKEMAKER
171 +endif
172
173 QUIET_SUBDIR0 = +$(MAKE) -C # space to separate -C and subdir
174 QUIET_SUBDIR1 =
175 @@ -968,7 +985,9 @@
176 $(QUIET_SUBDIR0)git-gui $(QUIET_SUBDIR1) all
177 $(QUIET_SUBDIR0)gitk-git $(QUIET_SUBDIR1) all
178 endif
179 +ifndef NO_PERL
180 $(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' all
181 +endif
182 $(QUIET_SUBDIR0)templates $(QUIET_SUBDIR1)
183
184 strip: $(PROGRAMS) git$X
185 @@ -1007,6 +1026,7 @@
186 chmod +x $@+ && \
187 mv $@+ $@
188
189 +ifndef NO_PERL
190 $(patsubst %.perl,%,$(SCRIPT_PERL)): perl/perl.mak
191
192 perl/perl.mak: GIT-CFLAGS perl/Makefile perl/Makefile.PL
193 @@ -1065,6 +1085,7 @@
194 $@.sh > $@+ && \
195 chmod +x $@+ && \
196 mv $@+ $@
197 +endif # NO_PERL
198
199 configure: configure.ac
200 $(QUIET_GEN)$(RM) $@ $<+ && \
201 @@ -1218,7 +1239,9 @@
202 $(INSTALL) $(ALL_PROGRAMS) '$(DESTDIR_SQ)$(gitexecdir_SQ)'
203 $(INSTALL) git$X '$(DESTDIR_SQ)$(bindir_SQ)'
204 $(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install
205 +ifndef NO_PERL
206 $(MAKE) -C perl prefix='$(prefix_SQ)' DESTDIR='$(DESTDIR_SQ)' install
207 +endif
208 ifndef NO_TCLTK
209 $(MAKE) -C gitk-git install
210 $(MAKE) -C git-gui install
211 @@ -1307,9 +1330,11 @@
212 $(RM) -r $(GIT_TARNAME) .doc-tmp-dir
213 $(RM) $(GIT_TARNAME).tar.gz git-core_$(GIT_VERSION)-*.tar.gz
214 $(RM) $(htmldocs).tar.gz $(manpages).tar.gz
215 - $(RM) gitweb/gitweb.cgi
216 $(MAKE) -C Documentation/ clean
217 +ifndef NO_PERL
218 + $(RM) gitweb/gitweb.cgi
219 $(MAKE) -C perl clean
220 +endif
221 $(MAKE) -C templates/ clean
222 $(MAKE) -C t/ clean
223 ifndef NO_TCLTK
224 diff -Nuar --exclude '*.orig' --exclude '*.rej' git-1.5.6.1.orig/t/lib-git-svn.sh git-1.5.6.1/t/lib-git-svn.sh
225 --- git-1.5.6.1.orig/t/lib-git-svn.sh 2008-05-28 00:56:46.000000000 -0700
226 +++ git-1.5.6.1/t/lib-git-svn.sh 2008-05-28 10:38:12.571288044 -0700
227 @@ -6,6 +6,12 @@
228 test_done
229 exit
230 fi
231 +if test -n "$NO_PERL"
232 +then
233 + test_expect_success 'skipping git-svn tests, NO_PERL defined' :
234 + test_done
235 + exit
236 +fi
237
238 GIT_DIR=$PWD/.git
239 GIT_SVN_DIR=$GIT_DIR/svn/git-svn
240 diff -Nuar --exclude '*.orig' --exclude '*.rej' git-1.5.6.1.orig/t/t5505-remote.sh git-1.5.6.1/t/t5505-remote.sh
241 --- git-1.5.6.1.orig/t/t5505-remote.sh 2008-05-28 00:56:46.000000000 -0700
242 +++ git-1.5.6.1/t/t5505-remote.sh 2008-05-28 10:38:12.571288044 -0700
243 @@ -3,6 +3,12 @@
244 test_description='git remote porcelain-ish'
245
246 . ./test-lib.sh
247 +if test -n "$NO_PERL"
248 +then
249 + test_expect_success 'skipping git-cvsimport tests, NO_PERL defined' :
250 + test_done
251 + exit
252 +fi
253
254 setup_repository () {
255 mkdir "$1" && (
256 diff -Nuar --exclude '*.orig' --exclude '*.rej' git-1.5.6.1.orig/t/t7501-commit.sh git-1.5.6.1/t/t7501-commit.sh
257 --- git-1.5.6.1.orig/t/t7501-commit.sh 2008-05-28 00:56:46.000000000 -0700
258 +++ git-1.5.6.1/t/t7501-commit.sh 2008-05-28 10:38:12.571288044 -0700
259 @@ -38,7 +38,7 @@
260 "echo King of the bongo >file &&
261 ! git-commit -m foo -a file"
262
263 -test_expect_success \
264 +[ -z "$NO_PERL" ] && test_expect_success \
265 "using paths with --interactive" \
266 "echo bong-o-bong >file &&
267 ! echo 7 | git-commit -m foo --interactive file"
268 @@ -119,7 +119,7 @@
269 "echo 'gak' >file && \
270 git-commit -m 'author' --author 'Rubber Duck <rduck@××××××.org>' -a"
271
272 -test_expect_success \
273 +[ -z "$NO_PERL" ] && test_expect_success \
274 "interactive add" \
275 "echo 7 | git-commit --interactive | grep 'What now'"
276
277 diff -Nuar --exclude '*.orig' --exclude '*.rej' git-1.5.6.1.orig/t/t9001-send-email.sh git-1.5.6.1/t/t9001-send-email.sh
278 --- git-1.5.6.1.orig/t/t9001-send-email.sh 2008-05-28 00:56:46.000000000 -0700
279 +++ git-1.5.6.1/t/t9001-send-email.sh 2008-05-28 10:38:12.571288044 -0700
280 @@ -2,6 +2,12 @@
281
282 test_description='git-send-email'
283 . ./test-lib.sh
284 +if test -n "$NO_PERL"
285 +then
286 + test_expect_success 'skipping git-send-email tests, NO_PERL defined' :
287 + test_done
288 + exit
289 +fi
290
291 PROG='git send-email'
292 test_expect_success \
293 diff -Nuar --exclude '*.orig' --exclude '*.rej' git-1.5.6.1.orig/t/t9200-git-cvsexportcommit.sh git-1.5.6.1/t/t9200-git-cvsexportcommit.sh
294 --- git-1.5.6.1.orig/t/t9200-git-cvsexportcommit.sh 2008-05-28 00:56:46.000000000 -0700
295 +++ git-1.5.6.1/t/t9200-git-cvsexportcommit.sh 2008-05-28 10:38:12.571288044 -0700
296 @@ -13,6 +13,12 @@
297 test_done
298 exit
299 fi
300 +if test -n "$NO_PERL"
301 +then
302 + test_expect_success 'skipping git-cvsexportcommit tests, NO_PERL defined' :
303 + test_done
304 + exit
305 +fi
306
307 CVSROOT=$(pwd)/cvsroot
308 CVSWORK=$(pwd)/cvswork
309 diff -Nuar --exclude '*.orig' --exclude '*.rej' git-1.5.6.1.orig/t/t9400-git-cvsserver-server.sh git-1.5.6.1/t/t9400-git-cvsserver-server.sh
310 --- git-1.5.6.1.orig/t/t9400-git-cvsserver-server.sh 2008-05-28 00:56:46.000000000 -0700
311 +++ git-1.5.6.1/t/t9400-git-cvsserver-server.sh 2008-05-28 10:38:12.573745493 -0700
312 @@ -17,6 +17,12 @@
313 test_done
314 exit
315 fi
316 +if test -n "$NO_PERL"
317 +then
318 + test_expect_success 'skipping git-cvsserver tests, NO_PERL defined' :
319 + test_done
320 + exit
321 +fi
322 perl -e 'use DBI; use DBD::SQLite' >/dev/null 2>&1 || {
323 test_expect_success 'skipping git-cvsserver tests, Perl SQLite interface unavailable' :
324 test_done
325 diff -Nuar --exclude '*.orig' --exclude '*.rej' git-1.5.6.1.orig/t/t9500-gitweb-standalone-no-errors.sh git-1.5.6.1/t/t9500-gitweb-standalone-no-errors.sh
326 --- git-1.5.6.1.orig/t/t9500-gitweb-standalone-no-errors.sh 2008-05-28 00:56:46.000000000 -0700
327 +++ git-1.5.6.1/t/t9500-gitweb-standalone-no-errors.sh 2008-05-28 10:38:12.573745493 -0700
328 @@ -67,6 +67,13 @@
329 }
330
331 . ./test-lib.sh
332 +if test -n "$NO_PERL"
333 +then
334 + test_expect_success 'skipping gitweb-standalone-no-errors tests, NO_PERL defined' :
335 + test_done
336 + exit
337 +fi
338 +
339
340 perl -MEncode -e 'decode_utf8("", Encode::FB_CROAK)' >/dev/null 2>&1 || {
341 test_expect_success 'skipping gitweb tests, perl version is too old' :
342 diff -Nuar --exclude '*.orig' --exclude '*.rej' git-1.5.6.1.orig/t/t9600-cvsimport.sh git-1.5.6.1/t/t9600-cvsimport.sh
343 --- git-1.5.6.1.orig/t/t9600-cvsimport.sh 2008-05-28 00:56:46.000000000 -0700
344 +++ git-1.5.6.1/t/t9600-cvsimport.sh 2008-05-28 10:38:12.573745493 -0700
345 @@ -15,6 +15,12 @@
346 test_done
347 exit
348 fi
349 +if test -n "$NO_PERL"
350 +then
351 + test_expect_success 'skipping git-cvsimport tests, NO_PERL defined' :
352 + test_done
353 + exit
354 +fi
355
356 cvsps_version=`cvsps -h 2>&1 | sed -ne 's/cvsps version //p'`
357 case "$cvsps_version" in
358
359
360
361 --
362 gentoo-commits@l.g.o mailing list