summaryrefslogtreecommitdiff
path: root/libraries/libwhisker2/Makefiles.patch
blob: 020f98d4d0c274d2b846f633255ddcf5cf931f57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
diff -Naur libwhisker2-2.5.orig/Makefile libwhisker2-2.5/Makefile
--- libwhisker2-2.5.orig/Makefile	2010-01-24 05:35:26.000000000 +0100
+++ libwhisker2-2.5/Makefile	2010-02-01 11:52:36.495699604 +0100
@@ -10,6 +10,7 @@
 
 install:
 	export DESTDIR
+	export MAN3PATH
 	perl Makefile.pl install
 
 clean:
@@ -20,4 +21,5 @@
 
 uninstall:
 	export DESTDIR
+	export MAN3PATH
 	perl Makefile.pl uninstall
diff -Naur libwhisker2-2.5.orig/Makefile.pl libwhisker2-2.5/Makefile.pl
--- libwhisker2-2.5.orig/Makefile.pl	2010-01-24 05:35:26.000000000 +0100
+++ libwhisker2-2.5/Makefile.pl	2010-02-01 12:24:51.045033735 +0100
@@ -29,6 +29,8 @@
 # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
 # POSSIBILITY OF SUCH DAMAGE.
 
+use File::Path;
+
 $VERSION	=	'2.5';		# version of the app
 $PACKAGE	=	'LW2';		# name of the app
 $TARGET		=	'LW2.pm';	# target build filename
@@ -42,6 +44,7 @@
 $HASPOD		=	 1;		# does it have embedded POD?
 
 $DESTDIR	= '';		# installation directory prefix
+$MAN3PATH	= '';		# man page installation prefix
 
 #### supported build options #########################################
 
@@ -131,6 +134,8 @@
 
 # adjust DESTDIR, if needed
 $DESTDIR = $ENV{DESTDIR} if(defined $ENV{DESTDIR});
+# adjust MAN3PATH, if needed
+$MAN3PATH = $ENV{MAN3PATH} if(defined $ENV{MAN3PATH});
 
 # parse command line build options
 while($COMMAND = shift @ARGV){
@@ -171,7 +176,7 @@
 	command_build() if(!-e $TARGET);
 	die("Can not install without Config.pm") if($MODULES{Config}==0);
 	$CWD=&cwd if($MODULES{Cwd}>0);
-	my $where=$DESTDIR . $Config{'man3direxp'};
+	my $where=$DESTDIR . $MAN3PATH;
 	my $t = $TARGET;
 	if($LIBRARY){
 		$t="$PACKAGE.3pm";
@@ -182,8 +187,8 @@
 	if(!-e $where){
 	  print STDOUT "WARNING!\n\n",
 		"The local man3 site directory does not exist:\n",
-		"$where\n\nPlease create this directory and try again.\n\n";
-		exit;
+		"$where\n\n";
+	  mkpath $where;
 	}
 
 	my $parser = Pod::Man->new (
@@ -219,7 +224,7 @@
 sub command_uninstall_pod {
 	die("Can not uninstall without Config.pm") if($MODULES{Config}==0);
 	$CWD=&cwd if($MODULES{Cwd}>0);
-	my $where=$DESTDIR . $Config{'man3direxp'};
+	my $where=$DESTDIR . $MAN3PATH;
 	my $t = $TARGET;
 	if($LIBRARY){
 		$t="$PACKAGE.3pm";
@@ -243,12 +248,12 @@
 	command_build() if(!-e $TARGET);
 	die("Can not install without Config.pm") if($MODULES{Config}==0);
 	$CWD=&cwd if($MODULES{Cwd}>0);
-	my $where=$DESTDIR . $Config{'installsitelib'};
+	my $where=$DESTDIR . $Config{'installvendorlib'};
 	if(!-e $where){
 	  print STDOUT "WARNING!\n\n",
 		"The local perl site directory does not exist:\n",
-		"$where\n\nPlease create this directory and try again.\n\n";
-		exit;	
+		"$where\n\n";
+	  mkpath $where;
 	}
 	open(IN,'<'.$TARGET)||puke($TARGET);
 	chdir($where);
@@ -271,7 +276,7 @@
 sub command_uninstall_library {
 	die("Can not uninstall without Config.pm") if($MODULES{Config}==0);
 	$CWD=&cwd if($MODULES{Cwd}>0);
-	my $where=$DESTDIR . $Config{'installsitelib'};
+	my $where=$DESTDIR . $Config{'installvendorlib'};
 	chdir($where);
 	if(-e $TARGET){
 		unlink $TARGET;
@@ -401,12 +406,12 @@
 sub command_install_compat {
 	die("Can not install without Config.pm") if($MODULES{Config}==0);
 	$CWD=&cwd if($MODULES{Cwd}>0);
-	my $where=$DESTDIR . $Config{'installsitelib'};
+	my $where=$DESTDIR . $Config{'installvendorlib'};
 	if(!-e $where){
 	  print STDOUT "WARNING!\n\n",
 		"The local perl site directory does not exist:\n",
-		"$where\n\nPlease create this directory and try again.\n\n";
-		exit;	
+		"$where\n\n";
+	  mkpath $where;
 	}
 	open(IN,'<'.'compat/LW.pm')||puke('compat/LW.pm');
 	chdir($where);