From 6e0909e045a068d899c6347684796ba545f7202e Mon Sep 17 00:00:00 2001 From: Hiroki Sato Date: Fri, 5 Sep 2008 19:41:48 +0000 Subject: * 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) --- Mk/bsd.port.mk | 56 ++++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 44 insertions(+), 12 deletions(-) (limited to 'Mk') 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} -- cgit v1.2.3