[22510] trunk/dports/devel/openssl/Portfile

source_changes at macosforge.org source_changes at macosforge.org
Sat Mar 3 06:59:44 PST 2007


Revision: 22510
          http://trac.macosforge.org/projects/macports/changeset/22510
Author:   pipping at macports.org
Date:     2007-03-03 06:59:44 -0800 (Sat, 03 Mar 2007)

Log Message:
-----------
variant universal: * fix testsuite
                   * beautify/shorten code (use loops wherever possible)

Modified Paths:
--------------
    trunk/dports/devel/openssl/Portfile

Modified: trunk/dports/devel/openssl/Portfile
===================================================================
--- trunk/dports/devel/openssl/Portfile	2007-03-03 13:25:56 UTC (rev 22509)
+++ trunk/dports/devel/openssl/Portfile	2007-03-03 14:59:44 UTC (rev 22510)
@@ -73,21 +73,27 @@
             lappend eList ${f}
         }
         set bList apps/openssl
+        set tList {}
+        foreach f [glob test/*test] {
+            lappend tList ${f}
+        }
+        lappend tList test/sha256t
+        lappend tList test/sha512t
 
-        # save the output of the first go in a temporary location
-        set ppcPath ${workpath}/ppc
-        xinstall -d ${ppcPath}
-        foreach l $lList {
-            xinstall ${l} ${ppcPath}
+        # define a backup procedure to a temporary location
+        proc backup {bakPath} {
+            xinstall -d ${bakPath}    
+            foreach a {l e b t} b {. engines apps test} {
+                upvar 1 [set a]List [set a]List 
+                xinstall -d ${bakPath}/$b
+                foreach n [set [set a]List] {
+                    xinstall ${n} ${bakPath}/${b}
+                }
+            }
         }
-        xinstall -d ${ppcPath}/engines
-        foreach e $eList {
-            xinstall ${e} ${ppcPath}/engines
-        }
-        xinstall -d ${ppcPath}/apps
-        foreach b $bList {
-            xinstall ${b} ${ppcPath}/apps
-        }
+        # backup the output of the first run (ppc)
+        set ppcPath ${workpath}/ppc
+        backup ${ppcPath}
 
         # cleanup the worksrcdir
         system "make clean"
@@ -104,43 +110,20 @@
         # build for i386
         system [command build]
 
-        # save the output of the second go in another temporary location
+        # backup the output of the first run (ppc)
         set i386Path ${workpath}/i386
-        xinstall -d ${i386Path}
-        foreach l $lList {
-           xinstall ${l} ${i386Path}
-        }
-        xinstall -d ${i386Path}/engines
-        foreach e $eList {
-            xinstall ${e} ${i386Path}/engines
-        }
-        xinstall -d ${i386Path}/apps
-        foreach b $bList {
-            xinstall ${b} ${i386Path}/apps
-        }
+        backup ${i386Path}
 
         # run lipo on the output of both runs
-        foreach l $lList {
-            delete ${l}
-            system "lipo \
-            -arch i386 ${i386Path}/${l} \
-            -arch  ppc  ${ppcPath}/${l} \
-            -create -output ${l}"
+        foreach n {l e b t} {
+            foreach m [set [set n]List] {
+                delete ${m}
+                system "lipo \
+                -arch i386 ${i386Path}/${m} \
+                -arch  ppc  ${ppcPath}/${m} \
+                -create -output ${m}"
+            }
         }
-        foreach e $eList {
-            delete ${e}
-            system "lipo \
-            -arch i386 ${i386Path}/${e} \
-            -arch  ppc  ${ppcPath}/${e} \
-            -create -output ${e}"
-        }
-        foreach b $bList {
-            delete ${b}
-            system "lipo \
-            -arch i386 ${i386Path}/${b} \
-            -arch  ppc  ${ppcPath}/${b} \
-            -create -output ${b}"
-        }
 
         # make sure installing won't rebuild
         reinplace "s|install: all |install: |g" Makefile

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070303/b8352dce/attachment.html


More information about the macports-changes mailing list