summaryrefslogtreecommitdiff
path: root/cad/gnetlist
diff options
context:
space:
mode:
authordmcmahill <dmcmahill>2002-05-31 15:51:42 +0000
committerdmcmahill <dmcmahill>2002-05-31 15:51:42 +0000
commitcae8139a8ad141ed2c3a52a1ed756a3713d4aee8 (patch)
treef401c09c13bca22085ecc4ecd8e04127ba2f0652 /cad/gnetlist
parent0d9dfa0ac6f6e1137574a6338c0abd01b5d31519 (diff)
downloadpkgsrc-cae8139a8ad141ed2c3a52a1ed756a3713d4aee8.tar.gz
- fix the gschem2pcb script (used to help go from a schematic to a netlist
and .pcb file for layout with the cad/pcb package). - fix the PCBboard netlister (needs GNU m4) - add depends on gm4.
Diffstat (limited to 'cad/gnetlist')
-rw-r--r--cad/gnetlist/Makefile5
-rw-r--r--cad/gnetlist/distinfo4
-rw-r--r--cad/gnetlist/patches/patch-aa15
-rw-r--r--cad/gnetlist/patches/patch-ab71
4 files changed, 93 insertions, 2 deletions
diff --git a/cad/gnetlist/Makefile b/cad/gnetlist/Makefile
index 55ff9841863..67b51e94a4c 100644
--- a/cad/gnetlist/Makefile
+++ b/cad/gnetlist/Makefile
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.9 2002/05/18 18:08:41 dmcmahill Exp $
+# $NetBSD: Makefile,v 1.10 2002/05/31 15:51:42 dmcmahill Exp $
#
DISTNAME= geda-gnetlist-${PKGVERSION}
PKGNAME= gnetlist-${PKGVERSION}
+PKGREVISION= 1
CATEGORIES= cad
MASTER_SITES= ftp://ftp.geda.seul.org/pub/geda/devel/${PKGVERSION}/ \
ftp://ieee.ing.uniroma1.it/pub/geda/devel/${PKGVERSION}/ \
@@ -18,6 +19,8 @@ PKGVERSION= 20020414
DEPENDS+= libgeda-${PKGVERSION}:../../cad/libgeda
DEPENDS+= geda-symbols-${PKGVERSION}:../../cad/geda-symbols
+# needs GNU m4 for the PCBboard netlister
+DEPENDS+= m4-1.4:../../devel/m4
CONFLICTS+= gEDA<19991011
diff --git a/cad/gnetlist/distinfo b/cad/gnetlist/distinfo
index c8b86c25159..fec816192e7 100644
--- a/cad/gnetlist/distinfo
+++ b/cad/gnetlist/distinfo
@@ -1,4 +1,6 @@
-$NetBSD: distinfo,v 1.4 2002/05/18 18:08:41 dmcmahill Exp $
+$NetBSD: distinfo,v 1.5 2002/05/31 15:51:43 dmcmahill Exp $
SHA1 (geda/geda-gnetlist-20020414.tar.gz) = f568fc3dc198046d7865b38d99a9de36d47f17fb
Size (geda/geda-gnetlist-20020414.tar.gz) = 236941 bytes
+SHA1 (patch-aa) = 2ec0c4ae6743f79b2d905c98d634cebb77bbc7d7
+SHA1 (patch-ab) = 7546a526795b2e42c0fe716030c3e0c93687e4c3
diff --git a/cad/gnetlist/patches/patch-aa b/cad/gnetlist/patches/patch-aa
new file mode 100644
index 00000000000..1af901dc1f7
--- /dev/null
+++ b/cad/gnetlist/patches/patch-aa
@@ -0,0 +1,15 @@
+$NetBSD: patch-aa,v 1.3 2002/05/31 15:51:44 dmcmahill Exp $
+
+needs GNU m4
+
+--- scheme/gnet-PCBboard.scm.orig Sun Jan 27 13:48:35 2002
++++ scheme/gnet-PCBboard.scm
+@@ -151,7 +151,7 @@
+ ;; Original pipe command commented out by AVH (bugfix by Rich Walker)
+ ;; (let ((pipe (open-output-pipe (string-append "m4 " *m4-pcbdir* "/common.m4 - >> " output-filename))))
+ ;; Fixed pipe command (AVH 1/27/02)
+- (let ((pipe (open-output-pipe (string-append "m4 -d -I" *m4-pcbdir* " " *m4-pcbdir* "/common.m4 - >> " output-filename))))
++ (let ((pipe (open-output-pipe (string-append "gm4 -d -I" *m4-pcbdir* " " *m4-pcbdir* "/common.m4 - >> " output-filename))))
+
+
+ ;; packages is a list with the different uref value
diff --git a/cad/gnetlist/patches/patch-ab b/cad/gnetlist/patches/patch-ab
new file mode 100644
index 00000000000..44d9af9d672
--- /dev/null
+++ b/cad/gnetlist/patches/patch-ab
@@ -0,0 +1,71 @@
+$NetBSD: patch-ab,v 1.3 2002/05/31 15:51:44 dmcmahill Exp $
+
+use sh(1) and awk(1) not bash(1) and gawk(1). Also use short options for
+head(1) and tail(1).
+
+--- src/gschem2pcb.orig Fri Apr 21 16:48:38 2000
++++ src/gschem2pcb
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+@@ -43,7 +43,7 @@
+ fi
+
+ # Search for the beginning of the filename assuming it ends by .sch
+-FILENAME=`echo "$1" | sed 's/.sch//g' -`
++FILENAME=`echo "$1" | sed 's/.sch//g' `
+ PCBFILENAME=$FILENAME.pcb
+
+ # test if a .pcb file exists
+@@ -59,7 +59,7 @@
+ gnetlist -g PCB -o $NETFILENAME $1
+ gnetlist -g PCBboard -o $PCBTEMPFILENAME $1
+ echo
+- gawk 'BEGIN {FS=","}
++ awk 'BEGIN {FS=","}
+ /^PKG_*/{
+ footprint=$1
+ sub(/PKG_/,"",footprint)
+@@ -68,23 +68,23 @@
+ value=substr($3,0,length($3)-1)
+ printf("Error: the footprint %s for the device %s does not exist\n",footprint,$2,value)
+ }' $PCBTEMPFILENAME
+- gawk '/^Element\(.*/{printf("%s\t%s\t\n",$3,$4)}' $PCBFILENAME|sort > $LISTFILE
+- gawk '/^Element\(.*/{printf("%s\t%s\t\n",$3,$4)}' $PCBTEMPFILENAME|sort > $NEWLISTFILE
+- UREF=`diff $NEWLISTFILE $LISTFILE | gawk '/</{printf("%s\n",$2)}' -`
++ awk '/^Element\(.*/{printf("%s\t%s\t\n",$3,$4)}' $PCBFILENAME|sort > $LISTFILE
++ awk '/^Element\(.*/{printf("%s\t%s\t\n",$3,$4)}' $PCBTEMPFILENAME|sort > $NEWLISTFILE
++ UREF=`diff $NEWLISTFILE $LISTFILE | awk '/</{printf("%s\n",$2)}' -`
+ #Search for UREF if $PCBTEMPFILENAME and create $PCBNEWFILENAME
+ #Header of the pcb file
+- head --lines 5 $PCBTEMPFILENAME > $PCBNEWFILENAME
++ head -n 5 $PCBTEMPFILENAME > $PCBNEWFILENAME
+ for f in `echo $UREF`; do
+ echo "Find new element $f"
+- LINE=`grep -n $f $PCBTEMPFILENAME|sed 's/:.*$//g' -`
+- gawk -v line=$LINE '{if (NR>=line)
++ LINE=`grep -n $f $PCBTEMPFILENAME|sed 's/:.*$//g' `
++ awk -v line=$LINE '{if (NR>=line)
+ {print
+ if ($1==")") exit}
+ }' $PCBTEMPFILENAME >> $PCBNEWFILENAME
+
+ done
+ # End of the pcb file
+- tail --lines 24 $PCBTEMPFILENAME >> $PCBNEWFILENAME
++ tail -n 24 $PCBTEMPFILENAME >> $PCBNEWFILENAME
+
+ # Un peu de ménage (in french in the texte)
+ rm $PCBTEMPFILENAME $NEWLISTFILE $LISTFILE
+@@ -96,7 +96,7 @@
+ gnetlist -g PCB -o $NETFILENAME $1
+ gnetlist -g PCBboard -o $PCBFILENAME $1
+ # Test if a footprint has not been found
+- gawk 'BEGIN {FS=","}
++ awk 'BEGIN {FS=","}
+ /^PKG_*/{
+ footprint=$1
+ sub(/PKG_/,"",footprint)