845e07
From 425354918f774c39c68b79de55691ee262cdcb84 Mon Sep 17 00:00:00 2001
845e07
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
845e07
Date: Wed, 25 Mar 2015 17:57:05 +0100
845e07
Subject: [PATCH] Build from lib
845e07
MIME-Version: 1.0
845e07
Content-Type: text/plain; charset=UTF-8
845e07
Content-Transfer-Encoding: 8bit
845e07
845e07
Building from lib.modern adds "modern::" prefix to manual pages.
845e07
845e07
This is a work-around for CPAN RT#103116. Creating symlink is not
845e07
enough for EU::MM.
845e07
845e07
Signed-off-by: Petr Písař <ppisar@redhat.com>
845e07
845e07
diff --git a/Makefile.PL b/Makefile.PL
845e07
index a8dbc7e..1b5b51a 100644
845e07
--- a/Makefile.PL
845e07
+++ b/Makefile.PL
845e07
@@ -1,10 +1,15 @@
845e07
 
845e07
 use ExtUtils::MakeMaker;
845e07
 
845e07
+if (!-d 'lib') {
845e07
+    rename (($] > 5.010 ? 'lib.modern' : 'lib.old'), 'lib') or
845e07
+        die "Could not rename to lib: $!";
845e07
+}
845e07
+
845e07
 WriteMakefile( 
845e07
 	'NAME'		=> 'Text-Wrap',
845e07
 	'DISTNAME'	  => 'Text-Tabs+Wrap',
845e07
-	'VERSION_FROM' => 'lib.modern/Text/Wrap.pm',
845e07
+	'VERSION_FROM' => 'lib/Text/Wrap.pm',
845e07
 	($] >= 5.005 ? 
845e07
 		(
845e07
 			ABSTRACT	=> 'Expand tabs and do simple line wrapping',
845e07
@@ -21,16 +26,5 @@ WriteMakefile(
845e07
 	'dist' => { COMPRESS=>"gzip", SUFFIX=>"gz" },
845e07
 	'INSTALLDIRS'	=> 'perl',
845e07
 
845e07
-	PM =>	($] > 5.010 ?
845e07
-		{
845e07
-			'lib.modern/Text/Tabs.pm'	=> '$(INST_LIBDIR)/Text/Tabs.pm',
845e07
-			'lib.modern/Text/Wrap.pm'	=> '$(INST_LIBDIR)/Text/Wrap.pm',
845e07
-		}
845e07
-		:
845e07
-		{
845e07
-			'lib.old/Text/Tabs.pm'	=> '$(INST_LIBDIR)/Text/Tabs.pm',
845e07
-			'lib.old/Text/Wrap.pm'	=> '$(INST_LIBDIR)/Text/Wrap.pm',
845e07
-		})
845e07
-
845e07
 	);
845e07
 
845e07
-- 
845e07
2.1.0
845e07