aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sci-biology/tablet-bin/tablet-bin-1.11.02.18.ebuild')
-rw-r--r--sci-biology/tablet-bin/tablet-bin-1.11.02.18.ebuild59
1 files changed, 59 insertions, 0 deletions
diff --git a/sci-biology/tablet-bin/tablet-bin-1.11.02.18.ebuild b/sci-biology/tablet-bin/tablet-bin-1.11.02.18.ebuild
new file mode 100644
index 000000000..d4b19252c
--- /dev/null
+++ b/sci-biology/tablet-bin/tablet-bin-1.11.02.18.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=3
+
+inherit python java-pkg-2
+
+DESCRIPTION="Graphical viewer for next generation sequence assemblies and alignments."
+HOMEPAGE="http://bioinf.scri.ac.uk/tablet/"
+SRC_URI="http://bioinf.scri.ac.uk/tablet/installers/tablet_linux_x86_1_11_02_18.sh
+ http://bioinf.scri.ac.uk/tablet/additional/coveragestats.py"
+
+# Tablet uses a modified version of the BSD License which has been edited to remove
+# references to distribution and use in source forms. This means that we are happy
+# for you to distribute and use Tablet however you please, but we do not (yet) want
+# to make the source code publicly available.
+
+# It's in the installer, and ends up on disk after installation at /opt/Tablet/docs/tablet.html
+# The original BSD licence was modified to remove references to distribution and use in
+# source forms, because we cannot make the source code available for Tablet.
+
+LICENSE="Tablet"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}
+ virtual/jre
+ dev-lang/python"
+
+src_install() {
+ # In theory it seems this binary package could be installed through ant instead
+ # of the install4j package which is not easy to be forced non-interactive.
+ # The below approach is not ideal.
+ sed "s#\"\${D}\"#"${D}"#g" "${FILESDIR}"/response.varfile > "${DISTDIR}"/response.varfile || die "sed failed"
+
+ # the intallation script somehow does not pickup
+ # -varfile="${DISTDIR}"/response.varfile from the commandline and tehrefore
+ # we place the file rather directly into the place where it should reside.
+ # In the file you can read details how the variables were mangled. For
+ # example, the trick with sys.symlinkDir in the response.varfile is to
+ # disable the installation process to symlink from /usr/local/bin/table to
+ # /opt/Tablet/tablet. That was logged in that file with the following line:
+ #
+ # /scratch/var/tmp/portage/sci-biology/tablet-bin-1.11.02.18/image/opt/Tablet/.install4j/installation.log: Variable changed: sys.symlinkDir=/usr/local/bin[class java.lang.String]
+ #
+ # The file is then left on the installed system in "${D}"/opt/Tablet/.install4j/response.varfile
+ mkdir -p "${D}"/opt/Tablet/.install4j || die "Cannot pre-create "${D}"/opt/Tablet/.install4j/"
+ cat "${DISTDIR}"/response.varfile > "${D}"/opt/Tablet/.install4j/response.varfile || die "Cannot write "${D}"/opt/Tablet/.install4j/response.varfile"
+
+ # make sure we force java to point a to $HOME which is inside our sanbox
+ # directory area. We force -Duser.home . It seems also -Dinstall4j.userHome
+ # could be done based on the figure shown at http://resources.ej-technologies.com/install4j/help/doc/
+ sed "s#/bin/java\" -Dinstall4j.jvmDir#/bin/java\" -Duser.home="${D}"/../temp -Dinstall4j.jvmDir#" -i "${DISTDIR}"/tablet_linux_x86_1_11_02_18.sh || die "failed to set userHome value"
+ sh "${DISTDIR}"/tablet_linux_x86_1_11_02_18.sh -q -overwrite -varfile="${DISTDIR}"/response.varfile --destination="${D}"/opt/Tablet -dir /scratch/var/tmp/portage/sci-biology/tablet-bin-1.11.02.18/image/opt/Tablet
+ dobin "${DISTDIR}"/coveragestats.py
+}