[128862] trunk/dports/textproc/yodl

larryv at macports.org larryv at macports.org
Fri Nov 28 14:11:43 PST 2014


Revision: 128862
          https://trac.macports.org/changeset/128862
Author:   larryv at macports.org
Date:     2014-11-28 14:11:42 -0800 (Fri, 28 Nov 2014)
Log Message:
-----------
yodl: Avoid C++11 functions

Enables building on outdated OS X without making things awkward.

Modified Paths:
--------------
    trunk/dports/textproc/yodl/Portfile
    trunk/dports/textproc/yodl/files/use-macports-compilers.patch

Added Paths:
-----------
    trunk/dports/textproc/yodl/files/avoid-c++11.patch

Modified: trunk/dports/textproc/yodl/Portfile
===================================================================
--- trunk/dports/textproc/yodl/Portfile	2014-11-28 21:55:48 UTC (rev 128861)
+++ trunk/dports/textproc/yodl/Portfile	2014-11-28 22:11:42 UTC (rev 128862)
@@ -5,6 +5,7 @@
 
 name                yodl
 version             3.04.00
+revision            1
 categories          textproc
 platforms           darwin
 license             GPL-3
@@ -32,7 +33,8 @@
 checksums           rmd160  bd03e15418295eb112b4228d3e2fd68b95d225a7 \
                     sha256  66b317877906e165506796f9342a1adf931376f7d8b6990b2d2ff12107685893
 
-patchfiles          fix-hashbangs.patch \
+patchfiles          avoid-c++11.patch \
+                    fix-hashbangs.patch \
                     use-macports-compilers.patch \
                     use-macports-locations.patch
 post-patch {

Added: trunk/dports/textproc/yodl/files/avoid-c++11.patch
===================================================================
--- trunk/dports/textproc/yodl/files/avoid-c++11.patch	                        (rev 0)
+++ trunk/dports/textproc/yodl/files/avoid-c++11.patch	2014-11-28 22:11:42 UTC (rev 128862)
@@ -0,0 +1,46 @@
+Index: src/verbinsert/verbinsert.cc
+===================================================================
+--- src/verbinsert/verbinsert.cc.orig
++++ src/verbinsert/verbinsert.cc
+@@ -1,3 +1,4 @@
++#include <cstdlib>
+ #include <iostream>
+ #include <fstream>
+ #include <iomanip>
+@@ -37,19 +38,19 @@ int main(int argc, char **argv)
+             continue;
+ 
+             case 's':
+-                indent.append(stoul(optarg), ' ');
++                indent.append(strtoul(optarg, NULL, 10), ' ');
+             continue;
+ 
+             case 't':
+-                indent.insert(0, stoul(optarg), '\t');
++                indent.insert(0, strtoul(optarg, NULL, 10), '\t');
+             continue;
+ 
+             case 'S':
+-                vindent.append(stoul(optarg), ' ');
++                vindent.append(strtoul(optarg, NULL, 10), ' ');
+             continue;
+ 
+             case 'T':
+-                vindent.insert(0, stoul(optarg), '\t');
++                vindent.insert(0, strtoul(optarg, NULL, 10), '\t');
+             continue;
+ 
+             case 'N':
+Index: icmake/program
+===================================================================
+--- icmake/program.orig
++++ icmake/program
+@@ -26,7 +26,7 @@ void _programYodlverbinsert()
+ {
+     if ("src/verbinsert/verbinsert.cc" younger 
+             g_install + BIN + "/yodlverbinsert")
+-        run(CXX + " --std=c++11 -o " + g_install + BIN + "/yodlverbinsert " + 
++        run(CXX + " -o " + g_install + BIN + "/yodlverbinsert " + 
+             g_copt + " src/verbinsert/verbinsert.cc " + g_lopt);
+ }
+ 

Modified: trunk/dports/textproc/yodl/files/use-macports-compilers.patch
===================================================================
--- trunk/dports/textproc/yodl/files/use-macports-compilers.patch	2014-11-28 21:55:48 UTC (rev 128861)
+++ trunk/dports/textproc/yodl/files/use-macports-compilers.patch	2014-11-28 22:11:42 UTC (rev 128862)
@@ -38,13 +38,11 @@
 ===================================================================
 --- icmake/program.orig
 +++ icmake/program
-@@ -26,8 +26,8 @@ void _programYodlverbinsert()
- {
+@@ -27,7 +27,7 @@ void _programYodlverbinsert()
      if ("src/verbinsert/verbinsert.cc" younger 
              g_install + BIN + "/yodlverbinsert")
--        run(CXX + " --std=c++11 -o " + g_install + BIN + "/yodlverbinsert " + 
+         run(CXX + " -o " + g_install + BIN + "/yodlverbinsert " + 
 -            g_copt + " src/verbinsert/verbinsert.cc " + g_lopt);
-+        run(CXX + " -o " + g_install + BIN + "/yodlverbinsert " + 
 +            g_cxxopt + " src/verbinsert/verbinsert.cc " + g_lopt);
  }
  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20141128/d001be59/attachment-0001.html>


More information about the macports-changes mailing list