Mail Archives: geda-user/2023/03/31/04:29:43.1
Peter Stuge:
> karl AT aspodata DOT se [via geda-user AT delorie DOT com] wrote:
> > > > 1, the dirname trick:
> > > > $(dirname $(dirname $(which pcb)))/share/pcb
> > > > followed by m4, pcblib-newlib alt. newlib depending of what
> > > > we are looking for
> > >
> > > This isn't a good choice at all since it makes assumptions about how
> > > pcb was compiled - specifically that there is a fixed relationship
> > > between the pcb binary path and the library path.
> >
> > Well, there seems there is one, at least per default:
> >
> > $ cd <git>/pcb
> > $ grep -B1 BINDIR_TO_PCBLIBDIR config.h
> > /* Relative path from bindir to pcblibdir */
> > #define BINDIR_TO_PCBLIBDIR "../share/pcb"
> > $
> >
> > which can be changed with
> > --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
> >
> > ./configure --datarootdir=/opt
> > gives:
> > /* Relative path from bindir to pcblibdir */
> > #define BINDIR_TO_PCBLIBDIR "../../../opt/pcb"
>
> Exactly; because it can be changed by pcb configure it's
> unfortunately not possible to assume anything.
It would still be useful in config phase, with it one could see if one
can find common.m4, else ask configure user for a path.
...
> How about we first try pcb -p --show-defaults, then pcb -x ps, then
> with default hid, then fail?
The hid lpr depends on the exporter ps:
configure: error: you have requested the lpr HID but not the ps HID, which it depends on
And you can even ./configure --with-printer= --with-gui= --with-exporters=
$ src/pcb --show-defaults
Error: No GUI available.
$ src/pcb -x ps --show-defaults
Invalid exporter ps, available ones:
$ src/pcb -p --show-defaults
$ src/pcb -h
Segmentation fault
$
Oops, found a problem.
> If there's no X then gschem/lepton might anyway not start
> (interactively) - right?
lepton-sch2pcb/gsch2pcb doesn't need X.
Regards,
/Karl Hammar
- Raw text -