Mail Archives: geda-user/2023/03/21/19:08:59
-rw-r--r-- 1 karl users 3718 Mar 1 2021 /usr/local/share/pcb/m4/common.m4
This is a multipart MIME message.
--==_Exmh_1679438018_3450
Content-Type: text/plain
In m4/pcb-data-dirs.m4, after some preamble, there is:
PCBDATADIR="${datarootdir}/pcb"
According to page 41 in:
https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.71/autoconf.pdf
one can see that datarootdir is listed under
section "4.8.2 Installation Directory Variables".
The first line of which says:
"The following variables specify the directories for package installation,"
which has noting to do with wherever pcb is installed
or where pcb's files are. So datarootdir has to be replaced
whith something else.
The point of having the pcb-data-dirs.m4 file seems to allow
the user to change the default or what autoconf can find out
itself.
I suggest that the variable datarootdir in this file be
replaced whith something like "dirname $(dirname $(which pcb))".
Crude patch attached, but it should be easy doing this directly in
the running code.
/////////
On boxA:
$ dir=$(dirname $(dirname $(which pcb)))
$ ls -l $dir/share/pcb/m4/common.m4
$ lepton-sch2pcb styrkort.sch
[...]
=====================================================
gsch2pcb backend configuration:
----------------------------------------
Variables which may be changed in gafrc:
----------------------------------------
gsch2pcb:pcb-m4-command: "/usr/bin/m4"
gsch2pcb:pcb-m4-dir: "/usr/local/share/pcb/m4"
gsch2pcb:pcb-m4-path: ("$HOME/.pcb" ".")
gsch2pcb:m4-files: ""
---------------------------------------------------
Variables which may be changed in the project file:
---------------------------------------------------
gsch2pcb:use-m4: yes
----------------
M4 command line:
----------------
/usr/bin/m4 -d -I/usr/local/share/pcb/m4 -I$HOME/.pcb -I. /usr/local/share/pcb/m4/common.m4 -
=====================================================
Using the m4 processor for pcb footprints
[...]
/////////
On boxB:
$ dir=$(dirname $(dirname $(which pcb)))
$ ls -l $dir/share/pcb/m4/common.m4
-rw-r--r-- 1 root root 3718 Feb 3 2019 /usr/share/pcb/m4/common.m4
$
$ lepton-sch2pcb styrkort.sch
[...]
=====================================================
gsch2pcb backend configuration:
----------------------------------------
Variables which may be changed in gafrc:
----------------------------------------
gsch2pcb:pcb-m4-command: "/usr/bin/m4"
gsch2pcb:pcb-m4-dir: "/usr/share/pcb/m4"
gsch2pcb:pcb-m4-path: ("$HOME/.pcb" ".")
gsch2pcb:m4-files: ""
---------------------------------------------------
Variables which may be changed in the project file:
---------------------------------------------------
gsch2pcb:use-m4: yes
----------------
M4 command line:
----------------
/usr/bin/m4 -d -I/usr/share/pcb/m4 -I$HOME/.pcb -I. /usr/share/pcb/m4/common.m4 -
=====================================================
Using the m4 processor for pcb footprints
/usr/bin/m4: cannot open `': No such file or directory
[...]
/////////
Don't know what the last line is about. it isn't there on boxA.
On boxA I get lots of:
find_element can't open dir "Grid[10000.000000 0 0 0]
": No such file or directory
find_element can't open dir "`e0?": No such file or directory
find_element can't open dir "??0?": No such file or directory
find_element can't open dir "^^.?": No such file or directory
find_element can't open dir "C ": No such file or directory
find_element can't open dir "?D.?": No such file or directory
yR2: can't find PCB element for footprint ipc7351b_1608Ar.fp (value=10k)
So device yR2 will not be in the layout.
but only the first time the command is run, strange.
Regards,
/Karl Hammar
--==_Exmh_1679438018_3450
Content-Type: text/plain; charset="utf-8" ; name="patch"
Content-Description: patch
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment; filename="patch"
diff --git a/m4/pcb-data-dirs.m4 b/m4/pcb-data-dirs.m4
index caee1e0f5..1d57d6693 100644
--- a/m4/pcb-data-dirs.m4
+++ b/m4/pcb-data-dirs.m4
@@ -27,7 +27,9 @@ AC_DEFUN([AX_PCB_DIRS],
=
# Check what prefix to use for PCB footprint libraries
AC_MSG_CHECKING([where to look for PCB footprints])
- PCBDATADIR=3D"${datarootdir}/pcb"
+
+ dir=3Dm4_esyscmd_s([dirname $(dirname $(which pcb) )])
+ PCBDATADIR=3D"${dir}/share/pcb"
AC_ARG_WITH([pcb-datadir],
AS_HELP_STRING([--with-pcb-datadir=3DDIR],
[search for PCB libraries in DIR [[DATAROOTDIR/pcb]]]),
--==_Exmh_1679438018_3450--
- Raw text -