Corrected the tab error in cdl2spi.py, and modified foundry_install.py
to make use of LEF and "readspice" annotation when creating layout
database files from GDS sources.
diff --git a/common/cdl2spi.py b/common/cdl2spi.py
index 8ed0eab..f597a90 100755
--- a/common/cdl2spi.py
+++ b/common/cdl2spi.py
@@ -231,7 +231,7 @@
     cdlModel=""
     for i in range(len(tok)-1, 0, -1):
         if not tok[i].startswith("$"):
-	    if '=' in tok[i]:
+            if '=' in tok[i]:
                 continue
             elif cdlModel == '':
                 cdlModel = tok[i]
diff --git a/common/foundry_install.py b/common/foundry_install.py
index a3d048b..bc1ba45 100755
--- a/common/foundry_install.py
+++ b/common/foundry_install.py
@@ -1255,6 +1255,39 @@
                         print('}', file=ofile)
                         print('load $topcell', file=ofile)
 
+                    else:
+                        # Use LEF files to set the port properties
+                        if have_lefanno or have_lef:
+                            if have_lefanno:
+                                lefdirname = 'lefanno'
+                            else:
+                                lefdirname = 'lef'
+
+                            # Find LEF file names in the source
+                            if ef_format:
+                                lefsrcdir = targetdir + lef_reflib + lefdirname
+                                lefsrclibdir = lefsrcdir + '/' + destlib
+                            else:
+                                lefsrcdir = targetdir + lef_reflib + destlib + '/' + lefdirname
+                                lefsrclibdir = lefsrcdir
+
+                            leffiles = os.listdir(lefsrclibdir)
+                            leffiles = list(item for item in leffiles if os.path.splitext(item)[1] == '.lef')
+                            for leffile in leffiles:
+                                print('lef read ' + lefsrclibdir + '/' + leffile, file=ofile)
+                     
+                        # Use CDL or SPICE netlists to set the port order
+                        if have_cdl or have_spice:
+                            if have_cdl:
+                                netdir = clibdir
+                            else:
+                                netdir = slibdir
+
+                            # Find CDL/SPICE file names in the source
+                            netfiles = os.listdir(netdir)
+                            for netfile in netfiles:
+                                print('readspice ' + netdir + '/' + netfile, file=ofile)
+
                     print('cellname delete \(UNNAMED\)', file=ofile)
                     print('writeall force', file=ofile)