Created attachment 151198 [details] liportaudio-cleanup Hello maintainers of ports depending on portaudio libs. Right now we have 2 portaudio ports, this patch fixes detection of installed portaudio libraries before building. audio/portaudio and audio/portaudio2 provide library with the same name: libportaudio.so The only difference is in ABI version: audio/portaudio => libportaudio.so.0 audio/portaudio2 => libportaudio.so.2 In your ports detection looks something like this: libportaudio:${PORTVERSION}/audio/portaudio[2] which means that both ports pass this test. When building from ports this can lead to false library detection and build failures or wrong linking depending on which library is already installed on user system. Please review changes to your ports. If there no objections I plan to commit this in standard two weeks. Thanks
Maintainer CC'd
How do the packages know which library to use if both are installed? Do you need to update some .pc files aswell? --HPS
Else patch looks good. --HPS
(In reply to Hans Petter Selasky from comment #3) > Else patch looks good. > > --HPS The other ports that need portaudio should explicitly specify a version. Thanks, David
(In reply to Pawel Pekala from comment #0) . . . > > Please review changes to your ports. If there no objections I plan to > commit this in standard two weeks. > > Thanks Patch is good, please commit. Thanks, David
> How do the packages know which library to use if both are installed? Do you > need to update some .pc files aswell? With audio/portaudio2 this should be easy as long you follow what pkgconfig gives you, there are separate directories for includes and library: /usr/local/include/portaudio2 /usr/local/lib/portaudio2. audio/portaudio is a mixed bag depending on upstream configure scripts as there is no pkgconfig pc file for this port.
I'm good with this patch. Thanks.
Looks okay from my standpoint.
(In reply to Pawel Pekala from comment #6) The problem has always been portaudio 1 sits in /usr/local where all the other ports needed for a build live, upstream ports blithely insert /usr/local/lib into their Makefiles without ensuring /usr/local/portaudio2/lib is inserted first. If I make a suggestion, move portaudio1 to under /usr/local/portaudio1 or some such. This would mean rebuilding all ports depending on portaudio1 as well as portaudio2 but would help in making less work for porters in the future.
> The problem has always been portaudio 1 sits in /usr/local where all the other > ports needed for a build live, upstream ports blithely insert /usr/local/lib > into their Makefiles without ensuring /usr/local/portaudio2/lib is inserted > first. If I make a suggestion, move portaudio1 to under /usr/local/portaudio1 > or some such. This would mean rebuilding all ports depending on portaudio1 as > well as portaudio2 but would help in making less work for porters in the > future. Yes this could be done as suggested after this PR is committed. I didn't looked at it but I suspect that moving files in audio/portaudio would require to modify all consumers to take notice otherwise there will be a lot of failed builds. Big task IMHO.
(In reply to Pawel Pekala from comment #10) grep portaudio-18 INDEX-*|wc -l 554 grep portaudio2-19 INDEX-*|wc -l 53 *sigh* yes it would be.
A commit references this bug: Author: pawel Date: Sun Jan 25 00:46:16 UTC 2015 New revision: 377845 URL: https://svnweb.freebsd.org/changeset/ports/377845 Log: Fix detection of libportaudio libraries PR: 196427 Submitted by: myself Approved by: hselasky, stephen, marcus, maintainer timeout from others Changes: head/audio/denemo/Makefile head/audio/jack/Makefile head/audio/listener/Makefile head/audio/mhwaveedit/Makefile head/audio/mixxx/Makefile head/audio/musescore/Makefile head/audio/py-fastaudio/Makefile head/audio/rezound/Makefile head/audio/zynaddsubfx/Makefile head/comms/linrad/Makefile head/comms/quisk/Makefile head/emulators/hatari/Makefile head/math/freemat/Makefile head/math/octave-forge-ltfat/Makefile head/net/wireshark/Makefile
Committed, thanks for reviews!