Fix linking against libxml2. Disable auto-configuration which uses

broken mix of linker and compiler invocation.
This commit is contained in:
joerg 2014-06-10 22:38:48 +00:00
parent 9f253c2e03
commit c125592ebd
3 changed files with 45 additions and 3 deletions

View file

@ -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 @@ CONFLICTS+= p5-XML-LibXML-XPathContext-[0-9]*
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}

View file

@ -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

View file

@ -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