Subject: | Does not pass prebuild_check on freebsd |
prebuild_check (in inc/Module/Build/Scintilla/GTK.pm) does not include
any additional paths to libs. So build failed with message:
"Check for gtk2 development libraries failed..." if system has gtk libs
in non-auto-include paths (freebsd, for ex., installs all external soft
in /usr/local/lib, but to link with these libs ld require -
L/usr/local/lib)
Attached patch should fix this problem by add stc_link_paths to ld args
in stc_prebuild_check.
Subject: | prebuild_check-use-right-libpths.patch |
Index: inc/Module/Build/Scintilla/GTK.pm
===================================================================
--- inc/Module/Build/Scintilla/GTK.pm (revision 19538)
+++ inc/Module/Build/Scintilla/GTK.pm (working copy)
@@ -65,11 +65,15 @@
sub stc_prebuild_check {
my $self = shift;
- my $ld = Alien::wxWidgets->linker;
- my $libstring = $self->stc_extra_scintilla_libs;
my $outfile = 'stc_checkdepends.out';
- my $command = qq($ld -fPIC -shared $libstring -o $outfile);
- if ( system($command) ) {
+ my @cmd = (
+ Alien::wxWidgets->linker,
+ $self->stc_link_paths,
+ '-fPIC -shared',
+ $self->stc_extra_scintilla_libs,
+ '-o '.$outfile,
+ );
+ if ( system(join(' ',@cmd)) ) {
unlink($outfile);
print qq(Check for gtk2 development libraries failed.\n);
print qq(Perhaps you need to install package libgtk2.0-dev or the equivalent for your system.\n);