ports/52538: [patch] Increased granularity for ImageMagick compile options
David Sze
dsze at distrust.net
Wed May 21 20:20:17 UTC 2003
>Number: 52538
>Category: ports
>Synopsis: [patch] Increased granularity for ImageMagick compile options
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Wed May 21 13:20:14 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator: David Sze
>Release: FreeBSD 4.8-RELEASE i386
>Organization:
None
>Environment:
System: FreeBSD abc.example.com 4.8-RELEASE FreeBSD 4.8-RELEASE #0: Mon Apr 21 21:11:07 EDT 2003 root at abc.example.com:/usr/src/sys/compile/ABC i386
>Description:
Patch for Makefile or ImageMagick port.
>How-To-Repeat:
>Fix:
The following patch allows support for various image formats to be added to
the ImageMagick port on a case-by-case basis. This is useful for vendors
whose products link against ImageMagick, but don't require support for all
of the esoteric image formats.
--- Makefile.patch begins here ---
*** Makefile.orig Fri May 9 16:23:11 2003
--- Makefile Wed May 21 10:54:37 2003
***************
*** 29,46 ****
MAINTAINER= ports at FreeBSD.org
COMMENT= Image processing tools (interactive optional--misc/display conflict)
- BUILD_DEPENDS= freetype-config:${PORTSDIR}/print/freetype2 # XXX
- LIB_DEPENDS= jasper.4:${PORTSDIR}/graphics/jasper \
- jbig.1:${PORTSDIR}/graphics/jbigkit \
- jpeg.9:${PORTSDIR}/graphics/jpeg \
- lcms.1:${PORTSDIR}/graphics/lcms \
- fpx.1:${PORTSDIR}/graphics/libfpx \
- wmf.2:${PORTSDIR}/graphics/libwmf \
- png.5:${PORTSDIR}/graphics/png \
- tiff.4:${PORTSDIR}/graphics/tiff \
- freetype.9:${PORTSDIR}/print/freetype2 \
- xml2.5:${PORTSDIR}/textproc/libxml2
-
USE_PERL5= yes
USE_BZIP2= yes
USE_GMAKE= yes
--- 29,34 ----
***************
*** 48,67 ****
LIBTOOLFLAGS= # none
CONFIGURE_TARGET= --build=${ARCH}-portbld-freebsd${OSREL}
CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
! CONFIGURE_ARGS= --enable-shared --with-perl=${PERL5} \
! --without-gslib
INSTALLS_SHLIB= yes
MAN1= ImageMagick.1 Magick++-config.1 Magick-config.1 \
! composite.1 conjure.1 convert.1 identify.1 mogrify.1 montage.1
! MAN3= Image::Magick.3
MAN4= miff.4
MAN5= quantize.5
- MAN3PREFIX= ${PREFIX}/lib/perl5/${PERL_VERSION}
CPPFLAGS= -I${LOCALBASE}/include
LDFLAGS= -L${LOCALBASE}/lib
# PerlMagick not works with threads, if perl is not threaded, and vice versa
.if defined(WITH_IMAGEMAGICK_THREADS) || \
defined(PERL_THREADED) && ${PERL_THREADED} == "true"
--- 36,60 ----
LIBTOOLFLAGS= # none
CONFIGURE_TARGET= --build=${ARCH}-portbld-freebsd${OSREL}
CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
! CONFIGURE_ARGS= --enable-shared
INSTALLS_SHLIB= yes
MAN1= ImageMagick.1 Magick++-config.1 Magick-config.1 \
! composite.1 convert.1 identify.1 mogrify.1 montage.1
MAN4= miff.4
MAN5= quantize.5
CPPFLAGS= -I${LOCALBASE}/include
LDFLAGS= -L${LOCALBASE}/lib
+ .if defined(WITH_PERL)
+ CONFIGURE_ARGS+= --with-perl=${PERL5}
+ MAN3= Image::Magick.3
+ MAN3PREFIX= ${PREFIX}/lib/perl5/${PERL_VERSION}
+ .else
+ CONFIGURE_ARGS+= --without-perl
+ .endif
+
# PerlMagick not works with threads, if perl is not threaded, and vice versa
.if defined(WITH_IMAGEMAGICK_THREADS) || \
defined(PERL_THREADED) && ${PERL_THREADED} == "true"
***************
*** 86,114 ****
# ('make test' there works)
.if defined(WITH_IMAGEMAGICK_MODULES)
CONFIGURE_ARGS+= --with-modules
! PLIST_SUB+= MODULES=''
.else
! PLIST_SUB+= MODULES='@comment '
.endif
.if defined(WITH_HDF)
! LIB_DEPENDS= df.1:${PORTSDIR}/graphics/hdf
CONFIGURE_ARGS+= --with-hdf
.endif
.if defined(WITHOUT_X11)
! PKGNAMESUFFIX+= -nox11
! BUILD_DEPENDS+= gs:${PORTSDIR}/print/ghostscript-gnu-nox11
! RUN_DEPENDS+= gs:${PORTSDIR}/print/ghostscript-gnu-nox11
CONFIGURE_ARGS+= --without-x --without-mpeg2
! PLIST_SUB+= X11='@comment '
.else
! LIB_DEPENDS+= mpeg2.0:${PORTSDIR}/multimedia/libmpeg2
! BUILD_DEPENDS+= gs:${PORTSDIR}/print/ghostscript-gnu
! RUN_DEPENDS+= gs:${PORTSDIR}/print/ghostscript-gnu
! USE_XLIB= yes
! MAN1+= animate.1 display.1 import.1
! PLIST_SUB+= X11=''
.endif
.if defined(NOPORTDOCS)
--- 79,206 ----
# ('make test' there works)
.if defined(WITH_IMAGEMAGICK_MODULES)
CONFIGURE_ARGS+= --with-modules
! PLIST_SUB+= MODULES=''
! .else
! PLIST_SUB+= MODULES='@comment '
! .endif
!
! .if defined(WITH_JPEG)
! LIB_DEPENDS+= jpeg.9:${PORTSDIR}/graphics/jpeg
! .else
! CONFIGURE_ARGS+= --without-jpeg
! .endif
!
! .if defined(WITH_PNG)
! LIB_DEPENDS+= png.5:${PORTSDIR}/graphics/png
! .else
! CONFIGURE_ARGS+= --without-png
! .endif
!
! .if defined(WITH_TIFF)
! LIB_DEPENDS+= tiff.4:${PORTSDIR}/graphics/tiff
.else
! CONFIGURE_ARGS+= --without-tiff
! .endif
!
! # Produce BZip compressed MIFF images
! .if !defined(WITH_BZLIB)
! CONFIGURE_ARGS+= --without-bzlib
.endif
+ # HDF (Hierarchical Data Format) images
.if defined(WITH_HDF)
! LIB_DEPENDS= df.1:${PORTSDIR}/graphics/hdf
CONFIGURE_ARGS+= --with-hdf
.endif
+ # FPX (FlashPIX) images
+ .if defined(WITH_FPX)
+ LIB_DEPENDS+= fpx.1:${PORTSDIR}/graphics/libfpx
+ .else
+ CONFIGURE_ARGS+= --without-fpx
+ .endif
+
+ # JBIG images (lossless compression for bi-level images)
+ .if defined(WITH_JBIG)
+ LIB_DEPENDS+= jbig.1:${PORTSDIR}/graphics/jbigkit
+ .else
+ CONFIGURE_ARGS+= --without-jbig
+ .endif
+
+ # JPEG2000 images (wavelet-based lossy compression)
+ .if defined(WITH_JPEG2000)
+ LIB_DEPENDS+= jasper.4:${PORTSDIR}/graphics/jasper
+ .else
+ CONFIGURE_ARGS+= --without-jp2
+ .endif
+
+ # LCMS (Little CMS) color management
+ .if defined(WITH_LCMS)
+ LIB_DEPENDS+= lcms.1:${PORTSDIR}/graphics/lcms
+ .else
+ CONFIGURE_ARGS+= --without-lcms
+ .endif
+
+ # TTF (TrueType Font) support
+ .if defined(WITH_TTF)
+ BUILD_DEPENDS+= freetype-config:${PORTSDIR}/print/freetype2 # XXX
+ LIB_DEPENDS+= freetype.9:${PORTSDIR}/print/freetype2
+ .else
+ CONFIGURE_ARGS+= --without-ttf
+ .endif
+
+ # WMF (Windows Meta File) images
+ .if defined(WITH_WMF)
+ LIB_DEPENDS+= wmf.2:${PORTSDIR}/graphics/libwmf
+ .else
+ CONFIGURE_ARGS+= --without-wmf
+ .endif
+
+ # SVG (Scalable Vector Graphics) images and MSL (Magick Scripting Language)
+ # both require XML
+ .if defined(WITH_SVG) || defined(WITH_MSL)
+ LIB_DEPENDS+= xml2.5:${PORTSDIR}/textproc/libxml2
+ MAN1+= conjure.1
+ .else
+ CONFIGURE_ARGS+= --without-xml
+ .endif
+
+ # DPS (Display PostScript) support
+ .if defined(WITH_DPS)
+ CONFIGURE_ARGS+= --with-dps
+ .else
+ CONFIGURE_ARGS+= --without-dps
+ .endif
+
+ # PDF (Adobe Portable Document Format) support
+ .if defined(WITH_PDF)
+ CONFIGURE_ARGS+= --with-gslib
+ .if defined(WITHOUT_X11)
+ BUILD_DEPENDS+= gs:${PORTSDIR}/print/ghostscript-gnu-nox11
+ RUN_DEPENDS+= gs:${PORTSDIR}/print/ghostscript-gnu-nox11
+ .else
+ BUILD_DEPENDS+= gs:${PORTSDIR}/print/ghostscript-gnu
+ RUN_DEPENDS+= gs:${PORTSDIR}/print/ghostscript-gnu
+ .endif
+ .else
+ CONFIGURE_ARGS+= --without-gslib
+ .endif
+
.if defined(WITHOUT_X11)
! PKGNAMESUFFIX+= -nox11
CONFIGURE_ARGS+= --without-x --without-mpeg2
! PLIST_SUB+= X11='@comment '
.else
! CONFIGURE_ARGS+= --with-x
! USE_XLIB= yes
! MAN1+= animate.1 display.1 import.1
! PLIST_SUB+= X11=''
! .if defined(WITH_MPEG2)
! CONFIGURE_ARGS+= --with-mpeg2
! LIB_DEPENDS+= mpeg2.0:${PORTSDIR}/multimedia/libmpeg2
! .else
! CONFIGURE_ARGS+= --without-mpeg2
! .endif
.endif
.if defined(NOPORTDOCS)
***************
*** 136,139 ****
--- 228,240 ----
@${PERL} -pi -e 's|timestamp: %ld|timestamp: %d|g' \
${WRKSRC}/magick/xwindow.c
+ post-install:
+ .if !defined(WITH_SVG) && !defined(WITH_MSL)
+ ${GREP} -v "^bin/conjure" ${TMPPLIST} > ${TMPPLIST}.tmp
+ ${MV} -f ${TMPPLIST}.tmp ${TMPPLIST}
+ .endif
+ .if !defined(WITH_PERL)
+ ${GREP} -v "lib/perl5/site_perl" ${TMPPLIST} > ${TMPPLIST}.tmp
+ ${MV} -f ${TMPPLIST}.tmp ${TMPPLIST}
+ .endif
.include <bsd.port.mk>
--- Makefile.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list