public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Martin Mokrejs" <mmokrejs@fold.natur.cuni.cz>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/sci:master commit in: sci-biology/gbrowse/files/, sci-biology/gbrowse/
Date: Sat, 30 Jul 2011 14:45:36 +0000 (UTC)	[thread overview]
Message-ID: <fa7a65b1a985d0cd4c830b8cac8e63ce2e576c28.mmokrejs@gentoo> (raw)

commit:     fa7a65b1a985d0cd4c830b8cac8e63ce2e576c28
Author:     Martin Mokrejs <mmokrejs <AT> fold <DOT> natur <DOT> cuni <DOT> cz>
AuthorDate: Sat Jul 30 14:45:25 2011 +0000
Commit:     Martin Mokrejs <mmokrejs <AT> fold <DOT> natur <DOT> cuni <DOT> cz>
CommitDate: Sat Jul 30 14:45:25 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=fa7a65b1

sci-biology/gbrowse: added support for --destdir, patch sent to upstream

(Portage version: 2.1.10.7/git/Linux i686, unsigned Manifest commit)

---
 sci-biology/gbrowse/ChangeLog           |    8 +++
 sci-biology/gbrowse/files/destdir.patch |   92 +++++++++++++++++++++++++++++++
 sci-biology/gbrowse/gbrowse-2.39.ebuild |    3 +-
 3 files changed, 102 insertions(+), 1 deletions(-)

diff --git a/sci-biology/gbrowse/ChangeLog b/sci-biology/gbrowse/ChangeLog
index b8780b1..5c2bd3e 100644
--- a/sci-biology/gbrowse/ChangeLog
+++ b/sci-biology/gbrowse/ChangeLog
@@ -3,6 +3,14 @@
 # $Header: /var/cvsroot/gentoo-x86/sci-biology/generic-genome-browser/ChangeLog,v 1.10 2007/07/29 17:07:38 phreak Exp $
 
   30 Jul 2011; Martin Mokrejs <mmokrejs@fold.natur.cuni.cz>
+  gbrowse-2.39.ebuild, +files/destdir.patch:
+  added support for --destdir, patch sent to upstream gbrowse-2.39.ebuild
+
+  30 Jul 2011; Martin Mokrejs <mmokrejs@fold.natur.cuni.cz>
+  gbrowse-2.39.ebuild, +files/destdir.patch:
+  added support for --destdir, patch sent to upstream
+
+  30 Jul 2011; Martin Mokrejs <mmokrejs@fold.natur.cuni.cz>
   -gbrowse-2.38.ebuild, -files/GBrowseInstall.pm-2.38.patch,
   +gbrowse-2.39.ebuild, +files/GBrowseInstall.pm-2.39.patch:
   version bump but still need to rewrite upstream's install procedure to

diff --git a/sci-biology/gbrowse/files/destdir.patch b/sci-biology/gbrowse/files/destdir.patch
new file mode 100644
index 0000000..655158c
--- /dev/null
+++ b/sci-biology/gbrowse/files/destdir.patch
@@ -0,0 +1,92 @@
+--- install_util/GBrowseInstall.pm.ori	2011-07-30 16:06:18.000000000 +0200
++++ install_util/GBrowseInstall.pm	2011-07-30 16:06:28.000000000 +0200
+@@ -419,6 +419,7 @@
+ sub ACTION_install {
+     my $self = shift;
+     my $prefix = $self->install_base || $self->prefix || '';
++    my $destdir = $self->destdir || '';
+     GBrowseGuessDirectories->prefix($prefix);
+ 
+     $self->depends_on('config_data');
+@@ -445,7 +446,7 @@
+ 
+     # fix some directories so that www user can write into them
+     my $tmp = $self->config_data('tmp') || GBrowseGuessDirectories->tmp;
+-    mkpath($tmp);
++    mkpath($destdir.$tmp);
+     my ($uid,$gid) = (getpwnam($user))[2,3];
+ 
+     # taint check issues
+@@ -454,29 +455,29 @@
+     $gid =~ /^(\d+)$/;
+     $gid = $1;
+     
+-    unless (chown $uid,$gid,$tmp) {
++    unless (chown $uid,$gid,$destdir.$tmp) {
+ 	$self->ownership_warning($tmp,$user);
+     }
+ 
+     my $htdocs_i = File::Spec->catfile($self->install_path->{htdocs},'i');
+     my $images   = File::Spec->catfile($tmp,'images');
+     my $htdocs = $self->install_path->{htdocs};
+-    chown $uid,-1,$htdocs;
++    chown $uid,-1,$destdir.$htdocs;
+     {
+ 	local $> = $uid;
+ 	symlink($images,$htdocs_i);  # so symlinkifowner match works!
+     }
+-    chown $>,-1,$self->install_path->{htdocs};
++    chown $>,-1,$destdir.$self->install_path->{htdocs};
+ 
+     my $persistent = $self->install_path->{'persistent'};
+     my $sessions   = File::Spec->catfile($persistent,'sessions');
+     my $userdata   = File::Spec->catfile($persistent,'userdata');
+-    mkpath([$sessions,$userdata],0711);
++    mkpath([$destdir.$sessions,$destdir.$userdata],0711);
+ 
+     my $databases = $self->install_path->{'databases'};
+     
+-    unless (chown $uid,$gid,glob(File::Spec->catfile($databases,'').'*')) {
+-	$self->ownership_warning($databases,$user);
++    unless (chown $uid,$gid,glob($destdir.File::Spec->catfile($databases,'').'*')) {
++	$self->ownership_warning($destdir.$databases,$user);
+     }
+ 
+     # chmod 0755,File::Spec->catfile($self->install_path->{'etc'},'init.d','gbrowse-slave');
+@@ -490,7 +491,7 @@
+     my $perl          = $self->perl;
+     my @inc           = map{"-I$_"} split ':',$self->added_to_INC;
+     system $perl,@inc,$metadb_script;
+-    system 'sudo','chown','-R',"$uid.$gid",$sessions,$userdata;
++    system 'sudo','chown','-R',"$uid.$gid",$destdir.$sessions,$destdir.$userdata;
+ 
+ #    if (Module::Build->y_n(
+ #	    "It is recommended that you restart Apache. Shall I try this for you?",'y'
+@@ -600,6 +601,7 @@
+     my $self = shift;
+ 
+     my $prefix = $self->install_base || $self->prefix || '';
++    my $destdir = $self->destdir || '';
+     GBrowseGuessDirectories->prefix($prefix);
+     my $install_path = GBrowseGuessDirectories->etc;
+ 
+@@ -647,7 +649,7 @@
+ 	if ($self->config_data('installconf') =~ /^[yY]/ && !-e "${includes}/$file") {
+ 	    warn "Creating include file for Apache config: $target\n";
+ 	    my $dir = dirname($target);
+-	    mkpath([$dir]);
++	    mkpath([$destdir.$dir]);
+ 	    if (my $f = IO::File->new("blib${includes}/$file",'>')) {
+ 		$f->print($self->apache_conf);
+ 		$f->close;
+@@ -935,8 +937,9 @@
+ sub ownership_warning {
+     my $self = shift;
+     my ($path,$owner) = @_;
++    my $destdir = $self->destdir || '';
+     warn "*** WARNING: Using sudo to change ownership of $path to '$owner'. You may be prompted for your login password ***\n";
+-    system "sudo chown -R $owner $path";
++    system "sudo chown -R $owner $destdir.$path";
+ }
+ 
+ sub cgiurl {

diff --git a/sci-biology/gbrowse/gbrowse-2.39.ebuild b/sci-biology/gbrowse/gbrowse-2.39.ebuild
index 426ee4b..0acd25a 100644
--- a/sci-biology/gbrowse/gbrowse-2.39.ebuild
+++ b/sci-biology/gbrowse/gbrowse-2.39.ebuild
@@ -89,7 +89,8 @@ RDEPEND="${DEPEND}
 src_prepare() {
 	sed -i 's/return unless -t STDIN/return/' install_util/GBrowseInstall.pm || die
 	sed -i 's/process_/bp_process_/g' INSTALL || die
-	epatch "${FILESDIR}"/GBrowseInstall.pm-"${PV}".patch || die "Failed to patch"
+	epatch "${FILESDIR}"/GBrowseInstall.pm-"${PV}".patch || die "Failed to apply GBrowseInstall.pm-"${PV}".patch"
+	epatch "${FILESDIR}"/destdir.patch || die "Failed to apply destdir.patch "
 }
 
 src_configure() {



             reply	other threads:[~2011-07-30 14:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-30 14:45 Martin Mokrejs [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-01-17 18:11 [gentoo-commits] proj/sci:master commit in: sci-biology/gbrowse/files/, sci-biology/gbrowse/ Martin Mokrejs
2011-07-30 19:22 Martin Mokrejs
2011-07-30 15:43 Martin Mokrejs
2011-07-30 10:46 Martin Mokrejs
2011-06-28 17:15 Justin Lecher
2011-05-11  8:59 Martin Mokrejs
2011-02-14 15:48 Martin Mokrejs

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fa7a65b1a985d0cd4c830b8cac8e63ce2e576c28.mmokrejs@gentoo \
    --to=mmokrejs@fold.natur.cuni.cz \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox