Fixup fromcvs/togit conversion
[minix-pkgsrc.git] / mk / tex.buildlink3.mk
blob1276e2e4dad9f149d1243e09d1bb04ad3dc3cfa4
1 # $NetBSD: tex.buildlink3.mk,v 1.16 2006/08/11 13:32:28 wiz Exp $
3 # This file is included by packages that need a TeX package to work.
5 # The following variables may be set by the pkgsrc user in mk.conf:
7 # TEX_DEFAULT
8 # The user's favorite TeX implementation.
10 # Possible values: teTeX3
11 # Default value: teTeX3
13 # The following variables may be set by a package:
15 # TEX_DEPMETHOD
16 # Select whether TeX is a runtime dependency or only needed
17 # when building the package.
19 # Possible values: build run
20 # Default value: run
22 # TEX_ACCEPTED
23 # List of TeX implementations that the package supports.
25 # Possible values: teTeX3
26 # Default value: teTeX3
28 # After including this file, the following variables may be used, but not
29 # in directives like .if, .for, etc.
31 # PKG_TEXMFPREFIX
32 # Absolute pathname of the directory where the standard TeX files
33 # can be found.
35 # Typical values: ${PREFIX}/share/texmf ${PREFIX}/share/texmf-dist
37 # PKG_LOCALTEXMFPREFIX
38 # Absolute pathname of the directory where extensions for TeX can
39 # be found.
41 # Typical values: ${PREFIX}/share/texmf ${PREFIX}/share/texmf-local
43 # TEX_TYPE
44 # The TeX implementation that has been selected based on the
45 # package's and the user's preferences.
47 # Typical values: teTeX3
50 # NOTE: before all TeX-related packages are converted to use these
51 # variables, we will keep PKG_TEXMFPREFIX = PKG_LOCALTEXMFPREFIX =
52 # ${PREFIX}/share/texmf
54 .if !defined(TEX_BUILDLINK3_MK)
55 TEX_BUILDLINK3_MK= # defined
57 .include "../../mk/bsd.prefs.mk"
59 TEX_DEPMETHOD?= run
61 # Assume only teTeX 3 is supported by default.
62 TEX_ACCEPTED?= teTeX3
64 # set up variables for buildlink or depends
66 BUILDLINK_API_DEPENDS.teTeX3= teTeX-bin-3.[0-9]*
67 BUILDLINK_PKGSRCDIR.teTeX3= ../../print/teTeX3-bin
69 # Determine the TeX version to be used.
71 .if !defined(_TEX_TYPE)
72 _TEX_TYPE= ${TEX_DEFAULT}
73 .endif
75 .if !empty(TEX_ACCEPTED:M${_TEX_TYPE})
76 TEX_TYPE= ${_TEX_TYPE}
77 .else
78 TEX_TYPE= none
79 .endif
81 # Set version specifics.
83 .if ${TEX_TYPE} == "teTeX3"
84 _TEX_DEPENDENCY= ${BUILDLINK_API_DEPENDS.teTeX3}
85 _TEX_PKGSRCDIR= ${BUILDLINK_PKGSRCDIR.teTeX3}
86 .endif
88 .endif # TEX_BUILDLINK3_MK
90 .if ${TEX_TYPE} == "none"
91 PKG_FAIL_REASON= \
92 "${_TEX_TYPE} is not an acceptable (${TEX_ACCEPTED})\
93 TeX version for ${PKGNAME}."
94 .else
95 PLIST_SUBST+= TEX_TYPE=${TEX_TYPE:Q}
96 .if (${TEX_DEPMETHOD} == "build")
97 BUILD_DEPENDS+= ${_TEX_DEPENDENCY}:${_TEX_PKGSRCDIR}
98 .else
99 TEX_DEPMETHOD:= run
100 . include "${_TEX_PKGSRCDIR}/buildlink3.mk"
102 .endif
103 .endif