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