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...
This commit is contained in:
parent
83da1daa95
commit
d1ece52b0c
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=200889
@ -55,10 +55,12 @@ OPTIONS= X11 "X11 support" on \
|
||||
IMAGEMAGICK_MODULES "Modules support (broken)" off \
|
||||
IMAGEMAGICK_BZLIB "Bzlib support" on \
|
||||
IMAGEMAGICK_16BIT_PIXEL "16bit pixel support" on \
|
||||
IMAGEMAGICK_DJVU "DJVU format support (needs threads)" off \
|
||||
IMAGEMAGICK_LCMS "LCMS support" on \
|
||||
IMAGEMAGICK_TTF "Freetype support" on \
|
||||
IMAGEMAGICK_FONTCONFIG "Fontconfig support" on \
|
||||
IMAGEMAGICK_JPEG "JPG format support" on \
|
||||
IMAGEMAGICK_OPENEXR "OpenEXR support (needs threads)" off \
|
||||
IMAGEMAGICK_PNG "PNG format support" on \
|
||||
IMAGEMAGICK_TIFF "TIFF format support" on \
|
||||
IMAGEMAGICK_FPX "FPX format support" off \
|
||||
@ -98,6 +100,13 @@ WITH_IMAGEMAGICK_THREADS=yes
|
||||
.else
|
||||
CONFIGURE_ARGS+= --without-threads
|
||||
.undef WITH_IMAGEMAGICK_THREADS
|
||||
.if defined(WITH_IMAGEMAGICK_OPENEXR) && !defined(WITHOUT_IMAGEMAGICK_PERL)
|
||||
. warning OpenEXR's libIlmThread may prevent PerlMagick from working
|
||||
.endif
|
||||
.if defined(WITH_IMAGEMAGICK_DJVU)
|
||||
. warning DjVu requires threads and will not be supported
|
||||
. undef WITH_IMAGEMAGICK_DJVU
|
||||
.endif
|
||||
.endif
|
||||
|
||||
# Faster, but poor quality
|
||||
@ -122,6 +131,26 @@ CONFIGURE_ARGS+= --without-modules
|
||||
PLIST_SUB+= MODULES='@comment '
|
||||
.endif
|
||||
|
||||
.if !defined(WITHOUT_IMAGEMAGICK_OPENEXR)
|
||||
LIB_DEPENDS+= IlmImf:${PORTSDIR}/graphics/OpenEXR
|
||||
PLIST_SUB+= OPENEXR=""
|
||||
.else
|
||||
CONFIGURE_ARGS+= --without-openexr
|
||||
PLIST_SUB+= OPENEXR="@comment "
|
||||
.endif
|
||||
|
||||
.if !defined(WITHOUT_IMAGEMAGICK_DJVU)
|
||||
. if defined(WITHOUT_X11)
|
||||
LIB_DEPENDS+= djvulibre:${PORTSDIR}/graphics/djvulibre-nox11
|
||||
. else
|
||||
LIB_DEPENDS+= djvulibre:${PORTSDIR}/graphics/djvulibre
|
||||
. endif
|
||||
PLIST_SUB+= DJVU=""
|
||||
.else
|
||||
CONFIGURE_ARGS+= --without-djvu
|
||||
PLIST_SUB+= DJVU="@comment "
|
||||
.endif
|
||||
|
||||
.if !defined(WITHOUT_IMAGEMAGICK_JPEG)
|
||||
LIB_DEPENDS+= jpeg:${PORTSDIR}/graphics/jpeg
|
||||
PLIST_SUB+= JPEG=""
|
||||
|
31
graphics/ImageMagick/files/patch-module-path
Normal file
31
graphics/ImageMagick/files/patch-module-path
Normal file
@ -0,0 +1,31 @@
|
||||
Modify module-searching to only check the compiled-in location,
|
||||
if the environment variables don't provide an override. The stock
|
||||
code checks the compiled-in location if a particular module can't
|
||||
be found at the environment-specified directory, which may lead
|
||||
to wrong binaries being loaded, etc.
|
||||
|
||||
-mi
|
||||
|
||||
--- magick/module.c Sat Sep 8 16:44:05 2007
|
||||
+++ magick/module.c Thu Oct 4 23:30:26 2007
|
||||
@@ -589,4 +589,6 @@
|
||||
"Searching for coder module file \"%s\" ...",filename);
|
||||
module_path=GetEnvironmentValue("MAGICK_CODER_MODULE_PATH");
|
||||
+ if (module_path == NULL)
|
||||
+ module_path = MagickCoderModulesPath;
|
||||
break;
|
||||
}
|
||||
@@ -596,4 +598,6 @@
|
||||
"Searching for filter module file \"%s\" ...",filename);
|
||||
module_path=GetEnvironmentValue("MAGICK_CODER_FILTER_PATH");
|
||||
+ if (module_path == NULL)
|
||||
+ module_path = MagickFilterModulesPath;
|
||||
break;
|
||||
}
|
||||
@@ -624,5 +628,5 @@
|
||||
module_path=DestroyString(module_path);
|
||||
}
|
||||
-#if defined(UseInstalledMagick)
|
||||
+#if defined(UseInstalledMagick) && 0
|
||||
#if defined(MagickCoderModulesPath)
|
||||
{
|
@ -310,9 +310,12 @@ lib/ImageMagick/modules-%%QBIT%%/coders/.keep
|
||||
%%PNG%%%%MODULES%%lib/ImageMagick/modules-%%QBIT%%/coders/png.a
|
||||
%%PNG%%%%MODULES%%lib/ImageMagick/modules-%%QBIT%%/coders/png.la
|
||||
%%PNG%%%%MODULES%%lib/ImageMagick/modules-%%QBIT%%/coders/png.so
|
||||
%%MODULES%%lib/ImageMagick/modules-%%QBIT%%/coders/exr.a
|
||||
%%MODULES%%lib/ImageMagick/modules-%%QBIT%%/coders/exr.la
|
||||
%%MODULES%%lib/ImageMagick/modules-%%QBIT%%/coders/exr.so
|
||||
%%OPENEXR%%%%MODULES%%lib/ImageMagick/modules-%%QBIT%%/coders/exr.a
|
||||
%%OPENEXR%%%%MODULES%%lib/ImageMagick/modules-%%QBIT%%/coders/exr.la
|
||||
%%OPENEXR%%%%MODULES%%lib/ImageMagick/modules-%%QBIT%%/coders/exr.so
|
||||
%%DJVU%%%%MODULES%%lib/ImageMagick/modules-%%QBIT%%/coders/djvu.a
|
||||
%%DJVU%%%%MODULES%%lib/ImageMagick/modules-%%QBIT%%/coders/djvu.la
|
||||
%%DJVU%%%%MODULES%%lib/ImageMagick/modules-%%QBIT%%/coders/djvu.so
|
||||
%%MODULES%%lib/ImageMagick/modules-%%QBIT%%/coders/pnm.a
|
||||
%%MODULES%%lib/ImageMagick/modules-%%QBIT%%/coders/pnm.la
|
||||
%%MODULES%%lib/ImageMagick/modules-%%QBIT%%/coders/pnm.so
|
||||
|
Loading…
Reference in New Issue
Block a user