[Bps-public-commit] RTx-TakeScreenshots branch, master, updated. f714ffcc5c3d71145b5c93f4c2ad0e4febcdc651

Thomas Sibley trs at bestpractical.com
Tue Mar 8 11:05:05 EST 2011


The branch, master has been updated
       via  f714ffcc5c3d71145b5c93f4c2ad0e4febcdc651 (commit)
       via  bae809b010ca7da1d5bb60c774fd1186ab756fc8 (commit)
       via  452234ebc2dc0d3b653c8c426245458001da3fdb (commit)
      from  b8cff3b2763e45105cf1e06a33744bf8c3a43ab7 (commit)

Summary of changes:
 .gitignore                     |    3 ++
 Makefile.PL                    |    2 +
 bin/clean-slate                |    7 ++++
 inc/Module/Install/External.pm |   66 ++++++++++++++++++++++++++++++++++++++++
 4 files changed, 78 insertions(+), 0 deletions(-)
 create mode 100644 .gitignore
 create mode 100755 bin/clean-slate
 create mode 100644 inc/Module/Install/External.pm

- Log -----------------------------------------------------------------
commit 452234ebc2dc0d3b653c8c426245458001da3fdb
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Tue Mar 8 10:54:00 2011 -0500

    Add a convenience script to get a clean slate
    
    This tries to run make dropdb and make initdb from your RT in-place
    repo and then make initdb for the plugin.
    
    It should really be just another target in the Makefile, but getting in
    the generated one is Not Easy.

diff --git a/bin/clean-slate b/bin/clean-slate
new file mode 100755
index 0000000..616e211
--- /dev/null
+++ b/bin/clean-slate
@@ -0,0 +1,7 @@
+#!/bin/sh
+EXT=`pwd`
+RT=${RTHOME:-~/bps/rt}
+cd $RT
+echo -ne "\ny\n" | make dropdb && echo -ne "\n" | make initdb
+cd $EXT
+echo -ne "\n" | make initdb

commit bae809b010ca7da1d5bb60c774fd1186ab756fc8
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Tue Mar 8 11:03:50 2011 -0500

    Actually require wmctrl

diff --git a/Makefile.PL b/Makefile.PL
index 5061c7d..01566af 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -11,4 +11,6 @@ starts up.  It is, unfortunately, X only.
 .
 }
 
+requires_external_bin('wmctrl');
+
 &WriteAll;
diff --git a/inc/Module/Install/External.pm b/inc/Module/Install/External.pm
new file mode 100644
index 0000000..5e29f10
--- /dev/null
+++ b/inc/Module/Install/External.pm
@@ -0,0 +1,66 @@
+#line 1
+package Module::Install::External;
+
+# Provides dependency declarations for external non-Perl things
+
+use strict;
+use Module::Install::Base ();
+
+use vars qw{$VERSION $ISCORE @ISA};
+BEGIN {
+	$VERSION = '1.00';
+	$ISCORE  = 1;
+	@ISA     = qw{Module::Install::Base};
+}
+
+sub requires_external_cc {
+	my $self = shift;
+
+	# We need a C compiler, use the can_cc method for this
+	unless ( $self->can_cc ) {
+		print "Unresolvable missing external dependency.\n";
+		print "This package requires a C compiler.\n";
+		print STDERR "NA: Unable to build distribution on this platform.\n";
+		exit(0);
+	}
+
+	# Unlike some of the other modules, while we need to specify a
+	# C compiler as a dep, it needs to be a build-time dependency.
+
+	1;
+}
+
+sub requires_external_bin {
+	my ($self, $bin, $version) = @_;
+	if ( $version ) {
+		die "requires_external_bin does not support versions yet";
+	}
+
+	# Load the package containing can_run early,
+	# to avoid breaking the message below.
+	$self->load('can_run');
+
+	# Locate the bin
+	print "Locating required external dependency bin:$bin...";
+	my $found_bin = $self->can_run( $bin );
+	if ( $found_bin ) {
+		print " found at $found_bin.\n";
+	} else {
+		print " missing.\n";
+		print "Unresolvable missing external dependency.\n";
+		print "Please install '$bin' seperately and try again.\n";
+		print STDERR "NA: Unable to build distribution on this platform.\n";
+		exit(0);
+	}
+
+	# Once we have some way to specify external deps, do it here.
+	# In the mean time, continue as normal.
+
+	1;
+}
+
+1;
+
+__END__
+
+#line 138

commit f714ffcc5c3d71145b5c93f4c2ad0e4febcdc651
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Tue Mar 8 11:05:03 2011 -0500

    Ignore some standard files

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..46a70c4
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+*.sw[op]
+Makefile
+Makefile.old

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list