Patch attached, but I don't know if it's okay. I don't really want to install libssh.
Created attachment 167400 [details]
turn libssh support into an option
Hi Moritz, thanks for your patch! :)
It looks mostly good, but I have 2 minor improvements if that is ok. They are both based on the fact that according to the mc project documentation, libssh is only required for supporting SFTP as a virtual file system. 
1. The options should be named SFTP rather than LIBSSH, and the description should be something along the lines of "Support for SFTP (via libssh)"
2. In addition to setting the libssh dependency, this option should also cause the configure script to be called with either --enable-vfs-sftp or --disable-vfs-sftp . The following line should be added below the LIBSSH_LIB_DEPENDS line to achieve this:
Do you think you would be able to resubmit your patch with these changes?
Lastly, if you do have any way to test building this port with the new option enabled, and then again with it disabled, it is always good to attach any evidence that it works. Thanks again :)
Just wondering if you have any thoughts on my previous response? I think it is a good idea, and your patch only needs a few small improvements to be ready for commit. Do you think you will be able to submit an updated version?
Thanks for reminding me, I would have forgotten all about it, to be
I think we need to add '--disable-vfs-sftp' to the configure options, if
the SFTP option is not enabled. Do you know whether something like
NO_SFTP_CONFIGURE_DISABLE is possible?
Created attachment 168348 [details]
Patch for misc/mc to create new port option SFTP
I have updated the patch provided by Moritz based on the recommendations I provided above. Note that the SFTP_CONFIGURE_ENABLE will automatically add either --enable-vfs-sftp or --disable-vfs-sftp depending on the status of the SFTP option. Refer to the FreeBSD porter's handbook for details on this option helper:
Created attachment 168349 [details]
QA: Successful poudriere testport logs for misc/mc 4.8.16 with patch on FreeBSD 10.2 amd64
A commit references this bug:
Date: Fri Mar 18 12:04:32 UTC 2016
New revision: 411345
misc/mc: Multiple fixes
- Fix subshell functionality for csh users
- Make SFTP an option, enabled by default
- Fix SIGILL on FreeBSD 9.x
- Fix perl ls helper with fish shell
PR: 207487, 208027, 208102, 208104