aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Mokrejs <mmokrejs@fold.natur.cuni.cz>2012-01-17 19:11:07 +0100
committerMartin Mokrejs <mmokrejs@fold.natur.cuni.cz>2012-01-17 19:11:07 +0100
commitbfc8451b06a8727456543751d139d29706473c03 (patch)
tree43081fe325d6e680bafecb21659b58fc10ba7d20 /sci-biology
parent[sci-visualization/yt] initial import, ebuild written by me (diff)
downloadsci-bfc8451b06a8727456543751d139d29706473c03.tar.gz
sci-bfc8451b06a8727456543751d139d29706473c03.tar.bz2
sci-bfc8451b06a8727456543751d139d29706473c03.zip
version bump and some fixes so that it works with webappconfig again?
(Portage version: 2.1.10.44/git/Linux i686, unsigned Manifest commit)
Diffstat (limited to 'sci-biology')
-rw-r--r--sci-biology/gbrowse/ChangeLog6
-rw-r--r--sci-biology/gbrowse/Manifest1
-rw-r--r--sci-biology/gbrowse/files/GBrowseInstall.pm-2.45.patch32
-rw-r--r--sci-biology/gbrowse/gbrowse-2.45.ebuild199
4 files changed, 238 insertions, 0 deletions
diff --git a/sci-biology/gbrowse/ChangeLog b/sci-biology/gbrowse/ChangeLog
index c63914ae5..41e233429 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/ChangeLog,v 1.10 2007/07/29 17:07:38 phreak Exp $
+*gbrowse-2.45 (17 Jan 2012)
+
+ 17 Jan 2012; Martin Mokrejs <mmokrejs@fold.natur.cuni.cz>
+ +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 <mmokrejs@fold.natur.cuni.cz>
gbrowse-2.39.ebuild:
added dev-perl/TermReadKey to dependencies
diff --git a/sci-biology/gbrowse/Manifest b/sci-biology/gbrowse/Manifest
index 5d79df93e..6e6d8a7ef 100644
--- a/sci-biology/gbrowse/Manifest
+++ b/sci-biology/gbrowse/Manifest
@@ -1,4 +1,5 @@
DIST GBrowse-2.39.tar.gz 11969088 SHA256 b4e76acfa1d8f64d5f227c3ba0258666928b4f357428549be85f05c944337d44 SHA512 4297192236a297a4f6a25892e245e3f5a4951b561ae167d7d402ff09b50a9a8a0d924094136d191d9068f735f77795a166e37aac67cd964d70cc805a15f8c26d WHIRLPOOL a0fc2c882d9e11f76d739a824152f9b5482f2b352583dc2e92fcfb60cf1b19ff1a9684c543ee6b8e69b3ed441548d5dd9b1d2da9e8779f0d157a7fe73f6e7af8
+DIST GBrowse-2.45.tar.gz 11954151 SHA256 8f8c9054d48199ccfe0a536ef892461a9e197d49ac99dd67381f9ad45377c35c SHA512 8b330ccb5468a4dd6b2f409a97350578788eb857a8db79715314f12875a69c5f37c6679b1efa23aaae77b978f93f35dbe8113a2714e3bbd45fb02273edf1a119 WHIRLPOOL 2bd2e7a47788b31861dc0d0f8654f56c5e078b9a99b9bab74c89422800b8e9a8bfb3e0b64e99dc9eb53bcfe04f3106322f8da2c978ad2873adc3ef06e64d37a4
DIST README-gff-files 5309 SHA256 21f4f026b212698c5aac0e82045670f8397ab50fdfe74b938fcbc71a1d36c82a SHA512 b591d269400c28f8908e5cc7bd27815b35b1750661cd4bb2c34e94f712ce100f71c7e9934800477425747e75fdd487192c3a2c05cf7249e28006c986feb54cca WHIRLPOOL f4080b582ac52adc76536cb7dcd646e4ce85b0f8210ef2010e037db7d114b436077f3b7d7d84216030e92130ad5be649442ece1e281273b13c39c537542270b6
DIST Refseq_Genome_TBLASTX.tar.gz 56482234 SHA256 7036bdd9aefbf44e384df83f4c1e973c1ab3eac8fe74b37499c4a3f1c55a18af SHA512 d49dc91f1246a881acf1b4fa0f336fe25ee0317f04a5bc42f2750509f95af3768eabfa0d4517f97ee14bb5de9e59700e0a7ef9018e577d2a87874809d313fdfb WHIRLPOOL 0cc86c1987d5399b952ba05cb441035a03ef5e47242e7f2ce95a73cc5420ff8b581ab6b097b66c96d65dc73b9ef4e301473b89a29c60413dd4d4d5e39508b6df
DIST fly.fasta.gz 37349852 SHA256 892ed03e17edd3469f1ed00cb9967fb905bbac57c1cb7858667381f34a6bfeea SHA512 f3c0864d82be03c5e06a2e420ecd42df254318b7ee18f7dbb982b1c716ff5db465da69991ab009cf157b6a3601220fadd58d91d68732570af453e2bd329e09b7 WHIRLPOOL e914a4082913fff82687b0282e9ddcb01cfdd50712dbc30dba9ba697fcacc2b4b168f2b6b587479c84e2b51370ea7285fb6c5a8ce3961a55f3ee2ee29f27d169
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 000000000..e91fe1634
--- /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 +0100
++++ install_util/GBrowseInstall.pm 2010-11-27 12:02:15.000000000 +0100
+@@ -436,8 +436,8 @@
+ $self->ownership_warning($databases,$user);
+ }
+
+- 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;
+
+ my $base = basename($self->install_path->{htdocs});
+
+--- install_util/GBrowseInstall.pm.ori 2011-02-14 13:50:41.000000000 +0100
++++ install_util/GBrowseInstall.pm 2011-02-14 13:51:46.000000000 +0100
+@@ -470,11 +470,11 @@
+ my @inc = map{"-I$_"} split ':',$self->added_to_INC;
+ system $perl,@inc,$metadb_script;
+
+- 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";
+- }
++# 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";
++# }
+
+ print STDERR "\n***INSTALLATION COMPLETE***\n";
+ print STDERR "Load http://localhost/$base for demo and documentation.\n";
diff --git a/sci-biology/gbrowse/gbrowse-2.45.ebuild b/sci-biology/gbrowse/gbrowse-2.45.ebuild
new file mode 100644
index 000000000..f9148443c
--- /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="2"
+
+inherit perl-module webapp
+
+MY_P="GBrowse-${PV}"
+
+DESCRIPTION="Display of genomic annotations on interactive web pages"
+HOMEPAGE="http://gmod.org/"
+# mirror://sourceforge/gmod/${MY_P}.tar.gz
+# mirror://cpan/authors/id/L/LD/LDS/GBrowse-2.33.tar.gz
+SRC_URI="
+ 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="Artistic"
+# webapp ebuilds do not set SLOT
+KEYWORDS="~x86 ~amd64"
+IUSE="cgi fastcgi minimal mysql pdf postgres svg test" # lwp moby scf
+
+S="${WORKDIR}/${MY_P}"
+
+# TODO: dev-perl/MOBY, dev-perl/Bio-SCF, dev-perl/Safe-World (not compatible w/perl-5.10)
+# how about mod_fcgi and dev-libs/fcgi and mod_scgi?
+DEPEND="!!sci-biology/GBrowse
+ >=perl-core/Module-Build-0.380.0
+ >=dev-lang/perl-5.8.8
+ dev-perl/Capture-Tiny
+ >=sci-biology/bioperl-1.6.901
+ >=dev-perl/GD-2.07
+ dev-perl/IO-String
+ virtual/perl-Digest-MD5
+ >=dev-perl/CGI-Session-4.03
+ dev-perl/Statistics-Descriptive
+ >=dev-perl/Bio-Graphics-1.97
+ >=dev-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 deps should be longer
+# GBROWSE NOTICE: To enable PDF generation, please enter the directory "/home/httpd" and run the commands: "sudo mkdir .inkscape .gnome2" and "sudo chown apache .inkscape .gnome2". To turn off this message add "generate pdf = 0" to the [GENERAL] section of your GBrowse.conf configuration file., referer: http://127.0.0.1/gbrowse/cgi-bin/gbrowse_details/yeast?ref=chrII;start=90739;end=92028;name=YBL069W;class=Sequence;feature_id=881;db_id=annotations%3Adatabase
+
+RDEPEND="${DEPEND}
+ >=www-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? ( >=dev-perl/Bio-DB-Das-Chado-0.32 )
+ >=dev-perl/Bio-SamTools-1.29
+ >=dev-perl/Bio-BigFile-1.06
+ )"
+
+src_prepare() {
+ sed -i 's/return unless -t STDIN/return/' install_util/GBrowseInstall.pm || die "Failed to kill the interactive behavior of install_util/GBrowseInstall.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.patch"
+ epatch "${FILESDIR}"/fix-PNG-export.patch || die "Failed to apply fix-PNG-export.patch"
+ epatch "${FILESDIR}"/symlink.patch || die "Failed to apply symlink.patch"
+ epatch "${FILESDIR}"/gbrowse_metadb_config.pl.patch || die "Failed to apply gbrowse_metadb_config.pl.patch"
+ epatch "${FILESDIR}"/disable-gbrowse_metadb_config.pl.patch || die "Failed 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/Browser2/Action.pm \
+ Changes; do
+ sed -i 's#/var/lib/gbrowse2#/var/db/gbrowse2#' $f || die "Failed to rewrite /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}"/htdocs/cgi-bin#' $f || die "Failed to rewrite /usr/lib/cgi-bin/gb2 to /usr/share/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="${MY_HTDOCSDIR}" \
+ CGIBIN="${MY_HTDOCSDIR}"/cgi-bin \
+ CONF="${MY_HTDOCSDIR}"/etc/gbrowse \
+ PACKAGE_DIR="${D}" \
+ INSTALLDIRS=vendor \
+ GBROWSE_ROOT="gbrowse" \
+ DESTDIR="${D}" \
+ DATABASES="/var/db/gbrowse2/databases" \
+ PERSISTENT="/var/db/gbrowse2" \
+ TMP="/var/tmp/gbrowse2" \
+ INSTALLETC="n" \
+ INSTALLCONF="n" \
+ WWWUSER="apache" \
+ DO_XS=1 \
+ NONROOT=1 \
+ || die
+}
+
+src_install() {
+ mydoc="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 otherwise:
+ # 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/sessions, 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 uninitialized value $label in lc at /usr/lib/perl5/vendor_perl/5.12.4/i686-linux-thread-multi/Bio/Graphics/Browser2/AuthorizedFeatureFile.pm line 34., referer: 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/userdata
+ chown -R apache.apache "${D}"/var/db/gbrowse2 # it has to be owned by apache.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.conf"
+ sed -i 's#/var/db/gbrowse2/databases#/var/db/gbrowse2#' conf/GBrowse.conf || die "Failed to dropping trailing 'databases' from db_variable in conf/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/gbrowse.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 of the live database."
+ einfo "d='/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='/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@localhost'
+
+ 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
+}