Alien::Imager has escaped

Corion on 2006-11-26T20:12:16

Alien::Imager has escaped onto my Perl repository. With it, I can (almost) automatically install Imager with JPEG and PNG support on Win32, provided a suitable C environment is available. A pending patch to CPAN allowing a parameter to the recompile command will then recompile Imager with the added libraries.

I could not get Giflib to compile nicely on Windows, and I could not get Tifflib to play nice too, so these two are missing from the Imager build.

Configuring Imager was greatly simplified by Imager allowwing environment variables for all of the relevant parameters to Makefile.PL. If your module requires configuration during the Makefile.PL or build phase, please consider supporting environment variables so that external scripts can set up the environment and then install your script through CPAN.


Building giflib on Windows

tonyc on 2006-12-14T14:31:25

I needed to check Imager builds against giflib for a recent bug report, so I created Makefiles to build giflib with both MSVC and Mingw/gcc

First for MSVC:

OBJS = dev2gif.obj egif_lib.obj dgif_lib.obj gifalloc.obj gif_font.obj gif_hash.obj \
    gif_err.obj quantize.obj qprintf.obj getarg.obj

CFLAGS=-DHAVE_IO_H -DHAVE_FCNTL_H -DHAVE_STDARG_H -DWIN32 -DHAVE_BASETSD_H

libgif.lib: $(OBJS)
    link /lib /out:libgif.lib $(OBJS)

and for mingw:

CC = gcc
AR = ar

OBJS = dev2gif.o egif_lib.o dgif_lib.o gifalloc.o gif_font.o gif_hash.o \
    gif_err.o quantize.o qprintf.o getarg.o

CFLAGS= -DHAVE_IO_H -DHAVE_FCNTL_H -DHAVE_STDARG_H -DWIN32 -DHAVE_BASETSD_H

.c.o:
    $(CC) -c $(CFLAGS) $*.c

libgif.a : $(OBJS)
    $(AR) r $@ $(OBJS)

These don't install, and they just build the libraries - none of the supporting programs are built