use ExtUtils::MakeMaker; use Config; # See lib/ExtUtils/MakeMaker.pm for details of how to influence # the contents of the Makefile that is written. # # NOTE: The current ActiveState binary distribution does not completely setup # the values in Config.pm. You must manually modify the values of libpth to # add the VisualC++ library path. It should look something like this in order # to work properly. # # libpth='"C:\Perl\lib\CORE" "D:\DevStudio\VC98\lib"' # WriteMakefile( 'NAME' => 'Image::Magick', 'VERSION_FROM' => 'Magick.pm', # finds $VERSION 'LIBS' => ['-L..\VisualMagick\lib -L..\VisualMagick\bin -lCORE_RL_magick_.lib'], 'DEFINE' => '-D_VISUALC_ -D_WINDOWS', # e.g., '-DHAVE_SOMETHING' 'INC' => '-I.. -I..\xlib\include', 'BINARY_LOCATION' => 'x86/Image-Magick.tar.gz', 'dist' => {ZIP => "zip.exe", ZIPFLAGS=>"-rP"}, ($Config{'archname'} =~ /-object$/i ? ('CAPI' => 'TRUE') : ()), ); # # Add a target for building an ActiveState ppm distribution module # Requires tar, gzip, and zip. This produces PerlMagick.zip # Get GNU tar and gzip from http://sourceware.cygnus.com/ # Get Win32 command line PKZIP from http://www.pkware.com/ # and rename PKZIP.EXE to ZIP.EXE and PKUNZIP.EXE to UNZIP.EXE # Make sure tar.exe, gzip.exe and zip.exe are in your system path # sub MY::postamble { ' ppm: ppd all if exist PerlMagick.zip del PerlMagick.zip $(TAR) $(TARFLAGS) Image-Magick.tar blib $(COMPRESS) Image-Magick.tar if exist x86 del x86 /y if exist x86 rd x86 md x86 copy Image-Magick.tar$(SUFFIX) x86 del Image-Magick.tar$(SUFFIX) if exist ppm-readme.txt copy ppm-readme.txt readme $(ZIP) $(ZIPFLAGS) PerlMagick.zip readme Image-Magick.ppd x86/Image-Magick.tar$(SUFFIX) del x86\Image-Magick.tar$(SUFFIX) rd x86 ' } # # Modify the MakeMaker test fragment # sub MY::test { # # List any ImageMagick features derived from add-on libraries # or programs you would like to test. # # Valid choices are: # # Feature Formats Tested Prerequisites # ======= ====================== ====================================== # bzlib BZip compression BZip library # cgm CGM format 'ralcgm' program # hdf HDF format HDF library # jbig JBIG format JBIG library # jpeg JPEG format JPEG library # mpeg MPEG format 'mpeg2decode' & 'mpeg2encode' programs # png PNG format PNG and Zlib libraries # ps Postscript format 'gs' program and/or DPS library # rad Radiance format 'ra_ppm' program # tiff TIFF format TIFF library # ttf TrueType font format FreeType library # x X11 support X-windows libraries and server # xfig Xfig format 'transfig' program # zlib Zip compression Zlib library # my @DELEGATES = qw/ bzlib cgm jbig jpeg mpeg png ps tiff ttf x xfig zlib/; package MY; # so that "SUPER" works right my $inherited = shift->SUPER::test(@_); my $delegate_tests= " t/filter.t" . " t/read.t" . " t/montage.t" . " t/jpeg/read.t" . " t/jpeg/write.t" . " t/jbig/read.t" . " t/jbig/write.t" . " t/ttf/read.t" . " t/png/read.t" . " t/png/write.t" . " t/tiff/read.t" . " t/tiff/write.t" . " t/zlib/read.t" . " t/zlib/write.t" . " t/ps/read.t" . " t/ps/write.t" . " t/write.t" . " t/setattribute.t" . " t/getattribute.t"; if ( defined $ENV{'DISPLAY'} ) { $delegate_tests .= " t/x/write.t t/x/read.t"; } $inherited =~ s:^TEST_FILES =.*:TEST_FILES = ${delegate_tests}:m; $inherited; }