Index: head/Mk/Uses/ghostscript.mk =================================================================== --- head/Mk/Uses/ghostscript.mk (revision 392602) +++ head/Mk/Uses/ghostscript.mk (revision 392603) @@ -1,98 +1,102 @@ # $FreeBSD$ # # Provide support for ghostscript ports. # # Feature: ghostscript # Usage: USES=ghostscript or USES=ghostscript:args # Valid ARGS: , 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_VERSION= 7 8 9 9.06 9.16 _GS_ARGS= ${ghostscript_ARGS} -.if ${_GS_ARGS:N[789]:Nnox11:Nagpl:Nbuild:Nrun} +.if ${_GS_ARGS:N[789]:N9.06:N9.16: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 +.undef _GS_SELECTED +.for V in ${_GS_ARGS} ${GHOSTSCRIPT_DEFAULT} +.if ${V:M9} +_GS_SELECTED?= 9 +.elif ${V:M9.06} +_GS_SELECTED?= 9 +.elif ${V:M9.16} +_GS_SELECTED?= 9 +_GS_AGPL_SUFFIX?= -agpl +.elif ${V:Magpl} && defined(_GS_SELECTED) && !empty(_GS_SELECTED:N9) IGNORE= Ghostscript-agpl is only available in version 9 -. endif +.elif ${V:M8} +_GS_SELECTED?= 8 +.elif ${V:M7} +_GS_SELECTED?= 7 +.endif +.endfor +.if !defined(_GS_SELECTED) +IGNORE= Invalid ghostscript argument or GHOSTSCRIPT_DEFAULT .endif .undef _GS_NOX11_SUFFIX .if ${_GS_ARGS:Mnox11} || defined(WITHOUT_X11) _GS_NOX11_SUFFIX= -nox11 .endif # 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 # _INCLUDE_USES_GHOSTSCRIPT_MK Index: head/Mk/bsd.default-versions.mk =================================================================== --- head/Mk/bsd.default-versions.mk (revision 392602) +++ head/Mk/bsd.default-versions.mk (revision 392603) @@ -1,40 +1,40 @@ # $FreeBSD$ # # MAINTAINER: ports@FreeBSD.org # # Provide default versions for ports with multiple versions selectable # by the user. # # Users who want to override these defaults can easily do so by defining # DEFAULT_VERSIONS in their make.conf as follows: # # DEFAULT_VERSIONS= perl5=5.18 ruby=2.0 .if !defined(_INCLUDE_BSD_DEFAULT_VERSIONS_MK) _INCLUDE_BSD_DEFAULT_VERSIONS_MK= yes .for lang in ${DEFAULT_VERSIONS} _l= ${lang:C/=.*//g} ${_l:tu}_DEFAULT= ${lang:C/.*=//g} .endfor APACHE_DEFAULT?= 2.4 FPC_DEFAULT?= 2.6.4 GCC_DEFAULT?= 4.8 LUA_DEFAULT?= 5.2 MYSQL_DEFAULT?= 5.6 PERL5_DEFAULT?= 5.20 PGSQL_DEFAULT?= 9.3 PHP_DEFAULT?= 5.6 PYTHON_DEFAULT?= 2.7 PYTHON2_DEFAULT?= 2.7 PYTHON3_DEFAULT?= 3.4 RUBY_DEFAULT?= 2.1 TCLTK_DEFAULT?= 8.6 FIREBIRD_DEFAULT?= 2.5 -GHOSTSCRIPT_DEFAULT?= 9 +GHOSTSCRIPT_DEFAULT?= 9.06 # Version of lang/gcc. Do not override! LANG_GCC_IS= 4.8 .endif