This queue is for tickets about the XML-LibXSLT CPAN distribution.

Report information
The Basics
Id:
16224
Status:
resolved
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
gordoste [...] hotmail.com
Cc:
AdminCc:

BugTracker
Severity:
Normal
Broken in:
1.58
Fixed in:
(no value)

Attachments
xml-libxslt-nonstandard-path.patch



Subject: Patch for Makefile.PL for non-standard libxslt paths
Here is a patch that allows someone to specify a path for libxslt instead of picking it up from xslt-config. It's basically copied straight from XML::LibXML.
diff -ruN XML-LibXSLT-1.58/Makefile.PL XML-LibXSLT-1.58.new/Makefile.PL --- XML-LibXSLT-1.58/Makefile.PL 2005-08-05 15:00:06.000000000 +0000 +++ XML-LibXSLT-1.58.new/Makefile.PL 2005-12-01 11:01:28.000000000 +0000 @@ -13,28 +13,41 @@ my $DEBUG = delete $config{DEBUG}; -# get libs and inc from gnome-config -eval { - print "running xslt-config... "; - my $ver = backtick('xslt-config --version'); - my ($major, $minor, $point) = $ver =~ /(\d+)\.(\d+)\.(\d+)/g; - die "VERSION" unless $major > 1 || $minor > 0 || $point >= 6; - $config{LIBS} ||= backtick('xslt-config --libs'); - $config{INC} ||= backtick('xslt-config --cflags'); - print "ok\n"; -}; -if ($@) { - print "failed\n"; - if ($@ =~ /^VERSION/) { - die "XML::LibXSLT needs libxslt version 1.0.6 or higher\n"; - } - warn "*** ", $@ if $DEBUG; - warn "using fallback values for LIBS and INC\n"; - # backtick fails if gnome-config didn't exist... - $config{LIBS} = '-L/usr/local/lib -L/usr/lib -lxslt -lxml2 -lz -lm'; - $config{INC} = '-I/usr/local/include -I/usr/include'; - - print <<OPT; +unless ( $is_Win32 ) { # cannot get config in W32 + my $xsltcfg = "xslt-config"; + my $libprefix = $ENV{XSLTPREFIX} || $config{XSLTPREFIX}; + + delete $config{XSLTPREFIX}; # delete if exists, otherwise MakeMaker gets confused + + if ( defined $libprefix ) { + $xsltcfg = $libprefix . '/bin/' . $xsltcfg; + } + + # if a user defined INC and LIBS on the command line we must not + # override them + if ( not defined $config{LIBS} and not defined $config{INC} ) { + # get libs and inc from gnome-config + eval { + print "running xslt-config... "; + my $ver = backtick("$xsltcfg --version"); + my ($major, $minor, $point) = $ver =~ /(\d+)\.(\d+)\.(\d+)/g; + die "VERSION" unless $major > 1 || $minor > 0 || $point >= 6; + $config{LIBS} ||= backtick("$xsltcfg --libs"); + $config{INC} ||= backtick("$xsltcfg --cflags"); + print "ok\n"; + }; + if ($@) { + print "failed\n"; + if ($@ =~ /^VERSION/) { + die "XML::LibXSLT needs libxslt version 1.0.6 or higher\n"; + } + warn "*** ", $@ if $DEBUG; + warn "using fallback values for LIBS and INC\n"; + # backtick fails if gnome-config didn't exist... + $config{LIBS} = '-L/usr/local/lib -L/usr/lib -lxslt -lxml2 -lz -lm'; + $config{INC} = '-I/usr/local/include -I/usr/include'; + + print <<OPT; options: LIBS='$config{LIBS}' INC='$config{INC}' @@ -42,7 +55,8 @@ \$ $^X Makefile.PL LIBS='-L/path/to/lib' INC='-I/path/to/include' OPT - + } + } } if ($config{LIBS} !~ /\-lxslt/) {
On st 30.lis.2005 19:11:09, guest wrote:
Show quoted text
> Here is a patch that allows someone to specify a path for libxslt > instead of picking it up from xslt-config. It's basically copied > straight from XML::LibXML.
patch applied to the axkit Subversion repository (to appear in 1.60 release)


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.