diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2019-09-01 00:00:32 +0200 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2019-09-01 00:00:32 +0200 |
commit | ca9627e70852f6b2e835660df870fe3ab405882d (patch) | |
tree | 0a008b1d5b16fa0679a195ed7b5662c7891f591c /sci-biology | |
download | darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.tar.gz darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.tar.bz2 darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.tar.xz darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.zip |
Initial import
Diffstat (limited to 'sci-biology')
-rw-r--r-- | sci-biology/imagej/Manifest | 5 | ||||
-rw-r--r-- | sci-biology/imagej/files/AutoThresholder.java.patch | 10 | ||||
-rw-r--r-- | sci-biology/imagej/imagej-1.51k-r1.ebuild | 132 |
3 files changed, 147 insertions, 0 deletions
diff --git a/sci-biology/imagej/Manifest b/sci-biology/imagej/Manifest new file mode 100644 index 0000000..b1df94b --- /dev/null +++ b/sci-biology/imagej/Manifest @@ -0,0 +1,5 @@ +AUX AutoThresholder.java.patch 444 BLAKE2B d760b59f0e1b2214f66cc4b8cadc42a7f9545957d6271010cb60d393def3f79dd58a67a44bb3bf7668700abbba20a612e903985ce35c0911c7967cfbb9118dfc SHA512 46033542bc3023356692c966a0cc84819ebd52cf6fe78d6538a3c8521e58612559bfb11eea6eea61c22e354f82647f523b74ee12fa0df0bea6d26045ee2a3c96 +DIST ImageJ.png 13012 BLAKE2B b42ee855e6214b275cbdcc722f6c7b095fe83de477a151714c4afec8e23abe12b2d0bf62ae81a4f9c4ccefc9245a9e144085b844ee3f92121a88f7d27106acf5 SHA512 60c2ff73bcfc668931c59b0dfb299723a369b741601bdd591a407302e30fc58c6c626525b3f08b955a5dab37729d3f704db689317b42a94e7a3ccbfb72abc9b3 +DIST ij150.zip 6899239 BLAKE2B 7a0c15f8a2cfb5dc672fe3edb7e0daffb0c6847cf92e0c9fefa3fc22177e73ec0736b842eb1d71c1c9de49a8887e3c2dd373a10b60c5246adca3dc14f85f8120 SHA512 a927df1ca345cff4b9aa0b6c03510103bc8fc8c21a572c3417060bcf28da8a1fbce07de5a73cd04ba4818bd715a8caa05432365460651b7b9de3f34c89e6318a +DIST ij151k-src.zip 1580015 BLAKE2B 143fca57d38457f8264f59517890b9541ebc2838f56ccc07fdc0fec114bdc02042dc74a0c9560e7ed47e8d5e3c91f83dd725c860f823f4956c55636c30025bfc SHA512 93249fb1c186e757dde78231d3064a1179f5c10d94dc02b9b0535febd5db78cb2666e9e952380de8847339c840d4e46e857eaa982340c6e5084d1003c44791e6 +EBUILD imagej-1.51k-r1.ebuild 3855 BLAKE2B c3c55318a933a9729f37b6f1867cbdc5f995c1368eac0f17ef628c08929ddd6e75da17c6348bced7f2b6e673ef4b189fb8a9847fa9ac98b4438fe85877d361c1 SHA512 abc79769a94634996e19957a4236eda54a1f3394e964fb6591e1d62ef24c2c72f7920e0a12e7d6b981922e0d8a134ee2a9a208983d0023ef151f813f1611c049 diff --git a/sci-biology/imagej/files/AutoThresholder.java.patch b/sci-biology/imagej/files/AutoThresholder.java.patch new file mode 100644 index 0000000..97c8932 --- /dev/null +++ b/sci-biology/imagej/files/AutoThresholder.java.patch @@ -0,0 +1,10 @@ +--- imagej-1.51k/work/source/ij/process/AutoThresholder.java.ori 2017-03-15 22:33:45.843801175 +0100 ++++ imagej-1.51k/work/source/ij/process/AutoThresholder.java 2017-03-15 22:33:55.104053480 +0100 +@@ -650,7 +650,6 @@ + } + // The threshold is the minimum between the two peaks. + for (int i=1; i<255; i++) { +- //IJ.log(" "+i+" "+iHisto[i]); + if (iHisto[i-1] > iHisto[i] && iHisto[i+1] >= iHisto[i]) { + threshold = i; + break; diff --git a/sci-biology/imagej/imagej-1.51k-r1.ebuild b/sci-biology/imagej/imagej-1.51k-r1.ebuild new file mode 100644 index 0000000..931aef0 --- /dev/null +++ b/sci-biology/imagej/imagej-1.51k-r1.ebuild @@ -0,0 +1,132 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +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. +# see https://bugs.gentoo.org/show_bug.cgi?id=112275 +# https://github.com/imagej/imagej1/issues/28 +IJ_PV=$((${MY_PV::3}-1)) + +DESCRIPTION="Image Processing and Analysis in Java" +HOMEPAGE="http://rsb.info.nih.gov/ij/" + +SRC_URI="http://imagej.nih.gov/ij/download/src/${MY_PN}${MY_PV}-src.zip + http://rsb.info.nih.gov/ij/images/ImageJ.png + plugins? ( http://wsr.imagej.net/distros/cross-platform/${MY_PN}${IJ_PV}.zip )" +# plugins are under a different licenses and can be installed into user's $IJ_HOME/plugins +# plugins? ( http://rsb.info.nih.gov/ij/download/zips/${MY_PN}${IJ_PV}.zip )" + +RESTRICT="" +LICENSE="public-domain" # http://imagej.net/disclaimer.html +SLOT="0" + +KEYWORDS="" + +IUSE="doc plugins debug" + +RDEPEND=">=virtual/jre-1.6:* + dev-java/java-config + dev-java/jython" +DEPEND=">=virtual/jdk-1.6:* + dev-java/ant-core + ${RDEPEND}" + +S=${WORKDIR}/source +IJ_S=${WORKDIR}/ImageJ + +src_prepare() { + cp "${DISTDIR}"/ImageJ.png "${WORKDIR}/${PN}.png" || die + + if ! use debug ; then + sed -i 's: debug="on">: debug="off">:' "${S}"/build.xml || die + fi + epatch "${FILESDIR}"/AutoThresholder.java.patch + eapply_user +} + +# in src_compile we get: !!! ERROR: Package jython was not found! +# TODO: overwrite calls to jython ? See +# ij/plugin/frame/Editor.java +# plugin/PlugInInterpreter.java +# plugin/Macro_Runner.java + +src_compile() { + local antflags="build" + use doc && antflags="${antflags} javadocs" + + ant ${antflags} || die "ant build failed" + + # Max memory usage depends on available memory and CPU type + MEM=$(grep MemTotal /proc/meminfo | cut -d':' -f2 | grep -o [0-9]*) + IJ_MAX_MEM=$(expr ${MEM} / 1024) + if use x86 && $IJ_MAX_MEM -gt 2048 ; then + IJ_MAX_MEM=2048 + fi + # build finished, generate startup wrapper + cat <<EOF > "${T}/${PN}" +#!${EPREFIX}/bin/bash +IJ_LIB=${EPREFIX}/usr/share/${PN}/lib +if !([ "\${IJ_HOME}" ]) ; then + IJ_HOME=\${HOME}/.imagej +fi +if [ -d \${IJ_HOME}/plugins ] ; then + IJ_PLG=\${IJ_HOME} +else + IJ_PLG=${EPREFIX}/usr/share/${PN}/lib +fi +if !([ "\$IJ_MEM" ]) ; then + IJ_MEM=${IJ_MAX_MEM} +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 "${ED}"/usr/share/"${PN}"/lib/ + cp -R "${IJ_S}"/macros "${ED}"/usr/share/"${PN}"/lib/ + fi + + use doc && java-pkg_dohtml -r "${WORKDIR}"/api + + insinto /usr/share/pixmaps + doins "${WORKDIR}/${PN}".png + make_desktop_entry "${PN}" 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}/.imagej, i.e. \${HOME}/.imagej/plugins and \${HOME}/.imagej/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 "" +} |