]> git.imager.perl.org - imager.git/commitdiff
move most of README to lib/Imager/Install.pod
authorTony Cook <tony@develop-help.com>
Fri, 15 Feb 2013 05:43:11 +0000 (16:43 +1100)
committerTony Cook <tony@develop-help.com>
Fri, 15 Feb 2013 05:43:11 +0000 (16:43 +1100)
Imager.pm
MANIFEST
README
lib/Imager/Files.pod
lib/Imager/Install.pod [new file with mode: 0644]
t/x30podlinkcheck.t

index a04035769e0302b3bd52e01ce7ccca971ec31bfa..000bbcc3c7d5b7fd145e3aab1037a1674fc56edc 100644 (file)
--- a/Imager.pm
+++ b/Imager.pm
@@ -4423,6 +4423,10 @@ Overview.
 
 =item *
 
+L<Imager::Install> - installation notes for Imager.
+
+=item *
+
 L<Imager::Tutorial> - a brief introduction to Imager.
 
 =item *
@@ -4489,6 +4493,10 @@ L<Imager::Fountain> - Helper for making gradient profiles.
 
 =item *
 
+L<Imager::IO> - Imager I/O abstraction.
+
+=item *
+
 L<Imager::API> - using Imager's C API
 
 =item *
index 576d171b88b5a516eb4fbbe089aa40e2d3cdb279..de6a5ab0d1697d1eeb4321fb767ac12b604dd3c3 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -194,6 +194,7 @@ lib/Imager/Fountain.pm
 lib/Imager/Handy.pod
 lib/Imager/ImageTypes.pod
 lib/Imager/Inline.pod          Using Imager with Inline::C
+lib/Imager/Install.pod         Installation notes
 lib/Imager/interface.pod
 lib/Imager/IO.pod              Document Imager::IO objects
 lib/Imager/LargeSamples.pod    Track large sample support
diff --git a/README b/README
index 1967667bd45a08b9492be4aadce57c8fd6ba3352..edfe4d00f9e7ea943349665ff917592949ee59e1 100644 (file)
--- a/README
+++ b/README
@@ -1,6 +1,6 @@
 ================================================================
 Copyright (c) 1999-2004 Arnar M. Hrafnkelsson. All rights reserved.
-Copyright (c) 2004-2012 Anthony Cook.
+Copyright (c) 2004-2013 Anthony Cook.
 This program is free software; you can redistribute it and/or
 modify it under the same terms as Perl itself.
 
@@ -30,401 +30,24 @@ LICENSE(S) TO USE SUCH LIBRARIES SHOULD YOU NEED ANY.
 2. Compiling and testing
 ========================
 
-Some care has been taken to make the installation as smooth as
-possible.  This is rather hard due to the difference between operating
-systems and site setups.  To get started just type
+For details on the this process, including library and platform
+specific details, see Imager::Install, either by using:
 
-$ perl Makefile.PL
+  perldoc lib/Imager/Install.pod
 
-It should blurb out a list of which libraries were found and which
-not.  If you add a library to the machine after installing Imager it
-does not automatically become available in Imager.  It only uses the
-libraries that are found.  If the list of found libraries is not what
-you expected, then the Makefile.PL is either not searching in the
-right directories or your box does not have the libraries you think it
-does.  For a list of where to get the libraries have a look at
-3. External dependencies.  To widen the search path for libraries and
-include files set the IM_INCPATH and IM_LIBPATH variables.  The
-environment variables that matter when Makefile.PL is run are
+or at:
 
-IM_INCPATH      colon separated list of paths to extra include files
-IM_LIBPATH      colon separated list of paths to extra library files
+  http://imager.perl.org/docs/Imager/Install.html
 
-IM_VERBOSE      turns on verbose mode for the library scanning and such
-IM_MANUAL       to manually select which libraries are used and which not
-IM_NOLOG        if true logging will not be compiled into the module
-IM_DEBUG_MALLOC if true malloc debugging will be compiled into the module
-                do not use IM_DEBUG_MALLOC in production - this slows
-                everything down
+The basic installation process is similar to most other CPAN modules:
 
-IM_CFLAGS       Extra flags to pass to the compiler
-IM_LFLAGS       Extra flags to pass to the linker
-IM_DFLAGS       Extra flags to pass to the preprocessor
+  perl Makefile.PL
+  make
+  make test
+  make install
 
-
-
-When finding the libraries has been sorted out it's time for
-
-$ make 
-
-and if that works then do
-
-$ make test
-
-If either fails do take a peek at the file errep.perl.  It's creates a
-file report.txt.  This is some information which will help me discover
-where the problem is so I can try to fix it in future releases.  If
-you find running it ok (just remember - no warranty!) please send the
-report.txt via email to tonyc@cpan.org.
-
-Troubleshooting tips:
-
-A common problem is that libgif/libungif are sometimes linked to the X
-libraries and then running the tests fails.  In that case something
-like:
-
-$ IM_LFLAGS="-L/usr/X11R6/lib -lX11" perl Makefile.PL
-
-Which simply sets the environment variables for the extra libraries 
-to include the X libraries (which we do not use at all, but must
-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.4
-  ./configure --without-x ...
-
-Also note that libgif has a few bugs: You can run something like
-
-$ perl -Iblib/lib -Iblib/arch t/t105gif.t
-
-This way you can see what comments the test script prints out.
-t/t105gif.t checks for an bug in libgif and prints out a patch
-if that bug is present, note that this bug only affects the more
-"advanced" features of libgif.
-
-If for some reason you have libungif-devel package installed but
-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.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, 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
-
-and simply say no to tiff support when asked if you want it, the same thing
-can be used to circumvent problems in gifs to get Imager going.
-
-If it worked just continue with the installation as normally 
-(with make install).
-
-Freetype 1.x vs Freetype 2.x
-----------------------------
-
-These two libraries have some conflicting include file names, but as
-long as you don't put the Freetype 2.x freetype.h directory in the
-include path it should all work.
-
-Put the directory containing ft2build.h in the include path, but not
-the directory containing the freetype 2.x freetype.h.
-
-If you see compilation errors from font.c you've probably made the
-mistake of putting the Freetype 2.x freetype.h directory into the
-include path.
-
-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
------------------------------------------
-
-Through Freetype 2.1, Imager can use Macintosh DFON (.dfont) fonts and
-suitcase font files.
-
-If you want to be able to use more than just the first face in the
-font file though, you will need to configure freetype2 with the
---with-old-mac-fonts option:
-
-  ./configure --with-old-mac-fonts
-
-You can use the index option to get to the other font faces in the
-file:
-
-  # get the second face from $file
-  my $font = Imager::Font->new(file=>$file, index=>1)
-    or die Imager->errstr;
-
-If you're using a suitcase font, you will also need to force the use
-of freetype 2 with the type argument:
-
-  my $font = Imager::Font->new(file=>$suitcase, type=>'ft2', index=>$index)
-    or die Imager->errstr;
-
-
-========================
-3. External dependencies
-========================
-
-Some hints about getting the Imager module to find the libraries it
-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.
-
-eg.
-
-  yum install libjpeg-devel
-
-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.
-
-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.
-
-Debian: libpng12-dev
-Redhat: libpng-devel
-
-3.3 giflib
-----------
-
-  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.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.
-
-With the expiration of the LZW patent there's no reason to use
-libungif.
-
-libgif 4.1.4 has no problems known to me at this point.
-
-Debian: libgif-dev
-Redhat: giflib-devel
-
-3.4 libtiff
------------
-
- http://www.remotesensing.org/libtiff/
-
-Provides read and write access to TIFF images.
-
-Note: libtiff 3.9.0 shouldn't be used due to a bug in
-TIFFWriteDirectory().
-
-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/
-
-Solaris:
-
-  http://www.sunfreeware.com/
-
-========================
-4. Logging and debugging
-========================
-
-Logging is compiled in by default - if you should want to get of it
-from the binaries you can do so by setting the env IMAGER_NOLOG 
-to something. If you want to enable malloc debugging to check for leaks
-then set IMAGER_DEBUG_MALLOC to something.  Needless to say it is
-pretty pointless to have malloc debug enabled with no logging since you 
-can never see the malloc information that way.
-
-
-=================
-5. Win32 Support
-=================
-
-Imager can be installed on Win32 systems.  This was ported and tested
-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 MSVC++ 6.0, cygwin (perl 5.6.1) and gcc (MinGW).
-
-If you see an error under cygwin during testing along the lines of:
-
-  C:\cygwin\bin\perl.exe: *** unable to remap C:\cygwin\...some dll to the 
-    same address as parent (0x...) != 0x....
-
-you will need to install the cygwin rebase package and run:
-
-  $ rebaseall -v
-
-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.
-
-Imager and all of the libraries it requires are supplied with
-Strawberry Perl.
-
-============
-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
-
-   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}"'`"
-
-d) The default perl build in Snow Leopard and Lion is a fat binary,
-   and default builds of giflib, libpng and libjpeg (and maybe other
-   libraries) will produce link failures.
-
-   To avoid this you need to supply a CFLAGS parameter to the
-   library's configure script, but since the -arch flag conflicts with
-   the options used to build the dependency files, you need to supply
-   another flag to disable dependency tracking.
-
-   Snow Leopard fat binaries include i386, x86_64 and PPC objects,
-   hence you would run configure like:
-
-    ./configure --disable-dependency-tracking CFLAGS='-arch x86_64 -arch i386 -arch ppc'
-
-   Lion doesn't support PPC, so there you run configure like:
-
-   ./configure --disable-dependency-tracking CFLAGS='-arch x86_64 -arch i386'
-
-   For libgif you might also want to supply the --without-x option.
-   
 =======================
-7. General information
+3. General information
 =======================
 
 The Imager module homepage is currently at:
@@ -436,7 +59,7 @@ You can report bugs by pointing your browser at:
   https://rt.cpan.org/NoAuth/ReportBug.html?Queue=Imager
 
 ========================
-8. Thanks
+4. Thanks
 ========================
 
 Thanks go to:
index b8884c30a00baa0b188aef347163eaf716266244..0732d9f61c48045fd910ed2cfd0540244b23df2c 100644 (file)
@@ -1378,7 +1378,7 @@ C<png_warning>X<tags,PNG,png_warning> - keyword "Warning".
 
 =back
 
-Each of these tags has a corresponding C< I<base-tag-name>_compressed
+Each of these tags has a corresponding C<< I<base-tag-name>_compressed
 >> tag, eg. C<png_comment_compressed>.  When reading, if the PNG chunk
 is compressed this tag will be set to 1, but is otherwise unset.  When
 writing, Imager will honor the compression tag if set and non-zero,
@@ -1436,7 +1436,7 @@ C<cHRM> chunks are not written.
 
 =item *
 
-C<tags, png_gamma>C<png_gamma> - the gamma of the image. This value is
+X<tags, png_gamma>C<png_gamma> - the gamma of the image. This value is
 not currently used by Imager when processing the image, but this may
 change in the future.
 
@@ -1461,7 +1461,7 @@ representation.  Ignored when writing.
 
 =item *
 
-X<tags, png_time>X<png_time> - the creation time of the file formatted
+X<tags, png_time>C<png_time> - the creation time of the file formatted
 as C<< I<year>-I<month>-I<day>TI<hour>:I<minute>:I<second> >>.  This
 is stored as time data structure in the file, not a string.  If you
 set C<png_time> and it cannot be parsed as above, writing the PNG file
diff --git a/lib/Imager/Install.pod b/lib/Imager/Install.pod
new file mode 100644 (file)
index 0000000..131ca49
--- /dev/null
@@ -0,0 +1,407 @@
+=for stopwords freetype MinGW dfont Redhat SDK IFD GDI TTF preprocessor Redhat-like
+
+=head1 NAME
+
+Imager::Install - installation notes for Imager
+
+=head1 SYNOPSIS
+
+  perl Makefile.PL
+  make
+  make test
+  make install
+
+=head1 CONFIGURATION
+
+Assuming you have all of your required libraries in the places Imager
+looks, you should be able to use the standard mantra:
+
+  perl Makefile.PL
+  make
+  make test
+  make install
+
+to install Imager.
+
+If you've installed libraries in places Imager doesn't look, you can
+supply extra locations either with command-line options:
+
+  perl Makefile.PL --libpath=/home/tony/local/lib --incpath=/home/tony/local/include
+
+or with environment variables:
+
+  export IM_LIBPATH=/home/tony/local/lib IM_INCPATH=/home/tony/local/include
+  perl Makefile.PL
+
+Imager's F<Makefile.PL> produces an epilogue indicating which
+libraries have and haven't been found, for example:
+
+  Libraries found:
+    FT2
+    GIF
+    JPEG
+    PNG
+    T1
+    TIFF
+  Libraries *not* found:
+    Win32
+
+If a library you expect to be found isn't on this list, use the
+C<--verbose> or C<-v> option to produce way too much information from
+Imager's search for the libraries:
+
+  perl Makefile.PL -v
+
+If you can't resolve this, then run
+
+  perl errep.perl
+
+and include the (large) generated F<report.txt> in your email to:
+
+  bug-Imager@rt.cpan.org
+
+There are other options used to configure how Imager is built:
+
+=over
+
+=item C<--nolog>
+
+build Imager without logging support.  This will speed up Imager a
+little.  You can also remove logging by setting the C<IMAGER_NOLOG>
+environment variable to a true value.
+
+=item C<--coverage>
+
+used to build Imager for C<gcov> coverage testing.  This is intended
+for development and also requires options supplied to C<make>.
+
+=item C<--assert>
+
+build Imager with assertions enabled.
+
+=item C<--tracecontext>
+
+build Imager to trace context object management to C<stderr> for
+debugging.
+
+=back
+
+=head2 Build time environment variables
+X<build time environment variables>
+
+=over
+
+=item *
+
+X<< C<IMAGER_NOLOG> >>C<IMAGER_NOLOG> - build Imager with logging disabled.
+
+=item *
+
+X<< C<IMAGER_DEBUG_MALLOC> >>C<IMAGER_DEBUG_MALLOC> - build Imager with it's
+debug malloc wrappers.  This is I<not> compatible with threaded code.
+
+=item *
+
+X<< C<IM_INCPATH> >>C<IM_INCPATH> - equivalent to C<--incpath>.
+
+=item *
+
+X<< C<IM_LIBPATH> >>C<IM_LIBPATH> - equivalent to C<--libpath>.
+
+=item *
+
+X<< C<IM_VERBOSE> >>C<IM_VERBOSE> - equivalent to C<--verbose>
+
+=item *
+
+X<< C<IM_CFLAGS> >>C<IM_CFLAGS> - extra C compiler flags.
+
+=item *
+
+X<< C<IM_LFLAGS> >>C<IM_LFLAGS> - extra linker flags.
+
+=item *
+
+X<< C<IM_DFLAGS> >>C<IM_DFLAGS> - extra preprocessor flags.
+
+=back
+
+=head1 EXTERNAL LIBRARIES
+
+Some of the file format and font modules included with Imager use
+external libraries, which should be installed before you try to
+install Imager itself.
+
+If you don't have the libraries installed then Imager itself will
+install successfully, but the file format or font support module won't
+be.
+
+Preferably the latest version of each library should be used, simple
+because it has the latest security fixes.
+
+=head2 PNG - C<libpng>
+
+X<< C<libpng> >>L<Imager::File::PNG> uses L<< C<libpng>
+|http://www.libpng.org/pub/png/libpng.html >> for PNG image file
+support.
+
+Debian package: C<libpng12-dev>
+
+Redhat package: C<libpng-devel>
+
+=head2 TIFF - C<libtiff>
+
+X<< C<libtiff> >>L<Imager::File::TIFF> uses
+L<< C<libtiff> |http://www.remotesensing.org/libtiff/ >> for GIF image file
+support.
+
+Version 3.6.0 or later is required to avoid an exploit with infinite
+IFD loops, though it's possible some distributions have applied the
+fix to older versions as a security fix.
+
+Version 3.9.0 is rejected during the probe process due to a serious
+bug, fixed in 3.9.1.
+
+Debian package: C<libtiff4-dev>
+
+Redhat package: C<libtiff-devel>
+
+=head2 GIF - C<libgif>
+
+X<< C<libgif> >>L<Imager::File::GIF> uses
+L<< C<libgif> |http://sourceforge.net/projects/giflib/ >> for GIF image file
+support.
+
+C<libgif> releases 4.2.0 and 5.0.0 are specifically not supported, due
+to bugs in those versions.
+
+Release 4.1.4 or later should be used.
+
+C<giflib> 3 is no longer supported.
+
+C<libungif> is no longer supported as an alternative.
+
+Debian package: C<libgif-dev>
+
+Redhat package: C<giflib-devel>
+
+=head2 JPEG - C<libjpeg>
+
+L<Imager::File::JPEG> uses L<< C<libjpeg> |http://www.ijg.org/ >> for JPEG
+image file support.
+
+You may also use
+L<< C<libjpeg-turbo> |http://sourceforge.net/projects/libjpeg-turbo/ >>.
+
+To install older releases of C<libjpeg> from source, you'll need to
+run:
+
+  make install-lib
+
+to install the libraries.  C<make install> only installs the program
+binaries.
+
+Redhat package: C<libjpeg-devel>
+
+Debian package: C<libjpeg8-dev>
+
+=head2 Freetype 2.x - C<libfreetype>
+
+L<Imager::Font::FT2> uses L<< Freetype 2
+(C<libfreetype>)|http://www.freetype.org/ >> for font support, supporting
+too many font formats to mention here.
+
+This is the recommended library to use for font support.
+
+Debian package: C<libfreetype6-dev>
+
+Redhat package: C<freetype-devel>
+
+=head2 Win32 GDI fonts
+
+L<Imager::Font::W32> uses L<Win32
+GDI|http://msdn.microsoft.com/en-us/library/dd145203%28v=vs.85%29.aspx>
+to render text using installed Windows fonts.
+
+This requires Win32 SDK headers and libraries, and is only expected to
+work on native Win32 or Cygwin.
+
+For this to work under Cygwin, install the C<w32api-headers> and
+C<w32api-runtime> packages.
+
+=head2 C<t1lib>
+
+L<Imager::Font::T1> uses L<< C<t1lib> |http://www.t1lib.org/ >> for
+font support, supporting Postscript Type 1 fonts only.
+
+Debian package: C<libt1-dev>
+
+Redhat package: C<t1lib-devel>
+
+=head2 Freetype 1.x - C<libttf>
+
+Imager uses L<< Freetype 1 (C<libttf>)|http://www.freetype.org/ >> if
+available for font support, supporting TTF fonts only.
+
+Freetype 1.x is essentially unsupported and shouldn't be used for new
+code.
+
+=head1 PLATFORM SPECIFICS
+
+=head2 Linux
+
+Several distributions include an Imager package, but they are
+typically several releases behind due to the nature of release cycles.
+
+Imager typically supports the external libraries as packaged with any
+supported release of Linux.
+
+=head3 Debian
+
+To install the libraries used by Imager under Debian (or Ubuntu), run
+as root (or with sudo):
+
+  apt-get install libgif-dev libjpeg8-dev libtiff4-dev libpng12-dev libfreetype6-dev
+
+You may also need to install development tools:
+
+  apt-get install build-essential
+
+=head3 Redhat
+
+To install the libraries used by Imager under Redhat and related Linux
+distributions, run as root (or sudo):
+
+  yum install giflib-devel libjpeg-devel libtiff-devel libpng-devel freetype-devel
+
+To install the development tools needed:
+
+  yum install gcc
+
+(which appears to be enough on a base Redhat-like install) or the more
+commonly recommended recipe:
+
+  yum groupinstall "Development Tools"
+
+which is massive overkill.
+
+=head2 Mac OS X
+
+=head3 Building libraries
+
+The default perl build in Snow Leopard and Lion is a fat binary, and
+default builds of C<giflib>, C<libpng> and C<libjpeg> (and maybe other
+libraries) will produce link failures.
+
+To avoid this you need to supply a C<CFLAGS> parameter to the
+library's configure script, but since the C<-arch> flag conflicts with
+the options used to build the dependency files, you need to supply
+another flag to disable dependency tracking.
+
+Snow Leopard fat binaries include C<i386>, C<x86_64> and C<PPC>
+objects, hence you would run configure like:
+
+  ./configure --disable-dependency-tracking CFLAGS='-arch x86_64 -arch i386 -arch ppc'
+
+Lion doesn't support C<PPC>, so there you run configure like:
+
+  ./configure --disable-dependency-tracking CFLAGS='-arch x86_64 -arch i386'
+
+For C<libgif> you might also want to supply the C<--without-x> option:
+
+  ./configure --disable-dependency-tracking --without-x CFLAGS='-arch x86_64 -arch i386'
+
+If you copy library files into place manually, you may need to run
+C<ranlib> on them in their new location:
+
+  ranlib /usr/local/lib/libgif.a
+
+=head3 Macintosh C<dfont> and suitcase font support
+
+Through Freetype 2.1, Imager can use Macintosh C<DFON> (C<.dfont>)
+fonts and suitcase font files.
+
+If you want to be able to use more than just the first face in the
+font file though, you will need to configure C<freetype2> with the
+--with-old-mac-fonts option:
+
+  ./configure --with-old-mac-fonts
+
+You can use the index option to get to the other font faces in the
+file:
+
+  # get the second face from $file
+  my $font = Imager::Font->new(file=>$file, index=>1)
+    or die Imager->errstr;
+
+If you're using a suitcase font, you will also need to force the use
+of Freetype 2 with the type argument:
+
+  my $font = Imager::Font->new(file=>$suitcase, type=>'ft2', index=>$index)
+    or die Imager->errstr;
+
+=head2 Microsoft Windows
+
+The simplest way to install the libraries used by Imager is to install
+L<Strawberry perl|http://strawberryperl.com/>.
+
+You can then use either the bundled Imager, or install from CPAN.
+
+If you get errors from your make tool, make sure you're using the same
+make that was used to build your perl - C<nmake> for Visual C/C++ and
+C<dmake> for MinGW, run:
+
+  perl -V:make
+
+to see which make was used to build your perl.
+
+=head2 Cygwin
+
+To build Imager with as much library support as possible on Cygwin,
+install the following packages:
+
+  libjpeg-devel libpng-devel libgif-devel libtiff-devel
+  libfreetype-devel t1lib-devel w32api-headers w32api-runtime
+
+If you see an error under cygwin during testing along the lines of:
+
+  C:\cygwin\bin\perl.exe: *** unable to remap C:\cygwin\...some dll to the 
+    same address as parent (0x...) != 0x....
+
+you will need to install the cygwin C<rebase> package and run:
+
+  $ rebaseall -v
+
+or possibly, just:
+
+  $ perlrebase
+
+will fix the problem.
+
+=head1 Other issues
+
+=head2 Freetype 1.x vs Freetype 2.x
+
+Freetype 1.x is no longer recommended, is no longer supported
+upstream, and receives only limited updates in Imager.
+
+These two libraries have some conflicting include file names, but as
+long as you don't put the Freetype 2.x F<freetype.h> directory in the
+include path it should all work.
+
+Put the directory containing F<ft2build.h> in the include path, but
+not the directory containing the freetype 2.x F<freetype.h>.
+
+If you see compilation errors from font.c you've probably made the
+mistake of putting the Freetype 2.x F<freetype.h> directory into the
+include path.
+
+To see which directories should be in the include path, try:
+
+  freetype-config --cflags
+
+Ideally, C<freetype-config> should be in the PATH when building Imager
+with freetype 2.x support, in which case L<Imager::Font::FT2> can
+configure itself.
+
+=cut
\ No newline at end of file
index dffa59428f35e3d3d3b95c8247fca12e2b99735a..667a33b28a4315522d322838b0aa7ca1789115fb 100644 (file)
@@ -1,7 +1,7 @@
 #!perl -w
 use strict;
 use Test::More;
-use Pod::Parser;
+use Pod::Parser 1.50;
 use File::Find;
 use File::Spec::Functions qw(rel2abs abs2rel splitdir);
 
@@ -9,6 +9,10 @@ use File::Spec::Functions qw(rel2abs abs2rel splitdir);
 my @known =
   qw(perl Affix::Infix2Postfix Parse::RecDescent GD Image::Magick Graphics::Magick CGI Image::ExifTool XSLoader DynaLoader Prima::Image IPA PDL);
 
+# also known since we supply them, but we don't always install them
+push @known, qw(Imager::Font::FT2 Imager::Font::W32 Imager::Font::T1
+   Imager::File::JPEG Imager::File::GIF Imager::File::PNG Imager::File::TIFF);
+
 my @pod; # files with pod
 
 my $base = rel2abs("blib/lib");
@@ -104,9 +108,9 @@ sub sequence {
   if ($seq->cmd_name eq "L") {
     my $raw = $seq->raw_text;
     my $base_link = $seq->parse_tree->raw_text;
-    $base_link =~ /^(https?|ftp|mailto):/
+    (my $link = $base_link) =~ s/.*\|//s;
+    $link =~ /^(https?|ftp|mailto):/
       and return '';
-    (my $link = $base_link) =~ s/.*\|//;
     my ($pod, $part) = split m(/), $link, 2;
     $pod ||= $self->{link};
     if ($part) {