pkgsrc/net/p5-Net-LibIDN/patches/patch-aa
dholland cef760fcdc Insert rpath for BUILDLINK_PREFIX.libidn as well as using the one that
comes from Perl, so this will still build if libidn and Perl are
installed in different trees. Belt-and-suspenders fix for PR 47187 on
NetBSD, may also fix the problem seen on Dragonfly.
2013-01-03 20:48:47 +00:00

29 lines
674 B
Text

$NetBSD: patch-aa,v 1.4 2013/01/03 20:48:47 dholland Exp $
Use both the LDFLAGS from Perl and the directory passed from the
pkgsrc makefile to find libidn.
--- Makefile.PL.orig 2009-02-26 12:09:45.000000000 +0000
+++ Makefile.PL
@@ -47,15 +47,12 @@ sub InitMakeParams
"disable-tld" => \$disable_tld
);
- if ($libdir)
- {
- $Params{LIBS} = "-L$libdir -lidn";
- }
- else
- {
- $Params{LIBS} = $Config{ldflags} . ' -lidn';
- }
-
+ $Params{LIBS} = "";
+ $Params{LIBS} .= "-L$libdir " if ($libdir);
+ $Params{LIBS} .= "-Wl,-R$libdir " if ($libdir);
+ $Params{LIBS} .= $Config{ldflags};
+ $Params{LIBS} .= " -lidn";
+
if ($incdir)
{
$Params{INC} = "-I$incdir";