ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Context using LuaTeX -	distribution	packaging	question
Date: Wed, 29 Oct 2008 16:10:23 +0100	[thread overview]
Message-ID: <49087CDF.9090507@wxs.nl> (raw)
In-Reply-To: <49087A0B.5050206@net-b.de>

Tobias Burnus wrote:
> Hi Hans,
> 
> Hans Hagen wrote:
>> i remember that there has been some discussion about this following link 
>>   issue but i forgot what was the outcome
>>   
> 
> Can you incorporate the following patch in your cont-tmf.zip? It should
> work with most Linux systems and it should not harm on other systems.

you use an old luatools / luat-inp.lua; if a patch is needed, then it 
should go into

function input.identify_own()
     local instance = input.instance
     local ownpath = input.getownpath() or lfs.currentdir()
     local ie = instance.environment
     if ownpath then
         if input.env('SELFAUTOLOC')    == "" then os.env['SELFAUTOLOC'] 
    = file.collapse_path(ownpath) end
         if input.env('SELFAUTODIR')    == "" then os.env['SELFAUTODIR'] 
    = file.collapse_path(ownpath .. "/..") end
         if input.env('SELFAUTOPARENT') == "" then 
os.env['SELFAUTOPARENT'] = file.collapse_path(ownpath .. "/../..") end
     else
         input.verbose = true
         input.report("error: unable to locate ownpath")
         os.exit()
     end
     if input.env('TEXMFCNF') == "" then os.env['TEXMFCNF'] = 
input.cnfdefault end
     if input.env('TEXOS')    == "" then os.env['TEXOS']    = 
input.env('SELFAUTODIR') end
     if input.env('TEXROOT')  == "" then os.env['TEXROOT']  = 
input.env('SELFAUTOPARENT') end
     if input.verbose then
         for _,v in 
ipairs({"SELFAUTOLOC","SELFAUTODIR","SELFAUTOPARENT","TEXMFCNF"}) do
             input.report("variable %s set to %s",v,input.env(v) or 
"unknown")
         end
     end
     function input.identify_own() end
end

function input.identify_cnf()
     local instance = input.instance
     if #instance.cnffiles == 0 then
         -- fallback
         input.identify_own()
         -- the real search
         input.expand_variables()
         local t = input.split_path(input.env('TEXMFCNF'))
         t = input.aux.expanded_path(t)
         input.aux.expand_vars(t) -- redundant
         local function locate(filename,list)
             for _,v in ipairs(t) do
                 local texmfcnf = 
input.normalize_name(file.join(v,filename))
                 if lfs.isfile(texmfcnf) then
                     table.insert(list,texmfcnf)
                 end
             end
         end
         locate(input.luaname,instance.luafiles)
         locate(input.cnfname,instance.cnffiles)
     end
end


> Tobias
> 
> --- /dev/shm/luatools.lua       2008-10-29 12:46:21.261006248 +0100
> +++ luatools.lua                2008-10-29 15:56:04.000000000 +0100
> @@ -3053,9 +3053,16 @@
>                      if not lfs.isdir(file.join(ownroot,"texmf")) then
>                          ownroot = input.normalize_name(file.join(ownpath,".."))
>                          if not lfs.isdir(file.join(ownroot,"texmf")) then
> -                            input.verbose = true
> -                            input.report("error", "unable to identify cnf file")
> -                            return
> +                            -- On Linux installations, the file might be under $PREFIX/bin
> +                            -- while the texmf tree is under $PREFIX/share/texmf
> +                            if string.gmatch(ownpath, "/bin$") then
> +                                ownroot = input.normalize_name(file.join(ownpath,"../share"))
> +                            end
> +                            if not lfs.isdir(file.join(ownroot,"texmf")) then
> +                               input.verbose = true
> +                               input.report("error", "unable to identify cnf file")
> +                               return
> +                            end
>                          end
>                      end
>                      local texmfcnf = file.join(ownroot,"texmf-local/web2c",filename) -- for minimals and myself
> 
> 
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : https://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________


-- 

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


  reply	other threads:[~2008-10-29 15:10 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-29  9:48 Tobias Burnus
2008-10-29 10:50 ` Tobias Burnus
2008-10-29 11:05   ` Hans Hagen
2008-10-29 11:56     ` Tobias Burnus
2008-10-29 14:58     ` Tobias Burnus
2008-10-29 15:10       ` Hans Hagen [this message]
2008-10-29 18:41         ` Tobias Burnus
2008-10-29 18:55           ` Tobias Burnus
2008-10-29 21:47             ` Hans Hagen
2008-10-30  7:13             ` Peter Münster
2008-10-29 19:06           ` Hans Hagen
2008-10-29 19:44             ` Tobias Burnus
2008-10-29 21:32               ` Hans Hagen
2008-10-30 10:07                 ` Tobias Burnus
2008-10-30 10:28                   ` luigi scarso
2008-10-30 10:54                   ` Hans Hagen
2008-10-29 19:08           ` Hans Hagen
2008-10-29 11:03 ` Hans Hagen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49087CDF.9090507@wxs.nl \
    --to=pragma@wxs.nl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).