[MacPorts] #52477: rtorrent: Update to 0.9.6 w/ patches for macOS 10.12

MacPorts noreply at macports.org
Sat Oct 1 21:11:00 CEST 2016


#52477: rtorrent: Update to 0.9.6 w/ patches for macOS 10.12
-------------------------+--------------------------------
  Reporter:  torstenb@…  |      Owner:  macports-tickets@…
      Type:  defect      |     Status:  new
  Priority:  Normal      |  Milestone:
 Component:  ports       |    Version:  2.3.4
Resolution:              |   Keywords:  sierra haspatch
      Port:  rtorrent    |
-------------------------+--------------------------------

Comment (by ryandesign@…):

 Your patch adds this block:

 {{{
 post-patch {
     system "find ${worksrcpath} \\( -name '*.h' -or -name '*.cc' \\) -type
 f -print0 | xargs -0 sed -i '' -e 's/tr1::/std::/g'"
     system "find ${worksrcpath} \\( -name '*.h' -or -name '*.cc' \\) -type
 f -print0 | xargs -0 sed -i '' -e 's/std::std::/std::/g'"
     system "find ${worksrcpath} \\( -name '*.h' -or -name '*.cc' \\) -type
 f -print0 | xargs -0 sed -i '' -e '/namespace tr1/d'"
     system "find ${worksrcpath} \\( -name '*.h' -or -name '*.cc' \\) -type
 f -print0 | xargs -0 sed -i '' -e '/include/s,tr1/,,'"
 }
 }}}

 Ideally, you would use `fs-traverse` and `reinplace`, instead of `system`
 calling `find`, `xargs` and `sed`. Maybe something like this (untested):

 {{{
 post-patch {
     fs-traverse f ${worksrcpath} {
         switch [file extension ${f}] {
             .cc -
             .h {
                 reinplace {s/std::std::/std::/g} ${f}
                 reinplace {/namespace tr1/d} ${f}
                 reinplace {/namespace tr1/d} ${f}
                 reinplace {/include/s,tr1/,,} ${f}
             }
         }
     }
 }
 }}}

 It looks like this will make the port work with compilers that support the
 final C++11 standard, but fail with compilers that only support the
 transitional tr1 standard. I wonder if you should only be doing this
 replacing when `configure.cxx_stdlib` is` libc++`. Or alternatively, maybe
 this code requires libc++; if so, include the cxx11 1.0 portgroup to
 handle the details. We can wait on this, commit it without such changes,
 and see whether it fails to build on the older [https://build.macports.org
 Buildbot] workers.

 The same comments apply to libtorrent in #52476.

-- 
Ticket URL: <https://trac.macports.org/ticket/52477#comment:4>
MacPorts <https://www.macports.org/>
Ports system for the Mac operating system



More information about the macports-tickets mailing list