1995-02-27 22:43:12 +01:00
|
|
|
# New ports collection makefile for: ImageMagick
|
|
|
|
# Date created: 15 November 1994
|
|
|
|
# Whom: torstenb
|
|
|
|
#
|
1999-08-25 08:16:32 +02:00
|
|
|
# $FreeBSD$
|
1995-02-27 22:43:12 +01:00
|
|
|
#
|
|
|
|
|
2000-04-13 08:28:28 +02:00
|
|
|
PORTNAME= ImageMagick
|
2011-07-08 14:51:57 +02:00
|
|
|
DISTVERSION= 6.7.0-10
|
1998-08-21 14:00:41 +02:00
|
|
|
CATEGORIES= graphics perl5
|
2006-05-24 16:20:33 +02:00
|
|
|
MASTER_SITES= ftp://ftp.imagemagick.org/pub/ImageMagick/ \
|
|
|
|
ftp://ftp.nluug.nl/pub/ImageMagick/ \
|
2010-06-04 10:09:20 +02:00
|
|
|
ftp://gd.tuwien.ac.at/pub/graphics/ImageMagick/
|
2009-08-22 02:23:13 +02:00
|
|
|
|
2008-04-30 16:47:05 +02:00
|
|
|
MAINTAINER= mm@FreeBSD.org
|
2003-10-05 13:21:58 +02:00
|
|
|
COMMENT= Image processing tools
|
1996-11-06 08:53:24 +01:00
|
|
|
|
2010-06-04 10:09:20 +02:00
|
|
|
USE_XZ= yes
|
2000-07-19 15:08:38 +02:00
|
|
|
USE_PERL5= yes
|
2003-10-05 13:21:58 +02:00
|
|
|
USE_GNOME= gnomehack gnometarget pkgconfig
|
2010-12-04 08:34:27 +01:00
|
|
|
USE_AUTOTOOLS= libltdl
|
2008-04-19 17:01:02 +02:00
|
|
|
# For some reason, using our libtool breaks the build into pieces:
|
2010-12-04 08:34:27 +01:00
|
|
|
#USE_AUTOTOOLS+= libtool
|
2006-02-23 11:40:44 +01:00
|
|
|
GNU_CONFIGURE= yes
|
2001-12-08 20:57:27 +01:00
|
|
|
CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
|
2007-07-23 11:36:51 +02:00
|
|
|
CONFIGURE_ARGS= --enable-shared --without-dps
|
2010-05-21 17:01:19 +02:00
|
|
|
USE_GMAKE= yes
|
2009-03-23 13:25:33 +01:00
|
|
|
MAKE_JOBS_SAFE= yes
|
2006-09-04 20:36:59 +02:00
|
|
|
USE_LDCONFIG= yes
|
2001-01-25 12:05:14 +01:00
|
|
|
|
2004-05-19 21:48:16 +02:00
|
|
|
MAN1= ImageMagick.1 Magick++-config.1 Magick-config.1 Wand-config.1 \
|
2006-05-26 03:41:08 +02:00
|
|
|
animate.1 conjure.1 compare.1 composite.1 convert.1 display.1 \
|
2008-04-21 04:46:58 +02:00
|
|
|
MagickCore-config.1 MagickWand-config.1 \
|
2006-07-26 17:44:03 +02:00
|
|
|
identify.1 import.1 mogrify.1 montage.1 stream.1
|
2001-03-13 23:36:26 +01:00
|
|
|
|
2001-12-08 20:57:27 +01:00
|
|
|
CPPFLAGS= -I${LOCALBASE}/include
|
|
|
|
LDFLAGS= -L${LOCALBASE}/lib
|
|
|
|
|
2011-01-22 00:51:11 +01:00
|
|
|
PLIST_SUB= PORTVERSION=${PORTVERSION:R}
|
2004-06-06 17:22:29 +02:00
|
|
|
|
2010-11-22 14:47:12 +01:00
|
|
|
OPTIONS=\
|
|
|
|
IMAGEMAGICK_16BIT_PIXEL "16bit pixel support" on \
|
|
|
|
IMAGEMAGICK_BZLIB "Bzlib support" on \
|
|
|
|
IMAGEMAGICK_DJVU "DJVU format support (needs threads)" off \
|
|
|
|
IMAGEMAGICK_DOT "GraphViz dot graphs support" off \
|
|
|
|
IMAGEMAGICK_FFTW "Discrete Fourier Transform support" on \
|
|
|
|
IMAGEMAGICK_FONTCONFIG "Fontconfig support" on \
|
|
|
|
IMAGEMAGICK_FPX "FPX format support" on \
|
|
|
|
IMAGEMAGICK_GSLIB "libgs (Postscript SHLIB) support" off \
|
|
|
|
IMAGEMAGICK_JBIG "JBIG format support" on \
|
|
|
|
IMAGEMAGICK_JPEG "JPG format support" on \
|
|
|
|
IMAGEMAGICK_JPEG2000 "JPEG2000 format support" on \
|
|
|
|
IMAGEMAGICK_LCMS "LCMS support" on \
|
2011-03-09 14:58:31 +01:00
|
|
|
IMAGEMAGICK_LZMA "LZMA support" on \
|
2010-11-22 14:47:12 +01:00
|
|
|
IMAGEMAGICK_LQR "Liquid Rescale support" on \
|
|
|
|
IMAGEMAGICK_MODULES "Modules support" on \
|
|
|
|
IMAGEMAGICK_OPENEXR "OpenEXR support (needs threads)" off \
|
|
|
|
IMAGEMAGICK_OPENMP "OpenMP for SMP (needs threads)" off \
|
|
|
|
IMAGEMAGICK_PDF "PDF format support" on \
|
|
|
|
IMAGEMAGICK_PERL "Perl support" on \
|
|
|
|
IMAGEMAGICK_PNG "PNG format support" on \
|
2011-03-10 23:47:17 +01:00
|
|
|
IMAGEMAGICK_SVG "SVG format support (requires X11)" on \
|
2010-11-22 14:47:12 +01:00
|
|
|
IMAGEMAGICK_TESTS "Run bundled self-tests after build" on \
|
|
|
|
IMAGEMAGICK_TIFF "TIFF format support" on \
|
|
|
|
IMAGEMAGICK_TTF "Freetype support" on \
|
|
|
|
IMAGEMAGICK_WMF "WMF format support" off \
|
|
|
|
THREADS "Threads support" off \
|
|
|
|
X11 "X11 support" on
|
2006-11-28 19:30:40 +01:00
|
|
|
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2010-10-16 17:26:51 +02:00
|
|
|
.if !defined(WITHOUT_IMAGEMAGICK_PDF) && defined(WITH_GHOSTSCRIPT_VER) && ${WITH_GHOSTSCRIPT_VER} == "7"
|
2009-03-05 11:27:35 +01:00
|
|
|
IGNORE= support for the PDF format requires ghostscript 8 and higher
|
2007-04-03 01:01:25 +02:00
|
|
|
.endif
|
|
|
|
|
2010-03-28 23:40:05 +02:00
|
|
|
#.if defined(WITH_IMAGEMAGICK_HDRI)
|
|
|
|
#BROKEN= hdri support broken, disable in options
|
|
|
|
#CONFIGURE_ARGS+= --enable-hdri
|
|
|
|
#.else
|
2007-11-07 06:46:29 +01:00
|
|
|
CONFIGURE_ARGS+= --disable-hdri
|
2010-03-28 23:40:05 +02:00
|
|
|
#.endif
|
2007-11-07 06:46:29 +01:00
|
|
|
|
2010-11-22 14:47:12 +01:00
|
|
|
.if defined(WITH_THREADS)
|
|
|
|
_IMAGEMAGICK_THREADS=yes
|
|
|
|
_IMAGEMAGICK_THREADS_MSG=with threads
|
2011-01-22 00:51:11 +01:00
|
|
|
PERL_THREADED!= ${SH} -c 'case `perl --version` in *freebsd-thread*) ${ECHO_CMD} yes ;; esac'
|
2008-05-23 13:45:52 +02:00
|
|
|
.else
|
2010-11-22 14:47:12 +01:00
|
|
|
_IMAGEMAGICK_THREADS=no
|
|
|
|
_IMAGEMAGICK_THREADS_MSG=without threads
|
|
|
|
_IMAGEMAGICK_THREADS_IGNORE_MSG=. Define WITH_THREADS
|
2008-05-23 13:45:52 +02:00
|
|
|
.endif
|
|
|
|
|
2010-11-22 14:47:12 +01:00
|
|
|
.if defined(WITH_IMAGEMAGICK_PERL)
|
2003-07-22 15:58:59 +02:00
|
|
|
CONFIGURE_ARGS+= --with-perl=${PERL5}
|
2003-10-04 18:36:09 +02:00
|
|
|
PLIST_SUB+= WITH_PERL=''
|
|
|
|
MAN3= Image::Magick.3
|
2007-08-04 13:41:30 +02:00
|
|
|
MAN3PREFIX= ${PREFIX}/lib/perl5/${PERL_VERSION}
|
2010-11-22 14:47:12 +01:00
|
|
|
# PerlMagick not works with threads, if perl is not threaded, and vice versa
|
2010-11-24 01:40:22 +01:00
|
|
|
. if defined(PERL_THREADED)
|
2010-11-22 14:47:12 +01:00
|
|
|
_IMAGEMAGICK_THREADS_PERL_MSG=Perl is threaded
|
|
|
|
_IMAGEMAGICK_THREADS=yes
|
|
|
|
. else
|
|
|
|
_IMAGEMAGICK_THREADS_PERL_MSG=Perl is non-threaded
|
|
|
|
_IMAGEMAGICK_THREADS_IGNORE_MSG=. ${_IMAGEMAGICK_THREADS_PERL_MSG}. Reinstall Perl with threads or undefine WITH_IMAGEMAGICK_PERL
|
|
|
|
. if ${_IMAGEMAGICK_THREADS} == "yes"
|
|
|
|
IGNORE=${_IMAGEMAGICK_THREADS_IGNORE_MSG} or undefine WITH_THREADS
|
|
|
|
. endif
|
|
|
|
_IMAGEMAGICK_THREADS=no
|
|
|
|
. endif
|
2003-07-22 15:58:59 +02:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-perl
|
2003-10-04 18:36:09 +02:00
|
|
|
PLIST_SUB+= WITH_PERL='@comment '
|
2003-07-22 15:58:59 +02:00
|
|
|
.endif
|
|
|
|
|
2010-11-22 14:47:12 +01:00
|
|
|
.if ${_IMAGEMAGICK_THREADS} == "yes"
|
2001-01-25 12:05:14 +01:00
|
|
|
CONFIGURE_ARGS+= --with-threads
|
2010-11-22 14:47:12 +01:00
|
|
|
CONFIGURE_ENV+= PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \
|
|
|
|
PTHREAD_LIBS="${PTHREAD_LIBS}"
|
2006-04-15 04:37:50 +02:00
|
|
|
LDFLAGS+= ${PTHREAD_LIBS}
|
2001-03-06 18:19:53 +01:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-threads
|
2010-11-22 14:47:12 +01:00
|
|
|
_IMAGEMAGICK_THREADS=no
|
Explicitly disable support for OpenEXR and DjVu by default. These were
never dependencies before, so official packages never contained the
support, but if a local system had them installed, ImageMagick would try
to use them -- and sometimes fail.
Also add a patch, that modifies the module-searching algorithm from
/always/ checking the compiled-in constant path, to only checking it, if
an environment variable is not set. This fixes a problem with testing,
where a module installed by an earlier version of the software could be
used by the newly built version, that's being tested.
This port has too many options -- perhaps, support for the most common
things (like PNG, JPEG, and GIF) should be permanent...
2007-10-05 07:32:09 +02:00
|
|
|
.endif
|
2010-11-22 14:47:12 +01:00
|
|
|
|
|
|
|
# OpenMP
|
|
|
|
.if defined(WITH_IMAGEMAGICK_OPENMP)
|
|
|
|
. if ${_IMAGEMAGICK_THREADS} == "no"
|
|
|
|
IGNORE=OpenMP requires threads${_IMAGEMAGICK_THREADS_IGNORE_MSG}
|
|
|
|
. else
|
|
|
|
CONFIGURE_ARGS+= --enable-openmp
|
|
|
|
. endif
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --disable-openmp
|
2001-01-24 00:00:25 +01:00
|
|
|
.endif
|
2000-04-24 19:58:37 +02:00
|
|
|
|
2001-08-08 22:02:49 +02:00
|
|
|
# Faster, but poor quality
|
|
|
|
.if defined(WITHOUT_IMAGEMAGICK_16BIT_PIXEL)
|
2002-09-19 23:11:48 +02:00
|
|
|
CONFIGURE_ARGS+= --with-quantum-depth=8
|
2004-06-12 16:52:07 +02:00
|
|
|
PLIST_SUB+= QBIT='Q8'
|
2003-10-04 18:36:09 +02:00
|
|
|
.else
|
2004-06-12 16:52:07 +02:00
|
|
|
PLIST_SUB+= QBIT='Q16'
|
2001-01-11 06:19:46 +01:00
|
|
|
.endif
|
|
|
|
|
2004-03-15 03:54:00 +01:00
|
|
|
.if defined(WITH_WINDOWS_FONT_DIR)
|
|
|
|
CONFIGURE_ARGS+= --with-windows-font-dir=${WITH_WINDOWS_FONT_DIR}
|
|
|
|
.endif
|
|
|
|
|
2001-08-09 03:22:17 +02:00
|
|
|
# Loadable coders, smaller executable, but PerlMagick not really works
|
|
|
|
# ('make test' there works)
|
|
|
|
.if defined(WITH_IMAGEMAGICK_MODULES)
|
2001-03-13 23:36:26 +01:00
|
|
|
CONFIGURE_ARGS+= --with-modules
|
2003-07-22 15:58:59 +02:00
|
|
|
PLIST_SUB+= MODULES=''
|
|
|
|
.else
|
2006-07-26 17:44:03 +02:00
|
|
|
CONFIGURE_ARGS+= --without-modules
|
2003-07-22 15:58:59 +02:00
|
|
|
PLIST_SUB+= MODULES='@comment '
|
|
|
|
.endif
|
|
|
|
|
2010-11-22 14:47:12 +01:00
|
|
|
.if defined(WITH_IMAGEMAGICK_OPENEXR)
|
|
|
|
. if ${_IMAGEMAGICK_THREADS} == "no"
|
|
|
|
IGNORE=OpenEXR requires threads. ${_IMAGEMAGICK_THREADS_IGNORE_MSG}
|
|
|
|
. else
|
Explicitly disable support for OpenEXR and DjVu by default. These were
never dependencies before, so official packages never contained the
support, but if a local system had them installed, ImageMagick would try
to use them -- and sometimes fail.
Also add a patch, that modifies the module-searching algorithm from
/always/ checking the compiled-in constant path, to only checking it, if
an environment variable is not set. This fixes a problem with testing,
where a module installed by an earlier version of the software could be
used by the newly built version, that's being tested.
This port has too many options -- perhaps, support for the most common
things (like PNG, JPEG, and GIF) should be permanent...
2007-10-05 07:32:09 +02:00
|
|
|
LIB_DEPENDS+= IlmImf:${PORTSDIR}/graphics/OpenEXR
|
|
|
|
PLIST_SUB+= OPENEXR=""
|
2010-11-22 14:47:12 +01:00
|
|
|
. endif
|
Explicitly disable support for OpenEXR and DjVu by default. These were
never dependencies before, so official packages never contained the
support, but if a local system had them installed, ImageMagick would try
to use them -- and sometimes fail.
Also add a patch, that modifies the module-searching algorithm from
/always/ checking the compiled-in constant path, to only checking it, if
an environment variable is not set. This fixes a problem with testing,
where a module installed by an earlier version of the software could be
used by the newly built version, that's being tested.
This port has too many options -- perhaps, support for the most common
things (like PNG, JPEG, and GIF) should be permanent...
2007-10-05 07:32:09 +02:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-openexr
|
|
|
|
PLIST_SUB+= OPENEXR="@comment "
|
|
|
|
.endif
|
|
|
|
|
2010-11-22 14:47:12 +01:00
|
|
|
.if defined(WITH_IMAGEMAGICK_DJVU)
|
|
|
|
. if ${_IMAGEMAGICK_THREADS} == "no"
|
|
|
|
IGNORE=DjVu requires threads${_IMAGEMAGICK_THREADS_IGNORE_MSG}
|
|
|
|
. else
|
|
|
|
. if defined(WITHOUT_X11)
|
Explicitly disable support for OpenEXR and DjVu by default. These were
never dependencies before, so official packages never contained the
support, but if a local system had them installed, ImageMagick would try
to use them -- and sometimes fail.
Also add a patch, that modifies the module-searching algorithm from
/always/ checking the compiled-in constant path, to only checking it, if
an environment variable is not set. This fixes a problem with testing,
where a module installed by an earlier version of the software could be
used by the newly built version, that's being tested.
This port has too many options -- perhaps, support for the most common
things (like PNG, JPEG, and GIF) should be permanent...
2007-10-05 07:32:09 +02:00
|
|
|
LIB_DEPENDS+= djvulibre:${PORTSDIR}/graphics/djvulibre-nox11
|
2010-11-22 14:47:12 +01:00
|
|
|
. else
|
|
|
|
LIB_DEPENDS+= djvulibre:${PORTSDIR}/graphics/djvulibre
|
|
|
|
. endif
|
Explicitly disable support for OpenEXR and DjVu by default. These were
never dependencies before, so official packages never contained the
support, but if a local system had them installed, ImageMagick would try
to use them -- and sometimes fail.
Also add a patch, that modifies the module-searching algorithm from
/always/ checking the compiled-in constant path, to only checking it, if
an environment variable is not set. This fixes a problem with testing,
where a module installed by an earlier version of the software could be
used by the newly built version, that's being tested.
This port has too many options -- perhaps, support for the most common
things (like PNG, JPEG, and GIF) should be permanent...
2007-10-05 07:32:09 +02:00
|
|
|
PLIST_SUB+= DJVU=""
|
2010-11-22 14:47:12 +01:00
|
|
|
. endif
|
Explicitly disable support for OpenEXR and DjVu by default. These were
never dependencies before, so official packages never contained the
support, but if a local system had them installed, ImageMagick would try
to use them -- and sometimes fail.
Also add a patch, that modifies the module-searching algorithm from
/always/ checking the compiled-in constant path, to only checking it, if
an environment variable is not set. This fixes a problem with testing,
where a module installed by an earlier version of the software could be
used by the newly built version, that's being tested.
This port has too many options -- perhaps, support for the most common
things (like PNG, JPEG, and GIF) should be permanent...
2007-10-05 07:32:09 +02:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-djvu
|
|
|
|
PLIST_SUB+= DJVU="@comment "
|
|
|
|
.endif
|
|
|
|
|
2003-08-16 16:56:26 +02:00
|
|
|
.if !defined(WITHOUT_IMAGEMAGICK_JPEG)
|
2007-09-25 21:41:11 +02:00
|
|
|
LIB_DEPENDS+= jpeg:${PORTSDIR}/graphics/jpeg
|
2006-05-26 03:41:08 +02:00
|
|
|
PLIST_SUB+= JPEG=""
|
2003-08-16 16:56:26 +02:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-jpeg
|
2006-05-26 03:41:08 +02:00
|
|
|
PLIST_SUB+= JPEG="@comment "
|
2003-07-22 15:58:59 +02:00
|
|
|
.endif
|
|
|
|
|
2003-08-16 16:56:26 +02:00
|
|
|
.if !defined(WITHOUT_IMAGEMAGICK_PNG)
|
2007-09-25 21:41:11 +02:00
|
|
|
LIB_DEPENDS+= png:${PORTSDIR}/graphics/png
|
2006-05-26 03:41:08 +02:00
|
|
|
PLIST_SUB+= PNG=""
|
2003-07-22 15:58:59 +02:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-png
|
2006-05-26 03:41:08 +02:00
|
|
|
PLIST_SUB+= PNG="@comment "
|
2003-07-22 15:58:59 +02:00
|
|
|
.endif
|
|
|
|
|
2003-08-16 16:56:26 +02:00
|
|
|
.if !defined(WITHOUT_IMAGEMAGICK_TIFF)
|
2007-09-25 21:41:11 +02:00
|
|
|
LIB_DEPENDS+= tiff:${PORTSDIR}/graphics/tiff
|
2006-05-26 03:41:08 +02:00
|
|
|
PLIST_SUB+= TIFF=""
|
2001-03-13 23:36:26 +01:00
|
|
|
.else
|
2003-07-22 15:58:59 +02:00
|
|
|
CONFIGURE_ARGS+= --without-tiff
|
2006-05-26 03:41:08 +02:00
|
|
|
PLIST_SUB+= TIFF="@comment "
|
2001-03-13 23:36:26 +01:00
|
|
|
.endif
|
2000-03-10 00:36:52 +01:00
|
|
|
|
2007-02-23 04:48:43 +01:00
|
|
|
.if defined(WITH_IMAGEMAGICK_GSLIB)
|
|
|
|
CONFIGURE_ARGS+= --with-gslib
|
|
|
|
USE_GHOSTSCRIPT= yes
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-gslib
|
|
|
|
.endif
|
|
|
|
|
2009-06-01 23:27:13 +02:00
|
|
|
.if !defined(WITHOUT_IMAGEMAGICK_LQR)
|
|
|
|
CONFIGURE_ARGS+= --with-lqr
|
|
|
|
LIB_DEPENDS+= lqr-1.3:${PORTSDIR}/graphics/liblqr-1
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-lqr
|
|
|
|
.endif
|
|
|
|
|
2010-05-12 17:07:14 +02:00
|
|
|
.if !defined(WITHOUT_IMAGEMAGICK_FFTW)
|
2010-10-16 17:26:51 +02:00
|
|
|
CONFIGURE_ARGS+= --with-fftw
|
|
|
|
LIB_DEPENDS+= fftw3.5:${PORTSDIR}/math/fftw3
|
2010-05-12 17:07:14 +02:00
|
|
|
.else
|
2010-10-16 17:26:51 +02:00
|
|
|
CONFIGURE_ARGS+= --without-fftw
|
2010-05-12 17:07:14 +02:00
|
|
|
.endif
|
|
|
|
|
2003-07-22 15:58:59 +02:00
|
|
|
# Produce BZip compressed MIFF images
|
2003-08-16 16:56:26 +02:00
|
|
|
.if defined(WITHOUT_IMAGEMAGICK_BZLIB)
|
2003-07-22 15:58:59 +02:00
|
|
|
CONFIGURE_ARGS+= --without-bzlib
|
|
|
|
.endif
|
|
|
|
|
|
|
|
# FPX (FlashPIX) images
|
2003-08-16 16:56:26 +02:00
|
|
|
.if !defined(WITHOUT_IMAGEMAGICK_FPX)
|
2007-11-07 06:46:29 +01:00
|
|
|
LIB_DEPENDS+= fpx.[2-9]:${PORTSDIR}/graphics/libfpx
|
2005-02-17 16:39:00 +01:00
|
|
|
CONFIGURE_ARGS+= --with-fpx
|
2006-05-26 03:41:08 +02:00
|
|
|
PLIST_SUB+= FPX=""
|
|
|
|
.else
|
2007-09-25 21:41:11 +02:00
|
|
|
CONFIGURE_ARGS+= --without-fpx
|
2006-05-26 03:41:08 +02:00
|
|
|
PLIST_SUB+= FPX="@comment "
|
2003-07-22 15:58:59 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
# JBIG images (lossless compression for bi-level images)
|
2003-08-16 16:56:26 +02:00
|
|
|
.if !defined(WITHOUT_IMAGEMAGICK_JBIG)
|
2007-09-25 21:41:11 +02:00
|
|
|
LIB_DEPENDS+= jbig:${PORTSDIR}/graphics/jbigkit
|
2006-05-26 03:41:08 +02:00
|
|
|
PLIST_SUB+= JBIG=""
|
2003-07-22 15:58:59 +02:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-jbig
|
2006-05-26 03:41:08 +02:00
|
|
|
PLIST_SUB+= JBIG="@comment "
|
2003-07-22 15:58:59 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
# JPEG2000 images (wavelet-based lossy compression)
|
2003-08-16 16:56:26 +02:00
|
|
|
.if !defined(WITHOUT_IMAGEMAGICK_JPEG2000)
|
2007-09-25 21:41:11 +02:00
|
|
|
LIB_DEPENDS+= jasper:${PORTSDIR}/graphics/jasper
|
2006-05-26 03:41:08 +02:00
|
|
|
PLIST_SUB+= JPEG2000=""
|
2003-07-22 15:58:59 +02:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-jp2
|
2006-05-26 03:41:08 +02:00
|
|
|
PLIST_SUB+= JPEG2000="@comment "
|
2003-07-22 15:58:59 +02:00
|
|
|
.endif
|
|
|
|
|
2004-05-22 14:09:47 +02:00
|
|
|
# GraphViz dot graphs
|
|
|
|
.if defined(WITH_IMAGEMAGICK_DOT)
|
2007-08-07 18:38:36 +02:00
|
|
|
LIB_DEPENDS+= gvc:${PORTSDIR}/graphics/graphviz
|
2007-03-29 22:57:15 +02:00
|
|
|
CFLAGS+= -I${LOCALBASE}/include/graphviz
|
|
|
|
LDFLAGS+= -L${LOCALBASE}/lib/graphviz
|
2004-05-22 14:09:47 +02:00
|
|
|
.else
|
2008-04-29 17:07:50 +02:00
|
|
|
CONFIGURE_ARGS+= --without-gvc
|
2004-05-22 14:09:47 +02:00
|
|
|
.endif
|
|
|
|
|
2011-03-09 14:58:31 +01:00
|
|
|
# LZMA support
|
|
|
|
.if !defined(WITHOUT_LZMA)
|
|
|
|
. if (${OSVERSION} >= 900000 && ${OSVERSION} < 900012) || (${OSVERSION} < 800505)
|
2011-03-17 22:12:46 +01:00
|
|
|
LIB_DEPENDS+= lzma:${PORTSDIR}/archivers/xz
|
2011-03-09 14:58:31 +01:00
|
|
|
. endif
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-lzma
|
|
|
|
.endif
|
|
|
|
|
2003-07-22 15:58:59 +02:00
|
|
|
# LCMS (Little CMS) color management
|
2003-08-16 16:56:26 +02:00
|
|
|
.if !defined(WITHOUT_IMAGEMAGICK_LCMS)
|
2007-09-25 21:41:11 +02:00
|
|
|
LIB_DEPENDS+= lcms:${PORTSDIR}/graphics/lcms
|
2003-07-22 15:58:59 +02:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-lcms
|
|
|
|
.endif
|
|
|
|
|
2006-05-26 03:41:08 +02:00
|
|
|
# Freetype (TrueType Font) support
|
2003-08-16 16:56:26 +02:00
|
|
|
.if !defined(WITHOUT_IMAGEMAGICK_TTF)
|
2007-09-25 21:41:11 +02:00
|
|
|
LIB_DEPENDS+= freetype:${PORTSDIR}/print/freetype2
|
2004-01-20 17:30:09 +01:00
|
|
|
USE_GHOSTSCRIPT= yes
|
2006-05-26 03:41:08 +02:00
|
|
|
CONFIGURE_ARGS+= --with-freetype
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-freetype
|
|
|
|
.endif
|
|
|
|
|
|
|
|
# Fontconfig support
|
|
|
|
.if !defined(WITHOUT_IMAGEMAGICK_FONTCONFIG)
|
2007-09-25 21:41:11 +02:00
|
|
|
LIB_DEPENDS+= fontconfig:${PORTSDIR}/x11-fonts/fontconfig
|
2006-05-26 03:41:08 +02:00
|
|
|
CONFIGURE_ARGS+= --with-fontconfig
|
- Remove unneeded dependency from gtk12/gtk20 [1]
- Remove USE_XLIB/USE_X_PREFIX/USE_XPM in favor of USE_XORG
- Remove X11BASE support in favor of LOCALBASE or PREFIX
- Use USE_LDCONFIG instead of INSTALLS_SHLIB
- Remove unneeded USE_GCC 3.4+
Thanks to all Helpers:
Dmitry Marakasov, Chess Griffin, beech@, dinoex, rafan, gahr,
ehaupt, nox, itetcu, flz, pav
PR: 116263
Tested on: pointyhat
Approved by: portmgr (pav)
2008-04-19 19:56:05 +02:00
|
|
|
CONFIGURE_ENV+= FONTCONFIG_CFLAGS="-I${LOCALBASE}/include" \
|
|
|
|
FONTCONFIG_LIBS="-L${LOCALBASE}/lib"
|
|
|
|
MAKE_ENV+= FONTCONFIG_CFLAGS="-I${LOCALBASE}/include"
|
2003-07-22 15:58:59 +02:00
|
|
|
.else
|
2006-05-26 03:41:08 +02:00
|
|
|
CONFIGURE_ARGS+= --without-fontconfig
|
2003-07-22 15:58:59 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
# WMF (Windows Meta File) images
|
2005-03-06 23:16:12 +01:00
|
|
|
.if defined(WITH_IMAGEMAGICK_WMF)
|
2007-09-25 21:41:11 +02:00
|
|
|
LIB_DEPENDS+= wmf:${PORTSDIR}/graphics/libwmf
|
2005-03-06 23:16:12 +01:00
|
|
|
CONFIGURE_ARGS+= --with-wmf=yes
|
2011-01-10 10:08:07 +01:00
|
|
|
CFLAGS+= -I${LOCALBASE}/include/freetype2
|
2008-12-31 15:02:35 +01:00
|
|
|
PLIST_SUB+= WMF=""
|
2003-07-22 15:58:59 +02:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-wmf
|
2008-12-31 15:02:35 +01:00
|
|
|
PLIST_SUB+= WMF="@comment "
|
2003-07-22 15:58:59 +02:00
|
|
|
.endif
|
|
|
|
|
2011-01-22 00:51:11 +01:00
|
|
|
# SVG (Scalable Vector Graphics) requires both libxml2 and X11
|
2011-03-09 14:58:31 +01:00
|
|
|
.if defined(WITH_IMAGEMAGICK_SVG) && !defined(WITHOUT_X11)
|
2011-01-22 00:51:11 +01:00
|
|
|
USE_GNOME+= libxml2
|
2007-09-25 21:41:11 +02:00
|
|
|
LIB_DEPENDS+= rsvg-2:${PORTSDIR}/graphics/librsvg2
|
2011-01-22 00:51:11 +01:00
|
|
|
CONFIGURE_ARGS+= --with-rsvg --with-xml
|
- Remove unneeded dependency from gtk12/gtk20 [1]
- Remove USE_XLIB/USE_X_PREFIX/USE_XPM in favor of USE_XORG
- Remove X11BASE support in favor of LOCALBASE or PREFIX
- Use USE_LDCONFIG instead of INSTALLS_SHLIB
- Remove unneeded USE_GCC 3.4+
Thanks to all Helpers:
Dmitry Marakasov, Chess Griffin, beech@, dinoex, rafan, gahr,
ehaupt, nox, itetcu, flz, pav
PR: 116263
Tested on: pointyhat
Approved by: portmgr (pav)
2008-04-19 19:56:05 +02:00
|
|
|
CONFIGURE_ENV+= RSVG_CFLAGS="-I${LOCALBASE}/include/librsvg-2" \
|
|
|
|
RSVG_LIBS="-L${LOCALBASE}/lib"
|
2006-05-26 03:41:08 +02:00
|
|
|
.else
|
2011-01-22 00:51:11 +01:00
|
|
|
CONFIGURE_ARGS+= --without-rsvg --without-xml
|
2003-07-22 15:58:59 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
# PDF (Adobe Portable Document Format) support
|
2007-04-03 01:01:25 +02:00
|
|
|
.if !defined(WITHOUT_IMAGEMAGICK_PDF)
|
2004-01-20 17:30:09 +01:00
|
|
|
USE_GHOSTSCRIPT= yes
|
2003-07-22 15:58:59 +02:00
|
|
|
.endif
|
|
|
|
|
2001-06-05 13:38:35 +02:00
|
|
|
.if defined(WITHOUT_X11)
|
2003-07-22 15:58:59 +02:00
|
|
|
PKGNAMESUFFIX+= -nox11
|
2008-04-29 17:07:50 +02:00
|
|
|
CONFIGURE_ARGS+= --without-x
|
2003-07-22 15:58:59 +02:00
|
|
|
PLIST_SUB+= X11='@comment '
|
|
|
|
.else
|
2006-09-04 20:36:59 +02:00
|
|
|
CONFLICTS+= display-[0-9]*
|
2003-07-22 15:58:59 +02:00
|
|
|
CONFIGURE_ARGS+= --with-x
|
2007-09-23 13:31:36 +02:00
|
|
|
USE_XORG= xext xt
|
2003-07-22 15:58:59 +02:00
|
|
|
PLIST_SUB+= X11=''
|
2001-03-08 02:06:35 +01:00
|
|
|
.endif
|
|
|
|
|
2008-01-19 00:26:55 +01:00
|
|
|
.if ${ARCH} == sparc64 && ${OSVERSION} < 700000
|
|
|
|
USE_GCC= 4.2+
|
|
|
|
.endif
|
|
|
|
|
2002-03-07 03:40:05 +01:00
|
|
|
.if defined(NOPORTDOCS)
|
|
|
|
INSTALL_TARGET= install
|
|
|
|
.else
|
|
|
|
INSTALL_TARGET= install install-data-html
|
|
|
|
.endif
|
|
|
|
|
2009-03-18 05:57:45 +01:00
|
|
|
.if ${ARCH} == sparc64
|
|
|
|
WITHOUT_IMAGEMAGICK_TESTS=yes
|
|
|
|
.endif
|
|
|
|
|
2002-06-24 17:17:16 +02:00
|
|
|
post-patch:
|
2007-10-28 21:38:40 +01:00
|
|
|
# prevent perllocal.pod from being written
|
2010-03-28 23:40:05 +02:00
|
|
|
@${REINPLACE_CMD} -e '/PERL/s|install && \\$$|pure_install \&\& \\|' ${WRKSRC}/Makefile.in
|
2004-02-17 21:25:11 +01: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 19:27:58 +01:00
|
|
|
@${PERL} -pi -e 's|^tagnames=|#tagnames=|g ; \
|
2002-08-31 18:53:12 +02:00
|
|
|
s|lcms/lcms.h|lcms.h|g ; \
|
2003-10-05 13:21:58 +02:00
|
|
|
s|lcms_lcms_h|lcms_h|g' ${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
|
2002-10-30 00:05:45 +01:00
|
|
|
# version neither libraries nor directories
|
2002-10-17 20:46:12 +02:00
|
|
|
@${FIND} ${WRKSRC} -name "Makefile.in" | ${XARGS} ${PERL} -pi -e \
|
2002-08-31 18:53:12 +02:00
|
|
|
's|pkgdocdir =.*$$|pkgdocdir = ${DOCSDIR}/|g ; \
|
2002-10-30 00:05:45 +01:00
|
|
|
s|-\$$\(VERSION\)||; \
|
2002-03-07 03:40:05 +01:00
|
|
|
s| install-data-html||g'
|
2002-10-30 00:05:45 +01:00
|
|
|
# do not version lib directories
|
|
|
|
@${PERL} -pi -e 's|^(MagickLibSubdir).*$$|\1="ImageMagick"|' \
|
|
|
|
${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
|
2002-10-17 20:46:12 +02: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-03 02:10:06 +01:00
|
|
|
${WRKSRC}/magick/xwindow.c
|
2010-11-22 14:47:12 +01:00
|
|
|
.if ${_IMAGEMAGICK_THREADS} == "yes"
|
2006-04-15 04:37:50 +02:00
|
|
|
. for i in Magick++/lib/ImageMagick++.pc.in wand/Wand.pc.in magick/ImageMagick.pc.in
|
|
|
|
@${PERL} -pi -e 's|^(Libs.+)$$|\1 ${PTHREAD_LIBS}|; \
|
|
|
|
s|^(Cflags.+)$$|\1 ${PTHREAD_CFLAGS}|' \
|
|
|
|
${WRKSRC}/${i}
|
|
|
|
. endfor
|
|
|
|
.endif
|
|
|
|
# deprecated gvCleanup
|
|
|
|
@${REINPLACE_CMD} -e "s|gvCleanup|gvFreeContext|g" \
|
|
|
|
${WRKSRC}/coders/dot.c
|
2001-03-06 18:19:53 +01:00
|
|
|
|
2008-10-13 13:42:22 +02:00
|
|
|
pre-configure:
|
2010-11-22 14:47:12 +01:00
|
|
|
.if defined(_IMAGEMAGICK_THREADS_PERL_MSG)
|
|
|
|
@${ECHO_CMD} '###################################################################'
|
|
|
|
@${ECHO_CMD} NOTICE: ${_IMAGEMAGICK_THREADS_PERL_MSG}. Building ImageMagick ${_IMAGEMAGICK_THREADS_MSG}.
|
|
|
|
@${ECHO_CMD} '###################################################################'
|
2008-11-13 13:49:20 +01:00
|
|
|
.endif
|
2011-03-09 14:58:31 +01:00
|
|
|
.if defined(WITH_IMAGEMAGICK_SVG) && defined(WITHOUT_X11)
|
2011-03-10 23:47:17 +01:00
|
|
|
@${ECHO_CMD} NOTICE: SVG format support disabled, requires X11
|
2011-03-09 14:58:31 +01:00
|
|
|
.endif
|
2008-10-13 13:42:22 +02:00
|
|
|
|
2004-05-31 23:24:33 +02:00
|
|
|
post-install:
|
2010-05-21 17:01:19 +02:00
|
|
|
.if !defined(WITHOUT_IMAGEMAGICK_PERL)
|
|
|
|
@${RM} -f ${PREFIX}/lib/perl5/${PERL_VERSION}/mach/perllocal.pod
|
|
|
|
.endif
|
2004-05-31 23:24:33 +02:00
|
|
|
.if defined(WITHOUT_IMAGEMAGICK_16BIT_PIXEL)
|
2008-04-19 17:01:02 +02:00
|
|
|
@${TOUCH} ${PREFIX}/lib/ImageMagick-${PORTVERSION:R}/modules-Q8/coders/.keep
|
|
|
|
@${TOUCH} ${PREFIX}/lib/ImageMagick-${PORTVERSION:R}/modules-Q8/filters/.keep
|
2004-05-31 23:24:33 +02:00
|
|
|
.else
|
2008-04-19 17:01:02 +02:00
|
|
|
@${TOUCH} ${PREFIX}/lib/ImageMagick-${PORTVERSION:R}/modules-Q16/coders/.keep
|
|
|
|
@${TOUCH} ${PREFIX}/lib/ImageMagick-${PORTVERSION:R}/modules-Q16/filters/.keep
|
2004-05-31 23:24:33 +02:00
|
|
|
.endif
|
|
|
|
|
2007-09-25 21:41:11 +02:00
|
|
|
test check:
|
2007-10-03 17:56:00 +02:00
|
|
|
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} limits -m 20m ${MAKE} check
|
2007-09-25 21:41:11 +02:00
|
|
|
|
|
|
|
.if !defined(WITHOUT_IMAGEMAGICK_TESTS)
|
2007-09-28 04:23:16 +02:00
|
|
|
. for m in TTF
|
|
|
|
. if defined(WITHOUT_IMAGEMAGICK_$m)
|
2007-11-07 06:46:29 +01:00
|
|
|
WITHOUT_IMAGEMAGICK_TESTS=yes
|
2007-09-28 04:23:16 +02:00
|
|
|
. endif
|
|
|
|
. endfor
|
2007-11-07 06:46:29 +01:00
|
|
|
.endif
|
|
|
|
.if !defined(WITHOUT_IMAGEMAGICK_TESTS)
|
2008-04-19 17:01:02 +02:00
|
|
|
. for m in MODULES HDRI
|
2007-09-28 04:23:16 +02:00
|
|
|
. if defined(WITH_IMAGEMAGICK_$m)
|
2007-11-07 06:46:29 +01:00
|
|
|
WITHOUT_IMAGEMAGICK_TESTS=yes
|
2007-09-28 04:23:16 +02:00
|
|
|
. endif
|
|
|
|
. endfor
|
2007-11-07 06:46:29 +01:00
|
|
|
.endif
|
|
|
|
|
2011-01-22 00:51:11 +01:00
|
|
|
.if !defined(WITHOUT_IMAGEMAGICK_TESTS)
|
2007-09-25 21:41:11 +02:00
|
|
|
post-build: test
|
|
|
|
.endif
|
|
|
|
|
2006-11-28 19:30:40 +01:00
|
|
|
.include <bsd.port.post.mk>
|