texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: Attempt to make texi2any relocatable


From: Gavin D. Smith
Subject: branch master updated: Attempt to make texi2any relocatable
Date: Sun, 19 Dec 2021 06:19:29 -0500

This is an automated email from the git hooks/post-receive script.

gavin pushed a commit to branch master
in repository texinfo.

The following commit(s) were added to refs/heads/master by this push:
     new c0c07af  Attempt to make texi2any relocatable
c0c07af is described below

commit c0c07af5f1a35db1feefbfaa5d66b8210a9abd3b
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Sun Dec 19 11:17:10 2021 +0000

    Attempt to make texi2any relocatable
    
    * tp/texi2any.pl: Reinstate code removed on 2018-08-15, which
    attempted to find associated files relative to the installed location
    of texi2any.  Also find loadable XS modules.
    
    Report from Nikolay Kudryavtsev <nikolay.kudryavtsev@gmail.com>
    who was using Eli Zaretskii's ezwinports build of Texinfo.
---
 ChangeLog      | 11 +++++++++++
 tp/texi2any.pl | 13 ++++++++++++-
 2 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index d89dd6e..fc05893 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2021-12-19  Gavin Smith  <gavinsmith0123@gmail.com>
+
+       Attempt to make texi2any relocatable
+
+       * tp/texi2any.pl: Reinstate code removed on 2018-08-15, which
+       attempted to find associated files relative to the installed location
+       of texi2any.  Also find loadable XS modules.
+
+       Report from Nikolay Kudryavtsev <nikolay.kudryavtsev@gmail.com>
+       who was using Eli Zaretskii's ezwinports build of Texinfo.
+
 2021-12-19  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/Common.pm (@variable_string_settables),
diff --git a/tp/texi2any.pl b/tp/texi2any.pl
index fa7cc7a..bfec6f5 100755
--- a/tp/texi2any.pl
+++ b/tp/texi2any.pl
@@ -77,8 +77,19 @@ BEGIN
     Texinfo::ModulePath::init(undef, undef, 'updirs' => 1);
   } else {
     # Look for modules in their installed locations.
-
     my $lib_dir = File::Spec->catdir($datadir, $package);
+
+    # try to make package relocatable, will only work if
+    # standard relative paths are used
+    if (! -f File::Spec->catfile($lib_dir, 'Texinfo', 'Parser.pm')
+        and -f File::Spec->catfile($command_directory, $updir, 'share', 
+                                   $package, 'Texinfo', 'Parser.pm')) {
+      $lib_dir = File::Spec->catdir($command_directory, $updir, 
+                                          'share', $package);
+      $packagedir = File::Spec->catdir($command_directory, $updir, 
+                                          'lib', $package);
+    }
+
     unshift @INC, $lib_dir;
 
     require Texinfo::ModulePath;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]