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