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