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