More of a cosmetic fix: use PTHREAD_LIBS instead of hardcoded -pthread Port maintainer (gslin@gslin.org) is cc'd. Generated with FreeBSD Port Tools 1.02 (mode: change, diff: SVN)
Maintainer of net/libzmq2, Please note that PR ports/190426 has just been submitted. If it contains a patch for an upgrade, an enhancement or a bug fix you agree on, reply to this email stating that you approve the patch and a committer will take care of it. The full text of the PR can be found at: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/190426 -- Edwin Groothuis via the GNATS Auto Assign Tool edwin@FreeBSD.org
State Changed From-To: open->feedback Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
*** Bug 190918 has been marked as a duplicate of this bug. ***
It was changed to -pthread in this commit: http://svnweb.freebsd.org/ports?view=revision&revision=312209 PTHREAD_CFLAGS and PTHREAD_LIBS are deprecated. In this case I think you can remove the entire post-patch target. It adds -pthread to the pkgconfig file which means ports that depend on this port will also use -pthread, but this kind of propagation of -pthread hasn't been necessary since FreeBSD got rid of libc_r. You should check if the dependent ports still build, but I'd be surprised if they don't and actually that would probably be a bug in those ports then, not in libzmq2.
Wow, I wasn't aware of PTHREAD_LIBS deprecation. The commit was a year ago, why has it not been finished since then? Is it ok to remove -pthread replacements all over the tree now? Regarding libzmq2, I guess I'll test depends first. Most of them need so version added to LIB_DEPENDS entry anyway.
I'm not sure why it wasn't finished. It's safe to remove PTHREAD_CFLAGS everywhere because that variable is empty nowadays. PTHREAD_LIBS can be replaced with -pthread everywhere, but in many cases it can actually be removed. It used to be that we had two libc's, one without threading (libc) and one with threading (libc_r). If an executable used a library which required threading then the executable had to be linked with libc_r. That's why many ports had PTHREAD_LIBS added when they had a dependency which used threading. Nowadays libpthread is much more like a regular library and ports don't have to worry about such dependencies. The only exception is dynamic loading (using dlopen) of a library that requires threading. In that case the executable or library that calls dlopen needs to be linked with libpthread as well. There aren't that many ports like this. Examples are PHP and Ruby ports which can load external modules.
I'm okay with this patch.
(In reply to gslin from comment #7) > I'm okay with this patch. What do you think about removing -pthread? What reason was it added for?