diff options
author | hrs <hrs@FreeBSD.org> | 2015-08-23 01:48:35 +0800 |
---|---|---|
committer | hrs <hrs@FreeBSD.org> | 2015-08-23 01:48:35 +0800 |
commit | 52f2507f3ec0cb2b7b96aa2ba867c924e7b8c9a2 (patch) | |
tree | 445c3e315f03aa972de87391f921c655e4634f60 /Mk | |
parent | 069a5644197c0b8b71f45d29221cd5192af4c720 (diff) | |
download | freebsd-ports-gnome-52f2507f3ec0cb2b7b96aa2ba867c924e7b8c9a2.tar.gz freebsd-ports-gnome-52f2507f3ec0cb2b7b96aa2ba867c924e7b8c9a2.tar.zst freebsd-ports-gnome-52f2507f3ec0cb2b7b96aa2ba867c924e7b8c9a2.zip |
- Split ghostscript into X11-independent and -dependent parts:
* print/ghostscript{7,8,9,9-agpl}-base
Installs Ghostscript binary, libgs, and related files.
These ports do not depend on X11 libraries (i.e. x11* devices
are not available). USES=ghostscript will set dependency on
one of them depending on GHOSTSCRIPT_DEFAULT.
The default device is set to "display" or "bbox".
* print/ghostscript{7,8,9,9-agpl}-x11
Installs a shared library which provides X11 support to
the installed Ghostscript binaries. x11* devices will be
enabled when the library is available.
This depends on *-base (RUN_DEPENDS). USES=ghostscript:x11
will set dependency on one of them.
- Fix integer overflow reported as CVE-2015-3228.
- Update Uses/ghostscript.mk:
* Add x11 keyword. nox11 keyword is now obsolete.
* Use packagename in *_DEPENDS line to prevent relationship between
-base and -x11 packages from being broken.
- Fix x11/nox11 keyword and bump PORTREVISION in ports using
USES=ghostscript to update dependency of pre-compiled packages.
Diffstat (limited to 'Mk')
-rw-r--r-- | Mk/Uses/ghostscript.mk | 39 |
1 files changed, 22 insertions, 17 deletions
diff --git a/Mk/Uses/ghostscript.mk b/Mk/Uses/ghostscript.mk index b488a23a2657..98fd5012fc03 100644 --- a/Mk/Uses/ghostscript.mk +++ b/Mk/Uses/ghostscript.mk @@ -4,7 +4,7 @@ # # Feature: ghostscript # Usage: USES=ghostscript or USES=ghostscript:args -# Valid ARGS: <version>, build, run, nox11 +# Valid ARGS: <version>, build, run, x11 # # version The chooseable versions are 7, 8 and 9. If no version is # specified version 9 is selected. @@ -13,7 +13,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. +# x11 Indicate that X11 support 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 @@ -32,7 +32,7 @@ _GS_VERSION= 7 8 9 agpl _GS_ARGS= ${ghostscript_ARGS} -.if ${_GS_ARGS:N[789]:Nnox11:Nbuild:Nrun} +.if ${_GS_ARGS:N[789]:Nagpl:Nx11:Nbuild:Nrun} IGNORE?= Unknown ghostscript argument ${_GS_ARGS} .endif @@ -84,23 +84,28 @@ _GS_SELECTED?= 7 IGNORE?= Invalid ghostscript argument or GHOSTSCRIPT_DEFAULT .endif -# dependencies -_GS_PORT= ghostscript${_GS_SELECTED}${_GS_AGPL_SUFFIX}${_GS_NOX11_SUFFIX} - -.undef _GS_NOX11_SUFFIX -.if ${_GS_ARGS:Mnox11} || \ - (defined(OPTIONS_DEFINE) && defined(PORT_OPTIONS) && \ - ${OPTIONS_DEFINE:MX11} && ${PORT_OPTIONS:MX11} == "") -# XXX -#DEPENDS_ARGS+= print_${_GS_PORT}_UNSET_FORCE+=X11 -_GS_NOX11_SUFFIX= -nox11 +# Resolve minor version number for X11.so library. +.if !empty(_GS_SELECTED:M9) && defined(_GS_AGPL_SUFFIX) +_GS_VERSION_MINOR= 9.16_2 +.elif !empty(_GS_SELECTED:M9) +_GS_VERSION_MINOR= 9.06_11 +.elif !empty(_GS_SELECTED:M8) +_GS_VERSION_MINOR= 8.71_19 +.elif !empty(_GS_SELECTED:M7) +_GS_VERSION_MINOR= 7.07_32 .endif -.if defined(_GS_BUILD_DEP) -BUILD_DEPENDS+= gs:${PORTSDIR}/print/${_GS_PORT} +# dependencies +_GS_PORT= ghostscript${_GS_SELECTED}${_GS_AGPL_SUFFIX}-base +_GS_X11_PORT= ghostscript${_GS_SELECTED}${_GS_AGPL_SUFFIX}-x11 + +.for type in BUILD RUN +.if defined(_GS_${type}_DEP) +${type}_DEPENDS+= ${_GS_PORT}>=${_GS_VERSION_MINOR}:${PORTSDIR}/print/${_GS_PORT} +.if ${_GS_ARGS:Mx11} +${type}_DEPENDS+= ${_GS_X11_PORT}>=${_GS_VERSION_MINOR}:${PORTSDIR}/print/${_GS_X11_PORT} .endif -.if defined(_GS_RUN_DEP) -RUN_DEPENDS+= gs:${PORTSDIR}/print/${_GS_PORT} .endif +.endfor .endif # _INCLUDE_USES_GHOSTSCRIPT_MK |