From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1RnDVe-0005M8-Fe for garchives@archives.gentoo.org; Tue, 17 Jan 2012 18:11:50 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9195BE0B44; Tue, 17 Jan 2012 18:11:42 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 4F47AE0B44 for ; Tue, 17 Jan 2012 18:11:41 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 91B081B4028 for ; Tue, 17 Jan 2012 18:11:40 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 0D24080042 for ; Tue, 17 Jan 2012 18:11:40 +0000 (UTC) From: "Martin Mokrejs" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Martin Mokrejs" Message-ID: Subject: [gentoo-commits] proj/sci:master commit in: sci-biology/gbrowse/files/, sci-biology/gbrowse/ X-VCS-Repository: proj/sci X-VCS-Files: sci-biology/gbrowse/ChangeLog sci-biology/gbrowse/files/GBrowseInstall.pm-2.45.patch sci-biology/gbrowse/gbrowse-2.45.ebuild X-VCS-Directories: sci-biology/gbrowse/files/ sci-biology/gbrowse/ X-VCS-Committer: mmokrejs X-VCS-Committer-Name: Martin Mokrejs X-VCS-Revision: bfc8451b06a8727456543751d139d29706473c03 Date: Tue, 17 Jan 2012 18:11:40 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 3f8c8dda-d8f7-4617-8af4-4f6fe02d662b X-Archives-Hash: 04fd8b29a1fcf793b3bb593672b501a0 commit: bfc8451b06a8727456543751d139d29706473c03 Author: Martin Mokrejs fold natur cuni cz> AuthorDate: Tue Jan 17 18:11:07 2012 +0000 Commit: Martin Mokrejs fold natur cuni cz> CommitDate: Tue Jan 17 18:11:07 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/sci.git;a=3Dc= ommit;h=3Dbfc8451b version bump and some fixes so that it works with webappconfig again? (Portage version: 2.1.10.44/git/Linux i686, unsigned Manifest commit) --- sci-biology/gbrowse/ChangeLog | 6 + .../gbrowse/files/GBrowseInstall.pm-2.45.patch | 32 +++ sci-biology/gbrowse/gbrowse-2.45.ebuild | 199 ++++++++++++++= ++++++ 3 files changed, 237 insertions(+), 0 deletions(-) diff --git a/sci-biology/gbrowse/ChangeLog b/sci-biology/gbrowse/ChangeLo= g index c63914a..41e2334 100644 --- a/sci-biology/gbrowse/ChangeLog +++ b/sci-biology/gbrowse/ChangeLog @@ -2,6 +2,12 @@ # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 # $Header: /var/cvsroot/gentoo-x86/sci-biology/generic-genome-browser/Ch= angeLog,v 1.10 2007/07/29 17:07:38 phreak Exp $ =20 +*gbrowse-2.45 (17 Jan 2012) + + 17 Jan 2012; Martin Mokrejs + +gbrowse-2.45.ebuild, +files/GBrowseInstall.pm-2.45.patch: + version bump and some fixes so that it works with webappconfig again? + 17 Jan 2012; Martin Mokrejs gbrowse-2.39.ebuild: added dev-perl/TermReadKey to dependencies diff --git a/sci-biology/gbrowse/files/GBrowseInstall.pm-2.45.patch b/sci= -biology/gbrowse/files/GBrowseInstall.pm-2.45.patch new file mode 100644 index 0000000..e91fe16 --- /dev/null +++ b/sci-biology/gbrowse/files/GBrowseInstall.pm-2.45.patch @@ -0,0 +1,32 @@ +--- install_util/GBrowseInstall.pm.ori 2010-11-27 12:01:58.000000000 +01= 00 ++++ install_util/GBrowseInstall.pm 2010-11-27 12:02:15.000000000 +0100 +@@ -436,8 +436,8 @@ + $self->ownership_warning($databases,$user); + } +=20 +- chmod 0755,File::Spec->catfile($self->install_path->{'etc'},'init.d= ','gbrowse-slave'); +- $self->fix_selinux; ++ # chmod 0755,File::Spec->catfile($self->install_path->{'etc'},'init= .d','gbrowse-slave'); ++ # $self->fix_selinux; +=20 + my $base =3D basename($self->install_path->{htdocs}); +=20 +--- install_util/GBrowseInstall.pm.ori 2011-02-14 13:50:41.000000000 +01= 00 ++++ install_util/GBrowseInstall.pm 2011-02-14 13:51:46.000000000 +0100 +@@ -470,11 +470,11 @@ + my @inc =3D map{"-I$_"} split ':',$self->added_to_INC; + system $perl,@inc,$metadb_script; +=20 +- if (Module::Build->y_n( +- "It is recommended that you restart Apache. Shall I try this for y= ou?",'y' +- )) { +- system "sudo /etc/init.d/apache2 restart"; +- } ++# if (Module::Build->y_n( ++# "It is recommended that you restart Apache. Shall I try this for = you?",'y' ++# )) { ++# system "sudo /etc/init.d/apache2 restart"; ++# } + =20 + print STDERR "\n***INSTALLATION COMPLETE***\n"; + print STDERR "Load http://localhost/$base for demo and documentatio= n.\n"; diff --git a/sci-biology/gbrowse/gbrowse-2.45.ebuild b/sci-biology/gbrows= e/gbrowse-2.45.ebuild new file mode 100644 index 0000000..f914844 --- /dev/null +++ b/sci-biology/gbrowse/gbrowse-2.45.ebuild @@ -0,0 +1,199 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ +EAPI=3D"2" + +inherit perl-module webapp + +MY_P=3D"GBrowse-${PV}" + +DESCRIPTION=3D"Display of genomic annotations on interactive web pages" +HOMEPAGE=3D"http://gmod.org/" +# mirror://sourceforge/gmod/${MY_P}.tar.gz +# mirror://cpan/authors/id/L/LD/LDS/GBrowse-2.33.tar.gz +SRC_URI=3D" + mirror://cpan/authors/id/L/LD/LDS/${MY_P}.tar.gz + test? ( + http://sourceforge.net/projects/gmod/files/Generic%20Genome%20Browser/= Sample%20Data%20Files/saccharomyces_cerevisiae.gff.bz2 + http://sourceforge.net/projects/gmod/files/Generic%20Genome%20Browser/= Sample%20Data%20Files/Refseq_Genome_TBLASTX.tar.gz + http://sourceforge.net/projects/gmod/files/Generic%20Genome%20Browser/= Sample%20Data%20Files/README-gff-files + http://sourceforge.net/projects/gmod/files/Generic%20Genome%20Browser/= Sample%20Data%20Files/human.gff.tar.gz + http://sourceforge.net/projects/gmod/files/Generic%20Genome%20Browser/= Sample%20Data%20Files/yeast.fasta.gz + http://sourceforge.net/projects/gmod/files/Generic%20Genome%20Browser/= Sample%20Data%20Files/yeast.gff.gz + http://sourceforge.net/projects/gmod/files/Generic%20Genome%20Browser/= Sample%20Data%20Files/worm.fasta.gz + http://sourceforge.net/projects/gmod/files/Generic%20Genome%20Browser/= Sample%20Data%20Files/worm.gff.gz + http://sourceforge.net/projects/gmod/files/Generic%20Genome%20Browser/= Sample%20Data%20Files/fly.fasta.gz + http://sourceforge.net/projects/gmod/files/Generic%20Genome%20Browser/= Sample%20Data%20Files/fly.gff.gz )" + +LICENSE=3D"Artistic" +# webapp ebuilds do not set SLOT +KEYWORDS=3D"~x86 ~amd64" +IUSE=3D"cgi fastcgi minimal mysql pdf postgres svg test" # lwp moby scf + +S=3D"${WORKDIR}/${MY_P}" + +# TODO: dev-perl/MOBY, dev-perl/Bio-SCF, dev-perl/Safe-World (not compat= ible w/perl-5.10) +# how about mod_fcgi and dev-libs/fcgi and mod_scgi? +DEPEND=3D"!!sci-biology/GBrowse + >=3Dperl-core/Module-Build-0.380.0 + >=3Ddev-lang/perl-5.8.8 + dev-perl/Capture-Tiny + >=3Dsci-biology/bioperl-1.6.901 + >=3Ddev-perl/GD-2.07 + dev-perl/IO-String + virtual/perl-Digest-MD5 + >=3Ddev-perl/CGI-Session-4.03 + dev-perl/Statistics-Descriptive + >=3Ddev-perl/Bio-Graphics-1.97 + >=3Ddev-perl/JSON-2.510.0 + dev-perl/TermReadKey + dev-perl/libwww-perl + svg? ( dev-perl/GD-SVG ) + pdf? ( media-gfx/inkscape ) + mysql? ( dev-perl/DBD-mysql ) + postgres? ( dev-perl/DBD-Pg ) + sci-biology/ucsc-genome-browser" # that provides bigWig.h and jkweb.a, = aka Jim Kent's src + +# TODO: based on the following message in apache/error_log the list of d= eps should be longer +# GBROWSE NOTICE: To enable PDF generation, please enter the directory "= /home/httpd" and run the commands: "sudo mkdir .inkscape .gnome2" and "su= do chown apache .inkscape .gnome2". To turn off this message add "genera= te pdf =3D 0" to the [GENERAL] section of your GBrowse.conf configuration= file., referer: http://127.0.0.1/gbrowse/cgi-bin/gbrowse_details/yeast?r= ef=3DchrII;start=3D90739;end=3D92028;name=3DYBL069W;class=3DSequence;feat= ure_id=3D881;db_id=3Dannotations%3Adatabase + +RDEPEND=3D"${DEPEND} + >=3Dwww-servers/apache-2.0.47 + fastcgi? ( dev-libs/fcgi ) + www-apache/mod_fastcgi + dev-perl/DBI + || ( dev-perl/DBD-Pg dev-perl/DBD-mysql ) + !minimal? ( + dev-perl/File-NFSLock + dev-perl/FCGI + perl-core/Math-BigInt + perl-core/Math-BigInt-FastCalc + dev-perl/Math-BigInt-GMP + dev-perl/Digest-SHA1 + dev-perl/Crypt-SSLeay + dev-perl/Net-SMTP-SSL + dev-perl/Net-OpenID-Consumer + virtual/perl-DB_File + dev-perl/DB_File-Lock + dev-perl/GD-SVG + dev-perl/Text-Shellwords + dev-perl/XML-Twig + dev-perl/XML-DOM + dev-perl/XML-Writer + dev-perl/XML-Parser + dev-perl/Bio-Das + dev-perl/Text-Shellwords + postgres? ( >=3Ddev-perl/Bio-DB-Das-Chado-0.32 ) + >=3Ddev-perl/Bio-SamTools-1.29 + >=3Ddev-perl/Bio-BigFile-1.06 + )" + +src_prepare() { + sed -i 's/return unless -t STDIN/return/' install_util/GBrowseInstall.p= m || die "Failed to kill the interactive behavior of install_util/GBrowse= Install.pm" + sed -i 's/process_/bp_process_/g' INSTALL || die "Failed to prepend bp_= prefix to INSTALL file" + epatch "${FILESDIR}"/GBrowseInstall.pm-"${PV}".patch || die "Failed to = apply GBrowseInstall.pm-"${PV}".patch" + epatch "${FILESDIR}"/destdir.patch || die "Failed to apply destdir.patc= h" + epatch "${FILESDIR}"/fix-PNG-export.patch || die "Failed to apply fix-P= NG-export.patch" + epatch "${FILESDIR}"/symlink.patch || die "Failed to apply symlink.patc= h" + epatch "${FILESDIR}"/gbrowse_metadb_config.pl.patch || die "Failed to a= pply gbrowse_metadb_config.pl.patch" + epatch "${FILESDIR}"/disable-gbrowse_metadb_config.pl.patch || die "Fai= led to apply disable-gbrowse_metadb_config.pl.patch" + for f in conf/synteny/wild_rice_synteny.conf conf/synteny/rice_synteny.= conf conf/GBrowse.conf \ + htdocs/tutorial/tutorial.html htdocs/index.html lib/Bio/Graphics/Brow= ser2/Action.pm \ + Changes; do + sed -i 's#/var/lib/gbrowse2#/var/db/gbrowse2#' $f || die "Failed to re= write /var/lib/gbrowse2 to /var/db/gbrowse2 in $f" + done + for f in htdocs/index.html; do + sed -i 's#/usr/lib/cgi-bin/gb2#/usr/share/webapps/gbrowse/"${PV}"/htdo= cs/cgi-bin#' $f || die "Failed to rewrite /usr/lib/cgi-bin/gb2 to /usr/sh= are/webapps/gbrowse/"${PV}"/htdocs/cgi-bin in $f" + done +} + +src_configure() { + # GBROWSE_ROOT is the root path in SRC_URI to be prepended + # /usr/share/webapps/gbrowse/2.03/htdocs/etc/gbrowse/GBrowse.conf + webapp_src_preinst + perl Makefile.PL \ + HTDOCS=3D"${MY_HTDOCSDIR}" \ + CGIBIN=3D"${MY_HTDOCSDIR}"/cgi-bin \ + CONF=3D"${MY_HTDOCSDIR}"/etc/gbrowse \ + PACKAGE_DIR=3D"${D}" \ + INSTALLDIRS=3Dvendor \ + GBROWSE_ROOT=3D"gbrowse" \ + DESTDIR=3D"${D}" \ + DATABASES=3D"/var/db/gbrowse2/databases" \ + PERSISTENT=3D"/var/db/gbrowse2" \ + TMP=3D"/var/tmp/gbrowse2" \ + INSTALLETC=3D"n" \ + INSTALLCONF=3D"n" \ + WWWUSER=3D"apache" \ + DO_XS=3D1 \ + NONROOT=3D1 \ + || die +} + +src_install() { + mydoc=3D"Changes README TODO INSTALL" + perl-module_src_install + + # TODO: write our own readme + webapp_postinst_txt en "${S}"/INSTALL + webapp_src_install || die "Failed running webapp_src_install" + + # should create a /etc/init.d/ startup script based on this + # /var/tmp/portage/sci-biology/gbrowse-2.03/work/GBrowse-2.03/etc/init.= d/gbrowse-slave + + mkdir -p "${D}"/var/tmp/gbrowse2/images + chown -R apache.apache "${D}"/var/tmp/gbrowse2 + + # mkdir -p "${D}"/var/www/localhost/htdocs/gbrowse || die + # ln -s "${D}"/var/tmp/gbrowse2/images "${D}"/usr/share/webapps/gbrowse= /"${PV}"/htdocs/i || die + + # whole "${D}"/var/db/gbrowse2 has to be owned by apache.apache otherwi= se: + # 1. you hit an error that /var/db/gbrowse2/sessions/cgisess.db.lck + # [no, it is not enough chown -R apache.apache /var/db/gbrowse2/sessio= ns, the parent dir has to be apapche.apache as well] + # 2. even if you set /var/db/gbrowse2 to apache.apache still it is not = enough, you will get + # [Tue Jan 17 14:59:40 2012] [error] [client 127.0.0.1] Use of uninit= ialized value $label in lc at /usr/lib/perl5/vendor_perl/5.12.4/i686-linu= x-thread-multi/Bio/Graphics/Browser2/AuthorizedFeatureFile.pm line 34., r= eferer: http://127.0.0.1/gbrowse/cgi-bin/gbrowse/yeast/ + + mkdir -p "${D}"/var/db/gbrowse2 + mkdir -p "${D}"/var/db/gbrowse2/databases + mkdir -p "${D}"/var/db/gbrowse2/sessions "${D}"/var/db/gbrowse2/userdat= a + chown -R apache.apache "${D}"/var/db/gbrowse2 # it has to be owned by a= pache.apache otherwise /var/db/gbrowse2/sessions/cgisess.db.lck cannot be= created although /var/db/gbrowse2/sessions is owner by apache.apache + + einfo "Dropping trailing 'databases' from db_variable in conf/GBrowse.c= onf" + sed -i 's#/var/db/gbrowse2/databases#/var/db/gbrowse2#' conf/GBrowse.co= nf || die "Failed to dropping trailing 'databases' from db_variable in co= nf/GBrowse.conf" + + einfo "Probably you want to install a cron job to remove the generated = temporary images:" + einfo "find /var/tmp/gbrowse2/images -type f -atime +20 -print -exec rm= {}" + + einfo "Make sure you compiled apache with +cgi and do" + einfo "cp -i ${FILESDIR}/gbrowse.conf.vhosts.d /etc/apache2/vhosts.d/gb= rowse.conf" + + sed -i "s#"${D}"##g" "${S}"/install_util/GBrowseInstall.pm || die + sed -i "s#"${D}"##" "${S}"/blib/conf/GBrowse.conf* + sed -i 's#DBI:SQLite:'${D}'/var/lib/gbrowse2/databases/#DBI:SQLite:/var= /db/gbrowse2/databases/#' "${S}"/install_util/GBrowseInstall.pm || die +} + +pkg_postinst() { + webapp_pkg_postinst || die "webapp_pkg_postinst failed" + + einfo "Please run gbrowse_metadb_config.pl to update SQLite flatfiles o= f the live database." + einfo "d=3D'/usr/share/webapps/gbrowse/${PV}/htdocs/etc/gbrowse'; for f= in \$d/*.conf.new; do \ " + einfo " mv -i \$f \$d/\`basename \$f .new\`; done" + + einfo "Fix also the other copy of the file:" + einfo "d=3D'/var/www/localhost/htdocs/gbrowse/etc/gbrowse'; for f in \$= d/*.conf.new; do \ " + einfo " mv -i \$f \$d/\`basename \$f .new\`; done" +} + +src_test() { + mysql -uroot -p password -e 'create database yeast' + mysql -uroot -p password -e 'grant all privileges on yeast.* to gbrowse= @localhost' + mysql -uroot -p password -e 'grant file on *.* to gbrowse@localhost' + mysql -uroot -p password -e 'grant select on yeast.* to nobody@localhos= t' + + cd /usr/portage/distfiles || die + gzip -d yeast.fasta.gz || die + gzip -d yeast.gff.gz || die + #gzip -d fly.fasta.gz + #gzip -d fly.gff.gz + bp_bulk_load_gff.pl -d yeast -fasta yeast.fasta yeast.gff || die +}