perl-Gtk2-MozEmbed r44 - trunk



Author: tsch
Date: Thu Nov 20 09:26:05 2008
New Revision: 44
URL: http://svn.gnome.org/viewvc/perl-Gtk2-MozEmbed?rev=44&view=rev

Log:
Catch exceptions thrown by EU::PkgConfig so that we can abort properly.


Modified:
   trunk/ChangeLog
   trunk/Makefile.PL

Modified: trunk/Makefile.PL
==============================================================================
--- trunk/Makefile.PL	(original)
+++ trunk/Makefile.PL	Thu Nov 20 09:26:05 2008
@@ -48,11 +48,20 @@
   $use_dom = 0;
 }
 
-my %pkgcfg = ExtUtils::PkgConfig->find(
-	"xulrunner-gtkmozembed >= $build_reqs{'XULRunner'}",
-	"mozilla-gtkmozembed >= $build_reqs{'Mozilla'}",
-	"firefox-gtkmozembed >= $build_reqs{'Firefox'}",
-	"mozilla-firefox-gtkmozembed >= $build_reqs{'Firefox'}");
+# 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(
+            "xulrunner-gtkmozembed >= $build_reqs{'XULRunner'}",
+            "mozilla-gtkmozembed >= $build_reqs{'Mozilla'}",
+            "firefox-gtkmozembed >= $build_reqs{'Firefox'}",
+            "mozilla-firefox-gtkmozembed >= $build_reqs{'Firefox'}");
+          1; })
+{
+	warn $@;
+	exit 0;
+}
 
 mkdir 'build', 0777;
 



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