diff options
author | Donnie Berkholz <dberkholz@gentoo.org> | 2011-03-03 09:03:47 -0600 |
---|---|---|
committer | Donnie Berkholz <dberkholz@gentoo.org> | 2011-03-03 09:03:47 -0600 |
commit | 1fcbe850fa3657f27dd98799f640d10837b7beef (patch) | |
tree | 0b59ed1ade78a07b889c26ff307572aa3bf70a20 /sci-biology | |
parent | vtk: Drop, it's way outdated. (diff) | |
download | dberkholz-1fcbe850fa3657f27dd98799f640d10837b7beef.tar.gz dberkholz-1fcbe850fa3657f27dd98799f640d10837b7beef.tar.bz2 dberkholz-1fcbe850fa3657f27dd98799f640d10837b7beef.zip |
imagej: add 1.44n.
Diffstat (limited to 'sci-biology')
-rw-r--r-- | sci-biology/imagej/Manifest | 4 | ||||
-rw-r--r-- | sci-biology/imagej/imagej-1.44n.ebuild | 114 |
2 files changed, 118 insertions, 0 deletions
diff --git a/sci-biology/imagej/Manifest b/sci-biology/imagej/Manifest new file mode 100644 index 0000000..1b6b117 --- /dev/null +++ b/sci-biology/imagej/Manifest @@ -0,0 +1,4 @@ +DIST ImageJ.png 13012 RMD160 65843f558e99d08cb42e06eb82b2a1953438f3e1 SHA1 52a6d22da2e72a8f18c4c2a46655217f4429bb49 SHA256 02b93e7614a2ab52ca5dbdc941dc99b4b461c91b28203d33e877746f97e12b86 +DIST ij143.zip 3168198 RMD160 9b6d55a79466cf4f9790b9cdb031ac724fc76d72 SHA1 7c2f0fe96465ac3f835a3f173c9acd43bd9e8f2b SHA256 a4ab1e1f34ea4330694f245760132579bbbba4248835e180929c2c264d65ed62 +DIST ij144n-src.zip 1273772 RMD160 4e95395b4767ba6c47c77ca66fbc6a46de59cc82 SHA1 151f0d77c82aa4fb05818f037d2eb823fc0eef85 SHA256 884f2467fa9dff3c53a87d3003ef7fbd471b13585a93667fb2243a0f8d3966a4 +EBUILD imagej-1.44n.ebuild 2973 RMD160 fe3a11b5460127164af76897a95eaa766e06894c SHA1 cc5c62b80dd44ec87302c647cee04a6d42573365 SHA256 90701f7a096ea473c382812730a6c875a0df0252197c8ad0cc44ffd972bfd914 diff --git a/sci-biology/imagej/imagej-1.44n.ebuild b/sci-biology/imagej/imagej-1.44n.ebuild new file mode 100644 index 0000000..f6787c0 --- /dev/null +++ b/sci-biology/imagej/imagej-1.44n.ebuild @@ -0,0 +1,114 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +inherit java-pkg-2 java-ant-2 eutils versionator + +MY_PN="ij" +MY_PV=$(delete_all_version_separators) + +# NOTE: +# as plugins are regularly lagging behind, we use the pack released for previous +# version instead. Change to present version locally if you are sure proper +# version has been released. +IJ_PV=$(expr ${MY_PV::3} - 1) + +DESCRIPTION="Image Processing and Analysis in Java" +HOMEPAGE="http://rsb.info.nih.gov/ij/" + +SRC_URI="http://rsb.info.nih.gov/ij/download/src/${MY_PN}${MY_PV}-src.zip + http://rsb.info.nih.gov/ij/images/ImageJ.png + plugins? ( http://rsb.info.nih.gov/ij/download/zips/${MY_PN}${IJ_PV}.zip )" + +RESTRICT="nomirror" +LICENSE="public-domain" +SLOT="0" + +KEYWORDS="~x86 ~ppc ~amd64" + +IUSE="doc plugins debug" + +RDEPEND=">=virtual/jre-1.6 + dev-java/java-config" +DEPEND=">=virtual/jdk-1.6 + dev-java/ant-core + ${RDEPEND}" + +S=${WORKDIR}/source +IJ_S=${WORKDIR}/ImageJ + +src_unpack() { + cp ${DISTDIR}/ImageJ.png ${WORKDIR}/${PN}.png + unpack ${A} + + if ! use debug ; then + sed -i 's: debug="on">: debug="off">:' ${S}/build.xml + fi +} + +src_compile() { + local antflags="build" + use doc && antflags="${antflags} javadocs" + + ant ${antflags} || die "ant build failed" + + # build finished, generate startup wrapper + cat <<EOF > ${T}/${PN} +#!/bin/bash +IJ_LIB=/usr/share/${PN}/lib +if !([ "\${IJ_HOME}" ]) ; then + IJ_HOME=\${HOME} +fi +if [ -d \${IJ_HOME}/plugins ] ; then + IJ_PLG=\${IJ_HOME} +else + IJ_PLG=/usr/share/${PN}/lib +fi +if !([ "\$IJ_MEM" ]) ; then + IJ_MEM=128 +fi +if !([ "\$IJ_CP" ]) ; then + IJ_CP=\$(java-config -p imagej):\$(java-config -O)/lib/tools.jar +else + IJ_CP=\$(java-config -p imagej):\$(java-config -O)/lib/tools.jar:\${IJ_CP} +fi +\$(java-config --java) \\ + -Xmx\${IJ_MEM}m -Dswing.aatext=true \\ + -Dawt.useSystemAAFontSettings=on\\ + -cp \${IJ_CP} \\ + -Duser.home=\${IJ_HOME} \\ + -Dplugins.dir=\${IJ_PLG} \\ + ij.ImageJ "\$@" +EOF +} + +src_install() { + java-pkg_dojar *.jar + + dobin ${T}/${PN} + + if use plugins ; then + cp -R ${IJ_S}/plugins ${D}/usr/share/${PN}/lib/ + cp -R ${IJ_S}/macros ${D}/usr/share/${PN}/lib/ + fi + + use doc && java-pkg_dohtml -r ${WORKDIR}/api + + insinto /usr/share/pixmaps + doins ${WORKDIR}/${PN}.png + make_desktop_entry "imagej %F" "ImageJ" ${PN}.png Graphics +} + +pkg_postinst() { + einfo "" + einfo "You can configure the path of a folder, which contains \"plugins\" directory and IJ_Prefs.txt," + einfo "by setting the environmental variable, \$IJ_HOME." + einfo "Default setting is \$IJ_HOME=\${HOME}, i.e. \${HOME}/plugins and \${HOME}/IJ_Prefs.txt." + einfo "" + einfo "You can also configure the memory size by setting the environmental variable, \$IJ_MEM," + einfo "and the class path by setting the environmental variable, \$IJ_CP." + einfo "" + einfo "If you want to use much more plugins, please see http://rsb.info.nih.gov/ij/plugins/index.html" + einfo "and add *.class files to \$IJ_HOME/plugins folder" + einfo "" +} |