#14216 closed defect (fixed)
patch to graphics/gd2 to do a better job linking against libiconv and gdlib-config reporting of same
Reported by: | ghosthound | Owned by: | ghosthound |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 1.6.0 |
Keywords: | Cc: | ryandesign (Ryan Carsten Schmidt) | |
Port: |
Description
In trying to build perl/p5-gdtextutil (at least on leopard), I found that p5-gd didn't link against several libraries properly. Part of the problem appears to be a work-around for gd2 not properly reporting its libs, in particular libiconv. The attached patchfiles and patch for the Portfile resolve this. I can't say its the most elegant, perhaps someone better versed in auto* can provide a better fix.
Attachments (4)
Change History (11)
Changed 17 years ago by ghosthound
Attachment: | patch-gd2-Portfile added |
---|
Changed 17 years ago by ghosthound
Attachment: | patch-config-gdlib-config.in.diff added |
---|
patchfile for gd2.../config/gdlib-config.in to do a better job reporting libs
Changed 17 years ago by ghosthound
Attachment: | patch-Makefile.in.diff added |
---|
patchfile for gd2.../Makefile.in to do a better job linking against libiconv
Changed 17 years ago by ghosthound
Attachment: | patch-Makefile.am.diff added |
---|
patch for gd2.../Makefile.am to do a better job of reporting libiconv, I think optional for the port
comment:1 Changed 17 years ago by jmpalacios (Juan Manuel Palacios)
Milestone: | → Port Bugs |
---|
comment:2 Changed 17 years ago by ghosthound
Owner: | changed from ryandesign@… to ricci@… |
---|---|
Status: | new → assigned |
taking as we're well past the 72 hour maintainer timeout...
comment:3 Changed 17 years ago by ghosthound
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
committed in r34193 (not patch-Makefile.am.diff)
comment:4 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | ryandesign@… added |
---|
Sorry, I forgot about this, and also didn't understand the issue. gd2 has been linking properly with libiconv from MacPorts on my system...
Do we need to increment the port revision number to force a rebuild for everybody? Or did the errors that these patches corrected prevent the installation in the first place?
comment:5 Changed 17 years ago by ghosthound
Gah, totally forgot about bumping the revision. Yeah, we should, the reason being the answer to your first paragraph... GD2 does link just fine against libiconv. gdlib-config doesn't properly report how the linking was done (before the above patch), IIRC, it reports the link against libiconv as the path to libiconv (i.e. "/opt/local/lib/libiconv.dylib" instead of "-L/opt/local/lib -liconv". This results in failures for other software (like p5-gd) that try to use gdlib-config - thus p5-gd had some special (and hard-wired) configure arguments to avoid using gdlib-config. You should be able to see this by running "gdlib-config --libs" before and after this patch. If you'd like me to bump the revision I will, just let me know.
comment:6 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)
I did notice that gdlib-config --libs
contained /opt/local/lib/libiconv.dylib
which seemed odd to me. I bumped the revision in r34197.
Before:
$ port installed gd2 The following ports are currently installed: gd2 @2.0.35_0 (active) $ gdlib-config --libs -lXpm -lX11 -ljpeg -lfontconfig -lfreetype -lpng12 -lz /opt/local/lib/libiconv.dylib $
After:
$ port installed gd2 The following ports are currently installed: gd2 @2.0.35_1 (active) $ gdlib-config --libs -lXpm -lX11 -ljpeg -lfontconfig -lfreetype -lpng12 -lz -L/opt/local/lib -liconv -R/opt/local/lib $
Though I must say it seems like gdlib-config --libs
shouldn't need to include -L/opt/local/lib
since that's already included in gdlib-config --ldflags
. I'm also not sure what -R/opt/local/lib
means; never seen -R
before.
patch for graphics/gd2/Portfile