Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:
Apparently GCC < 6 required a patch to its texi2pod.pl script, which had
a syntax problem. The attached patch fixes this last problem. I could
successfully build GCC 5.4.0 by using a derived package for testing
(otherwise it would trigger a world rebuild which was never ending of my
lesser machine).
Here's the patch used to test it:
Toggle snippet (64 lines)
gnu/packages/gcc.scm | 21 +++++++++++++++++++++
gnu/packages/patches/gcc-fix-texi2pod.patch | 19 +++++++++++++++++++
2 files changed, 40 insertions(+)
create mode 100644 gnu/packages/patches/gcc-fix-texi2pod.patch
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index 7870d4513..320201b9c 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -395,6 +395,27 @@ Go. It also includes runtime support libraries for these languages.")
;; `(("isl" ,isl)
;; ,@(package-inputs gcc-4.7)))))
+(define-public gcc-5-dev
+ (package (inherit gcc-5)
+ (name "gcc-dev")
+ (version "5.4.0-dev")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/gcc/gcc-"
+ version "/gcc-" version ".tar.bz2"))
+ (sha256
+ (base32
+ "0fihlcy5hnksdxk0sn6bvgnyq8gfrgs8m794b1jxwd1dxinzg3b0"))
+ (patches (search-patches "gcc-arm-bug-71399.patch"
+ "gcc-strmov-store-file-names.patch"
+ "gcc-asan-powerpc-missing-include.patch"
+ "gcc-5.0-libvtv-runpath.patch"
+ "gcc-5-source-date-epoch-1.patch"
+ "gcc-5-source-date-epoch-2.patch"
+ "gcc-fix-texi2pod.patch"))))
+ (native-inputs `(("perl" ,perl) ;for manpages
+ ("texinfo" ,texinfo)))))
+
(define-public gcc-6
(package
(inherit gcc-5)
diff --git a/gnu/packages/patches/gcc-fix-texi2pod.patch b/gnu/packages/patches/gcc-fix-texi2pod.patch
new file mode 100644
index 000000000..28bd56a38
--- /dev/null
+++ b/gnu/packages/patches/gcc-fix-texi2pod.patch
@@ -0,0 +1,19 @@
+This patch was taken from the official GCC git repository.
+X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=blobdiff_plain;f=contrib%2Ftexi2pod.pl;h=91bdbb5cea933d0381f2924ab94490fca31d5800;hp=eba1bcaa3cffa78b46030b219d04fe7d68367658;hb=67b56c905078d49d3e4028085e5cb1e1fb87a8aa;hpb=2f508a78310caab123e9794d3dcfe41f2769449b
+
+It fixes a defect in the contrib/texi2pod.pl script that prevented generating
+manual pages. It was corrected in the GCC 6.X series.
+
+diff --git a/contrib/texi2pod.pl b/contrib/texi2pod.pl
+index eba1bca..91bdbb5 100755
+--- a/contrib/texi2pod.pl
++++ b/contrib/texi2pod.pl
+@@ -316,7 +316,7 @@ while(<$inf>) {
+ @columns = ();
+ for $column (split (/\s*\@tab\s*/, $1)) {
+ # @strong{...} is used a @headitem work-alike
+- $column =~ s/^\@strong{(.*)}$/$1/;
++ $column =~ s/^\@strong\{(.*)\}$/$1/;
+ push @columns, $column;
+ }
+ $_ = "\n=item ".join (" : ", @columns)."\n";
I could then build gcc-dev and verify that the man pages gcc and cpp
were working correctly in an environment instantiated using:
The complete patch is attached; it should be good for core-updates.
Thank you,
Maxim