Subject: | Makefile.PL doesn't fully respect PREFIX |
It would be nice to have Makefile.PL default the xul-node directory to
somewhere under PREFIX. The included patch does just that.
Subject: | Philip_Gwyn-XUL-Node.PREFIX.patch |
diff -rub XUL-Node-0.05/Makefile.PL XUL-Node-0.05.PG/Makefile.PL
--- XUL-Node-0.05/Makefile.PL 2004-08-06 09:19:58.000000000 -0400
+++ XUL-Node-0.05.PG/Makefile.PL 2007-02-27 08:11:05.000000000 -0500
@@ -26,11 +26,25 @@
my $BLIB_TESTS_XUL = "$BLIB_SERVER_XUL/tests.xul";
my $PORT = prompt("\nEnter port for $SERVER_SCRIPT_NAME:\n", 8077);
+
+my $root;
+if( $^O eq 'MSWin32' ) {
+ $root = "C:/perl/$SERVER_ROOT_DIR";
+}
+else {
+ my $prefix = "/usr/local";
+ foreach my $a ( @ARGV ) {
+ next unless $a =~ /^PREFIX=(.+)/;
+ $prefix = $1;
+ last;
+ }
+ $root = "$prefix/$SERVER_ROOT_DIR";
+}
+
+
my $INSTALL_DIR = prompt(
"\nWhere do you want to install the server root directory?\n",
- $^O eq 'MSWin32'?
- "C:/perl/$SERVER_ROOT_DIR":
- "/usr/local/$SERVER_ROOT_DIR"
+ $root
);
WriteMakefile(