pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/textproc/p5-XML-LibXML Fix linking against libxml2. Di...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/760c6419c252
branches:  trunk
changeset: 635775:760c6419c252
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Tue Jun 10 22:38:48 2014 +0000

description:
Fix linking against libxml2. Disable auto-configuration which uses
broken mix of linker and compiler invocation.

diffstat:

 textproc/p5-XML-LibXML/Makefile                  |   4 +-
 textproc/p5-XML-LibXML/distinfo                  |   3 +-
 textproc/p5-XML-LibXML/patches/patch-Makefile.PL |  41 ++++++++++++++++++++++++
 3 files changed, 45 insertions(+), 3 deletions(-)

diffs (74 lines):

diff -r c69d9c9ee217 -r 760c6419c252 textproc/p5-XML-LibXML/Makefile
--- a/textproc/p5-XML-LibXML/Makefile   Tue Jun 10 22:17:57 2014 +0000
+++ b/textproc/p5-XML-LibXML/Makefile   Tue Jun 10 22:38:48 2014 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.54 2014/06/05 09:24:48 wiz Exp $
+# $NetBSD: Makefile,v 1.55 2014/06/10 22:38:48 joerg Exp $
 
 DISTNAME=      XML-LibXML-2.0116
 PKGNAME=       p5-${DISTNAME}
@@ -24,7 +24,7 @@
 
 MAKE_ENV+=             SKIP_SAX_INSTALL=1 # Must be done in the INSTALL script
 MAKE_PARAMS+=          INC="-I${BUILDLINK_PREFIX.libxml2}/include/libxml2"
-MAKE_PARAMS+=          LIBS="-L${BUILDLINK_PREFIX.libxml2}/lib ${LINKER_RPATH_FLAG}${BUILDLINK_PREFIX.libxml2}/lib -lxml2"
+MAKE_PARAMS+=          LIBS="-L${BUILDLINK_PREFIX.libxml2}/lib ${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.libxml2}/lib -lxml2"
 PERL5_PACKLIST=                auto/XML/LibXML/.packlist
 
 FILES_SUBST+=          PERL5_INSTALLVENDORLIB=${PERL5_INSTALLVENDORLIB:Q}
diff -r c69d9c9ee217 -r 760c6419c252 textproc/p5-XML-LibXML/distinfo
--- a/textproc/p5-XML-LibXML/distinfo   Tue Jun 10 22:17:57 2014 +0000
+++ b/textproc/p5-XML-LibXML/distinfo   Tue Jun 10 22:38:48 2014 +0000
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.28 2014/05/03 12:37:21 wen Exp $
+$NetBSD: distinfo,v 1.29 2014/06/10 22:38:48 joerg Exp $
 
 SHA1 (XML-LibXML-2.0116.tar.gz) = 12b0c3add404a8139def5afff2cfc18dad2b1f27
 RMD160 (XML-LibXML-2.0116.tar.gz) = 41396e1858e2399de5d50ce4f4f6393c5f8405f2
 Size (XML-LibXML-2.0116.tar.gz) = 463609 bytes
+SHA1 (patch-Makefile.PL) = f4a2c1b0c1af34c7884f0bd765ab78b463f6e8bc
diff -r c69d9c9ee217 -r 760c6419c252 textproc/p5-XML-LibXML/patches/patch-Makefile.PL
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/p5-XML-LibXML/patches/patch-Makefile.PL  Tue Jun 10 22:38:48 2014 +0000
@@ -0,0 +1,41 @@
+$NetBSD: patch-Makefile.PL,v 1.1 2014/06/10 22:38:48 joerg Exp $
+
+Patch away broken mixup of linker vs compiler invocation and
+hard-code the result.
+
+--- Makefile.PL.orig   2014-06-10 22:31:37.000000000 +0000
++++ Makefile.PL
+@@ -411,32 +411,7 @@ sub _libxml_check_lib {
+     }
+ }
+ 
+-print "Checking for ability to link against xml2...";
+-if ( _libxml_check_lib('xml2') ) {
+-    print "yes\n";
+-}
+-else {
+-    print "no\n";
+-    print "Checking for ability to link against libxml2...";
+-    if ( _libxml_check_lib('libxml2')) {
+-        print "yes\n";
+-    }
+-    else {
+-        print STDERR <<"DEATH";
+-libxml2, zlib, and/or the Math library (-lm) have not been found.
+-Try setting LIBS and INC values on the command line
+-Or get libxml2 from
+-  http://xmlsoft.org/
+-If you install via RPMs, make sure you also install the -devel
+-RPMs, as this is where the headers (.h files) are.
+-
+-Also, you may try to run perl Makefile.PL with the DEBUG=1 parameter
+-to see the exact reason why the detection of libxml2 installation
+-failed or why Makefile.PL was not able to compile a test program.
+-DEATH
+-        exit 0; # 0 recommended by http://cpantest.grango.org (Notes for CPAN Authors)
+-    }
+-}
++$config{LIBS} = "-lxml2";
+ 
+ # -------------------------------------------------------------------------- #
+ # _NOW_ write the Makefile



Home | Main Index | Thread Index | Old Index