aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Palmen <zirias@FreeBSD.org>2023-04-05 08:13:07 +0000
committerFelix Palmen <zirias@FreeBSD.org>2023-04-30 11:10:39 +0000
commit2a68fe27dc3dfef09d780ac4c4a378f7e46dc149 (patch)
tree3f53af128a1c63c34b8539c7c37b15a568650f69
parent84f562147f3c30bd67a4d4852ccdc9122e1d0be6 (diff)
downloadports-2a68fe27dc3dfef09d780ac4c4a378f7e46dc149.tar.gz
ports-2a68fe27dc3dfef09d780ac4c4a378f7e46dc149.zip
graphics/ImageMagick7: Convert -nox11 to flavor
Approved by: tcberner (mentor) Differential Revision: https://reviews.freebsd.org/D39424
-rw-r--r--MOVED1
-rw-r--r--graphics/ImageMagick7-nox11/Makefile9
-rw-r--r--graphics/ImageMagick7/Makefile52
-rw-r--r--graphics/Makefile1
4 files changed, 29 insertions, 34 deletions
diff --git a/MOVED b/MOVED
index 14b3c3da9b66..c8382746b24b 100644
--- a/MOVED
+++ b/MOVED
@@ -17920,3 +17920,4 @@ devel/zpu-gcc||2023-04-30|Has expired: Broken with latest C compiler and port un
devel/zpu-binutils||2023-04-30|Has expired: Broken with latest C compiler and port unused
databases/rocksdb-lite||2023-04-30|Has expired: Removed by upstream, see https://github.com/facebook/rocksdb/commit/4720ba4391eb016b05a30d09a8275624c3a4a87e
textproc/ltxml||2023-04-30|Has expired: Unfetchable
+graphics/ImageMagick7-nox11|graphics/ImageMagick7|2023-04-30|Flavorized
diff --git a/graphics/ImageMagick7-nox11/Makefile b/graphics/ImageMagick7-nox11/Makefile
deleted file mode 100644
index 14ac29e30124..000000000000
--- a/graphics/ImageMagick7-nox11/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
-# the SVG and PANGO plugins need X11
-OPTIONS_EXCLUDE= X11 SVG PANGO RAQM
-PORTSCOUT= ignore:1
-# workaround until bsd.port.mk code can grok the disabling of the X11 option
-WITHOUT_X11=yes
-
-MASTERDIR= ${.CURDIR}/../ImageMagick7
-
-.include "${MASTERDIR}/Makefile"
diff --git a/graphics/ImageMagick7/Makefile b/graphics/ImageMagick7/Makefile
index 7d872b57aa4e..1fae9f8b548a 100644
--- a/graphics/ImageMagick7/Makefile
+++ b/graphics/ImageMagick7/Makefile
@@ -1,6 +1,6 @@
PORTNAME= ImageMagick
DISTVERSION= 7.1.0-62
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= graphics perl5
MASTER_SITES= https://ftp.acc.umu.se/mirror/imagemagick.org/ftp/releases/ \
https://mirror.dogado.de/imagemagick/releases/ \
@@ -19,10 +19,14 @@ LICENSE_FILE= ${WRKSRC}/LICENSE
LIB_DEPENDS= libltdl.so:devel/libltdl \
libzip.so:archivers/libzip
-TESTS_DEPENDS= gsfonts>=0:print/gsfonts
+FLAVORS= x11 nox11
+FLAVOR?= ${FLAVORS:[1]}
+FLAVORS_SUB= yes
+nox11_PKGNAMESUFFIX= 7-nox11
# bin/Magick++-config
-CONFLICTS_INSTALL= ImageMagick6 ImageMagick6-nox11
+CONFLICTS_INSTALL= ImageMagick6 ImageMagick6-nox11 \
+ ImageMagick7 ImageMagick7-nox11
# This port uses .la files, keep libtool:keepla! (magick/module.c)
USES= cpe gettext-runtime gmake gnome libtool:keepla localbase \
@@ -48,11 +52,22 @@ PLIST_SUB= PORTVERSION=${PORTVERSION:R}
OPTIONS_SUB= yes
OPTIONS_DEFINE= BZIP2 DOCS DJVU FFMPEG FFTW FONTCONFIG FPX FREETYPE \
GRAPHVIZ GSLIB JPEG2000 JBIG JPEG JXL LCMS2 LZMA LQR MODULES \
- OPENEXR OPENMP PANGO PDF PERL PNG RAQM SVG TESTS TIFF WEBP WMF \
- THREADS X11 16BIT_PIXEL HDRI HEIF RAW
+ OPENEXR OPENMP PDF PERL PNG TESTS TIFF WEBP WMF THREADS \
+ 16BIT_PIXEL HDRI HEIF RAW
OPTIONS_DEFAULT= 16BIT_PIXEL BZIP2 FFTW FONTCONFIG FREETYPE HEIF \
- JPEG2000 JBIG JPEG JXL LCMS2 LZMA LQR MODULES OPENEXR PDF PERL PNG RAQM SVG \
- TIFF WEBP WMF THREADS X11 HDRI RAW
+ JPEG2000 JBIG JPEG JXL LCMS2 LZMA LQR MODULES OPENEXR PDF PERL PNG \
+ TIFF WEBP WMF THREADS HDRI RAW
+
+.if ${FLAVOR:U} == x11
+# the SVG and PANGO plugins need X11
+OPTIONS_DEFINE+= PANGO RAQM SVG
+OPTIONS_DEFAULT+= RAQM SVG
+CONFIGURE_ARGS+= --with-x
+USES+= xorg
+USE_XORG= ice sm x11 xext xt
+.else
+CONFIGURE_ARGS+= --without-x
+.endif
DJVU_DESC= DJVU format support (needs THREADS)
GSLIB_DESC= libgs (Postscript SHLIB) support
@@ -129,7 +144,6 @@ MODULES_CONFIGURE_WITH= modules
PANGO_CONFIGURE_WITH= pango
PANGO_USE= gnome=pango
-PANGO_IMPLIES= X11
PNG_CONFIGURE_WITH= png
PNG_LIB_DEPENDS= libpng.so:graphics/png
@@ -148,7 +162,8 @@ RAW_IMPLIES= LCMS2
SVG_DESC= SVG vector image format support (via librsvg, implies the x11 option)
SVG_CONFIGURE_WITH= rsvg
SVG_USE= gnome=cairo,gdkpixbuf2,librsvg2
-SVG_IMPLIES= X11
+
+TESTS_TEST_DEPENDS= gsfonts>=0:print/gsfonts
TIFF_CONFIGURE_WITH= tiff
TIFF_LIB_DEPENDS= libtiff.so:graphics/tiff
@@ -156,13 +171,6 @@ TIFF_LIB_DEPENDS= libtiff.so:graphics/tiff
WEBP_CONFIGURE_WITH= webp
WEBP_LIB_DEPENDS= libwebp.so:graphics/webp
-X11_CONFIGURE_WITH= x
-X11_USES= xorg
-X11_USE= xorg=ice,sm,x11,xext,xt
-X11_VARS= CONFLICTS_INSTALL+="ImageMagick7-nox11"
-X11_VARS_OFF= CONFLICTS_INSTALL+="ImageMagick7" \
- PKGNAMESUFFIX=7-nox11
-
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MTHREADS}
@@ -250,7 +258,7 @@ PLIST_SUB+= DJVU="@comment "
.if ${PORT_OPTIONS:MGSLIB}
CONFIGURE_ARGS+= --with-gslib
-. if ${PORT_OPTIONS:MX11}
+. if ${FLAVOR:U} == x11
USES+= ghostscript:x11
. else
USES+= ghostscript
@@ -261,7 +269,7 @@ CONFIGURE_ARGS+= --without-gslib
# WMF (Windows Meta File) images
.if ${PORT_OPTIONS:MWMF}
-. if ${PORT_OPTIONS:MX11}
+. if ${FLAVOR:U} == x11
LIB_DEPENDS+= libwmf.so:graphics/libwmf
. else
LIB_DEPENDS+= libwmf.so:graphics/libwmf-nox11
@@ -275,7 +283,7 @@ PLIST_SUB+= WMF="@comment "
# PDF (Adobe Portable Document Format) support
.if ${PORT_OPTIONS:MPDF}
-. if ${PORT_OPTIONS:MX11}
+. if ${FLAVOR:U} == x11
USES+= ghostscript:x11
. else
USES+= ghostscript
@@ -298,7 +306,7 @@ INSTALL_TARGET= install-strip
.endif
.if ${PORT_OPTIONS:MTESTS}
-. if ${PORT_OPTIONS:MX11}
+. if ${FLAVOR:U} == x11
USES+= ghostscript:x11,build
. else
USES+= ghostscript:build
@@ -329,10 +337,6 @@ pre-configure:
@${ECHO_CMD} '###################################################################'
.endif
-.if ${PORT_OPTIONS:MSVG} && ! ${PORT_OPTIONS:MX11}
- @${ECHO_CMD} NOTICE: SVG format support disabled, requires X11
-.endif
-
post-install:
.for i in ${SAMPLE_FILES}
@${MV} ${STAGEDIR}${PREFIX}/etc/ImageMagick-7/${i} \
diff --git a/graphics/Makefile b/graphics/Makefile
index 42bc2033ed5d..28fd5bdf6b44 100644
--- a/graphics/Makefile
+++ b/graphics/Makefile
@@ -8,7 +8,6 @@
SUBDIR += ImageMagick6
SUBDIR += ImageMagick6-nox11
SUBDIR += ImageMagick7
- SUBDIR += ImageMagick7-nox11
SUBDIR += O2-tools
SUBDIR += R-cran-DiagrammeR
SUBDIR += R-cran-GDD