Lines 4-15
Link Here
|
4 |
# Usage: USES=ghostscript or USES=ghostscript:args |
4 |
# Usage: USES=ghostscript or USES=ghostscript:args |
5 |
# Valid ARGS: <version>, build, run, test, x11 |
5 |
# Valid ARGS: <version>, build, run, test, x11 |
6 |
# |
6 |
# |
7 |
# version The chooseable versions are 7, 8, 9 and agpl. If no version is |
7 |
# version The chooseable versions are 9, agpl and 10. If no version is |
8 |
# specified version agpl is selected. |
8 |
# specified version agpl is selected. 9 and agpl are synonymous. |
9 |
# |
9 |
# |
10 |
# USES=ghostscript:7 # Use Ghostscript 7 |
10 |
# USES=ghostscript:9 # Use Ghostscript 9 |
11 |
# USES=ghostscript:run # Use the set default Ghostscript as a run dependency |
11 |
# USES=ghostscript:run # Use the set default Ghostscript as a run dependency |
12 |
# USES=ghostscript:8,build # Use ghostscript 8 as a build dependency. |
12 |
# USES=ghostscript:9,build # Use ghostscript 9 as a build dependency. |
13 |
# |
13 |
# |
14 |
# x11 Indicate that X11 support is required. |
14 |
# x11 Indicate that X11 support is required. |
15 |
# build Indicates that Ghostscript is needed at build time and adds |
15 |
# build Indicates that Ghostscript is needed at build time and adds |
Lines 30-44
_INCLUDE_USES_GHOSTSCRIPT_MK= yes
Link Here
|
30 |
# allowed versions |
30 |
# allowed versions |
31 |
# When adding a version, please keep the comment in |
31 |
# When adding a version, please keep the comment in |
32 |
# Mk/bsd.default-versions.mk in sync. |
32 |
# Mk/bsd.default-versions.mk in sync. |
33 |
_GS_VERSION= 7 8 9 agpl |
33 |
_GS_VERSION= 9 agpl 10 |
34 |
|
34 |
|
35 |
_GS_ARGS= ${ghostscript_ARGS} |
35 |
_GS_ARGS= ${ghostscript_ARGS} |
36 |
|
36 |
|
37 |
. if ${_GS_ARGS:N[789]:Nagpl:Nx11:Nbuild:Nrun:Ntest} |
37 |
. if ${_GS_ARGS:N9:N10:Nagpl:Nx11:Nbuild:Nrun:Ntest} |
38 |
IGNORE?= Unknown ghostscript argument ${_GS_ARGS} |
38 |
IGNORE?= Unknown ghostscript argument ${_GS_ARGS} |
39 |
. endif |
39 |
. endif |
40 |
|
40 |
|
41 |
. if ${GHOSTSCRIPT_DEFAULT:N[789]:Nagpl} |
41 |
. if ${GHOSTSCRIPT_DEFAULT:N9:Nagpl:N10} |
42 |
IGNORE?= Invalid GHOSTSCRIPT_DEFAULT value: ${GHOSTSCRIPT_DEFAULT}, please select one of ${_GS_VERSION} |
42 |
IGNORE?= Invalid GHOSTSCRIPT_DEFAULT value: ${GHOSTSCRIPT_DEFAULT}, please select one of ${_GS_VERSION} |
43 |
. endif |
43 |
. endif |
44 |
|
44 |
|
Lines 67-103
_GS_RUN_DEP= yes
Link Here
|
67 |
.undef _GS_SELECTED |
67 |
.undef _GS_SELECTED |
68 |
. for V in ${_GS_ARGS} ${GHOSTSCRIPT_DEFAULT} |
68 |
. for V in ${_GS_ARGS} ${GHOSTSCRIPT_DEFAULT} |
69 |
_V=${V} |
69 |
_V=${V} |
70 |
. if ${_V:M9} |
70 |
. if ${_V:M10} |
71 |
_GS_SELECTED?= 9 |
71 |
_GS_SELECTED?= 10 |
|
|
72 |
. elif ${_V:M9} |
73 |
_GS_SELECTED?= 9-agpl |
72 |
. elif ${_V:Magpl} |
74 |
. elif ${_V:Magpl} |
73 |
_GS_SELECTED?= 9-agpl |
75 |
_GS_SELECTED?= 9-agpl |
74 |
. elif ${_V:M8} |
|
|
75 |
_GS_SELECTED?= 8 |
76 |
. elif ${_V:M7} |
77 |
_GS_SELECTED?= 7 |
78 |
. endif |
76 |
. endif |
79 |
. endfor |
77 |
. endfor |
80 |
|
78 |
|
|
|
79 |
.undef _GS_FLAVORED |
80 |
. if empty(_GS_SELECTED:M9-agpl) |
81 |
_GS_FLAVORED= yes |
82 |
. endif |
83 |
|
81 |
# Resolve minor version number for X11.so library. |
84 |
# Resolve minor version number for X11.so library. |
82 |
. if !empty(_GS_SELECTED:M9-agpl) |
85 |
. if !empty(_GS_SELECTED:M10) |
83 |
_GS_VERSION_MINOR= 9.16_2 |
86 |
_GS_VERSION_MINOR= 10.01.1_2 |
84 |
. elif !empty(_GS_SELECTED:M9) |
87 |
. elif !empty(_GS_SELECTED:M9-agpl) |
85 |
_GS_VERSION_MINOR= 9.06_11 |
88 |
_GS_VERSION_MINOR= 9.56.1 |
86 |
. elif !empty(_GS_SELECTED:M8) |
|
|
87 |
_GS_VERSION_MINOR= 8.71_19 |
88 |
. elif !empty(_GS_SELECTED:M7) |
89 |
_GS_VERSION_MINOR= 7.07_32 |
90 |
. endif |
89 |
. endif |
91 |
|
90 |
|
92 |
# dependencies |
91 |
# dependencies |
93 |
_GS_PORT= ghostscript${_GS_SELECTED}-base |
92 |
_GS_PKGNAME= ghostscript${_GS_SELECTED}${_GS_FLAVORED:?:-base} |
94 |
_GS_X11_PORT= ghostscript${_GS_SELECTED}-x11 |
93 |
_GS_X11_PKGNAME= ghostscript${_GS_SELECTED}-x11 |
|
|
94 |
_GS_PORT= print/ghostscript${_GS_SELECTED}${_GS_FLAVORED:?:-base} |
95 |
_GS_X11_PORT= print/ghostscript${_GS_SELECTED}${_GS_FLAVORED:?@:-}x11 |
95 |
|
96 |
|
96 |
. for type in BUILD RUN TEST |
97 |
. for type in BUILD RUN TEST |
97 |
. if defined(_GS_${type}_DEP) |
98 |
. if defined(_GS_${type}_DEP) |
98 |
${type}_DEPENDS+= ${_GS_PORT}>=${_GS_VERSION_MINOR}:print/${_GS_PORT} |
99 |
. if !defined(_GS_FLAVORED) || !${_GS_ARGS:Mx11} |
|
|
100 |
${type}_DEPENDS+= ${_GS_PKGNAME}>=${_GS_VERSION_MINOR}:${_GS_PORT} |
101 |
. endif |
99 |
. if ${_GS_ARGS:Mx11} |
102 |
. if ${_GS_ARGS:Mx11} |
100 |
${type}_DEPENDS+= ${_GS_X11_PORT}>=${_GS_VERSION_MINOR}:print/${_GS_X11_PORT} |
103 |
${type}_DEPENDS+= ${_GS_X11_PKGNAME}>=${_GS_VERSION_MINOR}:${_GS_X11_PORT} |
101 |
. endif |
104 |
. endif |
102 |
. endif |
105 |
. endif |
103 |
. endfor |
106 |
. endfor |