Index: /gs2-extensions/imagemagick/trunk/README
===================================================================
--- /gs2-extensions/imagemagick/trunk/README	(revision 31012)
+++ /gs2-extensions/imagemagick/trunk/README	(revision 31012)
@@ -0,0 +1,152 @@
+31 Oct 2016
+ak19
+
+If making an imagemagick binary tarball, here are the steps to go through and the things to check
+
+
+TO CREATE THE IMAGEMAGICK TARBALL FOR DARWIN EL CAPITAN
+
+1. svn co http://svn.greenstone.org/gs2-extensions/imagemagick/trunk
+
+2. Then:
+   cd src
+   ./CASCADE-MAKE.sh
+
+3. See section THINGS TO CHECK below and perform the tests there to check the compiled up imagemagick works.
+
+4. Create an imagemagick folder containing only setup.bash, setup.bat and the darwin folder.
+
+The darwin folder should only contain the following 4 folders, so remove the rest:
+- script
+- etc
+- lib
+- bin: cut down to just the following 
+  Magick++-config
+  Magick-config
+  MagickCore-config
+  MagickWand-config
+  Wand-config
+  identify
+  convert
+
+Note: As per the El Capitan release-kit (kits/rk3/ant-scripts/compile.xml), only the darwin folder within the tarball (and not the setup scripts) will get copied over as the "imagemagick" folder into gs2build/bin/darwin. (So the "darwin" folder will be named "imagemagick" in the final binary.)
+
+5. Create a tarball of the imagemagick folder created in step 4 above (containing the darwing subfolder and the 2 setup scripts) and name the tarball imagemagick-darwin-10.11.tar.gz
+
+   tar -cvzf imagemagick-darwin-10.11.tar.gz imagemagick
+
+6. Commit the tarball into the trunk folder checked out in step 1 above. 
+
+
+THINGS TO CHECK
+
+To test imagemagick works:
+
+1. ./identify -list format
+
+It shoul print out the list of img conversion formats supported. Check the read/write staus of the listed file formats: we want r,w  (read and write abilities) for GIF, JPG, PNG, TIFF.
+
+2. Next run
+   ./convert logo: logo.png
+
+This will (should) generate a file called logo.png in the same location.
+Check that it is indeed PNG by running:
+
+   file logo.png
+
+The file info printed should say whether it's PNG. If things went wrong, the actual file produced might be listed as GIF still. In that case, the conversion was unsuccessful, which means something could be wrong with the delegate/imgmagick library for that image file format. Check for any errors when configuring and compiling up that delegate library.
+
+
+
+RESOURCES ON COMPILING UP AN IMAGEMAGICK BINARY STATICALLY
+
+- http://www.imagemagick.org/script/download.php
+
+- http://stackoverflow.com/questions/25634129/compile-static-version-of-imagemagick-convert-util
+
+- http://imagemagick.sourceforge.net/docs/GuideToBuildingIMForMacOSX.pdf
+
+- http://www.imagemagick.org/discourse-server/viewtopic.php?t=13145
+
+Words to look out for:
+delegates
+
+./convert
+different listing of formats supported?
+
+
+depends on:
+- version of imgmagick (src code)
+- whether it uses xwindows libraries or not
+-> macs used to come with xwindows libraries, and imgmagick used to make use of that. But now Macs aren't guaranteed to come with xwindows libs, so for El Capitan binaries, compile up ImageMagick tarball on Gilda El Capitan (which produces bins not dependent on xwindows libs), rather than generating the tarball on the ElCap laptop where xwin libs are available and dynamically linked to (but these libs are then found missing on other El Capitan machines like Gilda, and the convert command will fail).
+
+
+FILE LISTING:
+
+gilda:GS3bin_28Oct2016 anupama$ cd gs2build/bin/darwin/imagemagick/
+
+gilda:imagemagick anupama$ ls
+bin		  etc	   lib	script
+
+gilda:imagemagick anupama$ ls script/
+aspectpad.sh
+
+gilda:imagemagick anupama$ ls -la lib/
+total 38672
+drwxr-xr-x  41 anupama  wheel     1394 28 Oct 15:37 .
+drwxr-xr-x   6 anupama  wheel      204 28 Oct 15:37 ..
+drwxr-xr-x   3 anupama  wheel      102 28 Oct 15:37 ImageMagick-6.9.5
+-rw-r--r--   1 anupama  wheel      642 24 Aug 13:54 charset.alias
+drwxr-xr-x   6 anupama  wheel      204 28 Oct 15:37 gettext
+-rw-r--r--   1 anupama  wheel  1108152 24 Aug 14:03 libMagick++-6.Q16.a
+-rw-r--r--   1 anupama  wheel     1691 24 Aug 14:03 libMagick++-6.Q16.la
+-rw-r--r--   1 anupama  wheel  7242008 24 Aug 14:03 libMagickCore-6.Q16.a
+-rw-r--r--   1 anupama  wheel     1491 24 Aug 14:03 libMagickCore-6.Q16.la
+-rw-r--r--   1 anupama  wheel  2624976 24 Aug 14:03 libMagickWand-6.Q16.a
+-rw-r--r--   1 anupama  wheel     1594 24 Aug 14:03 libMagickWand-6.Q16.la
+-rw-r--r--   1 anupama  wheel    53392 24 Aug 13:52 libasprintf.a
+-rw-r--r--   1 anupama  wheel      943 24 Aug 13:52 libasprintf.la
+-rw-r--r--   1 anupama  wheel   104624 24 Aug 13:54 libbz2.a
+-rw-r--r--   1 anupama  wheel     9400 24 Aug 13:48 libcharset.a
+-rw-r--r--   1 anupama  wheel      938 24 Aug 13:48 libcharset.la
+-rw-r--r--   1 anupama  wheel     1228 24 Aug 13:53 libgettextlib.la
+-rw-r--r--   1 anupama  wheel  1352208 24 Aug 13:53 libgettextpo.a
+-rw-r--r--   1 anupama  wheel     1215 24 Aug 13:53 libgettextpo.la
+-rw-r--r--   1 anupama  wheel     1325 24 Aug 13:53 libgettextsrc.la
+-rw-r--r--   1 anupama  wheel  1292104 24 Aug 13:48 libiconv.a
+-rw-r--r--   1 anupama  wheel      932 24 Aug 13:48 libiconv.la
+-rw-r--r--   1 anupama  wheel   211720 24 Aug 13:53 libintl.a
+-rw-r--r--   1 anupama  wheel     1109 24 Aug 13:53 libintl.la
+-rw-r--r--   1 anupama  wheel   595296 24 Aug 13:57 libjasper.a
+-rw-r--r--   1 anupama  wheel      988 24 Aug 13:57 libjasper.la
+-rw-r--r--   1 anupama  wheel   421824 24 Aug 13:55 libjpeg.a
+-rw-r--r--   1 anupama  wheel     1016 24 Aug 13:55 libjpeg.la
+-rw-r--r--   1 anupama  wheel   281688 24 Aug 13:57 libpng.a
+-rw-r--r--   1 anupama  wheel     1022 24 Aug 13:57 libpng.la
+-rw-r--r--   1 anupama  wheel   281688 24 Aug 13:57 libpng14.a
+-rw-r--r--   1 anupama  wheel     1022 24 Aug 13:57 libpng14.la
+-rw-r--r--   1 anupama  wheel  1376688 24 Aug 13:56 libtiff.a
+-rw-r--r--   1 anupama  wheel     1114 24 Aug 13:56 libtiff.la
+-rw-r--r--   1 anupama  wheel   125408 24 Aug 13:56 libtiffxx.a
+-rw-r--r--   1 anupama  wheel     1211 24 Aug 13:56 libtiffxx.la
+-rw-r--r--   1 anupama  wheel  2495888 24 Aug 13:55 libxml2.a
+-rw-r--r--   1 anupama  wheel     1124 24 Aug 13:55 libxml2.la
+-rw-r--r--   1 anupama  wheel   108264 24 Aug 13:54 libz.a
+drwxr-xr-x  18 anupama  wheel      612 28 Oct 15:37 pkgconfig
+-rw-r--r--   1 anupama  wheel      357 24 Aug 13:55 xml2Conf.sh
+
+gilda:imagemagick anupama$ ls etc/
+ImageMagick-6
+
+gilda:imagemagick anupama$ ls -la bin/
+total 38240
+drwxr-xr-x  9 anupama  wheel      306 28 Oct 15:37 .
+drwxr-xr-x  6 anupama  wheel      204 28 Oct 15:37 ..
+-rwxrwxr-x  1 anupama  wheel     1328 24 Aug 14:03 Magick++-config
+-rwxrwxr-x  1 anupama  wheel     1294 24 Aug 14:03 Magick-config
+-rwxrwxr-x  1 anupama  wheel     1302 24 Aug 14:03 MagickCore-config
+-rwxrwxr-x  1 anupama  wheel     1542 24 Aug 14:03 MagickWand-config
+-rwxrwxr-x  1 anupama  wheel     1289 24 Aug 14:03 Wand-config
+-rwxrwxr-x  1 anupama  wheel  9903736 24 Aug 14:03 convert
+-rwxrwxr-x  1 anupama  wheel  9653688 24 Aug 14:03 identify
+
