#47934 closed defect (fixed)
libvpx should be in depends_build not depends_lib
Reported by: | ryandesign (Ryan Carsten Schmidt) | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.3.3 |
Keywords: | Cc: | dbevans (David B. Evans), jeremyhu (Jeremy Huddleston Sequoia), dstrubbe (David Strubbe) | |
Port: | avidemux, ffmpeg, ffmpeg-devel, gd2, gstreamer010-gst-plugins-bad, gstreamer1-gst-plugins-good |
Description
libvpx installs a static library only, so dependents should list libvpx in depends_build, not depends_lib. Right? I can make this change, but want to verify with you that it's correct first.
Change History (9)
comment:1 follow-up: 2 Changed 9 years ago by dbevans (David B. Evans)
comment:2 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to devans@…:
I don't know about "should" but I think, theoretically, you're right about making libvpx or any lib that produces only a static library a build dependency. The lib dependency is not "wrong" per se as it doesn't break the port but could be viewed as overkill.
What I meant was that making it a library dependency causes libvpx to be installed on users' systems when it doesn't need to be. There is no benefit to it being there, for users installing these ports from binaries. I was just hesitating because every port depending on libvpx does it by library dependency, and I wanted to make sure there wasn't some reason why this was needed in this case. But I don't think there is.
comment:3 Changed 9 years ago by dbevans (David B. Evans)
Agreed. You caught me in a bad mood. Sorry for being "linquistically over-sensitive."
comment:4 Changed 9 years ago by dbevans (David B. Evans)
comment:5 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:6 follow-up: 8 Changed 9 years ago by dstrubbe (David Strubbe)
I'm don't think this is a good idea for gd2, because it recommends linking libvpx according to its config binary:
$ gdlib-config --libs -lgd -ljpeg -lz -L/opt/local/lib -lpng16 -L/opt/local/lib -lfreetype -L/opt/local/lib -lfontconfig -lfontconfig -L/opt/local/lib -lXpm -L/opt/local/lib -lvpx -L/opt/local/lib -ltiff -liconv
Everything else in this list is depends_lib for gd2. As a result, a code which naturally uses the output of this command in a configure script to decide how to link will fail if libvpx is no longer installed.
On the other hand, the depends_lib port:expat does not seem to be dynamically linked into any library or executable from gd2, so I wonder if it really needs to be depends_lib.
comment:8 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to dstrubbe:
I'm don't think this is a good idea for gd2, because it recommends linking libvpx according to its config binary:
$ gdlib-config --libs -lgd -ljpeg -lz -L/opt/local/lib -lpng16 -L/opt/local/lib -lfreetype -L/opt/local/lib -lfontconfig -lfontconfig -L/opt/local/lib -lXpm -L/opt/local/lib -lvpx -L/opt/local/lib -ltiff -liconvEverything else in this list is depends_lib for gd2. As a result, a code which naturally uses the output of this command in a configure script to decide how to link will fail if libvpx is no longer installed.
gd2 no longer uses libvpx as of 2.2.0; see https://github.com/libgd/libgd/issues/129.
On the other hand, the depends_lib port:expat does not seem to be dynamically linked into any library or executable from gd2, so I wonder if it really needs to be depends_lib.
Looks like I added the expat dependency when updating the port to 2.0.34 in 2007 in [2fb64674a09a9a070635c840110f4e208d0be078/macports-ports]. That was probably wrong. expat was probably only an indirect dependency through gettext. That was back when libraries were being overlinked to indirect dependencies. Overlinking was fixed in MacPorts in 2013; see #38010 and [a940ce8fed8df056b8d5720ac69961a6e9c6ecf7/macports-base].
I don't know about "should" but I think, theoretically, you're right about making libvpx or any lib that produces only a static library a build dependency. The lib dependency is not "wrong" per se as it doesn't break the port but could be viewed as overkill.
Having said that, I haven't done any real testing of this so why don't you let me handle ffmpeg/ffmpeg-devel and the gstreamer ports and I'll leave avidemux and gd2 to you. I'm tempted to wait on this until libvpx 1.4.0 is committed and do it then along with the required revbump.
Note that dependents of static libraries always need a revdump whenever the libvpx code changes due to the static lib issue. Otherwise, the port could be using a compiled in old version of the library even though the library has been updated.