From 9f07546c0a41c51798aeca2c26010741db03535c Mon Sep 17 00:00:00 2001 From: Martin Mokrejs Date: Sat, 30 Jul 2011 12:40:38 +0200 Subject: version bump but still need to rewrite upstream's install procedure to prevent 'mkdir /var/lib/gbrowse2' from happening (Portage version: 2.1.10.7/git/Linux i686, unsigned Manifest commit) --- sci-biology/gbrowse/ChangeLog | 14 ++ sci-biology/gbrowse/Manifest | 8 +- .../gbrowse/files/GBrowseInstall.pm-2.38.patch | 32 ---- .../gbrowse/files/GBrowseInstall.pm-2.39.patch | 32 ++++ sci-biology/gbrowse/gbrowse-2.38.ebuild | 162 --------------------- sci-biology/gbrowse/gbrowse-2.39.ebuild | 162 +++++++++++++++++++++ 6 files changed, 212 insertions(+), 198 deletions(-) delete mode 100644 sci-biology/gbrowse/files/GBrowseInstall.pm-2.38.patch create mode 100644 sci-biology/gbrowse/files/GBrowseInstall.pm-2.39.patch delete mode 100644 sci-biology/gbrowse/gbrowse-2.38.ebuild create mode 100644 sci-biology/gbrowse/gbrowse-2.39.ebuild (limited to 'sci-biology') diff --git a/sci-biology/gbrowse/ChangeLog b/sci-biology/gbrowse/ChangeLog index eaa41a45d..b8780b15f 100644 --- a/sci-biology/gbrowse/ChangeLog +++ b/sci-biology/gbrowse/ChangeLog @@ -2,6 +2,20 @@ # Copyright 1999-2011 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 $ + 30 Jul 2011; Martin Mokrejs + -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 + prevent 'mkdir /var/lib/gbrowse2' from happening + +*gbrowse-2.39 (30 Jul 2011) + + 30 Jul 2011; Martin Mokrejs + -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 + prevent 'mkdir /var/lib/gbrowse2' from happening + 08 Jul 2011; Martin Mokrejs gbrowse-2.38.ebuild: Added dependency on >=perl-gcpan/Text-ParseWords-3.27, documented requirement diff --git a/sci-biology/gbrowse/Manifest b/sci-biology/gbrowse/Manifest index b63129745..22f2fd5e1 100644 --- a/sci-biology/gbrowse/Manifest +++ b/sci-biology/gbrowse/Manifest @@ -1,8 +1,8 @@ -AUX GBrowseInstall.pm-2.38.patch 1278 RMD160 96c7f2c66537c6e01cf2619018f608607c0927dc SHA1 a3cb874018d2c7a5acf34381971cc09d83a13f73 SHA256 5a1018f582c2e0ffca034d04ce73f678dd879d90932e4e89ea664c7c113f4b7c +AUX GBrowseInstall.pm-2.39.patch 1278 RMD160 96c7f2c66537c6e01cf2619018f608607c0927dc SHA1 a3cb874018d2c7a5acf34381971cc09d83a13f73 SHA256 5a1018f582c2e0ffca034d04ce73f678dd879d90932e4e89ea664c7c113f4b7c AUX gbrowse-slave.default 210 RMD160 77245190ab0d3a543f3103bb6f21864f73ea1cde SHA1 a19d60edd3fdc1f059ed8fa58f7e91fc47ec92dc SHA256 e4e6d68ade29681f442b2e1c7f8abbc7ff3255b3b8db3c59ed6368ba561d7d66 AUX gbrowse-slave.init.d 2196 RMD160 8b565d1be23c89cbae0f9fd5cd2201f47a564b94 SHA1 738bc8f06486a0e6caa72642f79f9b7dbb356524 SHA256 de511a92757153ee648eb6cd39e3c69c1e30fa2c2ed406f24c08571c72609219 AUX gbrowse.conf.vhosts.d 740 RMD160 e24f5132e37a84dd0bb9a39e2de99cd11d260844 SHA1 2c44fdcf04bef92eb6210d4e6667b994e5643a13 SHA256 8acd5a067ab3dd42cff0ab7cb0d783b2409ccb872590eba32ea55d4929f65f21 -DIST GBrowse-2.38.tar.gz 11966992 RMD160 dde50d49ee1b228103dffc9701e450ac9e3be3cd SHA1 4228a4938cbdbc409ddb23f81cd3186cdf15391d SHA256 acf7d3d0f32d0138640b2773ed580572ff63d646d4538f354dec8986607aa275 +DIST GBrowse-2.39.tar.gz 11969088 RMD160 47dd338a0b99632e77a532a3c27d0b9d9d514dca SHA1 2cc48cc1603aa3ae487c47259f9a896bec4eff8e SHA256 b4e76acfa1d8f64d5f227c3ba0258666928b4f357428549be85f05c944337d44 DIST README-gff-files 5309 RMD160 8ba184fa8a6b921f925143cf53de06e3da353023 SHA1 ad2d2b3133c73a05ace4a0107ff1a3a4221bc8f8 SHA256 21f4f026b212698c5aac0e82045670f8397ab50fdfe74b938fcbc71a1d36c82a DIST Refseq_Genome_TBLASTX.tar.gz 56482234 RMD160 e188d9dfe12bed3fd299be4625f7e658f54bb8c4 SHA1 72ec3de9b9ca0e10c2dd8dcda24f9be74f98cf09 SHA256 7036bdd9aefbf44e384df83f4c1e973c1ab3eac8fe74b37499c4a3f1c55a18af DIST fly.fasta.gz 37349852 RMD160 4bedfcc5d0ea3d325f3d3e446713251a8ce34ca3 SHA1 8f2c7a2f24dbab0f27c73009fe51efb8f41d6769 SHA256 892ed03e17edd3469f1ed00cb9967fb905bbac57c1cb7858667381f34a6bfeea @@ -13,6 +13,6 @@ DIST worm.fasta.gz 30593662 RMD160 674ef3d09cdfaa5d748f18c0e769f0a5ca3d48cf SHA1 DIST worm.gff.gz 65789458 RMD160 ddced7c965963ce41a10bdecae949731ed305121 SHA1 ccfb0f287e27ff7849b099c81d811f468a7e617c SHA256 afd63c65c3fdb0ba8a1cf455bd4477a2d5d27d5b0e88c6a5a10d156d0567374f DIST yeast.fasta.gz 3801757 RMD160 5545054cf6ffa5381c7992141144107076fdf62e SHA1 c36fddc5fd2c79e01292f66644088654304bc438 SHA256 bf51cbced31aa6a30bca43cc72fdb53194fbb403407e2ebb9d70c901ab072e6d DIST yeast.gff.gz 249814 RMD160 64538d18de23d930915938bd00ae4a94a52f3960 SHA1 ec753b1ae409e1377f568531a53be8985a7bfa2e SHA256 20c93e6ba9457896a693d13e8fd8fa00d77acbb55aee9b19a31c2b29c4b7e9b1 -EBUILD gbrowse-2.38.ebuild 6381 RMD160 a8a14f370543197cde8816f4d0cc0797eba158b7 SHA1 6f67d008248a7fdef7848a55855788bc367c15d5 SHA256 1107ad4bd23e6c34d09d5e9bf026c64d302282d477fb6546936a0eee27b87de2 -MISC ChangeLog 2729 RMD160 de32f4faa78f55a913b316b8eea10e978e02a38b SHA1 7c533d5e014be35560270b678053679083160696 SHA256 a5190627f4800c65af6f0fb3cc8a97d3d54909ef83611bf0d346696a89e43583 +EBUILD gbrowse-2.39.ebuild 6353 RMD160 861a7ccc9131fa4c0cb90262b66f4bf2d812f348 SHA1 f15271be624fd4996e1a420620b188e72b0c69b5 SHA256 6f107f9adf9a3000ebd8a76f045c9775bfb52c1ddd8387ef1f69fd628edfe906 +MISC ChangeLog 3372 RMD160 d293a0f800aa84e937e7c8ce579c30df32d06c47 SHA1 c03cd02620dfbf30c435e8e2b20fbd042231f52d SHA256 5b3d0ab17974a42dba9c360c569de57bbf5621e3cf72fb756b6b64708419f998 MISC metadata.xml 572 RMD160 bc941571413238acb3d77e61d49b959737ed4f5a SHA1 0c05303509c0e2dd21b37fc93c936809db49e530 SHA256 89b9964a9404a95dbb622a91735348da8e66d34d7dd7e7f144ed8c0159c43e31 diff --git a/sci-biology/gbrowse/files/GBrowseInstall.pm-2.38.patch b/sci-biology/gbrowse/files/GBrowseInstall.pm-2.38.patch deleted file mode 100644 index e91fe1634..000000000 --- a/sci-biology/gbrowse/files/GBrowseInstall.pm-2.38.patch +++ /dev/null @@ -1,32 +0,0 @@ ---- 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/files/GBrowseInstall.pm-2.39.patch b/sci-biology/gbrowse/files/GBrowseInstall.pm-2.39.patch new file mode 100644 index 000000000..e91fe1634 --- /dev/null +++ b/sci-biology/gbrowse/files/GBrowseInstall.pm-2.39.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.38.ebuild b/sci-biology/gbrowse/gbrowse-2.38.ebuild deleted file mode 100644 index ea981ca01..000000000 --- a/sci-biology/gbrowse/gbrowse-2.38.ebuild +++ /dev/null @@ -1,162 +0,0 @@ -# Copyright 1999-2011 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="-minimal 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) -# TODO: make sure www-servers/apache +cgi -DEPEND=" - >=perl-core/Module-Build-0.380.0 - >=dev-lang/perl-5.8.8 - dev-perl/Capture-Tiny - >=sci-biology/bioperl-1.6 - >=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/libwww-perl - svg? ( dev-perl/GD-SVG )" - -# 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 - -# TODO: implement ebuild checks for these version of packages -# ! Bio::Root::Version (1.006001) is installed, but we need version >= 1.0069 -# * Bio::DB::BigFile is not installed -# * Bio::DB::Sam is not installed, install http://cpansearch.perl.org/src/LDS/Bio-SamTools-1.29 -# * DBD::Pg is not installed -# >=perl-gcpan/Text-ParseWords-3.27 - -RDEPEND="${DEPEND} - >=www-servers/apache-2.0.47 - 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 - )" - -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" -} - -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/www/gbrowse2/databases/" \ - 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 - - chown -R apache.apache "${D}"/var/www/gbrowse2/databases || die - - mkdir -p "${D}"/var/www/localhost/htdocs/gbrowse || die - ln -s "${D}"/var/tmp/gbrowse2/images "${D}"/var/www/localhost/htdocs/gbrowse/i || die - - 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 copy ${FILESDIR}/gbrowse.conf.vhosts.d to /etc/apache2/vhosts.d/" - - 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/www/gbrowse2/databases/#DBI:SQLite:/var/www/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 upate SQlite flatfiles or the live database" - einfo "This was disabled by "${FILESDIR}"/GBrowseInstall.pm-disable-gbrowse_metadb_config.pl.pm.patch" -} - -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 -} diff --git a/sci-biology/gbrowse/gbrowse-2.39.ebuild b/sci-biology/gbrowse/gbrowse-2.39.ebuild new file mode 100644 index 000000000..426ee4ba2 --- /dev/null +++ b/sci-biology/gbrowse/gbrowse-2.39.ebuild @@ -0,0 +1,162 @@ +# Copyright 1999-2011 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 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=" + >=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/libwww-perl + svg? ( dev-perl/GD-SVG ) + 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 + sed -i 's/process_/bp_process_/g' INSTALL || die + epatch "${FILESDIR}"/GBrowseInstall.pm-"${PV}".patch || die "Failed to patch" +} + +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/www/gbrowse2/databases/" \ + 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 + + chown -R apache.apache "${D}"/var/www/gbrowse2/databases || die + + mkdir -p "${D}"/var/www/localhost/htdocs/gbrowse || die + ln -s "${D}"/var/tmp/gbrowse2/images "${D}"/var/www/localhost/htdocs/gbrowse/i || die + + 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 copy ${FILESDIR}/gbrowse.conf.vhosts.d to /etc/apache2/vhosts.d/" + + 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/www/gbrowse2/databases/#DBI:SQLite:/var/www/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 upate SQlite flatfiles or the live database" + einfo "This was disabled by "${FILESDIR}"/GBrowseInstall.pm-disable-gbrowse_metadb_config.pl.pm.patch" +} + +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 +} -- cgit v1.2.3-65-gdbad