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 62 63 64
|
Description:
GAP assumes packages doc are built inside the GAP root. This patch convert
relative reference to absolute reference, based on $gaproot/pkg/gapdoc/doc.
Note that gapdoc is irrelevant here, except that it is always available.
Origin: Debian
Author: Bill Allombert <ballombe@debian.org>
Last-Update: 2014-02-20
Index: gap-4r7p2/etc/convert.pl
===================================================================
--- gap-4r7p2.orig/etc/convert.pl 2014-02-20 11:36:19.101664823 +0100
+++ gap-4r7p2/etc/convert.pl 2014-02-20 12:24:36.878588794 +0100
@@ -141,6 +141,9 @@
use Getopt::Std;
+$gaproot="/usr/share/gap/";
+#Added by Bill Allombert to absorb ../../.. from caller. Any pkg/*/* would do.
+$gappkg="$gaproot/pkg/gapdoc/doc/";
#
# Global variables
@@ -462,7 +465,7 @@
sub hreftype {
my ($book, $bdir) = @_;
if ( !(exists $convertbooks{$book}) ) {
- my @ls = `ls ${odir}$bdir`;
+ my @ls = `ls $gappkg$bdir`;
$convertbooks{$book}
= (grep { m/^CHAP...[.]htm$/ } @ls) ?
1 : # .htm files have shape CHAP<MMM>.htm
@@ -2165,9 +2168,9 @@
getlabs $dir;
while (<TEX>) {
if (/\\UseReferences{([^}]*)}/) {
- getlabs "$dir$1/";
+ getlabs "$gappkg$1/";
} elsif (/\\UseGapDocReferences{([^}]*)}/) {
- getlabs "$dir$1/";
+ getlabs "$gappkg$1/";
# ($gapdocbook = $1) =~ s?.*/([^/]*)/doc?$1?;
# $gapdocbooks{$gapdocbook} = 1;
# print STDERR "GapDoc books: ", keys(%gapdocbooks), "\n";
Index: gap-4r7p2/doc/gapmacro.tex
===================================================================
--- gap-4r7p2.orig/doc/gapmacro.tex 2013-12-01 11:17:13.000000000 +0100
+++ gap-4r7p2/doc/gapmacro.tex 2014-02-20 11:36:20.129682258 +0100
@@ -891,11 +891,15 @@
%%
%F \UseReferences{<book-path>} . . . use references from book in <book-path>
%%
+
+%% /usr/share/gap/pkg/gapdoc/doc/:
+%% Added by Bill Allombert to absorb ../../.. from caller. Any pkg/*/* would do.
+
\outer\def\UseReferences#1{\begingroup\def\makelabel##1##2{\m@kelabel{##1}{##2}{}}\undoquotes
- \inputaux\labelin{#1/manual.lab}\endgroup
+ \inputaux\labelin{/usr/share/gap/pkg/gapdoc/doc/#1/manual.lab}\endgroup
}
\outer\def\UseGapDocReferences#1{\begingroup\def\makelabel##1##2##3{\m@kelabel{##1}{##2}{##3}}\undoquotes
- \inputaux\labelin{#1/manual.lab}\endgroup
+ \inputaux\labelin{/usr/share/gap/pkg/gapdoc/doc/#1/manual.lab}\endgroup
}
\outer\def\GAPDocLabFile#1{\def\makelabel##1##2##3{\m@kelabel{##1}{##2}{##3}}}
%
|