[packages/perl-Alien-Base] - up to 0.004_02 and better DESTDIR patch

arekm arekm at pld-linux.org
Mon Sep 8 18:53:55 CEST 2014


commit c635842770fad5b4edb6b2fe3d282f21ad35fd5f
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Mon Sep 8 18:53:53 2014 +0200

    - up to 0.004_02 and better DESTDIR patch

 perl-Alien-Base-DESTDIR.patch | 55 ++++++++++++++++++++++++++++---------------
 perl-Alien-Base.spec          |  7 +++---
 2 files changed, 40 insertions(+), 22 deletions(-)
---
diff --git a/perl-Alien-Base.spec b/perl-Alien-Base.spec
index 2b261ce..0888f2f 100644
--- a/perl-Alien-Base.spec
+++ b/perl-Alien-Base.spec
@@ -7,13 +7,14 @@
 %include	/usr/lib/rpm/macros.perl
 Summary:	Alien::Base - Base classes for Alien:: modules
 Name:		perl-Alien-Base
-Version:	0.004
+Version:	0.004_02
 Release:	1
 # same as perl
 License:	GPL v1+ or Artistic
 Group:		Development/Languages/Perl
-Source0:	http://www.cpan.org/modules/by-module/Alien/%{pdir}-%{pnam}-%{version}.tar.gz
-# Source0-md5:	ae8834c3e7361756781d45c44dc1cdab
+# Source0:	http://www.cpan.org/modules/by-module/Alien/%{pdir}-%{pnam}-%{version}.tar.gz
+Source0:	https://github.com/Perl5-Alien/Alien-Base/archive/%{version}.tar.gz
+# Source0-md5:	09cfd0fb01767bad619378d302507b2c
 Patch0:		%{name}-DESTDIR.patch
 URL:		http://search.cpan.org/dist/Alien-Base/
 BuildRequires:	perl-Module-Build
diff --git a/perl-Alien-Base-DESTDIR.patch b/perl-Alien-Base-DESTDIR.patch
index a5c235b..7a90c5a 100644
--- a/perl-Alien-Base-DESTDIR.patch
+++ b/perl-Alien-Base-DESTDIR.patch
@@ -1,26 +1,43 @@
-diff -urN Alien-Base-0.004.org/lib/Alien/Base/ModuleBuild.pm Alien-Base-0.004/lib/Alien/Base/ModuleBuild.pm
---- Alien-Base-0.004.org/lib/Alien/Base/ModuleBuild.pm	2014-03-06 01:10:46.000000000 +0100
-+++ Alien-Base-0.004/lib/Alien/Base/ModuleBuild.pm	2014-07-16 21:39:40.920495735 +0200
-@@ -308,7 +308,10 @@
+From 07e8ab7495e9f223ef3f192d60f45eec092f6fe4 Mon Sep 17 00:00:00 2001
+From: Graham Ollis <plicease at cpan.org>
+Date: Mon, 8 Sep 2014 12:09:06 -0400
+Subject: [PATCH] use and propagate DESTDIR as appropriate
+
+---
+ lib/Alien/Base/ModuleBuild.pm | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/lib/Alien/Base/ModuleBuild.pm b/lib/Alien/Base/ModuleBuild.pm
+index 5960502..a3b464b 100644
+--- a/lib/Alien/Base/ModuleBuild.pm
++++ b/lib/Alien/Base/ModuleBuild.pm
+@@ -323,8 +323,11 @@ sub ACTION_alien_install {
+ 
    return if $self->config_data( 'install_type' ) eq 'system';
  
++  my $destdir = $self->destdir;
++
    {
--    my $target = $self->alien_library_destination;
-+    my $target = $self->destdir
-+        ? File::Spec->catdir($self->destdir, $self->alien_library_destination)
-+        : $self->alien_library_destination;
-+    $self->alien_library_destination;
+     my $target = $self->alien_library_destination;
++    $target = File::Spec->catdir($destdir, $target) if defined $destdir;
      local $CWD = $target;
  
      # The only form of introspection that exists is to see that the README file
-@@ -692,6 +695,10 @@
-   my $self = shift;
-   my $dir = shift || croak "Must specify a directory to include in packlist";
+@@ -337,13 +340,16 @@ sub ACTION_alien_install {
  
-+  if ($self->destdir) {
-+      return;
-+  }
-+
-   my $inst = ExtUtils::Installed->new;
-   my $packlist = $inst->packlist( $self->module_name );
-   print "Using " .  $packlist->packlist_file . "\n";
+   {
+     local $CWD = $self->config_data( 'working_directory' );
++    local $ENV{DESTDIR} = $destdir if defined $destdir;
+     print "Installing library to $CWD ... ";
+     $self->alien_do_commands('install') or die "Failed\n";
+     print "Done\n";
+   }
+   
+   if ( $self->alien_isolate_dynamic ) {
+-    local $CWD = $self->alien_library_destination;
++    my $target = $self->alien_library_destination;
++    $target = File::Spec->catdir($destdir, $target) if defined $destdir;
++    local $CWD = $target;
+     print "Isolating dynamic libraries ... ";
+     mkdir 'dynamic' unless -d 'dynamic';
+     foreach my $dir (qw( bin lib )) {
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/perl-Alien-Base.git/commitdiff/c635842770fad5b4edb6b2fe3d282f21ad35fd5f



More information about the pld-cvs-commit mailing list