1995-02-27 16:43:12 -05:00
|
|
|
# New ports collection makefile for: ImageMagick
|
|
|
|
# Date created: 15 November 1994
|
|
|
|
# Whom: torstenb
|
|
|
|
#
|
1999-08-25 02:16:32 -04:00
|
|
|
# $FreeBSD$
|
1995-02-27 16:43:12 -05:00
|
|
|
#
|
|
|
|
|
2000-04-13 02:28:28 -04:00
|
|
|
PORTNAME= ImageMagick
|
2005-05-02 04:27:39 -04:00
|
|
|
PORTVERSION= 6.2.2.1
|
1998-08-21 08:00:41 -04:00
|
|
|
CATEGORIES= graphics perl5
|
2005-05-02 04:27:39 -04:00
|
|
|
MASTER_SITES= ftp://ftp.nluug.nl/pub/ImageMagick/ \
|
|
|
|
${MASTER_SITE_LOCAL:S/%SUBDIR%/pav/}
|
2004-06-07 08:08:05 -04:00
|
|
|
DISTNAME= ${PORTNAME}-${PORTVERSION:R}-${PORTVERSION:E}
|
1995-04-09 03:09:55 -04:00
|
|
|
|
2004-05-22 08:09:47 -04:00
|
|
|
MAINTAINER= avleeuwen@piwebs.com
|
2003-10-05 07:21:58 -04:00
|
|
|
COMMENT= Image processing tools
|
1996-11-06 02:53:24 -05:00
|
|
|
|
2004-06-07 08:08:05 -04:00
|
|
|
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION:R}
|
|
|
|
|
2000-07-19 09:08:38 -04:00
|
|
|
USE_PERL5= yes
|
2003-02-24 11:29:41 -05:00
|
|
|
USE_BZIP2= yes
|
2003-10-05 07:21:58 -04:00
|
|
|
USE_GNOME= gnomehack gnometarget pkgconfig
|
2002-02-21 01:31:16 -05:00
|
|
|
USE_GMAKE= yes
|
2004-08-21 15:47:56 -04:00
|
|
|
USE_LIBTOOL_VER=15
|
2004-12-07 14:04:14 -05:00
|
|
|
USE_LIBLTDL= yes
|
2002-05-02 18:24:28 -04:00
|
|
|
LIBTOOLFLAGS= # none
|
2001-12-08 14:57:27 -05:00
|
|
|
CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
|
2003-07-22 09:58:59 -04:00
|
|
|
CONFIGURE_ARGS= --enable-shared
|
2001-01-25 06:05:14 -05:00
|
|
|
INSTALLS_SHLIB= yes
|
|
|
|
|
2004-05-19 15:48:16 -04:00
|
|
|
MAN1= ImageMagick.1 Magick++-config.1 Magick-config.1 Wand-config.1 \
|
|
|
|
compare.1 composite.1 convert.1 identify.1 mogrify.1 montage.1
|
2001-03-13 17:36:26 -05:00
|
|
|
|
2001-12-08 14:57:27 -05:00
|
|
|
CPPFLAGS= -I${LOCALBASE}/include
|
|
|
|
LDFLAGS= -L${LOCALBASE}/lib
|
|
|
|
|
2004-06-07 08:08:05 -04:00
|
|
|
PLIST_SUB+= PORTVERSION=${PORTVERSION:R}
|
2004-06-06 11:22:29 -04:00
|
|
|
|
2003-08-16 10:56:26 -04:00
|
|
|
.if !defined(WITHOUT_IMAGEMAGICK_PERL)
|
2003-07-22 09:58:59 -04:00
|
|
|
CONFIGURE_ARGS+= --with-perl=${PERL5}
|
2003-10-04 12:36:09 -04:00
|
|
|
PLIST_SUB+= WITH_PERL=''
|
|
|
|
MAN3= Image::Magick.3
|
|
|
|
MAN3PREFIX= ${PREFIX}/lib/perl5/${PERL_VERSION}
|
2003-07-22 09:58:59 -04:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-perl
|
2003-10-04 12:36:09 -04:00
|
|
|
PLIST_SUB+= WITH_PERL='@comment '
|
2003-07-22 09:58:59 -04:00
|
|
|
.endif
|
|
|
|
|
2001-08-08 20:11:14 -04:00
|
|
|
# PerlMagick not works with threads, if perl is not threaded, and vice versa
|
|
|
|
.if defined(WITH_IMAGEMAGICK_THREADS) || \
|
2003-08-16 10:56:26 -04:00
|
|
|
(!defined(WITHOUT_IMAGEMAGICK_PERL) && \
|
2003-08-16 09:29:43 -04:00
|
|
|
defined(PERL_THREADED) && ${PERL_THREADED} == "true")
|
2001-01-25 06:05:14 -05:00
|
|
|
CONFIGURE_ARGS+= --with-threads
|
2004-12-14 19:13:54 -05:00
|
|
|
CONFIGURE_ENV+= PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" PTHREAD_LIBS="${PTHREAD_LIBS}"
|
2001-03-06 12:19:53 -05:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-threads
|
2001-01-23 18:00:25 -05:00
|
|
|
.endif
|
2000-04-24 13:58:37 -04:00
|
|
|
|
2001-08-08 16:02:49 -04:00
|
|
|
# Faster, but poor quality
|
|
|
|
.if defined(WITHOUT_IMAGEMAGICK_16BIT_PIXEL)
|
2002-09-19 17:11:48 -04:00
|
|
|
CONFIGURE_ARGS+= --with-quantum-depth=8
|
2004-06-12 10:52:07 -04:00
|
|
|
PLIST_SUB+= QBIT='Q8'
|
2003-10-04 12:36:09 -04:00
|
|
|
.else
|
2004-06-12 10:52:07 -04:00
|
|
|
PLIST_SUB+= QBIT='Q16'
|
2001-01-11 00:19:46 -05:00
|
|
|
.endif
|
|
|
|
|
2004-03-14 21:54:00 -05:00
|
|
|
.if defined(WITH_WINDOWS_FONT_DIR)
|
|
|
|
CONFIGURE_ARGS+= --with-windows-font-dir=${WITH_WINDOWS_FONT_DIR}
|
|
|
|
.endif
|
|
|
|
|
2001-08-08 21:22:17 -04:00
|
|
|
# Loadable coders, smaller executable, but PerlMagick not really works
|
|
|
|
# ('make test' there works)
|
|
|
|
.if defined(WITH_IMAGEMAGICK_MODULES)
|
2001-03-13 17:36:26 -05:00
|
|
|
CONFIGURE_ARGS+= --with-modules
|
2003-07-22 09:58:59 -04:00
|
|
|
PLIST_SUB+= MODULES=''
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= MODULES='@comment '
|
|
|
|
.endif
|
|
|
|
|
2003-08-16 10:56:26 -04:00
|
|
|
.if !defined(WITHOUT_IMAGEMAGICK_JPEG)
|
2003-08-16 09:29:43 -04:00
|
|
|
LIB_DEPENDS+= jpeg.9:${PORTSDIR}/graphics/jpeg
|
2003-08-16 10:56:26 -04:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-jpeg
|
2003-07-22 09:58:59 -04:00
|
|
|
.endif
|
|
|
|
|
2003-08-16 10:56:26 -04:00
|
|
|
.if !defined(WITHOUT_IMAGEMAGICK_PNG)
|
2003-07-22 09:58:59 -04:00
|
|
|
LIB_DEPENDS+= png.5:${PORTSDIR}/graphics/png
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-png
|
|
|
|
.endif
|
|
|
|
|
2003-08-16 10:56:26 -04:00
|
|
|
.if !defined(WITHOUT_IMAGEMAGICK_TIFF)
|
2003-07-22 09:58:59 -04:00
|
|
|
LIB_DEPENDS+= tiff.4:${PORTSDIR}/graphics/tiff
|
2001-03-13 17:36:26 -05:00
|
|
|
.else
|
2003-07-22 09:58:59 -04:00
|
|
|
CONFIGURE_ARGS+= --without-tiff
|
2001-03-13 17:36:26 -05:00
|
|
|
.endif
|
2000-03-09 18:36:52 -05:00
|
|
|
|
2003-07-22 09:58:59 -04:00
|
|
|
# Produce BZip compressed MIFF images
|
2003-08-16 10:56:26 -04:00
|
|
|
.if defined(WITHOUT_IMAGEMAGICK_BZLIB)
|
2003-07-22 09:58:59 -04:00
|
|
|
CONFIGURE_ARGS+= --without-bzlib
|
|
|
|
.endif
|
|
|
|
|
|
|
|
# FPX (FlashPIX) images
|
2003-08-16 10:56:26 -04:00
|
|
|
.if !defined(WITHOUT_IMAGEMAGICK_FPX)
|
2003-07-22 09:58:59 -04:00
|
|
|
LIB_DEPENDS+= fpx.1:${PORTSDIR}/graphics/libfpx
|
2005-02-17 10:39:00 -05:00
|
|
|
CONFIGURE_ARGS+= --with-fpx
|
2003-07-22 09:58:59 -04:00
|
|
|
.endif
|
|
|
|
|
|
|
|
# JBIG images (lossless compression for bi-level images)
|
2003-08-16 10:56:26 -04:00
|
|
|
.if !defined(WITHOUT_IMAGEMAGICK_JBIG)
|
2003-07-22 09:58:59 -04:00
|
|
|
LIB_DEPENDS+= jbig.1:${PORTSDIR}/graphics/jbigkit
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-jbig
|
|
|
|
.endif
|
|
|
|
|
|
|
|
# JPEG2000 images (wavelet-based lossy compression)
|
2003-08-16 10:56:26 -04:00
|
|
|
.if !defined(WITHOUT_IMAGEMAGICK_JPEG2000)
|
2003-07-22 09:58:59 -04:00
|
|
|
LIB_DEPENDS+= jasper.4:${PORTSDIR}/graphics/jasper
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-jp2
|
|
|
|
.endif
|
|
|
|
|
2004-05-22 08:09:47 -04:00
|
|
|
# GraphViz dot graphs
|
|
|
|
.if defined(WITH_IMAGEMAGICK_DOT)
|
|
|
|
LIB_DEPENDS+= dotneato.0:${PORTSDIR}/graphics/graphviz
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-dot
|
|
|
|
.endif
|
|
|
|
|
2003-07-22 09:58:59 -04:00
|
|
|
# LCMS (Little CMS) color management
|
2003-08-16 10:56:26 -04:00
|
|
|
.if !defined(WITHOUT_IMAGEMAGICK_LCMS)
|
2003-07-22 09:58:59 -04:00
|
|
|
LIB_DEPENDS+= lcms.1:${PORTSDIR}/graphics/lcms
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-lcms
|
|
|
|
.endif
|
|
|
|
|
|
|
|
# TTF (TrueType Font) support
|
2003-08-16 10:56:26 -04:00
|
|
|
.if !defined(WITHOUT_IMAGEMAGICK_TTF)
|
2003-07-22 09:58:59 -04:00
|
|
|
BUILD_DEPENDS+= freetype-config:${PORTSDIR}/print/freetype2 # XXX
|
|
|
|
LIB_DEPENDS+= freetype.9:${PORTSDIR}/print/freetype2
|
2004-01-20 11:30:09 -05:00
|
|
|
USE_GHOSTSCRIPT= yes
|
2003-07-22 09:58:59 -04:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-ttf
|
|
|
|
.endif
|
|
|
|
|
|
|
|
# WMF (Windows Meta File) images
|
2005-03-06 17:16:12 -05:00
|
|
|
.if defined(WITH_IMAGEMAGICK_WMF)
|
|
|
|
.if !defined(WITH_IMAGEMAGICK_MODULES)
|
|
|
|
IGNORE= WMF support requires WITH_IMAGEMAGICK_MODULES
|
|
|
|
.else
|
|
|
|
.if defined(WITHOUT_X11)
|
|
|
|
IGNORE= WMF support requires X11 libraries, please unset WITHOUT_X11
|
|
|
|
.else
|
2003-07-22 09:58:59 -04:00
|
|
|
LIB_DEPENDS+= wmf.2:${PORTSDIR}/graphics/libwmf
|
2005-03-06 17:16:12 -05:00
|
|
|
CONFIGURE_ARGS+= --with-wmf=yes
|
|
|
|
.endif
|
|
|
|
.endif
|
2003-07-22 09:58:59 -04:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-wmf
|
|
|
|
.endif
|
|
|
|
|
|
|
|
# SVG (Scalable Vector Graphics) images and MSL (Magick Scripting Language)
|
|
|
|
# both require XML
|
2003-08-16 10:56:26 -04:00
|
|
|
.if !defined(WITHOUT_IMAGEMAGICK_SVG) || !defined(WITHOUT_IMAGEMAGICK_MSL)
|
2003-07-22 09:58:59 -04:00
|
|
|
LIB_DEPENDS+= xml2.5:${PORTSDIR}/textproc/libxml2
|
|
|
|
MAN1+= conjure.1
|
2003-10-04 12:36:09 -04:00
|
|
|
PLIST_SUB+= WITH_CONJURE=''
|
2003-07-22 09:58:59 -04:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-xml
|
2003-10-04 12:36:09 -04:00
|
|
|
PLIST_SUB+= WITH_CONJURE='@comment '
|
2003-07-22 09:58:59 -04:00
|
|
|
.endif
|
|
|
|
|
|
|
|
# DPS (Display PostScript) support
|
2003-08-16 10:56:26 -04:00
|
|
|
.if !defined(WITHOUT_IMAGEMAGICK_DPS)
|
2003-07-22 09:58:59 -04:00
|
|
|
CONFIGURE_ARGS+= --with-dps
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-dps
|
|
|
|
.endif
|
|
|
|
|
|
|
|
# PDF (Adobe Portable Document Format) support
|
2003-08-16 10:56:26 -04:00
|
|
|
.if !defined(WITHOUT_IMAGEMAGICK_PDF)
|
2003-07-22 09:58:59 -04:00
|
|
|
CONFIGURE_ARGS+= --with-gslib
|
2004-01-20 11:30:09 -05:00
|
|
|
USE_GHOSTSCRIPT= yes
|
2003-07-22 09:58:59 -04:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-gslib
|
|
|
|
.endif
|
|
|
|
|
2001-06-05 07:38:35 -04:00
|
|
|
.if defined(WITHOUT_X11)
|
2003-07-22 09:58:59 -04:00
|
|
|
PKGNAMESUFFIX+= -nox11
|
2002-09-05 04:01:39 -04:00
|
|
|
CONFIGURE_ARGS+= --without-x --without-mpeg2
|
2003-07-22 09:58:59 -04:00
|
|
|
PLIST_SUB+= X11='@comment '
|
|
|
|
.else
|
2003-10-05 07:21:58 -04:00
|
|
|
CONFLICTS+= display
|
2003-07-22 09:58:59 -04:00
|
|
|
CONFIGURE_ARGS+= --with-x
|
|
|
|
USE_XLIB= yes
|
|
|
|
MAN1+= animate.1 display.1 import.1
|
|
|
|
PLIST_SUB+= X11=''
|
2003-08-16 10:56:26 -04:00
|
|
|
.if !defined(WITHOUT_IMAGEMAGICK_MPEG2)
|
2004-06-12 10:52:07 -04:00
|
|
|
RUN_DEPENDS+= mpeg2encode:${PORTSDIR}/multimedia/mpeg2codec
|
2003-07-22 09:58:59 -04:00
|
|
|
.endif
|
2001-03-07 20:06:35 -05:00
|
|
|
.endif
|
|
|
|
|
2002-03-06 21:40:05 -05:00
|
|
|
.if defined(NOPORTDOCS)
|
|
|
|
INSTALL_TARGET= install
|
|
|
|
.else
|
|
|
|
INSTALL_TARGET= install install-data-html
|
|
|
|
.endif
|
|
|
|
|
2002-06-24 11:17:16 -04:00
|
|
|
post-patch:
|
2004-02-17 15:25:11 -05:00
|
|
|
# remove the autogenerated Magick.c so it will be regenerated from
|
|
|
|
# Magick.xs on _this_ system:
|
|
|
|
@${RM} -f ${WRKSRC}/PerlMagick/Magick.c
|
2004-12-17 13:27:58 -05:00
|
|
|
@${PERL} -pi -e 's|^tagnames=|#tagnames=|g ; \
|
2002-08-31 12:53:12 -04:00
|
|
|
s|lcms/lcms.h|lcms.h|g ; \
|
2003-10-05 07:21:58 -04:00
|
|
|
s|lcms_lcms_h|lcms_h|g' ${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
|
2002-10-29 18:05:45 -05:00
|
|
|
# version neither libraries nor directories
|
2002-10-17 14:46:12 -04:00
|
|
|
@${FIND} ${WRKSRC} -name "Makefile.in" | ${XARGS} ${PERL} -pi -e \
|
2002-08-31 12:53:12 -04:00
|
|
|
's|pkgdocdir =.*$$|pkgdocdir = ${DOCSDIR}/|g ; \
|
2002-10-29 18:05:45 -05:00
|
|
|
s|-\$$\(VERSION\)||; \
|
2002-03-06 21:40:05 -05:00
|
|
|
s| install-data-html||g'
|
2002-10-29 18:05:45 -05:00
|
|
|
# do not version lib directories
|
|
|
|
@${PERL} -pi -e 's|^(MagickLibSubdir).*$$|\1="ImageMagick"|' \
|
|
|
|
${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
|
2002-10-17 14:46:12 -04:00
|
|
|
@${PERL} -pi -e 's|lcms/lcms.h|lcms.h|g' ${WRKSRC}/magick/transform.c
|
|
|
|
@${PERL} -pi -e 's|<malloc.h>|<stdlib.h>|g' ${WRKSRC}/ltdl/ltdl.c
|
|
|
|
@${PERL} -pi -e 's|timestamp: %ld|timestamp: %d|g' \
|
2002-03-02 20:10:06 -05:00
|
|
|
${WRKSRC}/magick/xwindow.c
|
2001-03-06 12:19:53 -05:00
|
|
|
|
2004-05-31 17:24:33 -04:00
|
|
|
post-install:
|
|
|
|
.if defined(WITHOUT_IMAGEMAGICK_16BIT_PIXEL)
|
|
|
|
@${TOUCH} ${PREFIX}/lib/ImageMagick/modules-Q8/coders/.keep
|
|
|
|
@${TOUCH} ${PREFIX}/lib/ImageMagick/modules-Q8/filters/.keep
|
|
|
|
.else
|
|
|
|
@${TOUCH} ${PREFIX}/lib/ImageMagick/modules-Q16/coders/.keep
|
|
|
|
@${TOUCH} ${PREFIX}/lib/ImageMagick/modules-Q16/filters/.keep
|
|
|
|
.endif
|
|
|
|
|
1995-02-27 16:43:12 -05:00
|
|
|
.include <bsd.port.mk>
|