1 |
commit: bfc8451b06a8727456543751d139d29706473c03 |
2 |
Author: Martin Mokrejs <mmokrejs <AT> fold <DOT> natur <DOT> cuni <DOT> cz> |
3 |
AuthorDate: Tue Jan 17 18:11:07 2012 +0000 |
4 |
Commit: Martin Mokrejs <mmokrejs <AT> fold <DOT> natur <DOT> cuni <DOT> cz> |
5 |
CommitDate: Tue Jan 17 18:11:07 2012 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=bfc8451b |
7 |
|
8 |
version bump and some fixes so that it works with webappconfig again? |
9 |
|
10 |
(Portage version: 2.1.10.44/git/Linux i686, unsigned Manifest commit) |
11 |
|
12 |
--- |
13 |
sci-biology/gbrowse/ChangeLog | 6 + |
14 |
.../gbrowse/files/GBrowseInstall.pm-2.45.patch | 32 +++ |
15 |
sci-biology/gbrowse/gbrowse-2.45.ebuild | 199 ++++++++++++++++++++ |
16 |
3 files changed, 237 insertions(+), 0 deletions(-) |
17 |
|
18 |
diff --git a/sci-biology/gbrowse/ChangeLog b/sci-biology/gbrowse/ChangeLog |
19 |
index c63914a..41e2334 100644 |
20 |
--- a/sci-biology/gbrowse/ChangeLog |
21 |
+++ b/sci-biology/gbrowse/ChangeLog |
22 |
@@ -2,6 +2,12 @@ |
23 |
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 |
24 |
# $Header: /var/cvsroot/gentoo-x86/sci-biology/generic-genome-browser/ChangeLog,v 1.10 2007/07/29 17:07:38 phreak Exp $ |
25 |
|
26 |
+*gbrowse-2.45 (17 Jan 2012) |
27 |
+ |
28 |
+ 17 Jan 2012; Martin Mokrejs <mmokrejs@×××××××××××××××.cz> |
29 |
+ +gbrowse-2.45.ebuild, +files/GBrowseInstall.pm-2.45.patch: |
30 |
+ version bump and some fixes so that it works with webappconfig again? |
31 |
+ |
32 |
17 Jan 2012; Martin Mokrejs <mmokrejs@×××××××××××××××.cz> |
33 |
gbrowse-2.39.ebuild: |
34 |
added dev-perl/TermReadKey to dependencies |
35 |
|
36 |
diff --git a/sci-biology/gbrowse/files/GBrowseInstall.pm-2.45.patch b/sci-biology/gbrowse/files/GBrowseInstall.pm-2.45.patch |
37 |
new file mode 100644 |
38 |
index 0000000..e91fe16 |
39 |
--- /dev/null |
40 |
+++ b/sci-biology/gbrowse/files/GBrowseInstall.pm-2.45.patch |
41 |
@@ -0,0 +1,32 @@ |
42 |
+--- install_util/GBrowseInstall.pm.ori 2010-11-27 12:01:58.000000000 +0100 |
43 |
++++ install_util/GBrowseInstall.pm 2010-11-27 12:02:15.000000000 +0100 |
44 |
+@@ -436,8 +436,8 @@ |
45 |
+ $self->ownership_warning($databases,$user); |
46 |
+ } |
47 |
+ |
48 |
+- chmod 0755,File::Spec->catfile($self->install_path->{'etc'},'init.d','gbrowse-slave'); |
49 |
+- $self->fix_selinux; |
50 |
++ # chmod 0755,File::Spec->catfile($self->install_path->{'etc'},'init.d','gbrowse-slave'); |
51 |
++ # $self->fix_selinux; |
52 |
+ |
53 |
+ my $base = basename($self->install_path->{htdocs}); |
54 |
+ |
55 |
+--- install_util/GBrowseInstall.pm.ori 2011-02-14 13:50:41.000000000 +0100 |
56 |
++++ install_util/GBrowseInstall.pm 2011-02-14 13:51:46.000000000 +0100 |
57 |
+@@ -470,11 +470,11 @@ |
58 |
+ my @inc = map{"-I$_"} split ':',$self->added_to_INC; |
59 |
+ system $perl,@inc,$metadb_script; |
60 |
+ |
61 |
+- if (Module::Build->y_n( |
62 |
+- "It is recommended that you restart Apache. Shall I try this for you?",'y' |
63 |
+- )) { |
64 |
+- system "sudo /etc/init.d/apache2 restart"; |
65 |
+- } |
66 |
++# if (Module::Build->y_n( |
67 |
++# "It is recommended that you restart Apache. Shall I try this for you?",'y' |
68 |
++# )) { |
69 |
++# system "sudo /etc/init.d/apache2 restart"; |
70 |
++# } |
71 |
+ |
72 |
+ print STDERR "\n***INSTALLATION COMPLETE***\n"; |
73 |
+ print STDERR "Load http://localhost/$base for demo and documentation.\n"; |
74 |
|
75 |
diff --git a/sci-biology/gbrowse/gbrowse-2.45.ebuild b/sci-biology/gbrowse/gbrowse-2.45.ebuild |
76 |
new file mode 100644 |
77 |
index 0000000..f914844 |
78 |
--- /dev/null |
79 |
+++ b/sci-biology/gbrowse/gbrowse-2.45.ebuild |
80 |
@@ -0,0 +1,199 @@ |
81 |
+# Copyright 1999-2012 Gentoo Foundation |
82 |
+# Distributed under the terms of the GNU General Public License v2 |
83 |
+# $Header: $ |
84 |
+EAPI="2" |
85 |
+ |
86 |
+inherit perl-module webapp |
87 |
+ |
88 |
+MY_P="GBrowse-${PV}" |
89 |
+ |
90 |
+DESCRIPTION="Display of genomic annotations on interactive web pages" |
91 |
+HOMEPAGE="http://gmod.org/" |
92 |
+# mirror://sourceforge/gmod/${MY_P}.tar.gz |
93 |
+# mirror://cpan/authors/id/L/LD/LDS/GBrowse-2.33.tar.gz |
94 |
+SRC_URI=" |
95 |
+ mirror://cpan/authors/id/L/LD/LDS/${MY_P}.tar.gz |
96 |
+ test? ( |
97 |
+ http://sourceforge.net/projects/gmod/files/Generic%20Genome%20Browser/Sample%20Data%20Files/saccharomyces_cerevisiae.gff.bz2 |
98 |
+ http://sourceforge.net/projects/gmod/files/Generic%20Genome%20Browser/Sample%20Data%20Files/Refseq_Genome_TBLASTX.tar.gz |
99 |
+ http://sourceforge.net/projects/gmod/files/Generic%20Genome%20Browser/Sample%20Data%20Files/README-gff-files |
100 |
+ http://sourceforge.net/projects/gmod/files/Generic%20Genome%20Browser/Sample%20Data%20Files/human.gff.tar.gz |
101 |
+ http://sourceforge.net/projects/gmod/files/Generic%20Genome%20Browser/Sample%20Data%20Files/yeast.fasta.gz |
102 |
+ http://sourceforge.net/projects/gmod/files/Generic%20Genome%20Browser/Sample%20Data%20Files/yeast.gff.gz |
103 |
+ http://sourceforge.net/projects/gmod/files/Generic%20Genome%20Browser/Sample%20Data%20Files/worm.fasta.gz |
104 |
+ http://sourceforge.net/projects/gmod/files/Generic%20Genome%20Browser/Sample%20Data%20Files/worm.gff.gz |
105 |
+ http://sourceforge.net/projects/gmod/files/Generic%20Genome%20Browser/Sample%20Data%20Files/fly.fasta.gz |
106 |
+ http://sourceforge.net/projects/gmod/files/Generic%20Genome%20Browser/Sample%20Data%20Files/fly.gff.gz )" |
107 |
+ |
108 |
+LICENSE="Artistic" |
109 |
+# webapp ebuilds do not set SLOT |
110 |
+KEYWORDS="~x86 ~amd64" |
111 |
+IUSE="cgi fastcgi minimal mysql pdf postgres svg test" # lwp moby scf |
112 |
+ |
113 |
+S="${WORKDIR}/${MY_P}" |
114 |
+ |
115 |
+# TODO: dev-perl/MOBY, dev-perl/Bio-SCF, dev-perl/Safe-World (not compatible w/perl-5.10) |
116 |
+# how about mod_fcgi and dev-libs/fcgi and mod_scgi? |
117 |
+DEPEND="!!sci-biology/GBrowse |
118 |
+ >=perl-core/Module-Build-0.380.0 |
119 |
+ >=dev-lang/perl-5.8.8 |
120 |
+ dev-perl/Capture-Tiny |
121 |
+ >=sci-biology/bioperl-1.6.901 |
122 |
+ >=dev-perl/GD-2.07 |
123 |
+ dev-perl/IO-String |
124 |
+ virtual/perl-Digest-MD5 |
125 |
+ >=dev-perl/CGI-Session-4.03 |
126 |
+ dev-perl/Statistics-Descriptive |
127 |
+ >=dev-perl/Bio-Graphics-1.97 |
128 |
+ >=dev-perl/JSON-2.510.0 |
129 |
+ dev-perl/TermReadKey |
130 |
+ dev-perl/libwww-perl |
131 |
+ svg? ( dev-perl/GD-SVG ) |
132 |
+ pdf? ( media-gfx/inkscape ) |
133 |
+ mysql? ( dev-perl/DBD-mysql ) |
134 |
+ postgres? ( dev-perl/DBD-Pg ) |
135 |
+ sci-biology/ucsc-genome-browser" # that provides bigWig.h and jkweb.a, aka Jim Kent's src |
136 |
+ |
137 |
+# TODO: based on the following message in apache/error_log the list of deps should be longer |
138 |
+# 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 |
139 |
+ |
140 |
+RDEPEND="${DEPEND} |
141 |
+ >=www-servers/apache-2.0.47 |
142 |
+ fastcgi? ( dev-libs/fcgi ) |
143 |
+ www-apache/mod_fastcgi |
144 |
+ dev-perl/DBI |
145 |
+ || ( dev-perl/DBD-Pg dev-perl/DBD-mysql ) |
146 |
+ !minimal? ( |
147 |
+ dev-perl/File-NFSLock |
148 |
+ dev-perl/FCGI |
149 |
+ perl-core/Math-BigInt |
150 |
+ perl-core/Math-BigInt-FastCalc |
151 |
+ dev-perl/Math-BigInt-GMP |
152 |
+ dev-perl/Digest-SHA1 |
153 |
+ dev-perl/Crypt-SSLeay |
154 |
+ dev-perl/Net-SMTP-SSL |
155 |
+ dev-perl/Net-OpenID-Consumer |
156 |
+ virtual/perl-DB_File |
157 |
+ dev-perl/DB_File-Lock |
158 |
+ dev-perl/GD-SVG |
159 |
+ dev-perl/Text-Shellwords |
160 |
+ dev-perl/XML-Twig |
161 |
+ dev-perl/XML-DOM |
162 |
+ dev-perl/XML-Writer |
163 |
+ dev-perl/XML-Parser |
164 |
+ dev-perl/Bio-Das |
165 |
+ dev-perl/Text-Shellwords |
166 |
+ postgres? ( >=dev-perl/Bio-DB-Das-Chado-0.32 ) |
167 |
+ >=dev-perl/Bio-SamTools-1.29 |
168 |
+ >=dev-perl/Bio-BigFile-1.06 |
169 |
+ )" |
170 |
+ |
171 |
+src_prepare() { |
172 |
+ sed -i 's/return unless -t STDIN/return/' install_util/GBrowseInstall.pm || die "Failed to kill the interactive behavior of install_util/GBrowseInstall.pm" |
173 |
+ sed -i 's/process_/bp_process_/g' INSTALL || die "Failed to prepend bp_ prefix to INSTALL file" |
174 |
+ epatch "${FILESDIR}"/GBrowseInstall.pm-"${PV}".patch || die "Failed to apply GBrowseInstall.pm-"${PV}".patch" |
175 |
+ epatch "${FILESDIR}"/destdir.patch || die "Failed to apply destdir.patch" |
176 |
+ epatch "${FILESDIR}"/fix-PNG-export.patch || die "Failed to apply fix-PNG-export.patch" |
177 |
+ epatch "${FILESDIR}"/symlink.patch || die "Failed to apply symlink.patch" |
178 |
+ epatch "${FILESDIR}"/gbrowse_metadb_config.pl.patch || die "Failed to apply gbrowse_metadb_config.pl.patch" |
179 |
+ epatch "${FILESDIR}"/disable-gbrowse_metadb_config.pl.patch || die "Failed to apply disable-gbrowse_metadb_config.pl.patch" |
180 |
+ for f in conf/synteny/wild_rice_synteny.conf conf/synteny/rice_synteny.conf conf/GBrowse.conf \ |
181 |
+ htdocs/tutorial/tutorial.html htdocs/index.html lib/Bio/Graphics/Browser2/Action.pm \ |
182 |
+ Changes; do |
183 |
+ sed -i 's#/var/lib/gbrowse2#/var/db/gbrowse2#' $f || die "Failed to rewrite /var/lib/gbrowse2 to /var/db/gbrowse2 in $f" |
184 |
+ done |
185 |
+ for f in htdocs/index.html; do |
186 |
+ 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" |
187 |
+ done |
188 |
+} |
189 |
+ |
190 |
+src_configure() { |
191 |
+ # GBROWSE_ROOT is the root path in SRC_URI to be prepended |
192 |
+ # /usr/share/webapps/gbrowse/2.03/htdocs/etc/gbrowse/GBrowse.conf |
193 |
+ webapp_src_preinst |
194 |
+ perl Makefile.PL \ |
195 |
+ HTDOCS="${MY_HTDOCSDIR}" \ |
196 |
+ CGIBIN="${MY_HTDOCSDIR}"/cgi-bin \ |
197 |
+ CONF="${MY_HTDOCSDIR}"/etc/gbrowse \ |
198 |
+ PACKAGE_DIR="${D}" \ |
199 |
+ INSTALLDIRS=vendor \ |
200 |
+ GBROWSE_ROOT="gbrowse" \ |
201 |
+ DESTDIR="${D}" \ |
202 |
+ DATABASES="/var/db/gbrowse2/databases" \ |
203 |
+ PERSISTENT="/var/db/gbrowse2" \ |
204 |
+ TMP="/var/tmp/gbrowse2" \ |
205 |
+ INSTALLETC="n" \ |
206 |
+ INSTALLCONF="n" \ |
207 |
+ WWWUSER="apache" \ |
208 |
+ DO_XS=1 \ |
209 |
+ NONROOT=1 \ |
210 |
+ || die |
211 |
+} |
212 |
+ |
213 |
+src_install() { |
214 |
+ mydoc="Changes README TODO INSTALL" |
215 |
+ perl-module_src_install |
216 |
+ |
217 |
+ # TODO: write our own readme |
218 |
+ webapp_postinst_txt en "${S}"/INSTALL |
219 |
+ webapp_src_install || die "Failed running webapp_src_install" |
220 |
+ |
221 |
+ # should create a /etc/init.d/ startup script based on this |
222 |
+ # /var/tmp/portage/sci-biology/gbrowse-2.03/work/GBrowse-2.03/etc/init.d/gbrowse-slave |
223 |
+ |
224 |
+ mkdir -p "${D}"/var/tmp/gbrowse2/images |
225 |
+ chown -R apache.apache "${D}"/var/tmp/gbrowse2 |
226 |
+ |
227 |
+ # mkdir -p "${D}"/var/www/localhost/htdocs/gbrowse || die |
228 |
+ # ln -s "${D}"/var/tmp/gbrowse2/images "${D}"/usr/share/webapps/gbrowse/"${PV}"/htdocs/i || die |
229 |
+ |
230 |
+ # whole "${D}"/var/db/gbrowse2 has to be owned by apache.apache otherwise: |
231 |
+ # 1. you hit an error that /var/db/gbrowse2/sessions/cgisess.db.lck |
232 |
+ # [no, it is not enough chown -R apache.apache /var/db/gbrowse2/sessions, the parent dir has to be apapche.apache as well] |
233 |
+ # 2. even if you set /var/db/gbrowse2 to apache.apache still it is not enough, you will get |
234 |
+ # [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/ |
235 |
+ |
236 |
+ mkdir -p "${D}"/var/db/gbrowse2 |
237 |
+ mkdir -p "${D}"/var/db/gbrowse2/databases |
238 |
+ mkdir -p "${D}"/var/db/gbrowse2/sessions "${D}"/var/db/gbrowse2/userdata |
239 |
+ 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 |
240 |
+ |
241 |
+ einfo "Dropping trailing 'databases' from db_variable in conf/GBrowse.conf" |
242 |
+ 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" |
243 |
+ |
244 |
+ einfo "Probably you want to install a cron job to remove the generated temporary images:" |
245 |
+ einfo "find /var/tmp/gbrowse2/images -type f -atime +20 -print -exec rm {}" |
246 |
+ |
247 |
+ einfo "Make sure you compiled apache with +cgi and do" |
248 |
+ einfo "cp -i ${FILESDIR}/gbrowse.conf.vhosts.d /etc/apache2/vhosts.d/gbrowse.conf" |
249 |
+ |
250 |
+ sed -i "s#"${D}"##g" "${S}"/install_util/GBrowseInstall.pm || die |
251 |
+ sed -i "s#"${D}"##" "${S}"/blib/conf/GBrowse.conf* |
252 |
+ sed -i 's#DBI:SQLite:'${D}'/var/lib/gbrowse2/databases/#DBI:SQLite:/var/db/gbrowse2/databases/#' "${S}"/install_util/GBrowseInstall.pm || die |
253 |
+} |
254 |
+ |
255 |
+pkg_postinst() { |
256 |
+ webapp_pkg_postinst || die "webapp_pkg_postinst failed" |
257 |
+ |
258 |
+ einfo "Please run gbrowse_metadb_config.pl to update SQLite flatfiles of the live database." |
259 |
+ einfo "d='/usr/share/webapps/gbrowse/${PV}/htdocs/etc/gbrowse'; for f in \$d/*.conf.new; do \ " |
260 |
+ einfo " mv -i \$f \$d/\`basename \$f .new\`; done" |
261 |
+ |
262 |
+ einfo "Fix also the other copy of the file:" |
263 |
+ einfo "d='/var/www/localhost/htdocs/gbrowse/etc/gbrowse'; for f in \$d/*.conf.new; do \ " |
264 |
+ einfo " mv -i \$f \$d/\`basename \$f .new\`; done" |
265 |
+} |
266 |
+ |
267 |
+src_test() { |
268 |
+ mysql -uroot -p password -e 'create database yeast' |
269 |
+ mysql -uroot -p password -e 'grant all privileges on yeast.* to gbrowse@localhost' |
270 |
+ mysql -uroot -p password -e 'grant file on *.* to gbrowse@localhost' |
271 |
+ mysql -uroot -p password -e 'grant select on yeast.* to nobody@localhost' |
272 |
+ |
273 |
+ cd /usr/portage/distfiles || die |
274 |
+ gzip -d yeast.fasta.gz || die |
275 |
+ gzip -d yeast.gff.gz || die |
276 |
+ #gzip -d fly.fasta.gz |
277 |
+ #gzip -d fly.gff.gz |
278 |
+ bp_bulk_load_gff.pl -d yeast -fasta yeast.fasta yeast.gff || die |
279 |
+} |