1From 34698c7f561fb575293a1c991a71e1b4ddc5ae73 Mon Sep 17 00:00:00 2001
2From: Andrei Dinu <andrei.adrianx.dinu@intel.com>
3Date: Fri, 5 Jul 2013 11:56:58 +0300
4Subject: [PATCH] Mandir and perl install dir were overwritten with faulty
5 information in the Makefile. Now the Mandir and perl
6 install dir are sent via paramters from the recipe.
7
8Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
9---
10Upstream-Status: Pending
11
12 Makefile.pl |   12 +++++++-----
13 1 file changed, 7 insertions(+), 5 deletions(-)
14
15diff --git a/Makefile.pl b/Makefile.pl
16index 9ca5602..8776e18 100644
17--- a/Makefile.pl
18+++ b/Makefile.pl
19@@ -131,6 +131,8 @@ foreach (keys %MODULES){
20
21 # adjust DESTDIR, if needed
22 $DESTDIR = $ENV{DESTDIR} if(defined $ENV{DESTDIR});
23+$MANDIR = $ENV{MANDIR} if(defined $ENV{MANDIR});
24+$INSTALLDIR = $ENV{INSTALLDIR} if(defined $ENV{INSTALLDIR});
25
26 # parse command line build options
27 while($COMMAND = shift @ARGV){
28@@ -171,7 +173,7 @@ sub command_install_pod {
29 	command_build() if(!-e $TARGET);
30 	die("Can not install without Config.pm") if($MODULES{Config}==0);
31 	$CWD=&cwd if($MODULES{Cwd}>0);
32-	my $where=$DESTDIR . $Config{'man3direxp'};
33+	my $where=$DESTDIR . $MANDIR;
34 	my $t = $TARGET;
35 	if($LIBRARY){
36 		$t="$PACKAGE.3pm";
37@@ -219,7 +221,7 @@ sub command_install_pod {
38 sub command_uninstall_pod {
39 	die("Can not uninstall without Config.pm") if($MODULES{Config}==0);
40 	$CWD=&cwd if($MODULES{Cwd}>0);
41-	my $where=$DESTDIR . $Config{'man3direxp'};
42+	my $where=$DESTDIR . $MANDIR;
43 	my $t = $TARGET;
44 	if($LIBRARY){
45 		$t="$PACKAGE.3pm";
46@@ -243,7 +245,7 @@ sub command_install_library {
47 	command_build() if(!-e $TARGET);
48 	die("Can not install without Config.pm") if($MODULES{Config}==0);
49 	$CWD=&cwd if($MODULES{Cwd}>0);
50-	my $where=$DESTDIR . $Config{'installsitelib'};
51+	my $where=$DESTDIR . $INSTALLDIR;
52 	if(!-e $where){
53 	  print STDOUT "WARNING!\n\n",
54 		"The local perl site directory does not exist:\n",
55@@ -271,7 +273,7 @@ sub command_install_library {
56 sub command_uninstall_library {
57 	die("Can not uninstall without Config.pm") if($MODULES{Config}==0);
58 	$CWD=&cwd if($MODULES{Cwd}>0);
59-	my $where=$DESTDIR . $Config{'installsitelib'};
60+	my $where=$DESTDIR . $INSTALLDIR;
61 	chdir($where);
62 	if(-e $TARGET){
63 		unlink $TARGET;
64@@ -401,7 +403,7 @@ sub command_socket_diag {
65 sub command_install_compat {
66 	die("Can not install without Config.pm") if($MODULES{Config}==0);
67 	$CWD=&cwd if($MODULES{Cwd}>0);
68-	my $where=$DESTDIR . $Config{'installsitelib'};
69+	my $where=$DESTDIR . $INSTALLDIR;
70 	if(!-e $where){
71 	  print STDOUT "WARNING!\n\n",
72 		"The local perl site directory does not exist:\n",
73--
741.7.9.5
75
76