Opened 16 years ago

Closed 16 years ago

Last modified 15 years ago

#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)

patch-gd2-Portfile (348 bytes) - added by ghosthound 16 years ago.
patch for graphics/gd2/Portfile
patch-config-gdlib-config.in.diff (553 bytes) - added by ghosthound 16 years ago.
patchfile for gd2.../config/gdlib-config.in to do a better job reporting libs
patch-Makefile.in.diff (666 bytes) - added by ghosthound 16 years ago.
patchfile for gd2.../Makefile.in to do a better job linking against libiconv
patch-Makefile.am.diff (287 bytes) - added by ghosthound 16 years ago.
patch for gd2.../Makefile.am to do a better job of reporting libiconv, I think optional for the port

Download all attachments as: .zip

Change History (11)

Changed 16 years ago by ghosthound

Attachment: patch-gd2-Portfile added

patch for graphics/gd2/Portfile

Changed 16 years ago by ghosthound

patchfile for gd2.../config/gdlib-config.in to do a better job reporting libs

Changed 16 years ago by ghosthound

Attachment: patch-Makefile.in.diff added

patchfile for gd2.../Makefile.in to do a better job linking against libiconv

Changed 16 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 16 years ago by jmpp@…

Milestone: Port Bugs

comment:2 Changed 16 years ago by ghosthound

Owner: changed from ryandesign@… to ricci@…
Status: newassigned

taking as we're well past the 72 hour maintainer timeout...

comment:3 Changed 16 years ago by ghosthound

Resolution: fixed
Status: assignedclosed

committed in r34193 (not patch-Makefile.am.diff)

comment:4 Changed 16 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 16 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 16 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.

comment:7 Changed 15 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

Note: See TracTickets for help on using tickets.