[perl-Gnome2-PanelApplet] Be nice to CPAN clients and testers



commit 62c0ae48a1b3dcc53f5c9a13bb12b0b7227548e2
Author: Torsten Schönfeld <kaffeetisch gmx de>
Date:   Sun Mar 7 02:18:10 2010 +0100

    Be nice to CPAN clients and testers

 Makefile.PL |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)
---
diff --git a/Makefile.PL b/Makefile.PL
index 45865fe..f2a8098 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -38,7 +38,16 @@ unless (eval "use ExtUtils::Depends '$perl_reqs{'ExtUtils::Depends'}';"
   exit 1; # not reached
 }
 
-my %pkgcfg = ExtUtils::PkgConfig->find("libpanelapplet-2.0 >= $build_reqs{'libpanelapplet-2.0'}");
+# If the package can't be found, warn and exit with status 0 to indicate to
+# CPAN testers that their system is not supported.
+my %pkgcfg;
+unless (eval { %pkgcfg = ExtUtils::PkgConfig->find (
+                 "libpanelapplet-2.0 >= $build_reqs{'libpanelapplet-2.0'}");
+	       1; })
+{
+	warn $@;
+	exit 0;
+}
 
 mkdir 'build', 0777;
 
@@ -73,6 +82,11 @@ WriteMakefile(
   XSPROTOARG    => '-noprototypes',
   MAN3PODS      => \%pod_files,
   PREREQ_PM     => \%perl_reqs,
+
+  META_MERGE    => {
+    configure_requires => \%perl_reqs,
+  },
+
   $dep->get_makefile_vars,
 );
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]