all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob 192233d41f251321c390c7e2260787a30b1a20b3 1891 bytes (raw)
name: gnu/packages/patches/docbook-utils-helpers-date.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
 
Description: patch to get the <date> from the sgml file
 For the moment, docbook2man doesn't use the tag date in <date> </date>
 to but `date "+%d %B %Y"`, and thus depend on the current locale.
 
 <refentry>
   <docinfo>
     <date>06 September 2003</>
   </docinfo>
 </refentry>
 
 A patch against /usr/share/perl5/sgmlspl-specs/docbook2man-spec.pl
 allows to use the date written in the source SGML file (which can be
 localized) instead of the current date.
 
 However, if no correct date tag is present in the SGML file, the date
 written in the manpage will depend on the current locale.
Author: Simon Paillard <simon.paillard@resel.enst-bretagne.fr>
Forwarded: not-needed
Bug-Debian: http://bugs.debian.org/214982

Index: docbook-utils-0.6.14/helpers/docbook2man-spec.pl
===================================================================
--- docbook-utils-0.6.14.orig/helpers/docbook2man-spec.pl	2012-05-09 18:27:28.000000000 +0200
+++ docbook-utils-0.6.14/helpers/docbook2man-spec.pl	2012-05-09 18:55:53.276783163 +0200
@@ -278,8 +278,9 @@
 .\\" etc. to Steve Cheng <steve\@ggi-project.org>.
 _END_BANNER
 
-	my $manpage_date = `date "+%d %B %Y"`;
-		
+	my $date = `date "+%d %B %Y"`;
+	my $manpage_date = $manpage_date || $date ;
+
 	output '.TH "';
 	
 	# If the title is not mixed-case, convention says to
@@ -292,7 +293,7 @@
 	}
 	
 	output  '" "', fold_string($manpage_sect), 
-		'" "', fold_string(`date "+%d %B %Y"`), 
+		'" "', fold_string($manpage_date), 
 		'" "', $manpage_misc, 
 		'" "', $manpage_manual, 
 		"\"\n";
@@ -568,6 +569,15 @@
 sgml('</ATTRIBUTION>', sub { $_[0]->parent->ext->{'attribution'} = pop_output(); });
 
 
+sgml('<DATE>', sub {
+	save_cdata();
+});
+sgml('</DATE>', sub { 
+	$manpage_date = fold_string(pop_output());
+	$raw_cdata--;
+});
+
+
 # IGNORE.
 sgml('<DOCINFO>', sub { push_output('nul'); });
 sgml('</DOCINFO>', sub { pop_output(); });

debug log:

solving 192233d41f ...
found 192233d41f in https://yhetil.org/guix/6c92eb83-361b-7eb3-fd63-8b582b9b41db@disroot.org/

applying [1/1] https://yhetil.org/guix/6c92eb83-361b-7eb3-fd63-8b582b9b41db@disroot.org/
diff --git a/gnu/packages/patches/docbook-utils-helpers-date.patch b/gnu/packages/patches/docbook-utils-helpers-date.patch
new file mode 100644
index 0000000000..192233d41f

1:10: trailing whitespace.
 
1:16: trailing whitespace.
 
1:20: trailing whitespace.
 
1:34: trailing whitespace.
 
1:36: trailing whitespace.
-		
Checking patch gnu/packages/patches/docbook-utils-helpers-date.patch...
Applied patch gnu/packages/patches/docbook-utils-helpers-date.patch cleanly.
warning: squelched 14 whitespace errors
warning: 19 lines add whitespace errors.

index at:
100644 192233d41f251321c390c7e2260787a30b1a20b3	gnu/packages/patches/docbook-utils-helpers-date.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.