Devel-PatchPerl-Plugin-Cygwin

 view release on metacpan or  search on metacpan

lib/Devel/PatchPerl/Plugin/Cygwin.pm  view on Meta::CPAN

END
}

sub _patch_cygwin_ld2
{
	my @adjust = (
		[ qr/^5\.8\.[0-7]$/, sub { $_[0] =~ s/ \|\| \$Is_VMS//; } ],
		[ qr/^5\.8\.[0-5]$/, sub {
		# cygwin/Makefile.SHs
			$_[0] =~ s/\@\@ -22,73/@@ -22,72/;
			$_[0] =~ s/-\t\@chmod a\+x ld2\n//;
		} ],
		[ qr/^5\.8\.[0-2]$/, sub {
		# cygwin/Makefile.SHs
			$_[0] =~ s/\@\@ -22,72/@@ -22,71/;
			$_[0] =~ s/these ones are mandatory/this one is pretty mandatory/;
			$_[0] =~ s/-VERSION = '\$version'\n//;
			$_[0] =~ s/ -e s,\@VERSION\@,\\\$\{VERSION},g//;
		} ],
		[ qr/^5\.8\.0$/, sub {
		# Makefile.SH

lib/Devel/PatchPerl/Plugin/Cygwin.pm  view on Meta::CPAN

+addtopath=`pwd | sed -e 's/ /\\\ /g'`
 $spitshell >>Makefile <<!GROK!THIS!
 
 cygwin.c: cygwin/cygwin.c
 	\$(LNS) cygwin/cygwin.c
 
-# shell script feeding perlld to decent perl
-ld2: $& Makefile perlld ${src}/cygwin/ld2.in
-	@echo "extracting ld2 (with variable substitutions)"
-	@$sed s,@buildpath@,$addtopath,g <${src}/cygwin/ld2.in >ld2
-	@chmod a+x ld2
-	@echo "installing ld2 into $installbin"
-# install is included in Cygwin distributions, and we make a note of th
-# requirement in the README.cygwin file. However, let's give them
-# a warning.
-	@/usr/bin/install -c -m 755 ld2 ${installbin}/ld2
-	@if test ! -f  ${installbin}/ld2; then \
-		echo "*************************************************" ; \
-		echo "Make will probably fail in a few more steps." ; \
-		echo "When it does, copy \"ld2\" to a directory in" ; \
-		echo "your path, other than \".\"." ; \

lib/Devel/PatchPerl/Plugin/Cygwin.pm  view on Meta::CPAN

 	$perldll = $libperl;
-	my $v_e_r_s = $ver; $v_e_r_s =~ tr/./_/;
+	my $v_e_r_s = substr($ver,0,-2); $v_e_r_s =~ tr/./_/;
 	$perldll =~ s/(\..*)?$/$v_e_r_s.$dlext/;
 	$perldll =~ s/^lib/cyg/;
-	if ($Config{useshrplib} eq 'true') {
-	    # install ld2 and perlld as well
-	    foreach ('ld2', 'perlld') {
-		safe_unlink("$installbin/$_");
-		copy("$_", "$installbin/$_");
-		chmod(0755, "$installbin/$_");
-		$packlist->{"$installbin/$_"} = { type => 'file' };
-	    };
-	    open (LD2, ">$installbin/ld2");
-	    print LD2 <<SHELL;
-#!/bin/sh
-#
-# ld wrapper, passes all args to perlld;
-#
-for trythis in $installbin/perl
-do

lib/Devel/PatchPerl/Plugin/Cygwin.pm  view on Meta::CPAN

-    exit \$?
-  fi
-done
-# hard luck!
-echo I see no perl executable around there
-echo perl is required to build dynamic libraries
-echo look if the path to perl in /bin/ld2 is correct
-exit 1
-SHELL
-	    close LD2;
-	    chmod(0755, "$installbin/ld2");
-	};
     } else {
 	$perldll = 'perl58.' . $dlext;
     }
@@ -376,6 +345,7 @@
 # Install library files.
 
 my ($do_installarchlib, $do_installprivlib) = (0, 0);
+my $vershort = $Is_Cygwin ? substr($ver,0,-2) : $ver;
 

lib/Devel/PatchPerl/Plugin/Cygwin.pm  view on Meta::CPAN

     $perldll = $libperl;
-    my $v_e_r_s = $ver; $v_e_r_s =~ tr/./_/;
+    my $v_e_r_s = substr($ver,0,-2); $v_e_r_s =~ tr/./_/;
     $perldll =~ s/(\..*)?$/$v_e_r_s.$dlext/;
     $perldll =~ s/^lib/cyg/;
-    if ($Config{useshrplib} eq 'true') {
-      # install ld2 and perlld as well
-      foreach ('ld2', 'perlld') {
-        safe_unlink("$installbin/$_");
-        copy("$_", "$installbin/$_");
-        chmod(0755, "$installbin/$_");
-      };
-      { 
-		open (LD2, ">$installbin/ld2");
-		print LD2 "#!/bin/sh\n#\n# ld wrapper, passes all args to perlld;\n#\n"
-		          . "for trythis in $installbin/perl\ndo\n  if [ -x \$trythis ]\n"
-		          . "  then\n    \$trythis $installbin/perlld \"\$\@\"\n"
-		          . "    exit \$?\n  fi\ndone\n# hard luck!\necho i see no perl"
-		          . " executable around there\necho perl is required to build "
-		          . "dynamic libraries\necho look if the path to perl in /bin/ld2"
-		          . " is correct\nexit 1\n";
-		close LD2;
-      };
-      chmod(0755, "$installbin/ld2");
-    };
   } else {
     $perldll = 'perl58.' . $dlext;
   }
@@ -331,6 +311,7 @@
 # Install library files.
 
 my ($do_installarchlib, $do_installprivlib) = (0, 0);
+my $vershort = $Is_Cygwin ? substr($ver,0,-2) : $ver;
 



( run in 0.296 second using v1.01-cache-2.11-cpan-8d75d55dd25 )