apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gsm...@apache.org
Subject svn commit: r1788281 - /apr/apr/branches/1.6.x/build/cvtdsp.pl
Date Thu, 23 Mar 2017 16:31:12 GMT
Author: gsmith
Date: Thu Mar 23 16:31:12 2017
New Revision: 1788281

URL: http://svn.apache.org/viewvc?rev=1788281&view=rev
Log:
add option to convert dsp files to build with openssl 1.1.0

Modified:
    apr/apr/branches/1.6.x/build/cvtdsp.pl

Modified: apr/apr/branches/1.6.x/build/cvtdsp.pl
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.6.x/build/cvtdsp.pl?rev=1788281&r1=1788280&r2=1788281&view=diff
==============================================================================
--- apr/apr/branches/1.6.x/build/cvtdsp.pl (original)
+++ apr/apr/branches/1.6.x/build/cvtdsp.pl Thu Mar 23 16:31:12 2017
@@ -34,6 +34,9 @@ elsif ($ARGV[0] eq '-m') {
         $name = "apr";
         onemake();
 }
+elsif ($ARGV[0] eq '-ossl11') {
+    find(\&toossl1, '.');
+}
 else {
     print "Specify -5 or -6 for Visual Studio 5 or 6 (98) .dsp format\n";
     print "Specify -w3 or -w4 for .dsp build with warning level 3 or 4 (strict)\n\n";
@@ -223,7 +226,43 @@ sub tovc2005 {
     }
 }
 
-sub tow3 { 
+sub toossl1 {
+
+    if (m|\.dsp$|) {
+        $oname = $_;
+        $tname = '.#' . $_;
+        $verchg = 0;
+        $srcfl = new IO::File $_, "r" || die;
+        $dstfl = new IO::File $tname, "w" || die;
+        while ($src = <$srcfl>) {
+            if ($src =~ s|inc32|include|) {
+                $verchg = -1;
+            }
+            if ($src =~ s|libeay32|libcrypto|) {
+                $verchg = -1;
+            }
+            if ($src =~ s|ssleay32|libssl|) {
+                $verchg = -1;
+            }
+            if ($src =~ s|(\\\|/)?out32dll||) {
+                $verchg = -1;
+            }
+            print $dstfl $src;
+        }
+        undef $srcfl;
+        undef $dstfl;
+        if ($verchg) {
+            unlink $oname || die;
+            rename $tname, $oname || die;
+            print "Converted project " . $oname . " to OpenSSL 1.1.0 in " . $File::Find::dir
. "\n";
+        }
+        else {
+            unlink $tname;
+        }
+    }
+}
+
+sub tow3 {
 
     if (m|\.dsp$| || m|\.mak$|) {
         $oname = $_;



Mime
View raw message