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