Sat Mar 16 21:47:15 2013 UTC ()
Choose ghostscript package for ghostscript tools based on whether
gnu-agpl-* is in ACCEPTABLE_LICENSES.

This is mostly the same as the old ghostscript type logic that was
removed in version 1.223.


(dholland)
diff -r1.253 -r1.254 pkgsrc/mk/tools/replace.mk

cvs diff -r1.253 -r1.254 pkgsrc/mk/tools/replace.mk (expand / switch to unified diff)

--- pkgsrc/mk/tools/replace.mk 2013/03/15 12:35:03 1.253
+++ pkgsrc/mk/tools/replace.mk 2013/03/16 21:47:14 1.254
@@ -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#
1071GHOSTSCRIPT_REQD?= 6.01 1071GHOSTSCRIPT_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
1078TOOLS_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
 1088TOOLS_DEPENDS.ghostscript= {${_TOOLS_DEP.ghostscript}}>=${GHOSTSCRIPT_REQD}:${_TOOLS_PKGSRCDIR.ghostscript}
1079MAKEVARS+= TOOLS_DEPENDS.ghostscript 1089MAKEVARS+= 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)
1086MAKEFLAGS+= TOOLS_IGNORE.${_t_}= 1096MAKEFLAGS+= 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])
1088TOOLS_DEPENDS.${_t_}?= ${TOOLS_DEPENDS.ghostscript} 1098TOOLS_DEPENDS.${_t_}?= ${TOOLS_DEPENDS.ghostscript}
1089TOOLS_CREATE+= ${_t_} 1099TOOLS_CREATE+= ${_t_}
1090TOOLS_FIND_PREFIX+= TOOLS_PREFIX.${_t_}=${TOOLS_DEPENDS.ghostscript:C/:.*//} 1100TOOLS_FIND_PREFIX+= TOOLS_PREFIX.${_t_}=${TOOLS_DEPENDS.ghostscript:C/:.*//}
1091TOOLS_PATH.${_t_}= ${TOOLS_PREFIX.${_t_}}/bin/${_t_} 1101TOOLS_PATH.${_t_}= ${TOOLS_PREFIX.${_t_}}/bin/${_t_}