aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkwm <kwm@FreeBSD.org>2015-07-17 04:53:28 +0800
committerkwm <kwm@FreeBSD.org>2015-07-17 04:53:28 +0800
commit4490d4bc75707dbdea79b297aac91b4ce174c25f (patch)
tree3fa9947d2b38c86d548ab0b4face968420a2825b
parent929b8a6a2120516c63b8fecd8eba713ab5aafae2 (diff)
downloadfreebsd-ports-gnome-4490d4bc75707dbdea79b297aac91b4ce174c25f.tar.gz
freebsd-ports-gnome-4490d4bc75707dbdea79b297aac91b4ce174c25f.tar.zst
freebsd-ports-gnome-4490d4bc75707dbdea79b297aac91b4ce174c25f.zip
Convert code in bsd.port.mk for USE_GHOSTSCRIPT* to USES=ghostscript.
Add GHOSTSCRIPT_DEFAULT to bsd.default-versions.mk for easy version selection. Arguments supported: <empty>, build, run, nox11 and agpl PR: 201201 (exp-run) Approved by: portmgr (mat@) Exp run by: antione@ (previous patch) Differential Revision: https://reviews.freebsd.org/D2938
-rw-r--r--CHANGES7
-rw-r--r--Mk/Uses/ghostscript.mk104
-rw-r--r--Mk/bsd.default-versions.mk1
-rw-r--r--Mk/bsd.port.mk73
-rw-r--r--Mk/bsd.sanity.mk4
-rw-r--r--cad/xcircuit/Makefile3
-rw-r--r--chinese/enscript/Makefile2
-rw-r--r--comms/efax-gtk/Makefile3
-rw-r--r--comms/hylafax/Makefile3
-rw-r--r--comms/tkhylafax/Makefile3
-rw-r--r--deskutils/etask/Makefile2
-rw-r--r--deskutils/gworkspace/Makefile2
-rw-r--r--devel/doxygen/Makefile2
-rw-r--r--devel/gdcm/Makefile2
-rw-r--r--devel/libexplain/Makefile3
-rw-r--r--editors/ted/Makefile3
-rw-r--r--editors/texmacs/Makefile2
-rw-r--r--editors/texmaker/Makefile3
-rw-r--r--editors/texstudio/Makefile4
-rw-r--r--graphics/GraphicsMagick/Makefile3
-rw-r--r--graphics/ImageMagick/Makefile10
-rw-r--r--graphics/cinepaint/Makefile5
-rw-r--r--graphics/eps2png/Makefile3
-rw-r--r--graphics/epstool/Makefile4
-rw-r--r--graphics/gimp-app/Makefile2
-rw-r--r--graphics/gle-graphics/Makefile3
-rw-r--r--graphics/graphviz/Makefile2
-rw-r--r--graphics/imgtops/Makefile3
-rw-r--r--graphics/impressive/Makefile3
-rw-r--r--graphics/klatexformula/Makefile4
-rw-r--r--graphics/ocaml-images/Makefile5
-rw-r--r--graphics/ocrfeeder/Makefile4
-rw-r--r--graphics/peps/Makefile2
-rw-r--r--graphics/pstoedit/Makefile3
-rw-r--r--graphics/pstoepsi/Makefile2
-rw-r--r--graphics/py-chart/Makefile3
-rw-r--r--graphics/sam2p/Makefile3
-rw-r--r--graphics/xournal/Makefile6
-rw-r--r--graphics/xpaint/Makefile3
-rw-r--r--mail/claws-mail-pdf_viewer/Makefile2
-rw-r--r--mail/courier/Makefile2
-rw-r--r--math/R/Makefile2
-rw-r--r--math/asymptote/Makefile3
-rw-r--r--math/plplot/Makefile3
-rw-r--r--misc/pspresent/Makefile2
-rw-r--r--multimedia/lives/Makefile4
-rw-r--r--print/auctex/Makefile2
-rw-r--r--print/cups-filters/Makefile4
-rw-r--r--print/cups-fxlinuxprint/Makefile3
-rw-r--r--print/cups-pdf/Makefile2
-rw-r--r--print/cups-pstoraster/Makefile3
-rw-r--r--print/dvisvg/Makefile2
-rw-r--r--print/epsonepl/Makefile3
-rw-r--r--print/flpsed/Makefile3
-rw-r--r--print/font2svg/Makefile2
-rw-r--r--print/foo2zjs/Makefile3
-rw-r--r--print/foomatic-filters/Makefile3
-rw-r--r--print/ggv/Makefile5
-rw-r--r--print/ghostscript7-commfont/Makefile2
-rw-r--r--print/ghostscript7-jpnfont/Makefile2
-rw-r--r--print/ghostscript7-korfont/Makefile2
-rw-r--r--print/gspdf/Makefile3
-rw-r--r--print/gsview/Makefile3
-rw-r--r--print/gv/Makefile3
-rw-r--r--print/hpijs/Makefile3
-rw-r--r--print/hplip/Makefile4
-rw-r--r--print/html2ps/Makefile3
-rw-r--r--print/kpdftool/Makefile3
-rw-r--r--print/libspectre/Makefile3
-rw-r--r--print/lilypond-devel/Makefile4
-rw-r--r--print/lilypond/Makefile4
-rw-r--r--print/lpr-wrapper/Makefile3
-rw-r--r--print/magicfilter/Makefile2
-rw-r--r--print/ps2eps/Makefile3
-rw-r--r--print/psdim/Makefile2
-rw-r--r--print/pstotext/Makefile2
-rw-r--r--print/scribus/Makefile4
-rw-r--r--print/texlive-base/Makefile3
-rw-r--r--print/texvc/Makefile2
-rw-r--r--print/transfig/Makefile3
-rw-r--r--sysutils/LPRngTool/Makefile3
-rw-r--r--textproc/docproj/Makefile3
-rw-r--r--textproc/groff/Makefile3
-rw-r--r--textproc/latex2html/Makefile3
-rw-r--r--textproc/pdftohtml/Makefile3
-rw-r--r--textproc/prosper/Makefile2
-rw-r--r--textproc/sowing/Makefile3
-rw-r--r--textproc/tth/Makefile3
-rw-r--r--x11/dgs/Makefile3
89 files changed, 219 insertions, 222 deletions
diff --git a/CHANGES b/CHANGES
index cddde1ab7ca1..7eee7cae2f87 100644
--- a/CHANGES
+++ b/CHANGES
@@ -10,6 +10,13 @@ in the release notes and/or placed into UPDATING.
All ports committers are allowed to commit to this file.
+20150716:
+AUTHOR: kwm@FreeBSD.org
+
+ USE_GHOSTSCRIPT was replaced by USES=ghostscript. The ghostscript USES
+ accepts version, build, run, nox11 and for version 9 the agpl argument.
+ If no version is specified, the default 9 for GHOSTSCRIPT_DEFAULT is honored.
+
20150701:
AUTHOR: mat@FreeBSD.org
diff --git a/Mk/Uses/ghostscript.mk b/Mk/Uses/ghostscript.mk
new file mode 100644
index 000000000000..9271eb0d0134
--- /dev/null
+++ b/Mk/Uses/ghostscript.mk
@@ -0,0 +1,104 @@
+# $FreeBSD$
+#
+# Provide support for ghostscript ports.
+#
+# Feature: ghostscript
+# Usage: USES=ghostscript or USES=ghostscript:args
+# Valid ARGS: <version>, build, run, nox11, agpl
+#
+# version The chooseable versions are 7, 8 and 9. If no version is
+# specified version 9 is selected.
+#
+# USES=ghostscript:7 # Use Ghostscript 7
+# USES=ghostscript:run # Use the set default Ghostscript as a run dependancy
+# USES=ghostscript:8,build # Use ghostscript 8 as a build dependancy.
+#
+# nox11 Indicate that the Ghostscript nox11 port is required.
+# agpl Indicate that the Ghostscript apgl port is required.
+# build Indicates that Ghostscript is needed at build time and adds
+# it as BUILD_DEPENDS.
+# run Indicates that Ghostscript is needed at run time and adds
+# it as RUN_DEPENDS.
+#
+# If build and run are omitted, Ghostscript will be added as BUILD_DEPENDS and
+# RUN_DEPENDS.
+#
+# MAINTAINER: ports@FreeBSD.org
+
+.if !defined(_INCLUDE_USES_GHOSTSCRIPT_MK)
+_INCLUDE_USES_GHOSTSCRIPT_MK= yes
+
+# allowed versions
+_GS_VERSION= 7 8 9
+
+_GS_ARGS= ${ghostscript_ARGS}
+
+.if ${_GS_ARGS:N[789]:Nnox11:Nagpl:Nbuild:Nrun}
+IGNORE= Unknown ghostscript argument ${_GS_ARGS}
+.endif
+
+# Determine version number of Ghostscript to use
+.include "${PORTSDIR}/Mk/bsd.default-versions.mk"
+
+.if ${_GS_VERSION:M${GHOSTSCRIPT_DEFAULT}} == ""
+IGNORE= Invalid GHOSTSCRIPT_DEFAULT value: ${GHOSTSCRIPT_DEFAULT}, please select one of ${_GS_VERSION}
+.endif
+
+# Make sure that no dependency or some other environment variable
+# pollutes the build/run dependency detection
+.undef _GS_BUILD_DEP
+.undef _GS_RUN_DEP
+.if ${_GS_ARGS:Mbuild}
+_GS_BUILD_DEP= yes
+.endif
+.if ${_GS_ARGS:Mrun}
+_GS_RUN_DEP= yes
+.endif
+
+# The port does not specify a build or run dependency, assume both are
+# required.
+.if !defined(_GS_BUILD_DEP) && !defined(_GS_RUN_DEP)
+_GS_BUILD_DEP= yes
+_GS_RUN_DEP= yes
+.endif
+
+_GS_SELECTED= ${GHOSTSCRIPT_DEFAULT}
+.if ${_GS_ARGS:M9}
+_GS_SELECTED:= 9
+.elif ${_GS_ARGS:M8}
+_GS_SELECTED:= 8
+.elif ${_GS_ARGS:M7}
+_GS_SELECTED:= 7
+.endif
+
+.undef _GS_AGPL_SUFFIX
+.if ${_GS_ARGS:Magpl}
+. if ${_GS_SELECTED} == "9"
+_GS_AGPL_SUFFIX= -agpl
+. else
+IGNORE= Ghostscript-agpl is only available in version 9
+. endif
+.endif
+
+.undef _GS_NOX11_SUFFIX
+.if ${_GS_ARGS:Mnox11} || defined(WITHOUT_X11)
+_GS_NOX11_SUFFIX= -nox11
+.endif
+
+.endif # _INCLUDE_USES_GHOSTSCRIPT_MK
+
+.if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_GHOSTSCRIPT_POST_MK)
+_INCLUDE_USES_GHOSTSCRIPT_POST_MK= yes
+
+# dependencies
+_GS_PORT= ghostscript${_GS_SELECTED}${_GS_AGPL_SUFFIX}${_GS_NOX11_SUFFIX}
+
+.if defined(_GS_BUILD_DEP)
+BUILD_DEPENDS+= ${_GS_PORT}>=0:${PORTSDIR}/print/${_GS_PORT}
+.endif
+.if defined(_GS_RUN_DEP)
+RUN_DEPENDS+= ${_GS_PORT}>=0:${PORTSDIR}/print/${_GS_PORT}
+.endif
+
+
+.endif
diff --git a/Mk/bsd.default-versions.mk b/Mk/bsd.default-versions.mk
index f1733d4556a4..3e6c85cbc280 100644
--- a/Mk/bsd.default-versions.mk
+++ b/Mk/bsd.default-versions.mk
@@ -32,6 +32,7 @@ PYTHON3_DEFAULT?= 3.4
RUBY_DEFAULT?= 2.1
TCLTK_DEFAULT?= 8.6
FIREBIRD_DEFAULT?= 2.5
+GHOSTSCRIPT_DEFAULT?= 9
# Version of lang/gcc. Do not override!
LANG_GCC_IS= 4.8
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index b855919d91a7..a3d3981df158 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -342,27 +342,6 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org
# CXXFLAGS_${ARCH}
# Append the cxxflags to CXXFLAGS only on the specified architecture
##
-# USE_GHOSTSCRIPT
-# - If set, this port needs ghostscript to both
-# build and run. If a number is specified,
-# the specified version will be used.
-# The valid value is '7', '8', or '9' in that case.
-# USE_GHOSTSCRIPT_BUILD
-# - If set, this port needs ghostscript to build.
-# USE_GHOSTSCRIPT_RUN
-# - If set, this port needs ghostscript to run.
-# GHOSTSCRIPT_PORT
-# - The port that provides postscript functionality.
-# Some installations may wish to override the default
-# to specify a version without X11 and/or localized
-# versions for their nationality.
-# Default: print/ghostscript9
-# WITH_GHOSTSCRIPT_VER
-# - If set, the specified version of ghostscript will be
-# used. The valid value is "7", "8", or "9". Note that
-# this is for users, not for port maintainers. This
-# should not be used in Makefile.
-##
# USE_GL - A list of Mesa or GL related dependencies needed by the port.
# Supported components are: egl, glesv2, glut, glu, glw, and gl.
# If set to "yes", this is equivalent to "glu". Note that
@@ -1927,58 +1906,6 @@ CONFIGURE_ARGS+=--x-libraries=${LOCALBASE}/lib --x-includes=${LOCALBASE}/include
.endif
.endif
-# Set the default for the installation of Postscript(TM)-
-# compatible functionality.
-.if !defined(USE_GHOSTSCRIPT)
-. if defined(USE_GHOSTSCRIPT_BUILD)
-_USE_GHOSTSCRIPT= ${USE_GHOSTSCRIPT_BUILD}
-. elif defined(USE_GHOSTSCRIPT_RUN)
-_USE_GHOSTSCRIPT= ${USE_GHOSTSCRIPT_RUN}
-. endif
-.else
-_USE_GHOSTSCRIPT= ${USE_GHOSTSCRIPT}
-.endif
-
-.if defined(WITH_GHOSTSCRIPT_VER) && !empty(WITH_GHOSTSCRIPT_VER:M[789])
-_USE_GHOSTSCRIPT_DEFAULT_VER= ${WITH_GHOSTSCRIPT_VER}
-.else
-_USE_GHOSTSCRIPT_DEFAULT_VER= 9
-.endif
-
-.if defined(_USE_GHOSTSCRIPT)
-. if !defined(WITHOUT_X11)
-_USE_GHOSTSCRIPT_PKGNAME_SUFFIX=
-. else
-_USE_GHOSTSCRIPT_PKGNAME_SUFFIX=-nox11
-. endif
-. if !empty(_USE_GHOSTSCRIPT:M[789])
-_USE_GHOSTSCRIPT_VER=${_USE_GHOSTSCRIPT:M[789]}
-. else
-_USE_GHOSTSCRIPT_VER=${_USE_GHOSTSCRIPT_DEFAULT_VER}
-. endif
-.else
-_USE_GHOSTSCRIPT_VER=${_USE_GHOSTSCRIPT_DEFAULT_VER}
-.endif
-
-# Sanity check
-.if defined(_USE_GHOSTSCRIPT) && defined(WITH_GHOSTSCRIPT_VER)
-. if empty(WITH_GHOSTSCRIPT_VER:M[789])
-. error You set an invalid value "${WITH_GHOSTSCRIPT_VER}" in WITH_GHOSTSCRIPT_VER. Abort.
-. elif ${_USE_GHOSTSCRIPT_VER} != ${WITH_GHOSTSCRIPT_VER}
-. error You set WITH_GHOSTSCRIPT_VER as ${WITH_GHOSTSCRIPT_VER} but ${PKGNAME} requires print/ghostscript${_USE_GHOSTSCRIPT_VER}. Abort.
-. endif
-.endif
-
-GHOSTSCRIPT_PORT?= print/ghostscript${_USE_GHOSTSCRIPT_VER}${_USE_GHOSTSCRIPT_PKGNAME_SUFFIX}
-
-# Set up the ghostscript dependencies.
-.if defined(USE_GHOSTSCRIPT) || defined(USE_GHOSTSCRIPT_BUILD)
-BUILD_DEPENDS+= gs:${PORTSDIR}/${GHOSTSCRIPT_PORT}
-.endif
-.if defined(USE_GHOSTSCRIPT) || defined(USE_GHOSTSCRIPT_RUN)
-RUN_DEPENDS+= gs:${PORTSDIR}/${GHOSTSCRIPT_PORT}
-.endif
-
# Macro for doing in-place file editing using regexps
REINPLACE_ARGS?= -i.bak
REINPLACE_CMD?= ${SED} ${REINPLACE_ARGS}
diff --git a/Mk/bsd.sanity.mk b/Mk/bsd.sanity.mk
index a540bf93a4d8..3040665aa62e 100644
--- a/Mk/bsd.sanity.mk
+++ b/Mk/bsd.sanity.mk
@@ -47,6 +47,10 @@ DEV_ERROR+= "USE_KDELIBS_VER is unsupported"
DEV_ERROR+= "USE_QT_VER is unsupported"
.endif
+.if defined(USE_GHOSTSCRIPT) || defined(USE_GHOSTSCRIPT_BUILD) || defined(USE_GHOSTSCRIPT_RUN)
+DEV_ERROR+= "USE_GHOSTSCRIPT is unsupported, please use USES=ghostscript instead"
+.endif
+
.if !empty(LIB_DEPENDS:M*/../*)
DEV_ERROR+= "LIB_DEPENDS contains unsupported relative path to dependency"
.endif
diff --git a/cad/xcircuit/Makefile b/cad/xcircuit/Makefile
index 5a8a6e8a1cb3..be61e7cf80c0 100644
--- a/cad/xcircuit/Makefile
+++ b/cad/xcircuit/Makefile
@@ -16,8 +16,7 @@ LICENSE= GPLv2
OPTIONS_DEFINE= EXAMPLES
USE_XORG= xpm xscrnsaver xt
-USES= tk gmake tar:tgz
-USE_GHOSTSCRIPT_RUN= yes
+USES= tk ghostscript:run gmake tar:tgz
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --with-tcl=${TCL_LIBDIR} \
--with-tk=${TK_LIBDIR}
diff --git a/chinese/enscript/Makefile b/chinese/enscript/Makefile
index a8d3be39ab8c..cb1263c6c248 100644
--- a/chinese/enscript/Makefile
+++ b/chinese/enscript/Makefile
@@ -14,7 +14,7 @@ EXTRA_PATCHES= ${.CURDIR}/files/patch-*
PLIST= ${WRKDIR}/pkg-plist
PKGMESSAGE= ${.CURDIR}/pkg-message
-USE_GHOSTSCRIPT_RUN= yes
+USES+= ghostscript:run
post-patch:
@${ECHO_CMD} "share/enscript/README.BIG5" > ${WRKDIR}/pkg-plist
diff --git a/comms/efax-gtk/Makefile b/comms/efax-gtk/Makefile
index 1eba2e78bc2a..0caeb75202b3 100644
--- a/comms/efax-gtk/Makefile
+++ b/comms/efax-gtk/Makefile
@@ -17,8 +17,7 @@ LIB_DEPENDS= libsigc-1.2.so:${PORTSDIR}/devel/libsigc++12 \
libcxx-gtk-utils-2-2.2.so:${PORTSDIR}/x11-toolkits/c++-gtk-utils
RUN_DEPENDS= ggv:${PORTSDIR}/print/ggv
-USES= compiler:c++11-lib pkgconfig
-USE_GHOSTSCRIPT_RUN=yes
+USES= compiler:c++11-lib ghostscript:run pkgconfig
USE_GNOME= gtk20
GNU_CONFIGURE= yes
diff --git a/comms/hylafax/Makefile b/comms/hylafax/Makefile
index 2865e4d65559..1d32fdcc2943 100644
--- a/comms/hylafax/Makefile
+++ b/comms/hylafax/Makefile
@@ -15,9 +15,8 @@ LIB_DEPENDS= libtiff.so:${PORTSDIR}/graphics/tiff \
libjbig.so:${PORTSDIR}/graphics/jbigkit
MAKE_JOBS_UNSAFE= yes
-USE_GHOSTSCRIPT=yes
HAS_CONFIGURE= yes
-USES= fakeroot jpeg
+USES= fakeroot ghostscript jpeg
CONFIGURE_ARGS= --with-INSTALL="" \
--with-LIBTIFF="-L${LOCALBASE}/lib -ltiff -ljpeg" \
diff --git a/comms/tkhylafax/Makefile b/comms/tkhylafax/Makefile
index 83066cceb90e..b83ad4c82f43 100644
--- a/comms/tkhylafax/Makefile
+++ b/comms/tkhylafax/Makefile
@@ -14,8 +14,7 @@ COMMENT= Tcl/tk interface to Sam Leffler's fax package
RUN_DEPENDS= sendfax:${PORTSDIR}/comms/hylafax \
gv:${PORTSDIR}/print/gv
-USE_GHOSTSCRIPT_RUN= yes
-USES+= tk:run
+USES+= ghostscript:run tk:run
WRKSRC= ${WRKDIR}/tkhylafax
MAKE_ARGS= STAGEDIR=${STAGEDIR} PREFIX=${STAGEDIR}${PREFIX} TCLSH=${TCLSH} WISH=${WISH}
diff --git a/deskutils/etask/Makefile b/deskutils/etask/Makefile
index c07e2cdab76a..68ab71e8db3f 100644
--- a/deskutils/etask/Makefile
+++ b/deskutils/etask/Makefile
@@ -14,7 +14,7 @@ COMMENT= Manage your projects or tasks within GNU Emacs
RUN_DEPENDS= xpdf:${PORTSDIR}/graphics/xpdf
USE_EMACS= yes
-USE_GHOSTSCRIPT_RUN= yes
+USES= ghostscript:run
USE_TEX= latex dvipsk
LISPDIR= ${PREFIX}/${EMACS_VERSION_SITE_LISPDIR}/${PORTNAME}
diff --git a/deskutils/gworkspace/Makefile b/deskutils/gworkspace/Makefile
index af001257f6b9..a62057b642b2 100644
--- a/deskutils/gworkspace/Makefile
+++ b/deskutils/gworkspace/Makefile
@@ -23,7 +23,7 @@ MAKE_ENV+= GNUSTEP_INSTALLATION_DOMAIN=SYSTEM
PLIST_SUB+= PDFVIEW="@comment "
.else
PLIST_SUB+= PDFVIEW=""
-USE_GHOSTSCRIPT= yes
+USES+= ghostscript
.endif
pre-configure:
diff --git a/devel/doxygen/Makefile b/devel/doxygen/Makefile
index 4e23f13978b6..578126c64fef 100644
--- a/devel/doxygen/Makefile
+++ b/devel/doxygen/Makefile
@@ -65,7 +65,7 @@ IGNORE= PDFDOCS option requires HTMLDOCS and LATEX options to be set
.endif
.if ${PORT_OPTIONS:MPDFDOCS}
-USE_GHOSTSCRIPT_BUILD= yes
+USES+= ghostscript:build
.endif
.if ${PORT_OPTIONS:MQT4}
diff --git a/devel/gdcm/Makefile b/devel/gdcm/Makefile
index 04996af33c77..2a20987198ad 100644
--- a/devel/gdcm/Makefile
+++ b/devel/gdcm/Makefile
@@ -66,7 +66,7 @@ PLIST_SUB+= GDCM_MAJOR="${GDCM_MAJOR}" \
.if ${PORT_OPTIONS:MDOCS}
USE_TEX= latex:build
-USE_GHOSTSCRIPT=yes
+USES+= ghostscript
BUILD_DEPENDS+= doxygen:${PORTSDIR}/devel/doxygen
CMAKE_ARGS+= -DGDCM_DOCUMENTATION:BOOL=YES \
-DGDCM_INSTALL_MAN_DIR:STRING=man \
diff --git a/devel/libexplain/Makefile b/devel/libexplain/Makefile
index d6dd2f20ec39..862a1b46496d 100644
--- a/devel/libexplain/Makefile
+++ b/devel/libexplain/Makefile
@@ -17,8 +17,7 @@ LICENSE_FILE= ${WRKSRC}/LICENSE
BUILD_DEPENDS= gsed:${PORTSDIR}/textproc/gsed
RUN_DEPENDS= lsof:${PORTSDIR}/sysutils/lsof
-USES= bison gettext gmake libtool:build
-USE_GHOSTSCRIPT_BUILD= yes
+USES= bison gettext ghostscript:build gmake libtool:build
GNU_CONFIGURE= yes
CONFIGURE_ENV= ac_cv_header_linux_kd_h=no
USE_LDCONFIG= yes
diff --git a/editors/ted/Makefile b/editors/ted/Makefile
index 8c3f3dc2b472..67c2ae1a7a54 100644
--- a/editors/ted/Makefile
+++ b/editors/ted/Makefile
@@ -26,8 +26,7 @@ GTK2_DESC= Use GTK2 instead of MOTIF
WRKSRC= ${WRKDIR}/Ted-${PORTVERSION}
USE_XORG= xext xft
-USES= iconv
-USE_GHOSTSCRIPT_RUN= yes
+USES= ghostscript:run iconv
GNU_CONFIGURE= yes
MAKE_ENV= DEF_AFMDIR="-DAFMDIR=\"\\\"${AFMDIR}/\\\"\"" \
DEF_INDDIR="-DINDDIR=\"\\\"${INDDIR}/\\\"\"" \
diff --git a/editors/texmacs/Makefile b/editors/texmacs/Makefile
index d5bb52a759a8..9868057c1d0c 100644
--- a/editors/texmacs/Makefile
+++ b/editors/texmacs/Makefile
@@ -40,7 +40,7 @@ PDF_DESC= Experimental PDF renderer
FREETYPE_LIB_DEPENDS= libfreetype.so:${PORTSDIR}/print/freetype2
FREETYPE_CONFIGURE_WITH=freetype=linked
-GHOSTSCRIPT_USE= GHOSTSCRIPT=yes
+GHOSTSCRIPT_USES= ghostscript
GHOSTSCRIPT_CONFIGURE_WITH= gs=yes
ICONV_USES= iconv
diff --git a/editors/texmaker/Makefile b/editors/texmaker/Makefile
index af79d994389c..659aaf04b468 100644
--- a/editors/texmaker/Makefile
+++ b/editors/texmaker/Makefile
@@ -13,8 +13,7 @@ COMMENT= LaTeX Development Environment
LIB_DEPENDS= libpoppler.so:${PORTSDIR}/graphics/poppler
-USES= desktop-file-utils pkgconfig qmake tar:bzip2
-USE_GHOSTSCRIPT_RUN= yes
+USES= desktop-file-utils ghostscript:run pkgconfig qmake tar:bzip2
_USE_QT4= gui network xml webkit \
moc_build rcc_build uic_build
_USE_QT5= concurrent network printsupport script webkit widgets \
diff --git a/editors/texstudio/Makefile b/editors/texstudio/Makefile
index eac291513859..5a8242dc9c95 100644
--- a/editors/texstudio/Makefile
+++ b/editors/texstudio/Makefile
@@ -12,9 +12,9 @@ COMMENT= Integrated writing environment for creating LaTeX documents
LIB_DEPENDS= libpoppler.so:${PORTSDIR}/graphics/poppler \
libpoppler-qt4.so:${PORTSDIR}/graphics/poppler-qt4
-USES= desktop-file-utils dos2unix execinfo pkgconfig qmake
+USES= desktop-file-utils dos2unix execinfo ghostscript:run \
+ pkgconfig qmake
DOS2UNIX_FILES= ${PORTNAME}.pro
-USE_GHOSTSCRIPT_RUN= yes
USE_QT4= gui network script svg xml iconengines_run \
designer_build moc_build rcc_build uic_build
USE_TEX= latex dvipsk
diff --git a/graphics/GraphicsMagick/Makefile b/graphics/GraphicsMagick/Makefile
index a1119f145718..aeb3115b6b1e 100644
--- a/graphics/GraphicsMagick/Makefile
+++ b/graphics/GraphicsMagick/Makefile
@@ -21,9 +21,8 @@ LIB_DEPENDS= libjbig.so:${PORTSDIR}/graphics/jbigkit \
PORTSCOUT= limit:^1\.3\.
-USES= iconv jpeg libtool tar:bzip2
+USES= ghostscript iconv jpeg libtool tar:bzip2
USE_GNOME= libxml2
-USE_GHOSTSCRIPT=yes
GNU_CONFIGURE= yes
CONFIGURE_ENV= PTHREAD_LIBS="-lpthread"
CONFIGURE_ARGS= --without-perl --enable-shared --enable-static \
diff --git a/graphics/ImageMagick/Makefile b/graphics/ImageMagick/Makefile
index 47459ec91868..cd7c01d2be91 100644
--- a/graphics/ImageMagick/Makefile
+++ b/graphics/ImageMagick/Makefile
@@ -219,7 +219,11 @@ PLIST_SUB+= TIFF="@comment "
.if ${PORT_OPTIONS:MGSLIB}
CONFIGURE_ARGS+= --with-gslib
-USE_GHOSTSCRIPT= yes
+. if ${PORT_OPTIONS:MX11}
+USES+= ghostscript
+. else
+USES+= ghostscript:nox11
+. endif
.else
CONFIGURE_ARGS+= --without-gslib
.endif
@@ -352,7 +356,7 @@ PLIST_SUB+= PANGO="@comment "
# PDF (Adobe Portable Document Format) support
.if ${PORT_OPTIONS:MPDF}
-USE_GHOSTSCRIPT= yes
+USES+= ghostscript
.endif
.if ! ${PORT_OPTIONS:MX11}
@@ -375,7 +379,7 @@ INSTALL_TARGET= install-strip
.endif
.if ${PORT_OPTIONS:MTESTS}
-USE_GHOSTSCRIPT_BUILD=yes
+USES+= ghostscript:build
.endif
post-patch:
diff --git a/graphics/cinepaint/Makefile b/graphics/cinepaint/Makefile
index 24e06fe74cf6..4093446143ce 100644
--- a/graphics/cinepaint/Makefile
+++ b/graphics/cinepaint/Makefile
@@ -25,11 +25,10 @@ OYRANOS_DESC= ICC profile support via Oyranos
PRINT_DESC= Gutenprint (gimp-print) plugin
GNU_CONFIGURE= yes
-USES= autoreconf desktop-file-utils gettext gmake jpeg libtool \
- pkgconfig python
+USES= autoreconf desktop-file-utils gettext ghostscript:run \
+ gmake jpeg libtool pkgconfig python
USE_XORG= xmu
USE_GNOME= gtk20
-USE_GHOSTSCRIPT_RUN=yes
USE_LDCONFIG= yes
INSTALL_TARGET= install-strip
diff --git a/graphics/eps2png/Makefile b/graphics/eps2png/Makefile
index 4f82fb4991e8..4afe0811c061 100644
--- a/graphics/eps2png/Makefile
+++ b/graphics/eps2png/Makefile
@@ -11,8 +11,7 @@ MASTER_SITE_SUBDIR= CPAN:JV
MAINTAINER= perl@FreeBSD.org
COMMENT= Converts EPS images to PNG
-USE_GHOSTSCRIPT= yes
-USES= perl5
+USES= ghostscript perl5
USE_PERL5= configure
MAKE_ARGS= INSTLLSCRIPT="${PREFIX}/bin"
diff --git a/graphics/epstool/Makefile b/graphics/epstool/Makefile
index 498eb374b2b3..ec03ec0cf269 100644
--- a/graphics/epstool/Makefile
+++ b/graphics/epstool/Makefile
@@ -12,9 +12,7 @@ COMMENT= Create or extract preview bitmaps in EPS files
LICENSE= GPLv2
-USE_GHOSTSCRIPT_RUN= yes
-
-USES= gmake
+USES= ghostscript:run gmake
MAKEFILE= makefile
MAKE_ARGS= MAKE="${MAKE_CMD}" GSCDEBUG="" CC="${CC}" CCAUX="${CC}" \
CLINK="${CC} ${LDFLAGS}" LINK="${CC} ${LDFLAGS}" EPSLIB="" \
diff --git a/graphics/gimp-app/Makefile b/graphics/gimp-app/Makefile
index 4d37fae6f571..8a84082ccbc1 100644
--- a/graphics/gimp-app/Makefile
+++ b/graphics/gimp-app/Makefile
@@ -93,7 +93,7 @@ CONFIGURE_ARGS+= --without-dbus
.endif
.if ${PORT_OPTIONS:MGHOSTSCRIPT}
-USE_GHOSTSCRIPT= yes
+USES+= ghostscript
CONFIGURE_ARGS+= --with-gs
PLIST_SUB+= GS=""
.else
diff --git a/graphics/gle-graphics/Makefile b/graphics/gle-graphics/Makefile
index 526b6b701707..d0f9f4da6be3 100644
--- a/graphics/gle-graphics/Makefile
+++ b/graphics/gle-graphics/Makefile
@@ -32,7 +32,8 @@ DOCS_USE= tex=latex:build tex=dvipsk:build
GNU_CONFIGURE= yes
LATEX_GS_DESC= Use LaTeX & GhostScript
-LATEX_GS_USE= tex=latex ghostscript=run
+LATEX_GS_USE= tex=latex
+LATEX_GS_USES= ghostscript
MAKE_JOBS_UNSAFE=yes
diff --git a/graphics/graphviz/Makefile b/graphics/graphviz/Makefile
index deeba50bed2d..3561332af6c3 100644
--- a/graphics/graphviz/Makefile
+++ b/graphics/graphviz/Makefile
@@ -90,7 +90,7 @@ GNOMEUI_USE= GNOME=libgnomeui
SMYRNA_USE= GNOME=libglade2 GL=glut
GVEDIT_USE= qt4=qmake_build,moc_build,rcc_build,uic_build \
qt4=linguist_build,corelib,gui
-GHOSTSCRIPT_USE=GHOSTSCRIPT=yes
+GHOSTSCRIPT_USES=ghostscript
PERL_USES= perl5
PHP_USE= PHP=yes PHP_BUILD=yes
PYTHON_USES= python:2.7,build
diff --git a/graphics/imgtops/Makefile b/graphics/imgtops/Makefile
index 9f4af620b327..8e2ffe631170 100644
--- a/graphics/imgtops/Makefile
+++ b/graphics/imgtops/Makefile
@@ -15,8 +15,7 @@ LICENSE_FILE= ${WRKSRC}/LICENSE
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pillow>0:${PORTSDIR}/graphics/py-pillow
-USES= python
-USE_GHOSTSCRIPT_RUN= yes
+USES= ghostscript:run python
USE_PYTHON= distutils
post-install:
diff --git a/graphics/impressive/Makefile b/graphics/impressive/Makefile
index 74bbf9d146ce..f627ea378efb 100644
--- a/graphics/impressive/Makefile
+++ b/graphics/impressive/Makefile
@@ -21,8 +21,7 @@ RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}opengl>=0:${PORTSDIR}/graphics/py-opengl \
mplayer:${PORTSDIR}/multimedia/mplayer \
${PYGAME}
-USES= python
-USE_GHOSTSCRIPT_RUN= yes
+USES= ghostscript:run python
NO_BUILD= yes
PLIST_FILES= bin/${PORTNAME} \
man/man1/${PORTNAME}.1.gz
diff --git a/graphics/klatexformula/Makefile b/graphics/klatexformula/Makefile
index 478cc213e3f5..cd5756df3845 100644
--- a/graphics/klatexformula/Makefile
+++ b/graphics/klatexformula/Makefile
@@ -10,11 +10,11 @@ COMMENT= Convert LaTeX formula to image
BUILD_DEPENDS= help2man:${PORTSDIR}/misc/help2man
-USES= cmake:outsource desktop-file-utils shared-mime-info
+USES= cmake:outsource desktop-file-utils ghostscript:run \
+ shared-mime-info
USE_QT4= gui xml dbus designer_build linguisttools_build \
qmake_build moc_build rcc_build uic_build
USE_TEX= latex dvipsk
-USE_GHOSTSCRIPT_RUN= yes
CMAKE_ARGS= -DQT_QMAKE_EXECUTABLE_FINDQT=${QMAKE} \
-DKLF_BUILD_KTEXTEDITORPLUGIN=off \
-DKLF_INSTALL_POST_UPDATEMIMEDATABASE=off \
diff --git a/graphics/ocaml-images/Makefile b/graphics/ocaml-images/Makefile
index ffad2a05a787..87f1b5f46f51 100644
--- a/graphics/ocaml-images/Makefile
+++ b/graphics/ocaml-images/Makefile
@@ -57,6 +57,7 @@ FREETYPE_CONFIGURE_WITH=freetype
FREETYPE_LIB_DEPENDS= libttf.so:${PORTSDIR}/print/freetype
GHOSTSCRIPT_CONFIGURE_WITH= gs
+GHOSTSCRIPT_USES= ghostscript
GTK2_CONFIGURE_WITH= liblgtk2
GTK2_BUILD_DEPENDS= lablgtk2:${PORTSDIR}/x11-toolkits/ocaml-lablgtk2
@@ -68,10 +69,6 @@ GTK2_RUN_DEPENDS= lablgtk2:${PORTSDIR}/x11-toolkits/ocaml-lablgtk2
USE_XORG= xpm
.endif
-.if ${PORT_OPTIONS:MGHOSTSCRIPT}
-USE_GHOSTSCRIPT= yes
-.endif
-
do-configure:
@(cd ${WRKSRC} && ${REINPLACE_CMD} ${OMAKESUBS} OMakefile)
(cd ${WRKSRC} && ${OMAKE} ${OMARGS} configure)
diff --git a/graphics/ocrfeeder/Makefile b/graphics/ocrfeeder/Makefile
index ee2ebe483d33..b52880b899d7 100644
--- a/graphics/ocrfeeder/Makefile
+++ b/graphics/ocrfeeder/Makefile
@@ -24,9 +24,9 @@ RUN_DEPENDS:= ${PYTHON_PKGNAMEPREFIX}lxml>0:${PORTSDIR}/devel/py-lxml \
NO_ARCH= yes
-USES= desktop-file-utils gettext gmake pkgconfig python tar:xz
+USES= desktop-file-utils gettext ghostscript gmake pkgconfig \
+ python tar:xz
USE_GNOME= gnomedocutils gtk30 librsvg2 pygobject3
-USE_GHOSTSCRIPT=yes
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --disable-silent-rules
diff --git a/graphics/peps/Makefile b/graphics/peps/Makefile
index 59814388febb..381ccf527308 100644
--- a/graphics/peps/Makefile
+++ b/graphics/peps/Makefile
@@ -11,7 +11,7 @@ MASTER_SITES= http://peps.redprince.net/peps/ \
MAINTAINER= ports@FreeBSD.org
COMMENT= Converts EPS images to anti-aliased bitmaps
-USE_GHOSTSCRIPT_RUN= yes
+USES= ghostscript:run
MAKE_ENV= GSPATH="${LOCALBASE}/bin/gs" GZPATH="/usr/bin/gzip" \
ETC="${PREFIX}/etc"
diff --git a/graphics/pstoedit/Makefile b/graphics/pstoedit/Makefile
index 436a5426243c..24b14524e0d7 100644
--- a/graphics/pstoedit/Makefile
+++ b/graphics/pstoedit/Makefile
@@ -14,8 +14,7 @@ LICENSE= GPLv2
LIB_DEPENDS= libgd.so:${PORTSDIR}/graphics/gd
-USES= pathfix pkgconfig libtool
-USE_GHOSTSCRIPT= yes
+USES= ghostscript pathfix pkgconfig libtool
GNU_CONFIGURE= yes
MAKE_ENV= INSTALL_STRIP_FLAG="${STRIP}"
USE_LDCONFIG= yes
diff --git a/graphics/pstoepsi/Makefile b/graphics/pstoepsi/Makefile
index 6ddbcfc41ef2..b507509a5d64 100644
--- a/graphics/pstoepsi/Makefile
+++ b/graphics/pstoepsi/Makefile
@@ -15,7 +15,7 @@ COMMENT= Wiliam Chia-Wei Cheng's yet another PS to EPSI converter
RUN_DEPENDS= pbmtoepsi:${PORTSDIR}/graphics/netpbm
-USE_GHOSTSCRIPT_RUN= yes
+USES= ghostscript:run
NO_WRKSUBDIR= yes
pre-patch:
diff --git a/graphics/py-chart/Makefile b/graphics/py-chart/Makefile
index c02c911dd9c1..271c7a3117d3 100644
--- a/graphics/py-chart/Makefile
+++ b/graphics/py-chart/Makefile
@@ -14,8 +14,7 @@ COMMENT= Create high quality Encapsulated Postscript, PDF, or PNG charts
LICENSE= GPLv2
-USE_GHOSTSCRIPT_RUN= yes
USE_PYTHON= distutils autoplist
-USES= python:2.7
+USES= ghostscript:run python:2.7
.include <bsd.port.mk>
diff --git a/graphics/sam2p/Makefile b/graphics/sam2p/Makefile
index ff4635f62874..33173fb318c4 100644
--- a/graphics/sam2p/Makefile
+++ b/graphics/sam2p/Makefile
@@ -17,10 +17,9 @@ RUN_DEPENDS= zip:${PORTSDIR}/archivers/zip \
OPTIONS_DEFINE= DOCS EXAMPLES
-USES= gmake jpeg:run perl5
+USES= ghostscript:run gmake jpeg:run perl5
USE_PERL5= build
USE_GCC= any
-USE_GHOSTSCRIPT_RUN= yes
GNU_CONFIGURE= yes
CONFIGURE_ENV= ac_cv_path_pts_bash="${SH}"
CONFIGURE_ARGS= --enable-gif
diff --git a/graphics/xournal/Makefile b/graphics/xournal/Makefile
index f4e3aeee325e..4b8a23083027 100644
--- a/graphics/xournal/Makefile
+++ b/graphics/xournal/Makefile
@@ -24,6 +24,8 @@ OPTIONS_DEFINE= GHOSTSCRIPT DOCS
GHOSTSCRIPT_DESC= Install ghostscript (PS/PDF as bitmap bg)
OPTIONS_DEFAULT= GHOSTSCRIPT
+GHOSTSCRIPT_USES= ghostscript:run
+
PORTDOCS_MAIN= AUTHORS \
ChangeLog \
COPYING \
@@ -64,10 +66,6 @@ PORTDOCS= ${PORTDOCS_MAIN} \
.include <bsd.port.options.mk>
-.if ${PORT_OPTIONS:MGHOSTSCRIPT}
-USE_GHOSTSCRIPT_RUN= yes
-.endif
-
post-patch:
@${REINPLACE_CMD} \
-e 's|$$(DESTDIR)/usr/share/|$$(DESTDIR)$$$$desktopdir/|g' \
diff --git a/graphics/xpaint/Makefile b/graphics/xpaint/Makefile
index f458436412d0..f116330d955f 100644
--- a/graphics/xpaint/Makefile
+++ b/graphics/xpaint/Makefile
@@ -21,9 +21,8 @@ RUN_DEPENDS= psselect:${PORTSDIR}/print/psutils \
bash:${PORTSDIR}/shells/bash
USE_XORG= xft xmu xpm
-USE_GHOSTSCRIPT_RUN=yes
GNU_CONFIGURE= yes
-USES= jpeg libtool:build shebangfix tar:bzip2
+USES= ghostscript:run jpeg libtool:build shebangfix tar:bzip2
SHEBANG_FILES= share/bin/imgmerge share/bin/xpaint_ocr
CPPFLAGS+= -I${LOCALBASE}/include -I${LOCALBASE}/include/freetype2 \
diff --git a/mail/claws-mail-pdf_viewer/Makefile b/mail/claws-mail-pdf_viewer/Makefile
index dfba90ca7a71..146c85bf9980 100644
--- a/mail/claws-mail-pdf_viewer/Makefile
+++ b/mail/claws-mail-pdf_viewer/Makefile
@@ -8,7 +8,7 @@ COMMENT= PDF and PostScript viewer plugin for Claws Mail
LIB_DEPENDS= libpoppler-glib.so:${PORTSDIR}/graphics/poppler-glib
-USE_GHOSTSCRIPT=yes
+USES+= ghostscript
CLAWS_PLUGINS_BUILD= pdf_viewer
diff --git a/mail/courier/Makefile b/mail/courier/Makefile
index 121df194786d..b3fda14a03f3 100644
--- a/mail/courier/Makefile
+++ b/mail/courier/Makefile
@@ -189,7 +189,7 @@ RUN_DEPENDS+= procmail:${PORTSDIR}/mail/procmail
.endif
.if ${PORT_OPTIONS:MSENDFAX}
-USE_GHOSTSCRIPT=yes
+USES+= ghostscript
SENDFAX_DEPENDS=sendfax:${PORTSDIR}/comms/mgetty+sendfax \
pnmscale:${PORTSDIR}/graphics/netpbm
BUILD_DEPENDS+= ${SENDFAX_DEPENDS}
diff --git a/math/R/Makefile b/math/R/Makefile
index 6aef58114e5d..cdd0d94c2a92 100644
--- a/math/R/Makefile
+++ b/math/R/Makefile
@@ -196,7 +196,7 @@ USES+= readline
.else # LIBR_SLAVEPORT
.if ${PORT_OPTIONS:MGHOSTSCRIPT}
-USE_GHOSTSCRIPT_RUN= yes
+USES+= ghostscript
.endif
.if ${PORT_OPTIONS:MJPEG}
diff --git a/math/asymptote/Makefile b/math/asymptote/Makefile
index 6b00c9c855bf..d40b09727f52 100644
--- a/math/asymptote/Makefile
+++ b/math/asymptote/Makefile
@@ -34,9 +34,8 @@ MAKE_JOBS_UNSAFE= yes
ONLY_FOR_ARCHS= i386 amd64
-USES= gmake perl5 python tar:tgz
+USES= ghostscript gmake perl5 python tar:tgz
USE_AUTOTOOLS= autoconf aclocal
-USE_GHOSTSCRIPT=yes
USE_GL= glut
USE_PERL5= build
USE_TEX= dvipsk formats
diff --git a/math/plplot/Makefile b/math/plplot/Makefile
index 8287f827c494..466cf29a77a1 100644
--- a/math/plplot/Makefile
+++ b/math/plplot/Makefile
@@ -22,8 +22,7 @@ RUN_DEPENDS= bash:${PORTSDIR}/shells/bash \
USE_GNOME= pango
USE_PERL5= build
-USE_GHOSTSCRIPT=yes
-USES= cmake gmake perl5 pkgconfig
+USES= cmake ghostscript gmake perl5 pkgconfig
CMAKE_ARGS= -DENABLE_java:BOOL=OFF \
-DENABLE_octave:BOOL=OFF \
-DENABLE_pdl:BOOL=OFF \
diff --git a/misc/pspresent/Makefile b/misc/pspresent/Makefile
index 04e02324c1aa..c490b9d1fc67 100644
--- a/misc/pspresent/Makefile
+++ b/misc/pspresent/Makefile
@@ -13,7 +13,7 @@ COMMENT= Full-screen slide shows of postscript files
LICENSE= GPLv2
USE_XORG= x11 xext xinerama
-USE_GHOSTSCRIPT_RUN= yes
+USES= ghostscript:run
MAKE_ARGS= CC="${CC}" CFLAGS="${CFLAGS}" LDLIBS="${LDFLAGS}"
ALL_TARGET= pspresent
diff --git a/multimedia/lives/Makefile b/multimedia/lives/Makefile
index 5d5c10e93c47..b7ae04ac9b56 100644
--- a/multimedia/lives/Makefile
+++ b/multimedia/lives/Makefile
@@ -41,12 +41,12 @@ RUN_DEPENDS= ${LOCALBASE}/bin/analyseplugin:${PORTSDIR}/audio/ladspa \
WRKSRC= ${WRKDIR}/${DISTNAME:tl}
-USES= libtool pathfix perl5 pkgconfig python shebangfix tar:bzip2
+USES= ghostscript:run libtool pathfix perl5 pkgconfig python \
+ shebangfix tar:bzip2
SHEBANG_FILES= build-lives-rfx-plugin build-lives-rfx-plugin-multi \
smogrify tools/autolives.pl
GNU_CONFIGURE= yes
USE_CSTD= gnu89
-USE_GHOSTSCRIPT_RUN= yes
USE_GNOME= gtk30
USE_LDCONFIG= yes
diff --git a/print/auctex/Makefile b/print/auctex/Makefile
index a350468aa46d..b9a8a1c1d4ae 100644
--- a/print/auctex/Makefile
+++ b/print/auctex/Makefile
@@ -15,7 +15,7 @@ LICENSE= GPLv3
NOT_FOR_ARCHS= ia64
USE_TEX= latex
-USE_GHOSTSCRIPT=yes
+USES= ghostscript
USE_EMACS= yes
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --with-lispdir=${PREFIX}/${LISPDIR} \
diff --git a/print/cups-filters/Makefile b/print/cups-filters/Makefile
index 54f5130810d0..ba20a2a7df96 100644
--- a/print/cups-filters/Makefile
+++ b/print/cups-filters/Makefile
@@ -23,11 +23,11 @@ LIB_DEPENDS= libtiff.so:${PORTSDIR}/graphics/tiff \
libpoppler.so:${PORTSDIR}/graphics/poppler
MAKE_JOBS_UNSAFE=YES
-USES= compiler:c++11-lib cpe jpeg libtool pathfix pkgconfig shebangfix tar:xz
+USES= compiler:c++11-lib cpe ghostscript jpeg libtool pathfix \
+ pkgconfig shebangfix tar:xz
CPE_VENDOR= linuxfoundation
SHEBANG_FILES= filter/textonly
USE_GNOME= glib20
-USE_GHOSTSCRIPT= yes
USE_RC_SUBR= cups_browsed
GNU_CONFIGURE= yes
CUPS_SOCKET?= /var/run/cups.sock
diff --git a/print/cups-fxlinuxprint/Makefile b/print/cups-fxlinuxprint/Makefile
index 6f22e934b8b9..e22f3a53fea8 100644
--- a/print/cups-fxlinuxprint/Makefile
+++ b/print/cups-fxlinuxprint/Makefile
@@ -14,9 +14,8 @@ LICENSE= GPLv2
LIB_DEPENDS= libcups.so:${PORTSDIR}/print/cups-client
-USES= dos2unix
+USES= dos2unix ghostscript:run
DOS2UNIX_FILES= fxlinuxprint.ppd
-USE_GHOSTSCRIPT_RUN=yes
GNU_CONFIGURE= yes
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
diff --git a/print/cups-pdf/Makefile b/print/cups-pdf/Makefile
index 9fe7617e712c..9eb375458b8c 100644
--- a/print/cups-pdf/Makefile
+++ b/print/cups-pdf/Makefile
@@ -19,7 +19,7 @@ RUN_DEPENDS= ${LOCALBASE}/sbin/cupsd:${PORTSDIR}/print/cups-base
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
-USE_GHOSTSCRIPT_RUN= yes
+USES= ghostscript:run
OPTIONS_DEFINE= DOCS
OPTIONS_DEFAULT= DOCS
diff --git a/print/cups-pstoraster/Makefile b/print/cups-pstoraster/Makefile
index d409e10e5b89..6340ca51d9d1 100644
--- a/print/cups-pstoraster/Makefile
+++ b/print/cups-pstoraster/Makefile
@@ -23,9 +23,8 @@ WRKSRC= ${WRKDIR}/espgs-${PORTVERSION}
DATADIR= ${PREFIX}/share/espgs
-USES= gmake iconv tar:bzip2
# We just need the ghostscript fonts, nothing more
-USE_GHOSTSCRIPT_RUN= yes
+USES= ghostscript:run gmake iconv tar:bzip2
GNU_CONFIGURE= yes
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
diff --git a/print/dvisvg/Makefile b/print/dvisvg/Makefile
index d780cf0786f2..d43ed28c3775 100644
--- a/print/dvisvg/Makefile
+++ b/print/dvisvg/Makefile
@@ -13,7 +13,7 @@ COMMENT= Converter from DVI to SVG
LICENSE= GPLv2
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION:R}
-USE_GHOSTSCRIPT_RUN= yes
+USES= ghostscript:run
USE_TEX= base texmf texhash
ALL_TARGET= # empty
# workaround for svgfonts.c not including kpathsea/c-auto.h
diff --git a/print/epsonepl/Makefile b/print/epsonepl/Makefile
index 97f9a33e8772..3b368dc71627 100644
--- a/print/epsonepl/Makefile
+++ b/print/epsonepl/Makefile
@@ -13,8 +13,7 @@ COMMENT= Printer filter for EPSON EPL-5700L etc
LIB_DEPENDS= libijs.so:${PORTSDIR}/print/libijs
-USES= uidfix tar:tgz
-USE_GHOSTSCRIPT_RUN= yes
+USES= ghostscript:run uidfix tar:tgz
MAKEFILE= ${FILESDIR}/Makefile
SUB_FILES= pkg-message
diff --git a/print/flpsed/Makefile b/print/flpsed/Makefile
index 88d8dcd46a96..88f1b1b4577e 100644
--- a/print/flpsed/Makefile
+++ b/print/flpsed/Makefile
@@ -15,8 +15,7 @@ LICENSE= GPLv3
LIB_DEPENDS+= libfltk.so:${PORTSDIR}/x11-toolkits/fltk
GNU_CONFIGURE= yes
-USE_GHOSTSCRIPT=yes
-USES= desktop-file-utils gmake
+USES= desktop-file-utils ghostscript gmake
PLIST_FILES= bin/flpsed \
man/man1/flpsed.1.gz \
share/applications/flpsed.desktop \
diff --git a/print/font2svg/Makefile b/print/font2svg/Makefile
index 7b60078e39e6..a28fe4ecc13d 100644
--- a/print/font2svg/Makefile
+++ b/print/font2svg/Makefile
@@ -12,7 +12,7 @@ COMMENT= All font to svg-font converter
RUN_DEPENDS= bash:${PORTSDIR}/shells/bash
-USE_GHOSTSCRIPT_RUN= yes
+USES= ghostscript:run
NO_BUILD= yes
PLIST_FILES= bin/font2svg %%DATADIR%%/encodings %%DATADIR%%/font2svg.ps
diff --git a/print/foo2zjs/Makefile b/print/foo2zjs/Makefile
index e15f03d81bfa..37e57bb83843 100644
--- a/print/foo2zjs/Makefile
+++ b/print/foo2zjs/Makefile
@@ -17,8 +17,7 @@ RUN_DEPENDS= ${LOCALBASE}/share/foomatic/db/oldprinterids:${PORTSDIR}/print/foom
gsed:${PORTSDIR}/textproc/gsed
PROJECTHOST= bsdistfiles
-USE_GHOSTSCRIPT=yes
-USES= gmake shebangfix
+USES= ghostscript gmake shebangfix
SHEBANG_FILES= msexpand
SUB_FILES= pkg-message ${DEVDCONF_FILE}
EXTRAFILES= msexpand getweb
diff --git a/print/foomatic-filters/Makefile b/print/foomatic-filters/Makefile
index 993e25afc324..0b25a7b04309 100644
--- a/print/foomatic-filters/Makefile
+++ b/print/foomatic-filters/Makefile
@@ -15,8 +15,7 @@ LICENSE_FILE= ${WRKSRC}/COPYING
LIB_DEPENDS= libdbus-1.so:${PORTSDIR}/devel/dbus
-USES= autoreconf perl5 pkgconfig
-USE_GHOSTSCRIPT=yes
+USES= autoreconf ghostscript perl5 pkgconfig
GNU_CONFIGURE= yes
CONFIGURE_ENV= ac_cv_path_A2PS=${LOCALBASE}/bin/a2ps \
ac_cv_path_CUPS=${LOCALBASE}/libexec/cups \
diff --git a/print/ggv/Makefile b/print/ggv/Makefile
index 5a519bd39985..6557b2b443c9 100644
--- a/print/ggv/Makefile
+++ b/print/ggv/Makefile
@@ -14,9 +14,8 @@ COMMENT= GNOME 2 ghostscript viewer
INSTALLS_OMF= yes
USE_GNOME= gnomeprefix intlhack libgnomeui
-USES= desktop-file-utils gettext gmake libtool pathfix pkgconfig \
- tar:bzip2
-USE_GHOSTSCRIPT=yes
+USES= desktop-file-utils gettext ghostscript gmake libtool \
+ pathfix pkgconfig tar:bzip2
GNU_CONFIGURE= yes
CPPFLAGS+= -I${LOCALBASE}/include
LIBS+= -L${LOCALBASE}/lib -lm
diff --git a/print/ghostscript7-commfont/Makefile b/print/ghostscript7-commfont/Makefile
index 63f88ddeca4f..92d464c4d075 100644
--- a/print/ghostscript7-commfont/Makefile
+++ b/print/ghostscript7-commfont/Makefile
@@ -23,7 +23,7 @@ PLIST_SUB= GS_RESDIR="${GS_RESDIR}"
PKGMESSAGE= ${WRKDIR}/pkg-message
DEPENDS_ARGS+= -DA4
# set these forcibly
-USE_GHOSTSCRIPT_RUN=7
+USES= ghostscript:7,run
CONFLICTS_INSTALL= \
ghostscript8-[0-9]* \
diff --git a/print/ghostscript7-jpnfont/Makefile b/print/ghostscript7-jpnfont/Makefile
index 5008cf40c039..cc2fd0e5cecb 100644
--- a/print/ghostscript7-jpnfont/Makefile
+++ b/print/ghostscript7-jpnfont/Makefile
@@ -16,7 +16,7 @@ RUN_DEPENDS= ${LOCALBASE}/share/fonts/std.ja_JP/Ryumin-Light.gs7:${PORTSDIR}/jap
${LOCALBASE}/share/ghostscript/Resource/CIDFont/Ryumin-Light:${PORTSDIR}/print/ghostscript7-commfont
# set these forcibly
-USE_GHOSTSCRIPT_RUN= 7
+USES= ghostscript:7,run
NO_BUILD= yes
DEPENDS_ARGS+= -DA4
diff --git a/print/ghostscript7-korfont/Makefile b/print/ghostscript7-korfont/Makefile
index 6a3751cb5413..739d0614c8d3 100644
--- a/print/ghostscript7-korfont/Makefile
+++ b/print/ghostscript7-korfont/Makefile
@@ -16,7 +16,7 @@ RUN_DEPENDS= ${LOCALBASE}/share/fonts/CIDFont/Munhwa-Regular:${PORTSDIR}/korean/
${LOCALBASE}/share/ghostscript/Resource/CIDFont/HYSMyeongJo-Medium:${PORTSDIR}/print/ghostscript7-commfont
# set these forcibly
-USE_GHOSTSCRIPT_RUN= 7
+USES= ghostscript:7,run
NO_BUILD= yes
DEPENDS_ARGS+= -DA4
diff --git a/print/gspdf/Makefile b/print/gspdf/Makefile
index 3b6b6959b6b6..86ab8bd9c50b 100644
--- a/print/gspdf/Makefile
+++ b/print/gspdf/Makefile
@@ -10,9 +10,8 @@ DISTNAME= GSPdf-${PORTVERSION}
MAINTAINER= ports@FreeBSD.org
COMMENT= Postscript and Pdf Viewer for GNUstep
-USES= gnustep
+USES= ghostscript gnustep
USE_GNUSTEP= back build
-USE_GHOSTSCRIPT= yes
MAKE_ENV= GNUSTEP_INSTALLATION_DOMAIN=SYSTEM
diff --git a/print/gsview/Makefile b/print/gsview/Makefile
index 07a3bc50d4bb..5d2e8582209d 100644
--- a/print/gsview/Makefile
+++ b/print/gsview/Makefile
@@ -18,9 +18,8 @@ LICENSE_PERMS= dist-mirror pkg-mirror auto-accept
RUN_DEPENDS+= epstool:${PORTSDIR}/graphics/epstool \
pstotext:${PORTSDIR}/print/pstotext
-USES= cpe
+USES= cpe ghostscript
USE_GNOME= gtk12
-USE_GHOSTSCRIPT=yes
MAKE_JOBS_UNSAFE= yes
diff --git a/print/gv/Makefile b/print/gv/Makefile
index 81882b024f8f..45685cbdd37f 100644
--- a/print/gv/Makefile
+++ b/print/gv/Makefile
@@ -13,8 +13,7 @@ COMMENT= PostScript and PDF previewer
LIB_DEPENDS= libXaw3d.so:${PORTSDIR}/x11-toolkits/Xaw3d
USE_XORG= xpm ice sm xext xmu x11
-USE_GHOSTSCRIPT= yes
-USES= cpe iconv gmake perl5 shebangfix
+USES= cpe ghostscript iconv gmake perl5 shebangfix
USE_PERL5= build
GNU_CONFIGURE= yes
CPPFLAGS+= -I${LOCALBASE}/include
diff --git a/print/hpijs/Makefile b/print/hpijs/Makefile
index eed870e93813..21e65e8206d0 100644
--- a/print/hpijs/Makefile
+++ b/print/hpijs/Makefile
@@ -13,8 +13,7 @@ CONFLICTS= hplip-[0-9]*
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --disable-dependency-tracking
-USES= jpeg
-USE_GHOSTSCRIPT_RUN= yes
+USES= ghostscript:run jpeg
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
diff --git a/print/hplip/Makefile b/print/hplip/Makefile
index 80efd33160bc..792ee66265ad 100644
--- a/print/hplip/Makefile
+++ b/print/hplip/Makefile
@@ -21,8 +21,8 @@ RUN_DEPENDS= espgs:${PORTSDIR}/print/cups-pstoraster \
CONFLICTS_INSTALL= hpijs-[0-9]*
INSTALL_TARGET= install-strip
-USES= dos2unix jpeg libtool pkgconfig python shebangfix
-USE_GHOSTSCRIPT_RUN= yes
+USES= dos2unix ghostscript:run jpeg libtool pkgconfig python \
+ shebangfix
USE_GNOME= pygobject
USE_LDCONFIG= yes
diff --git a/print/html2ps/Makefile b/print/html2ps/Makefile
index 0b915172a311..b602bd562344 100644
--- a/print/html2ps/Makefile
+++ b/print/html2ps/Makefile
@@ -21,8 +21,7 @@ RUN_DEPENDS= mogrify:${PORTSDIR}/graphics/ImageMagick \
paperconf:${PORTSDIR}/print/libpaper
NO_BUILD= yes
-USES= perl5
-USE_GHOSTSCRIPT_RUN= yes
+USES= ghostscript:run perl5
SUB_FILES= html2psrc
diff --git a/print/kpdftool/Makefile b/print/kpdftool/Makefile
index da913bad4aa5..1795a8a50e31 100644
--- a/print/kpdftool/Makefile
+++ b/print/kpdftool/Makefile
@@ -14,8 +14,7 @@ COMMENT= Simple utility to manipulate PS and PDF files
RUN_DEPENDS= convert:${PORTSDIR}/graphics/ImageMagick
USE_QT4= qt3support moc_build porting_build uic3_build
-USE_GHOSTSCRIPT_RUN= yes
-USES= qmake zip
+USES= ghostscript:run qmake zip
DESKTOP_ENTRIES= "KPDFTool" "${COMMENT}" "kpdftool" \
"kpdftool" "Qt;Utility;" true
diff --git a/print/libspectre/Makefile b/print/libspectre/Makefile
index ca303796f7e8..c4c8bb82c3c9 100644
--- a/print/libspectre/Makefile
+++ b/print/libspectre/Makefile
@@ -12,10 +12,9 @@ COMMENT= Small library for rendering Postscript documents
LICENSE= GPLv2
-USES= gmake libtool:keepla pathfix pkgconfig
+USES= gmake libtool:keepla pathfix pkgconfig ghostscript
USE_LDCONFIG= yes
USE_GNOME= cairo
-USE_GHOSTSCRIPT=yes
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
GNU_CONFIGURE= yes
diff --git a/print/lilypond-devel/Makefile b/print/lilypond-devel/Makefile
index 87c08fb115df..0ced1df48b23 100644
--- a/print/lilypond-devel/Makefile
+++ b/print/lilypond-devel/Makefile
@@ -47,9 +47,9 @@ INFO= internals \
lilypond-web \
music-glossary
-USES= bison:build gettext gmake pkgconfig perl5 compiler:c++11-lib python:-3
+USES= bison:build gettext ghostscript:9 gmake pkgconfig perl5 \
+ compiler:c++11-lib python:-3
USE_CXXSTD= c++11
-USE_GHOSTSCRIPT=9
USE_TEX= latex
USE_PERL5= build
USE_GNOME= pango
diff --git a/print/lilypond/Makefile b/print/lilypond/Makefile
index 8d91e11d102b..184086fb0a38 100644
--- a/print/lilypond/Makefile
+++ b/print/lilypond/Makefile
@@ -47,8 +47,8 @@ INFO= internals \
lilypond-web \
music-glossary
-USES= bison:build gettext gmake pkgconfig perl5 python:-3
-USE_GHOSTSCRIPT=9
+USES= bison:build gettext ghostscript:9 gmake pkgconfig perl5 \
+ python:-3
USE_TEX= latex
USE_PERL5= build
USE_GNOME= pango
diff --git a/print/lpr-wrapper/Makefile b/print/lpr-wrapper/Makefile
index 059f190e41c7..04c1ee5c4c75 100644
--- a/print/lpr-wrapper/Makefile
+++ b/print/lpr-wrapper/Makefile
@@ -16,9 +16,8 @@ RUN_DEPENDS= bash:${PORTSDIR}/shells/bash \
mpage:${PORTSDIR}/print/mpage \
pstops:${PORTSDIR}/print/psutils
-USES= shebangfix
+USES= ghostscript:run shebangfix
SHEBANG_FILES= lpr-wrapper.in lpr-wrapper-cups.in lpr-wrapper-features
-USE_GHOSTSCRIPT_RUN= yes
HAS_CONFIGURE= yes
CONFIGURE_ARGS= --prefix=${PREFIX}
diff --git a/print/magicfilter/Makefile b/print/magicfilter/Makefile
index 1ec324ee0a83..4eed4f18bc19 100644
--- a/print/magicfilter/Makefile
+++ b/print/magicfilter/Makefile
@@ -10,7 +10,7 @@ MASTER_SITES= http://www.pell.portland.or.us/~orc/Code/magicfilter/
MAINTAINER= ports@FreeBSD.org
COMMENT= Customizable, extensible automatic printer filter
-USE_GHOSTSCRIPT= yes
+USES= ghostscript
HAS_CONFIGURE= yes
CONFIGURE_SCRIPT= configure.sh
diff --git a/print/ps2eps/Makefile b/print/ps2eps/Makefile
index 4d392dfa8c77..cf437a00480c 100644
--- a/print/ps2eps/Makefile
+++ b/print/ps2eps/Makefile
@@ -13,8 +13,7 @@ COMMENT= Generate Encapsulated Postscript file from Postscript document
WRKSRC= ${WRKDIR}/ps2eps
-USE_GHOSTSCRIPT_RUN= yes
-USES= perl5
+USES= ghostscript:run perl5
USE_PERL5= run
OPTIONS_DEFINE= DOCS
diff --git a/print/psdim/Makefile b/print/psdim/Makefile
index f59d82df473f..0777c6989a35 100644
--- a/print/psdim/Makefile
+++ b/print/psdim/Makefile
@@ -12,7 +12,7 @@ COMMENT= Calculates the optimal placement of the pages for n-up printing
LICENSE= GPLv2
-USE_GHOSTSCRIPT=yes
+USES= ghostscript
HAS_CONFIGURE= yes
CONFIGURE_ARGS= --prefix=${PREFIX}
diff --git a/print/pstotext/Makefile b/print/pstotext/Makefile
index 06387a57608c..eb3a70c95c1e 100644
--- a/print/pstotext/Makefile
+++ b/print/pstotext/Makefile
@@ -18,7 +18,7 @@ LICENSE_NAME= End User License Agreement
LICENSE_FILE= ${WRKSRC}/pstotext.txt
LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
-USE_GHOSTSCRIPT_RUN= yes
+USES= ghostscript:run
SUB_LIST= LICENSE=${LICENSE} \
LICENSE_DIR=${_LICENSE_DIR}
diff --git a/print/scribus/Makefile b/print/scribus/Makefile
index c910b96c8264..b95ba0a5b7d2 100644
--- a/print/scribus/Makefile
+++ b/print/scribus/Makefile
@@ -27,8 +27,8 @@ RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}tkinter>0:${PORTSDIR}/x11-toolkits/py-tkinte
USE_QT4= gui linguist_build moc_build qmake_build rcc_build uic_build xml network
USE_GNOME= libartlgpl2 libxml2
-USE_GHOSTSCRIPT_RUN= yes
-USES= cmake desktop-file-utils jpeg pkgconfig python shared-mime-info tar:xz
+USES= cmake desktop-file-utils ghostscript:run jpeg pkgconfig \
+ python shared-mime-info tar:xz
USE_LDCONFIG= yes
CMAKE_ARGS+= -DWANT_HUNSPELL=YES -Wno-ferror-limit
diff --git a/print/texlive-base/Makefile b/print/texlive-base/Makefile
index fac2c9293f11..1286b45e344f 100644
--- a/print/texlive-base/Makefile
+++ b/print/texlive-base/Makefile
@@ -29,9 +29,8 @@ LIB_DEPENDS= libicuio.so:${PORTSDIR}/devel/icu \
CONFLICTS_INSTALL= texlive-texmf-201[23]*
USE_TEX= web2c kpathsea ptexenc texhash-bootstrap
-USES= gmake pkgconfig perl5 shebangfix tar:xz
+USES= ghostscript gmake pkgconfig perl5 shebangfix tar:xz
USE_AUTOTOOLS= autoconf
-USE_GHOSTSCRIPT=yes
USE_PERL5= run
USE_LDCONFIG= yes
# during build phase gnu configure is run a lot
diff --git a/print/texvc/Makefile b/print/texvc/Makefile
index 23c91f23b87c..60c87ff30ad4 100644
--- a/print/texvc/Makefile
+++ b/print/texvc/Makefile
@@ -24,7 +24,7 @@ RASTER_DESC= rasterization support
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MRASTER}
-USE_GHOSTSCRIPT_RUN= yes
+USES+= ghostscript:run
USE_TEX= latex dvipsk
RUN_DEPENDS+= convert:${PORTSDIR}/graphics/ImageMagick
.endif
diff --git a/print/transfig/Makefile b/print/transfig/Makefile
index a66072509aa1..7eb1ca2f8d90 100644
--- a/print/transfig/Makefile
+++ b/print/transfig/Makefile
@@ -14,9 +14,8 @@ COMMENT= Tools to convert Xfig .fig files
RUN_DEPENDS= ppmtogif:${PORTSDIR}/graphics/netpbm
LIB_DEPENDS= libpng.so:${PORTSDIR}/graphics/png
-USES= alias imake
+USES= alias ghostscript:run imake
CFLAGS+= -Wno-return-type
-USE_GHOSTSCRIPT_RUN= yes
USE_XORG= xpm
MAKE_ARGS+= INSTALLFLAGS="${COPY}" \
diff --git a/sysutils/LPRngTool/Makefile b/sysutils/LPRngTool/Makefile
index a42bf11105da..ba147fba5647 100644
--- a/sysutils/LPRngTool/Makefile
+++ b/sysutils/LPRngTool/Makefile
@@ -15,8 +15,7 @@ LICENSE= GPLv2
BUILD_DEPENDS= a2ps:${PORTSDIR}/print/a2ps \
mpage:${PORTSDIR}/print/mpage
-USES= tar:tgz tk
-USE_GHOSTSCRIPT_BUILD= yes
+USES= ghostscript:build tar:tgz tk
GNU_CONFIGURE= yes
CONFIGURE_ENV= ac_cv_path_WISH=${WISH}
CONFIGURE_ARGS= --with-spool_directory=/var/spool/lpd
diff --git a/textproc/docproj/Makefile b/textproc/docproj/Makefile
index 4eeed14f9299..cbf886395252 100644
--- a/textproc/docproj/Makefile
+++ b/textproc/docproj/Makefile
@@ -28,9 +28,8 @@ RUN_DEPENDS= links:${PORTSDIR}/www/links1 \
p5-XML-Parser>=2.41:${PORTSDIR}/textproc/p5-XML-Parser \
zip:${PORTSDIR}/archivers/zip
-USES= perl5
+USES= ghostscript:run perl5
USE_PERL5= run
-USE_GHOSTSCRIPT_RUN= yes
DEPENDS_ARGS+= BATCH=yes
NO_BUILD= yes
diff --git a/textproc/groff/Makefile b/textproc/groff/Makefile
index aeb5ca3248dd..ed086f755237 100644
--- a/textproc/groff/Makefile
+++ b/textproc/groff/Makefile
@@ -15,8 +15,7 @@ LICENSE= GPLv3
BUILD_DEPENDS= ${LOCALBASE}/bin/psselect:${PORTSDIR}/print/psutils
RUN_DEPENDS:= ${BUILD_DEPENDS}
-USE_GHOSTSCRIPT=yes
-USES= cpe gmake perl5 shebangfix
+USES= cpe ghostscript gmake perl5 shebangfix
GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --with-awk=/usr/bin/awk
CONFIGURE_ENV+= PERLPATH=${perl_CMD} # shebangfix
diff --git a/textproc/latex2html/Makefile b/textproc/latex2html/Makefile
index 65d83e1843ff..47e462995dc0 100644
--- a/textproc/latex2html/Makefile
+++ b/textproc/latex2html/Makefile
@@ -15,8 +15,7 @@ RUN_DEPENDS:= ${BUILD_DEPENDS}
CONFLICTS= ja-latex2html-[0-9]*
-USES= perl5
-USE_GHOSTSCRIPT=yes
+USES= ghostscript perl5
USE_TEX= latex dvipsk texhash
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --with-perl=${PERL} \
diff --git a/textproc/pdftohtml/Makefile b/textproc/pdftohtml/Makefile
index 3ad747eb55c2..4c988cf19e94 100644
--- a/textproc/pdftohtml/Makefile
+++ b/textproc/pdftohtml/Makefile
@@ -10,8 +10,7 @@ MASTER_SITES= SF/${PORTNAME}/Experimental%20Versions/${PORTNAME}%20${PORTVERSION
MAINTAINER= ports@FreeBSD.org
COMMENT= Command-line tool for converting pdf-files into html
-USES= gmake
-USE_GHOSTSCRIPT_RUN= yes
+USES= ghostscript gmake
PLIST_FILES= bin/pdf-to-html
diff --git a/textproc/prosper/Makefile b/textproc/prosper/Makefile
index c83b398294ec..a07ba5fb1280 100644
--- a/textproc/prosper/Makefile
+++ b/textproc/prosper/Makefile
@@ -14,7 +14,7 @@ MAINTAINER= ports@FreeBSD.org
COMMENT= LaTeX class for writing transparencies
NO_BUILD= yes
-USE_GHOSTSCRIPT_RUN= yes
+USES= ghostscript:run
USE_TEX= latex
MKTEXLSR= ${LOCALBASE}/bin/mktexlsr
diff --git a/textproc/sowing/Makefile b/textproc/sowing/Makefile
index d74748ba2940..b303acf9efb3 100644
--- a/textproc/sowing/Makefile
+++ b/textproc/sowing/Makefile
@@ -12,8 +12,7 @@ COMMENT= Text processing tools to generate documentation from source files
BUILD_DEPENDS= ppmtogif:${PORTSDIR}/graphics/netpbm
RUN_DEPENDS= ppmtogif:${PORTSDIR}/graphics/netpbm
-USES= gmake perl5
-USE_GHOSTSCRIPT=yes
+USES= ghostscript gmake perl5
USE_TEX= latex dvipsk
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --datadir=${DATADIR}
diff --git a/textproc/tth/Makefile b/textproc/tth/Makefile
index 170ded594b07..9c358abdd13f 100644
--- a/textproc/tth/Makefile
+++ b/textproc/tth/Makefile
@@ -14,8 +14,7 @@ COMMENT= TeX to HTML translator
RUN_DEPENDS= ppmtogif:${PORTSDIR}/graphics/netpbm
-USES= shebangfix tar:tgz
-USE_GHOSTSCRIPT_RUN= yes
+USES= ghostscript:run shebangfix tar:tgz
#USE_TEX= latex
SHEBANG_FILES= Xfonts.fix
diff --git a/x11/dgs/Makefile b/x11/dgs/Makefile
index fd463ae09e89..6c4eb7400843 100644
--- a/x11/dgs/Makefile
+++ b/x11/dgs/Makefile
@@ -15,10 +15,9 @@ LIB_DEPENDS= libpng.so:${PORTSDIR}/graphics/png \
MAKE_JOBS_UNSAFE= yes
-USE_GHOSTSCRIPT_RUN= yes
USE_XORG= xt sm ice xext x11
USE_GNOME= glib12
-USES= gmake jpeg libtool makeinfo
+USES= ghostscript:run gmake jpeg libtool makeinfo
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
WRKSRC= ${WRKDIR}/${PORTNAME}-0.5.9