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