Opened 15 months ago

Last modified 7 months ago

#52477 assigned defect

rtorrent: Update to 0.9.6 w/ patches for macOS 10.12

Reported by: torstenb@… Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: sierra haspatch Cc:
Port: rtorrent

Description (last modified by ryandesign (Ryan Schmidt))

Updating rtorrent to 0.9.6 and adding patches to build with newer clang on macOS Sierra 10.12. New patches are from current FreeBSD ports tree. Depends on newer libtorrent in trac ticket:52476

Attachments (4)

patch-extra-clang.diff (23.5 KB) - added by torstenb@… 15 months ago.
patch-src_display_window_file_list.diff (242 bytes) - added by torstenb@… 15 months ago.
patch-src_signal_handler.diff (225 bytes) - added by torstenb@… 15 months ago.
Portfile.diff (2.1 KB) - added by torstenb@… 15 months ago.

Download all attachments as: .zip

Change History (12)

comment:1 Changed 15 months ago by torstenb@…

Can't upload diff to Portfile as it matches BadContent entry "rak" + "sha". The developers username, also in the Websites URL, contains that string. Will add Portfile once BadContent entries allow it

Changed 15 months ago by torstenb@…

Changed 15 months ago by torstenb@…

Changed 15 months ago by torstenb@…

comment:2 follow-up: Changed 15 months ago by mf2k (Frank Schima)

  • Keywords changed from sierra, haspatch to sierra haspatch

It should work now.

Changed 15 months ago by torstenb@…

comment:3 in reply to: ↑ 2 Changed 15 months ago by torstenb@…

Replying to mf2k@…:

It should work now.

It does indeed. Thanks!

comment:4 Changed 15 months ago by ryandesign (Ryan Schmidt)

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 Buildbot workers.

The same comments apply to libtorrent in #52476.

comment:5 Changed 15 months ago by ryandesign (Ryan Schmidt)

  • Description modified (diff)

comment:6 Changed 13 months ago by jmroot (Joshua Root)

  • Owner changed from macports-tickets@… to stuartwesterman
  • Status changed from new to assigned

comment:7 Changed 13 months ago by stuartwesterman (Stuart Westerman)

Looks good!

comment:8 Changed 7 months ago by mf2k (Frank Schima)

  • Owner stuartwesterman deleted
Last edited 7 months ago by mf2k (Frank Schima) (previous) (diff)
Note: See TracTickets for help on using tickets.