Skip to content

Commit beb4adb

Browse files
graphics/ImageMagick[6-7]: optionize the dependency on ffmpeg
- Make an option for FFMPEG, and do not enable it by default. - Do not bump PORTREVISION: pkg will take care of it, and ports users may rebuild it if needed. - Note: there is no simple way to deactivate this option when ffmpeg is already installed. PR: 256215 Reported by: Toshimichi Masubuchi (ImageMagick7) and gessel (6) Approved by: maintainer’s time-out
1 parent aeb2d60 commit beb4adb

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

‎graphics/ImageMagick6/Makefile‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ COMMENT= Image processing tools (legacy version)
3232
LICENSE= APACHE20
3333
LICENSE_FILE= ${WRKSRC}/LICENSE
3434

35-
LIB_DEPENDS= libltdl.so:devel/libltdl \
36-
libavutil.so:multimedia/ffmpeg
35+
LIB_DEPENDS= libltdl.so:devel/libltdl
3736

3837
TESTS_DEPENDS= gsfonts>=0:print/gsfonts
3938

@@ -63,7 +62,7 @@ SAMPLE_FILES= coder.xml colors.xml delegates.xml log.xml magic.xml mime.xml \
6362
PLIST_SUB= PORTVERSION=${PORTVERSION:R}
6463

6564
OPTIONS_SUB= yes
66-
OPTIONS_DEFINE= BZIP2 DOCS DJVU FFTW FONTCONFIG FPX FREETYPE \
65+
OPTIONS_DEFINE= BZIP2 DOCS DJVU FFMPEG FFTW FONTCONFIG FPX FREETYPE \
6766
GRAPHVIZ GSLIB HEIF JPEG2000 JBIG JPEG LCMS2 LZMA LQR MODULES \
6867
OPENEXR OPENMP PANGO PDF PERL PNG RAQM SVG TESTS TIFF WEBP WMF \
6968
THREADS X11 16BIT_PIXEL HDRI RAW
@@ -87,6 +86,8 @@ PLIST_SUB+= QBIT=${_QBIT}
8786
BZIP2_DESC= bzip2 compressed MIFF images
8887
BZIP2_CONFIGURE_WITH= bzlib
8988

89+
FFMPEG_DESC= Video CODEC support from FFmpeg
90+
9091
FFTW_CONFIGURE_WITH= fftw
9192
FFTW_LIB_DEPENDS= libfftw3.so:math/fftw3
9293

@@ -265,6 +266,11 @@ CONFIGURE_ARGS+= --without-djvu
265266
PLIST_SUB+= DJVU="@comment "
266267
.endif
267268

269+
.if ${PORT_OPTIONS:MFFMPEG}
270+
BUILD_DEPENDS+= ffmpeg:multimedia/ffmpeg
271+
RUN_DEPENDS+= ffmpeg:multimedia/ffmpeg
272+
.endif
273+
268274
.if ${PORT_OPTIONS:MGSLIB}
269275
CONFIGURE_ARGS+= --with-gslib
270276
. if ${PORT_OPTIONS:MX11}

‎graphics/ImageMagick7/Makefile‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ LICENSE= APACHE20
3232
LICENSE_FILE= ${WRKSRC}/LICENSE
3333

3434
LIB_DEPENDS= libltdl.so:devel/libltdl \
35-
libzip.so:archivers/libzip \
36-
libavutil.so:multimedia/ffmpeg
35+
libzip.so:archivers/libzip
3736

3837
TESTS_DEPENDS= gsfonts>=0:print/gsfonts
3938

@@ -62,7 +61,7 @@ SAMPLE_FILES= colors.xml delegates.xml log.xml mime.xml policy.xml \
6261
PLIST_SUB= PORTVERSION=${PORTVERSION:R}
6362

6463
OPTIONS_SUB= yes
65-
OPTIONS_DEFINE= BZIP2 DOCS DJVU FFTW FONTCONFIG FPX FREETYPE \
64+
OPTIONS_DEFINE= BZIP2 DOCS DJVU FFMPEG FFTW FONTCONFIG FPX FREETYPE \
6665
GRAPHVIZ GSLIB JPEG2000 JBIG JPEG LCMS2 LZMA LQR MODULES \
6766
OPENEXR OPENMP PANGO PDF PERL PNG RAQM SVG TESTS TIFF WEBP WMF \
6867
THREADS X11 16BIT_PIXEL HDRI HEIF RAW
@@ -72,6 +71,7 @@ OPTIONS_DEFAULT= 16BIT_PIXEL BZIP2 FFTW FONTCONFIG FREETYPE \
7271

7372
DJVU_DESC= DJVU format support (needs THREADS)
7473
GSLIB_DESC= libgs (Postscript SHLIB) support
74+
FFMPEG_DESC= VIDEO codec support as FFmpeg
7575
TESTS_DESC= Run bundled self-tests after build
7676
#SIMD_CONFIGURE_WITH= gcc-arch
7777
CONFIGURE_ARGS+= --without-gcc-arch
@@ -302,6 +302,11 @@ USES+= ghostscript
302302
RUN_DEPENDS+= gsfonts>=0:print/gsfonts
303303
.endif
304304

305+
.if ${PORT_OPTIONS:MFFMPEG}
306+
BUILD_DEPENDS+= ffmpeg:multimedia/ffmpeg
307+
RUN_DEPENDS+= ffmpeg:multimedia/ffmpeg
308+
.endif
309+
305310
.if ${PORT_OPTIONS:MDOCS}
306311
INSTALL_TARGET= install-strip install-docDATA install-data-html
307312
.else

0 commit comments

Comments
 (0)