$ ldd /usr/local/lib/python2.7/site-packages/_portaudio.so
libportaudio.so => /usr/local/lib/libportaudio.so (0x801608000)
"-L/usr/local/lib/portaudio2" is appended instead of prepended:
cc -shared -fstack-protector -O2 -pipe -fstack-protector -fno-strict-aliasing build/temp.freebsd-10.1-STABLE-amd64-2.7/src/_portaudiomodule.o -L/usr/local/lib -lportaudio -lpython2.7 -o build/lib.freebsd-10.1-STABLE-amd64-2.7/_portaudio.so -L/usr/local/lib/portaudio2
Maintainer CC'd and maintainer-feedback requested.
Created attachment 150695 [details]
Try the attached patch. It also fixes:
- build on DragonFly DPorts
- LIB_DEPENDS to ignore libportaudio.so from audio/portaudio
- LOCALBASE != PREFIX build
the fix works here
Created attachment 150732 [details]
patch to py-pyaudio
I decided that the fix from Jann Bleich was fine (was working on a similar one).
Both portlint and poudriere complainded about the LIB_DEPENDS line so I replaced in with a somewhat ugly BUILD_DEPENDS version.
Thanks for reporting this and the proposed fix.
Comment on attachment 150732 [details]
patch to py-pyaudio
portaudio2 is linked directly, not via dlopen. RUN_DEPENDS is still required to not break runtime for package users.
And there's a generic way to depend on package that fits on 80col terminal.
Comment on attachment 150695 [details]
Illegal use of LIB_DEPENDS, at least before bug 196109.
Please don't forget to update keywords, and set/update flags as issues progress.
Maintainer, if you can attach a successful poudriere build, that would be great.
Created attachment 151004 [details]
Patch to py-pyaudio
- Improved fix for link problem
- Update to version 0.28
Created attachment 151006 [details]
Poudriere build log
The poudriere buildlog after applying proposed patch, attachment 151004 [details]. Log requested by Kubilay Kocak (See comment #9).
(In reply to Kubilay Kocak from comment #9)
> Please don't forget to update keywords, and set/update flags as issues
> Maintainer, if you can attach a successful poudriere build, that would be
Poudrere build is attached
A commit references this bug:
Date: Thu Jan 1 19:56:46 UTC 2015
New revision: 376027
- Update to version 0.2.8, add LICENSE 
- Fix build on DragonFly and when LOCALBASE != PREFIX 
- Make sure to link with audio/portaudio2 
Submitted by: maintainer , Jan Beich 
Committed with small change:
this prevents false library detection in more elegant way.
audio/portaudio => libportaudio.so.0
audio/portaudio2 => libportaudio.so.2