]> git.imager.perl.org - imager.git/blobdiff - README
correct cast
[imager.git] / README
diff --git a/README b/README
index 1ec958a2ce22fcdccbf058f436b36058fcf0524b..b07e60521223ac145c348751813accbc0d1d7491 100644 (file)
--- a/README
+++ b/README
@@ -1,13 +1,14 @@
 ================================================================
 Copyright (c) 1999-2004 Arnar M. Hrafnkelsson. All rights reserved.
-Copyright (c) 2004 Anthony Cook.
+Copyright (c) 2004-2009 Anthony Cook.
 This program is free software; you can redistribute it and/or
 modify it under the same terms as Perl itself.
 ================================================================
 
 >> THIS SOFTWARE COMES WITH ABSOLUTELY NO WARRANTY WHATSOEVER <<
-If you like or hate Imager, please let us know by sending mail 
-to imager@imager.perl.org
+
+If you like or hate Imager, please let me know by sending mail 
+to imager@imager.perl.org - I love feedback.
 
 ================================================================
 
@@ -88,7 +89,7 @@ included since libgif has been linked with it).
 Otherwise you could just build giflib without any X11 dependencies:
 
   # must be a clean tree
-  cd giflib-4.1.3
+  cd giflib-4.1.4
   ./configure --without-x ...
 
 Also note that libgif has a few bugs: You can run something like
@@ -105,14 +106,15 @@ not libungif on RedHat then you will probably get lots of errors
 like undefined symbol: FreeSavedImages when running make test.
 Install libungif package to fix it.
 
-Stock libungif 4.1.2 or later seems to fix all of the bugs, if you
+Stock libungif 4.1.4 or later seems to fix all of the bugs, if you
 have a problem that version of linungif (or later), let us know and
 we'll look into it.
 
-Imager needs to have a libtiff version of at least 3.5.5.  In the
-future we might consider supporting older libtiff versions.  For
-now you can either configure Imager manually (by
-setting the IM_MANUAL environment variable to 1, in sh:
+Imager needs to have a libtiff version of at least 3.5.5, but you
+should use a later version since some noticable bugs have been fixed.
+
+For now you can either configure Imager manually (by setting the
+IM_MANUAL environment variable to 1, in sh:
 
 $ IM_MANUAL=1 perl Makefile.PL
 
@@ -140,6 +142,9 @@ To see which directories should be in the include path, try:
 
   freetype-config --cflags
 
+Ideally, freetype-config should be in the PATH when building Imager
+with freetype 2.x support.
+
 
 Macintosh dfont and suitcase font support
 -----------------------------------------
@@ -172,52 +177,153 @@ of freetype 2 with the type argument:
 ========================
 
 Some hints about getting the Imager module to find the libraries it
-needs for specific features.  The libraries it uses are:
+needs for specific features.
+
+Most Linux distributions pre-package these.  For each library I've
+listed the Debian and Redhat package names.
+
+For Debian or Debian based system, such as Ubuntu, you would run:
+
+  aptitude install package-name
+
+or:
+
+  apt-get install package-name
+
+at a root shell (or via sudo).
+
+eg.
+
+  apt-get install libjpeg62-dev
+
+For a Redhat based system such as CentOS or Fedora you would run:
+
+  yum install package-name
+
+at a root shell.
 
- jpeg: http://www.ijg.org/files/
-       ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz
+eg.
 
-ftp.uu.net is still linked from many places, including the Independent
-JPEG Groups's home page, but it is non-functional.
+  yum install libjpeg-devel
 
-  png: http://www.libpng.org/pub/png/libpng.html
+I strongly recommend using your distribution's packages if possible,
+this will mean any security updates to those packages will be applied
+when you install security updates.
 
-  you also need zlib to use png:  http://www.gzip.org/zlib/
-We have encountered problems with libpng 1.0.1, which were fixed in 1.0.5
-Note: you should probably be using zlib 1.1.4, since 1.1.3 has a 
+3.1 libjpeg
+-----------
+
+  http://www.ijg.org/files/
+  ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz
+
+Provides read and write access to JPEG images.
+
+Make sure you run:
+
+  make install-lib
+
+to install the development headers and libraries before attempting to
+build Imager.
+
+Debian: libjpeg62-dev
+Redhat: libjpeg-devel
+
+3.2 libpng
+----------
+
+  http://www.libpng.org/pub/png/libpng.html
+
+Provides read and write access to PNG images.
+
+You also need zlib to use png: http://www.gzip.org/zlib/ We have
+encountered problems with libpng 1.0.1, which were fixed in 1.0.5
+Note: you should probably be using zlib 1.1.4, since 1.1.3 has a
 potential security problem.
 
-  gif: http://sourceforge.net/projects/libungif
+Debian: libpng12-dev
+Redhat: libpng-devel
+
+3.3 giflib
+----------
 
-giflib/libungif has come a long way since the buggy versions around
+  http://sourceforge.net/projects/giflib/
+
+Provides read and write access to GIF images.
+
+giflib/libungif has come a long way since the buggy versions available
 when Imager's gif support code was written.  Preferably you should get
-at least version 4.1.3.  If you have a recent Linux distribution you
+at least version 4.1.4.  If you have a recent Linux distribution you
 should be safe with whatever giflib it provides, but if you're
 building from source, please try to use the latest version.
 
-If you download giflib (as opposed to libungif) 4.1.3 from
-sourceforge, make sure you apply the patch referenced at:
+With the expiration of the LZQ patent there's no reason to use
+libungif.
+
+libgif 4.1.4 has no problems known to me at this point.
 
-https://sourceforge.net/tracker/index.php?func=detail&aid=981255&group_id=102202&atid=631306
+Debian: libgif-dev
+Redhat: giflib-devel
 
-libungif 4.1.3 does not need this patch.
+3.4 libtiff
+-----------
 
-At the time of writing you will need to manually select to install the
-4.1.2-1 of cygwin's libungif package.
+ http://www.remotesensing.org/libtiff/
 
- tiff: http://www.libtiff.org/
+Provides read and write access to TIFF images.
 
-   t1: http://www.ibiblio.org/pub/Linux/libs/graphics/
+Note: libtiff 3.9.0 shouldn't be used due to a bug in
+TIFFWriteDirectory().
 
-freetype2 or
-   tt: http://www.freetype.org/
+Debian: libtiff4-dev
+Redhat: libtiff-devel
+
+3.5 T1Lib
+---------
+
+  http://www.t1lib.org/
+  ftp://sunsite.unc.edu/pub/Linux/libs/graphics/
+
+Support for text drawing with Type 1 Postscript fonts.
+
+Debian: libt1-dev
+Redhat: t1lib-devel
+
+3.6 Freetype 2.x (libfreetype)
+------------------------------
+
+  http://www.freetype.org/
+
+Support for text drawing with a large number of font formats,
+including Truetype, Type 1, Opentype and some bitmap formats.
+
+Debian: libfreetype6-dev
+Redhat: freetype-devel
+
+3.7 Freetype 1.x (libttf)
+-------------------------
+
+  http://www.freetype.org/
+
+Support for text drawing with Truetype fonts.
+
+This library has been superceded by Freetype 2, and some Linux
+distributions are phasing it out.
+
+Debian: libttf-dev
+Redhat: freetype1-devel
+
+3.8 Binaries
+------------
 
 Precompiled versions of some of the libraries might be found at:
 
 AIX:
-   http://www.bullfreeware.com/
 
+  http://www.bullfreeware.com/
 
+Solaris:
+
+  http://www.sunfreeware.com/
 
 ========================
 4. Logging and debugging
@@ -240,7 +346,7 @@ with Microsoft Visual C++ 6.0 with build 623 of ActivePerl.  You can
 use all of the features of Imager.  You can also use Win32 GDI fonts
 directly by supplying the 'face' parameter to Imager::Font->new(...).
 
-I've tested with both MSVC++ 6.0 and cygwin (perl 5.6.1).
+I've tested with MSVC++ 6.0, cygwin (perl 5.6.1) and gcc (MinGW).
 
 If you see an error under cygwin during testing along the lines of:
 
@@ -251,34 +357,60 @@ you will need to install the cygwin rebase package and run:
 
   $ rebaseall -v
 
-Under cygwin you will need at least libungif 4.1.2 installed to
-prevent lockups in the gif test scripts.  At the time of writing you
-need to select libungif-4.1.2-1 manually in the setup.exe installation
-tool.
+If you get errors from your make tool, make sure you're using the same
+make that was used to build your perl - generally GNU make for cygwin,
+nmake for Visual C/C++ and dmake for MinGW.
+
+============
+6. Mac OS X
+============
+
+Building Imager under OS X is generally straightforward.  There are
+some exceptions though:
+
+a) you may find to need to ranlib library files in place after you've 
+   installed them, for example:
+
+     ranlib /usr/local/lib/libgif.a
+
+b) the version of GCC enabled by default on OS X 10.4 generates
+   incorrect code for some functions.  To work around this run:
+
+     gcc_select 3
 
-If you have any problems with the Win32 support, please email
-imager@imager.perl.org (don't forget to use nmake instead of make).
+   before building Imager and:
 
+     gcc_select 4
+
+   after building Imager.
+
+   This problem exhibits itself as test failures in t/t20fill.t
+
+   Imager 0.56 includes a workaround for this problem, but I wasn't
+   able to test it.
+
+c) if you want to build GCC 4.0 from scratch and use that you will
+   need to adjust the command-line supplied during the link stage, so
+   that there is some other option before the -bundle option.
+
+   For example:
+
+     perl Makefile.PL LDDLFLAGS="`perl -MConfig -e 'print "-g $Config{lddlflags}"'`"
+   
 =======================
-6. General information
+7. General information
 =======================
 
 The Imager module homepage is currently at:
 
  http://imager.perl.org/
 
-The current docs are rather bad as I've been busy adding features
-but hopefully they will be updated soon.  Until then you'll just
-have to use the source. The test scripts might also be a good idea.
-By activating the the #init_log lines in the test script you can get
-rather verbose debugging output from the C code.
-
 You can report bugs by pointing your browser at:
 
   https://rt.cpan.org/NoAuth/ReportBug.html?Queue=Imager
 
 ========================
-7. Thanks
+8. Thanks
 ========================
 
 Thanks go to:
@@ -302,5 +434,6 @@ Thanks go to:
   PerlJam             ( )
   Roderick Schertler  ( Roderick )
   Nathan Torkington   ( gnat )
+  Gabriel Vasseur
 
 (and just to play it safe) all those I forgot to mention.