Subject: | Fails to build on FreeBSD (0.991) |
The 0.991 version fails to build on my freebsd 9.0 system:
$ perl Build.PL
Can't build and link to 'Imlib2', 'X11', 'Xext', 'freetype'
All these libraries are installed on the system. There are two problems:
- The check_lib_or_exit function does not seem to look into /usr/local/lib, but that's where third-party libraries are installed on *BSD systems
- -ldl seems to be linux-specific and should/may be removed on *BSD systems
If I change Build.PL as in the attached diff (not usable as-is, probably should be protected with $^O=~/bsd/ checks or so), then things work: I can build the module and the tests pass.
Regards,
Slaven
Subject: | X11-FullScreen-0.991-FreeBSD.diff |
diff --git i/Build.PL w/Build.PL
index 91ed128..b870a9c 100644
--- i/Build.PL
+++ w/Build.PL
@@ -6,7 +6,8 @@ use Module::Build;
check_lib_or_exit(
# fill in what you prompted the user for here
- lib => [qw(Imlib2 X11 Xext freetype)]
+ lib => [qw(Imlib2 X11 Xext freetype)],
+ libpath=>"/usr/local/lib",
);
my ($imlib_include, $imlib_lib);
@@ -29,7 +30,7 @@ sub find_imlib_config {
my $build = Module::Build->new(
module_name => 'X11::FullScreen',
- extra_linker_flags => $imlib_lib . ' -lz -lm -ldl -lXext -lX11',
+ extra_linker_flags => $imlib_lib . ' -lz -lm -lXext -lX11',
extra_compiler_flags => '-I. ' . $imlib_include,
license => 'perl',
build_requires => {