[imagej/f14/master: 7/7] update to 1.44i fix launch script patch add imagej.jar link

Fabien Georget manawy at fedoraproject.org
Sat Oct 30 18:18:28 UTC 2010


commit e8bef5518208668384c25051e9f4db717ac61605
Author: manawy <manawy at fedoraproject.org>
Date:   Sat Oct 30 20:16:35 2010 +0200

    update to 1.44i
    fix launch script patch
    add imagej.jar link

 .gitignore               |    1 +
 imagej-1.44-patch1.patch |  107 ++++++++++++++++++++++++++++++++++++++++++++--
 imagej.spec              |   10 +++-
 sources                  |    2 +-
 4 files changed, 113 insertions(+), 7 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 121b34b..6859b32 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@ ij143m-src.zip
 macros.zip
 /ij144h-src.zip
 /macros.zip
+/ij144i-src.zip
diff --git a/imagej-1.44-patch1.patch b/imagej-1.44-patch1.patch
index 2a1ebfc..af455a7 100644
--- a/imagej-1.44-patch1.patch
+++ b/imagej-1.44-patch1.patch
@@ -1,6 +1,6 @@
 diff -up ./imagej.sh.patch1 ./imagej.sh
---- ./imagej.sh.patch1	2010-10-25 21:21:18.000000000 +0200
-+++ ./imagej.sh	2010-10-25 21:23:00.856473774 +0200
+--- ./imagej.sh.patch1	2010-10-30 19:11:07.917624743 +0200
++++ ./imagej.sh	2010-10-30 19:10:56.181785972 +0200
 @@ -6,50 +6,38 @@
  # This program is free software, but comes with no warrenty or guarantee
  # send bug reports or feedback to jjackson at familyjackson dot net
@@ -8,8 +8,8 @@ diff -up ./imagej.sh.patch1 ./imagej.sh
 -# Last modified date: $Date: 2009/12/14 20:16:33 $
 -# $Revision: 1.1 $
 +# Maintainer : Fabien Georget for fedora
-+# Last modified date: 2009-11-18
-+# Revision: 52 
++# Last modified date: 2010-10-30
++# Revision: 53
  #
 -# INSTALLATION INSTRUCTIONS
  #
@@ -66,3 +66,102 @@ diff -up ./imagej.sh.patch1 ./imagej.sh
  # LOG FILE
  #ij_log="${ij_tmp}/log.txt"
  # default behaviour when an ImageJ window is already open
+@@ -84,26 +72,17 @@ declare -i mem
+ declare -i max_mem
+ declare -i free_mem
+ 
+-java_home="${java_home:-$JAVA_HOME}"
++java_path="${JAVA_HOME}/bin/java"
+ 
+-if [[ "$OS" == 'SunOS' ]] ; then
+-    java_arch='-d64'
+-	JAVA_HOME="${java_home_SunOS:-$java_home}"	
+-	max_mem=`vmstat | awk 'BEGIN{maxMem='$max_64bit'} NR == 3 {fmem=int($5 / 1024); if (fmem < maxMem) {print fmem} else {print maxMem}}'`
+-	free_mem="max_mem"
+-	mem=${free_mem}/2
+-	if (( $mem > $default_mem || $mem < $min_mem )) ; then mem=$default_mem ; fi
+-elif [[ "$OS" == 'Linux' ]] ; then
++if [[ "$OS" == 'Linux' ]] ; then
+ 	if [[ "$processor" == 'x86_64' ]] ; then
+     	java_arch='-d64'
+-        JAVA_HOME="${java_home_Linux_x86_64:-$java_home}"
+     	max_mem=`free | awk -v maxMem=$max_64bit 'NR == 2 {fmem=int($2 / 1024); if (fmem < maxMem) {print fmem} else {print maxMem}}'`
+ 		free_mem=`free | awk -v maxMem=$max_64bit 'NR == 3 {fmem=int($4 / 1024); if (fmem < maxMem) {print fmem} else {print maxMem}}'`
+ 		mem=${free_mem}/3*2
+ 		if (( $mem > $default_mem || $mem < $min_mem )) ; then mem=$default_mem ; fi
+ 	else
+ 		java_arch='-d32'
+-    	JAVA_HOME="${java_home_Linux:-$java_home}"
+     	max_mem=`free | awk -v maxMem=$max_32bit 'NR == 2 {fmem=int($2 / 1024); if (fmem < maxMem) {print fmem} else {print maxMem}}'`
+ 		free_mem=`free | awk -v maxMem=$max_32bit 'NR == 3 {fmem=int($4 / 1024); if (fmem < maxMem) {print fmem} else {print maxMem}}'`
+ 		mem=${free_mem}/3*2
+@@ -112,16 +91,38 @@ elif [[ "$OS" == 'Linux' ]] ; then
+ fi
+ 
+ 
+-# if tools.jar is not in ${ij_path}/jre/lib/ext/ edit the 'tools=' line 
+-# to point to tools.jar. The -compile switch will load tools.jar into the 
+-# classpath and enable plugins to be compiled in imagej
++# create plugins, macros, luts dirs
++mkdir -p $ij_user_path/plugins
++mkdir -p $ij_user_path/macros
++mkdir -p $ij_user_path/luts
+ 
+-if [[ -f "${ij_path}/tools.jar" ]] ; then
+-    tools="${ij_path}/tools.jar"
+-else
+-    tools=''
++if [[ ! -d "$ij_tmp" ]] ; then
++    mkdir -p "$ij_tmp"
+ fi
+ 
++# makes symbolik links from shared plugins, macros and luts 
++
++ls $ij_data_path/plugins | while read p ; do
++  if [ ! -e "$ij_user_path/plugins/$p" ] ; then
++    ln -s $ij_data_path/plugins/$p $ij_user_path/plugins/$p
++  fi
++done
++
++ls $ij_data_path/macros | while read p; do
++  if [ ! -e "$ij_user_path/macros/$p" ] ; then
++      ln -s "$ij_data_path/macros/$p" "$ij_user_path/macros/$p"
++  fi
++done
++
++ls $ij_data_path/luts | while read p ; do
++    if [ ! -e "$ij_user_path/luts/$p" ] ; then
++	ln -s $ij_data_path/luts/$p $ij_user_path/luts/$p
++    fi
++done
++
++# enable plugins to be compiled with imageJ
++tools="${JAVA_HOME}/../lib/tools.jar"
++
+ # End Site specific variables ---------------------------------------------------------
+ 
+ # other variables 
+@@ -320,9 +321,9 @@ fi	
+ 
+ # Resolving ij.jar path.  If ij.jar is a symbolic link to ij_<version>.jar
+ # this allows updating ij.jar without crashing running sessions
+-ij_jar_path=$(derefln ${ij_path}/ij.jar)    
++ij_jar_path=$(derefln ${ij_path}/imagej.jar)    
+                                          
+-for mod_jar in ${ij_path}/lib/*jar  ; do
++for mod_jar in ${ij_path}/*jar  ; do
+     modules="${modules:-}${modules+:}$mod_jar"
+ done
+ modules="-cp ${ij_jar_path}:${modules+:}${modules:-}"
+@@ -470,9 +471,9 @@ if [[ "$portopen" == 'false' ]] ; then
+ fi
+ 
+ if (( $verbosity > 0 )) ; then
+-    echo ${JAVA_HOME}/bin/java ${java_arch} -mx${mem}m ${modules} ij.ImageJ -ijpath ${ij_path} -port${count} ${images} ${macrocmd} ${macroargs}
++    echo ${JAVA_HOME}/bin/java ${java_arch} -mx${mem}m ${modules} ij.ImageJ -ijpath ${ij_user_path} -port${count} ${images} ${macrocmd} ${macroargs}
+ fi
+ 
+ cd "$dir"
+-eval "${JAVA_HOME}/bin/java ${java_arch} -mx${mem}m ${modules} ij.ImageJ -ijpath ${ij_path} -port${count} ${images} ${macrocmd} ${macroargs} "
++eval "${JAVA_HOME}/bin/java ${java_arch} -mx${mem}m ${modules} ij.ImageJ  -ijpath ${ij_user_path} -port${count} ${images} ${macrocmd} ${macroargs} "
+ exit 0
diff --git a/imagej.spec b/imagej.spec
index a992f08..f6987cf 100644
--- a/imagej.spec
+++ b/imagej.spec
@@ -1,12 +1,12 @@
 Name:           imagej
 Version:        1.44
-Release:        1.h%{?dist}
+Release:        1.i%{?dist}
 Summary:        Image Processing and Analysis in Java
 
 Group:          Applications/Engineering
 License:        Public Domain
 URL:            http://rsbweb.nih.gov/ij/index.html
-Source0:        http://rsbweb.nih.gov/ij/download/src/ij144h-src.zip
+Source0:        http://rsbweb.nih.gov/ij/download/src/ij144i-src.zip
 Source1:        %{name}.desktop
 Source2:        http://rsbweb.nih.gov/ij/macros/macros.zip
 Source3:        http://rsb.info.nih.gov/ij/download/linux/unix-script.txt
@@ -72,6 +72,8 @@ rm -rf $RPM_BUILD_ROOT
 mkdir -p $RPM_BUILD_ROOT%{_javadir}
 cp -p source/ij.jar   \
 $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
+ln -s %{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
+
 
 # install javadoc
 mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}
@@ -148,6 +150,10 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Sat Oct 30 2010 Georget Fabien <fabien.georget at gmail.com> 1.44-1.i
+- update to 1.44i
+- create imagej.jar link
+
 * Tue Sep 28 2010 Georget Fabien <fabien.georget at gmail.com> 1.44-1.h
 - version 1.44h
 
diff --git a/sources b/sources
index eb602bf..feb9765 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
-cb4e4f94166268bf09885355a0de5ca0  ij144h-src.zip
+13c40a15623082461890e5b6d9378a42  ij144i-src.zip
 8161ec95aa84e9fa3e46e68a00fada4d  macros.zip


More information about the scm-commits mailing list