From: Richard D. <ric...@us...> - 2008-02-24 10:17:47
|
Update of /cvsroot/file-extattr/File-ExtAttr In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv2016 Modified Files: Changes MANIFEST Makefile.PL TODO Log Message: Bail more gracefully when build pre-reqs aren't present Index: Changes =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/Changes,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** Changes 26 Jan 2008 08:33:08 -0000 1.38 --- Changes 24 Feb 2008 10:17:48 -0000 1.39 *************** *** 9,12 **** --- 9,20 ---- since File::ExtAttr's test suite will never pass on it. + - (richdawe) Update Makefile.PL to fail more gracefully when the build + pre-requisites are not present. On Linux use + Devel::CheckLib to check for libattr. Also exit + more gracefully if libattr's headers are not present. + + - (richdawe) OpenBSD isn't supported, so bail gracefully + in Makefile.PL on that platform. + 1.07 2007-12-15 Index: TODO =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/TODO,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** TODO 23 Feb 2008 07:40:27 -0000 1.20 --- TODO 24 Feb 2008 10:17:48 -0000 1.21 *************** *** 1,6 **** todo: - * Detect libattr (for the header) using Devel::CheckLib - -- See <http://use.perl.org/~barbie/journal/35584?from=rss>. - -- There's no Fedora package, so package it too. * utf8 * warnings --- 1,3 ---- Index: Makefile.PL =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/Makefile.PL,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Makefile.PL 30 Nov 2007 20:16:49 -0000 1.9 --- Makefile.PL 24 Feb 2008 10:17:48 -0000 1.10 *************** *** 1,7 **** use ExtUtils::MakeMaker; # Check whether we have <attr/attributes.h> and <attr/xattr.h> on Linux. # Suggest what the user needs to install, to get these files. ! @DIRS = qw(. /usr/include); if ($^O eq 'linux') { --- 1,17 ---- + use lib qw(inc); use ExtUtils::MakeMaker; + use Devel::CheckLib; + use strict; # Check whether we have <attr/attributes.h> and <attr/xattr.h> on Linux. # Suggest what the user needs to install, to get these files. ! ! if ($^O eq 'linux') { ! check_lib_or_exit( ! lib => [qw(attr)] ! ); ! } ! ! my @DIRS = qw(. /usr/include); if ($^O eq 'linux') { *************** *** 11,14 **** --- 21,25 ---- ); my $incdir; + my $missing = 0; foreach $incdir (@DIRS) *************** *** 22,32 **** foreach (keys %headers) { ! die "<$_> not found; perhaps you need to install libattr-devel" ! if ($headers{$_} == 0); } } # OpenBSD does not support extended attributes. ! die 'OpenBSD does not support extended attributes' if ($^O eq 'openbsd'); # See lib/ExtUtils/MakeMaker.pm for details of how to influence --- 33,50 ---- foreach (keys %headers) { ! if ($headers{$_} == 0) { ! warn "<$_> not found; perhaps you need to install libattr-devel"; ! $missing++; ! } } + + exit(0) if ($missing > 0); } # OpenBSD does not support extended attributes. ! if ($^O eq 'openbsd') { ! warn 'OpenBSD does not support extended attributes'; ! die "OS unsupported"; ! } # See lib/ExtUtils/MakeMaker.pm for details of how to influence *************** *** 37,42 **** PREREQ_PM => { # e.g., Module::Name => 1.1 ! Carp => 0, ! Scalar::Util => 0 }, ($] >= 5.005 ? ## Add these new keywords supported since 5.005 --- 55,60 ---- PREREQ_PM => { # e.g., Module::Name => 1.1 ! 'Carp' => 0, ! 'Scalar::Util' => 0 }, ($] >= 5.005 ? ## Add these new keywords supported since 5.005 *************** *** 56,65 **** NO_META => 1, ); - - - sub MY::postamble { - ' - $(MYEXTLIB): mylib/Makefile - cd mylib && $(MAKE) $(PASSTHRU) - '; - } --- 74,75 ---- Index: MANIFEST =================================================================== RCS file: /cvsroot/file-extattr/File-ExtAttr/MANIFEST,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** MANIFEST 21 Dec 2007 16:49:53 -0000 1.20 --- MANIFEST 24 Feb 2008 10:17:48 -0000 1.21 *************** *** 1,3 **** --- 1,4 ---- Changes + inc/Devel/CheckLib.pm Makefile.PL MANIFEST |