| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: replace.mk,v 1.253 2013/03/15 12:35:03 fhajny Exp $ | | 1 | # $NetBSD: replace.mk,v 1.254 2013/03/16 21:47:14 dholland Exp $ |
2 | # | | 2 | # |
3 | # Copyright (c) 2005 The NetBSD Foundation, Inc. | | 3 | # Copyright (c) 2005 The NetBSD Foundation, Inc. |
4 | # All rights reserved. | | 4 | # All rights reserved. |
5 | # | | 5 | # |
6 | # This code is derived from software contributed to The NetBSD Foundation | | 6 | # This code is derived from software contributed to The NetBSD Foundation |
7 | # by Johnny C. Lam. | | 7 | # by Johnny C. Lam. |
8 | # | | 8 | # |
9 | # Redistribution and use in source and binary forms, with or without | | 9 | # Redistribution and use in source and binary forms, with or without |
10 | # modification, are permitted provided that the following conditions | | 10 | # modification, are permitted provided that the following conditions |
11 | # are met: | | 11 | # are met: |
12 | # 1. Redistributions of source code must retain the above copyright | | 12 | # 1. Redistributions of source code must retain the above copyright |
13 | # notice, this list of conditions and the following disclaimer. | | 13 | # notice, this list of conditions and the following disclaimer. |
14 | # 2. Redistributions in binary form must reproduce the above copyright | | 14 | # 2. Redistributions in binary form must reproduce the above copyright |
| @@ -1064,28 +1064,38 @@ TOOLS_PATH.${_t_}= ${TOOLS_PREFIX.${_t_} | | | @@ -1064,28 +1064,38 @@ TOOLS_PATH.${_t_}= ${TOOLS_PREFIX.${_t_} |
1064 | # native tool available. | | 1064 | # native tool available. |
1065 | # | | 1065 | # |
1066 | _TOOLS.ghostscript= dvipdf gs pdf2ps ps2pdf | | 1066 | _TOOLS.ghostscript= dvipdf gs pdf2ps ps2pdf |
1067 | | | 1067 | |
1068 | # This is the minimum version of Ghostscript required by the current | | 1068 | # This is the minimum version of Ghostscript required by the current |
1069 | # package. | | 1069 | # package. |
1070 | # | | 1070 | # |
1071 | GHOSTSCRIPT_REQD?= 6.01 | | 1071 | GHOSTSCRIPT_REQD?= 6.01 |
1072 | | | 1072 | |
1073 | # Set TOOLS_DEPENDS.ghostscript to an appropriate dependency based on | | 1073 | # Set TOOLS_DEPENDS.ghostscript to an appropriate dependency based on |
1074 | # various package options. | | 1074 | # various package options. |
1075 | # | | 1075 | # |
1076 | .if !defined(TOOLS_DEPENDS.ghostscript) | | 1076 | .if !defined(TOOLS_DEPENDS.ghostscript) |
1077 | _TOOLS_DEP.ghostscript:= ghostscript | | 1077 | _TOOLS_DEP.ghostscript:= ghostscript-gpl |
1078 | TOOLS_DEPENDS.ghostscript= ghostscript>=${GHOSTSCRIPT_REQD}:../../print/ghostscript | | 1078 | _TOOLS_DEP.ghostscript:= ${_TOOLS_DEP.ghostscript},ghostscript |
| | | 1079 | # |
| | | 1080 | # Determine the default Ghostscript package to build based on |
| | | 1081 | # ACCEPTABLE_LICENSES. |
| | | 1082 | # |
| | | 1083 | . if !empty(ACCEPTABLE_LICENSES:Mgnu-agpl-*) |
| | | 1084 | _TOOLS_PKGSRCDIR.ghostscript= ../../print/ghostscript |
| | | 1085 | . else |
| | | 1086 | _TOOLS_PKGSRCDIR.ghostscript= ../../print/ghostscript-gpl |
| | | 1087 | . endif |
| | | 1088 | TOOLS_DEPENDS.ghostscript= {${_TOOLS_DEP.ghostscript}}>=${GHOSTSCRIPT_REQD}:${_TOOLS_PKGSRCDIR.ghostscript} |
1079 | MAKEVARS+= TOOLS_DEPENDS.ghostscript | | 1089 | MAKEVARS+= TOOLS_DEPENDS.ghostscript |
1080 | .endif | | 1090 | .endif |
1081 | | | 1091 | |
1082 | .for _t_ in ${_TOOLS.ghostscript} | | 1092 | .for _t_ in ${_TOOLS.ghostscript} |
1083 | . if !defined(TOOLS_IGNORE.${_t_}) && !empty(_USE_TOOLS:M${_t_}) | | 1093 | . if !defined(TOOLS_IGNORE.${_t_}) && !empty(_USE_TOOLS:M${_t_}) |
1084 | . if !empty(PKGPATH:Mprint/ghostscript) || \ | | 1094 | . if !empty(PKGPATH:Mprint/ghostscript) || \ |
1085 | !empty(PKGPATH:Mprint/ghostscript-esp) | | 1095 | !empty(PKGPATH:Mprint/ghostscript-esp) |
1086 | MAKEFLAGS+= TOOLS_IGNORE.${_t_}= | | 1096 | MAKEFLAGS+= TOOLS_IGNORE.${_t_}= |
1087 | . elif !empty(_TOOLS_USE_PKGSRC.${_t_}:M[yY][eE][sS]) | | 1097 | . elif !empty(_TOOLS_USE_PKGSRC.${_t_}:M[yY][eE][sS]) |
1088 | TOOLS_DEPENDS.${_t_}?= ${TOOLS_DEPENDS.ghostscript} | | 1098 | TOOLS_DEPENDS.${_t_}?= ${TOOLS_DEPENDS.ghostscript} |
1089 | TOOLS_CREATE+= ${_t_} | | 1099 | TOOLS_CREATE+= ${_t_} |
1090 | TOOLS_FIND_PREFIX+= TOOLS_PREFIX.${_t_}=${TOOLS_DEPENDS.ghostscript:C/:.*//} | | 1100 | TOOLS_FIND_PREFIX+= TOOLS_PREFIX.${_t_}=${TOOLS_DEPENDS.ghostscript:C/:.*//} |
1091 | TOOLS_PATH.${_t_}= ${TOOLS_PREFIX.${_t_}}/bin/${_t_} | | 1101 | TOOLS_PATH.${_t_}= ${TOOLS_PREFIX.${_t_}}/bin/${_t_} |