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:
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:
16 # Select whether TeX is a runtime dependency or only needed
17 # when building the package.
19 # Possible values: build run
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.
32 # Absolute pathname of the directory where the standard TeX files
35 # Typical values: ${PREFIX}/share/texmf ${PREFIX}/share/texmf-dist
37 # PKG_LOCALTEXMFPREFIX
38 # Absolute pathname of the directory where extensions for TeX can
41 # Typical values: ${PREFIX}/share/texmf ${PREFIX}/share/texmf-local
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"
61 # Assume only teTeX 3 is supported by default.
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}
75 .if
!empty
(TEX_ACCEPTED
:M
${_TEX_TYPE})
76 TEX_TYPE
= ${_TEX_TYPE}
81 # Set version specifics.
83 .if
${TEX_TYPE} == "teTeX3"
84 _TEX_DEPENDENCY
= ${BUILDLINK_API_DEPENDS.teTeX3
}
85 _TEX_PKGSRCDIR
= ${BUILDLINK_PKGSRCDIR.teTeX3
}
88 .
endif # TEX_BUILDLINK3_MK
90 .if
${TEX_TYPE} == "none"
92 "${_TEX_TYPE} is not an acceptable (${TEX_ACCEPTED})\
93 TeX version for ${PKGNAME}."
95 PLIST_SUBST
+= TEX_TYPE
=${TEX_TYPE
:Q
}
96 .if
(${TEX_DEPMETHOD} == "build")
97 BUILD_DEPENDS
+= ${_TEX_DEPENDENCY}:${_TEX_PKGSRCDIR}
100 .
include "${_TEX_PKGSRCDIR}/buildlink3.mk"