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