aboutsummaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authorhrs <hrs@FreeBSD.org>2008-09-06 03:41:48 +0800
committerhrs <hrs@FreeBSD.org>2008-09-06 03:41:48 +0800
commitaf4809fc1df6c0e57965a8db07d9f19a87460519 (patch)
treecc602fddcf4837026d33d8544917f4d7dfcaa44b /Mk
parent531a0c3adee2fa77dd483af98c4155e2ce64074b (diff)
downloadfreebsd-ports-gnome-af4809fc1df6c0e57965a8db07d9f19a87460519.tar.gz
freebsd-ports-gnome-af4809fc1df6c0e57965a8db07d9f19a87460519.tar.zst
freebsd-ports-gnome-af4809fc1df6c0e57965a8db07d9f19a87460519.zip
* print/ghostscript-* and related ports have been renamed in the
following way: print/ghostscript-gnu -> print/ghostscript7 print/ghostscript-gnu-nox11 -> print/ghostscript7-nox11 print/ghostscript-gnu-commfont -> print/ghostscript7-commfont print/ghostscript-gpl -> print/ghostscript8 print/ghostscript-gpl-nox11 -> print/ghostscript8-nox11 japanese/ghostscript-gnu-jpnfont -> print/ghostscript7-jpnfont korean/ghostscript-gnu-korfont -> print/ghostscript7-korfont * USE_GHOSTSCRIPT now supports a version number which the port requires. The valid value is "7" or "8". If other value is specified, value of WITH_GHOSTSCRIPT_VER is used. * WITH_GHOSTSCRIPT_GNU has been removed in favor of WITH_GHOSTSCRIPT_VER. The valid value of WITH_GHOSTSCRIPT_VER is "7" or "8", and the default value is "8". Approved by: portmgr (pav)
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.port.mk56
1 files changed, 44 insertions, 12 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index 1e2293d0f3bf..cfce14af261d 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -344,7 +344,9 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org
##
# USE_GHOSTSCRIPT
# - If set, this port needs ghostscript to both
-# build and run.
+# build and run. If a number is specified,
+# the specified version will be used.
+# The valid value is '7' or '8' in that case.
# USE_GHOSTSCRIPT_BUILD
# - If set, this port needs ghostscript to build.
# USE_GHOSTSCRIPT_RUN
@@ -354,10 +356,12 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org
# Some installations may wish to override the default
# to specify a version without X11 and/or localized
# versions for their nationality.
-# Default: print/ghostscript-gpl
-# WITH_GHOSTSCRIPT_GNU
-# - If set, this port uses the GNU version of the ghostscript
-# software instead of the GPL version, which is used otherwise.
+# Default: print/ghostscript8
+# WITH_GHOSTSCRIPT_VER
+# - If set, the specified version of ghostscript will be
+# used. The valid value is "7" or "8". Note that
+# this is for users, not for port maintainers. This
+# should not be used in Makefile.
##
# USE_BISON - Implies that the port uses bison in one way or another:
# 'yes' (backwards compatibility) - use bison for building
@@ -2044,20 +2048,48 @@ CONFIGURE_ARGS+=--x-libraries=${X11BASE}/lib --x-includes=${X11BASE}/include
# Set the default for the installation of Postscript(TM)-
# compatible functionality.
-.if !defined(WITHOUT_X11)
-.if defined(WITH_GHOSTSCRIPT_GNU)
-GHOSTSCRIPT_PORT?= print/ghostscript-gnu
+.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
-GHOSTSCRIPT_PORT?= print/ghostscript-gpl
+_USE_GHOSTSCRIPT= ${USE_GHOSTSCRIPT}
.endif
+
+.if defined(WITH_GHOSTSCRIPT_VER) && !empty(WITH_GHOSTSCRIPT_VER:M[78])
+_USE_GHOSTSCRIPT_DEFAULT_VER= ${WITH_GHOSTSCRIPT_VER}
.else
-.if defined(WITH_GHOSTSCRIPT_GNU)
-GHOSTSCRIPT_PORT?= print/ghostscript-gnu-nox11
+_USE_GHOSTSCRIPT_DEFAULT_VER= 8
+.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[78])
+_USE_GHOSTSCRIPT_VER=${_USE_GHOSTSCRIPT:M[78]}
+. else
+_USE_GHOSTSCRIPT_VER=${_USE_GHOSTSCRIPT_DEFAULT_VER}
+. endif
.else
-GHOSTSCRIPT_PORT?= print/ghostscript-gpl-nox11
+_USE_GHOSTSCRIPT_VER=${_USE_GHOSTSCRIPT_DEFAULT_VER}
.endif
+
+# Sanity check
+.if defined(_USE_GHOSTSCRIPT) && defined(WITH_GHOSTSCRIPT_VER)
+. if empty(WITH_GHOSTSCRIPT_VER:M[78])
+. 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}