blob: 5f4bfe3f74235ab43d31871c5e4766e1b13a7567 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
# $NetBSD: buildlink.mk,v 1.10 2001/07/27 13:33:28 jlam Exp $
#
# This Makefile fragment is included by packages that use freetype2.
#
# To use this Makefile fragment, simply:
#
# (1) Optionally define BUILDLINK_DEPENDS.freetype2 to the dependency pattern
# for the version of freetype2 desired.
# (2) Include this Makefile fragment in the package Makefile,
# (3) Add ${BUILDLINK_DIR}/include to the front of the C preprocessor's header
# search path, and
# (4) Add ${BUILDLINK_DIR}/lib to the front of the linker's library search
# path.
.if !defined(FREETYPE2_BUILDLINK_MK)
FREETYPE2_BUILDLINK_MK= # defined
.include "../../mk/bsd.buildlink.mk"
BUILDLINK_DEPENDS.freetype2?= freetype2>=2.0.1
# Check if we got FreeType2 distributed with XFree86 4.x or if we need to
# depend on the freetype2 package.
#
.include "../../mk/bsd.prefs.mk"
.if exists(${X11BASE}/include/freetype2/freetype/freetype.h)
_IS_BUILTIN_FREETYPE2!= ${EGREP} -c BuildFreetype2Library ${X11BASE}/lib/X11/config/X11.tmpl || ${TRUE}
.else
_IS_BUILTIN_FREETYPE2= 0
.endif
.if ${_IS_BUILTIN_FREETYPE2} == "0"
_NEED_FREETYPE2= YES
.else
_NEED_FREETYPE2= NO
.endif
.if ${_NEED_FREETYPE2} == "YES"
DEPENDS+= ${BUILDLINK_DEPENDS.freetype2}:../../graphics/freetype2
EVAL_PREFIX+= BUILDLINK_PREFIX.freetype2=freetype2
BUILDLINK_PREFIX.freetype2_DEFAULT= ${LOCALBASE}
.else
BUILDLINK_PREFIX.freetype2= ${X11BASE}
.endif
BUILDLINK_FILES.freetype2= include/ft2build.h
BUILDLINK_FILES.freetype2+= include/freetype2/ft2build.h
BUILDLINK_FILES.freetype2+= include/freetype2/freetype/*
BUILDLINK_FILES.freetype2+= include/freetype2/freetype/cache/*
BUILDLINK_FILES.freetype2+= include/freetype2/freetype/config/*
BUILDLINK_FILES.freetype2+= include/freetype2/freetype/internal/*
BUILDLINK_FILES.freetype2+= lib/libfreetype.*
BUILDLINK_TARGETS+= ${BUILDLINK_TARGETS.freetype2}
BUILDLINK_TARGETS.freetype2= freetype2-buildlink
.if ${_NEED_FREETYPE2} == "YES"
BUILDLINK_TARGETS.freetype2+= freetype2-buildlink-config-wrapper
BUILDLINK_CONFIG.freetype2= \
${BUILDLINK_PREFIX.freetype2}/bin/freetype-config
BUILDLINK_CONFIG_WRAPPER.freetype2= \
${BUILDLINK_DIR}/bin/freetype-config
freetype2-buildlink-config-wrapper: _BUILDLINK_CONFIG_WRAPPER_USE
.else
BUILDLINK_TARGETS.freetype2+= freetype2-buildlink-config
BUILDLINK_CONFIG.freetype2= ${BUILDLINK_DIR}/bin/freetype-config
BUILDLINK_CONFIG_WRAPPER.freetype2= ${BUILDLINK_CONFIG.freetype2}
freetype2-buildlink-config:
${_PKG_SILENT}${_PKG_DEBUG} \
if [ ! -f ${BUILDLINK_CONFIG.freetype2} ]; then \
${ECHO_MSG} "Creating config script ${BUILDLINK_CONFIG.freetype2}."; \
${MKDIR} ${BUILDLINK_CONFIG.freetype2:H}; \
${SED} -e "s|@AWK@|${AWK}|g" \
-e "s|@SED@|${SED}|g" \
-e "s|@X11BASE@|${X11BASE}|g" \
-e "s|@BUILDLINK_DIR@|${BUILDLINK_DIR}|g" \
${.CURDIR}/../../graphics/freetype2/buildlink-freetype-config.in \
> ${BUILDLINK_CONFIG.freetype2}; \
${CHMOD} +x ${BUILDLINK_CONFIG.freetype2}; \
fi
.endif # _NEED_FREETYPE2
.if defined(USE_CONFIG_WRAPPER) && defined(GNU_CONFIGURE)
FREETYPE_CONFIG?= ${BUILDLINK_CONFIG_WRAPPER.freetype2}
CONFIGURE_ENV+= FREETYPE_CONFIG="${FREETYPE_CONFIG}"
.endif
pre-configure: ${BUILDLINK_TARGETS.freetype2}
freetype2-buildlink: _BUILDLINK_USE
.endif # FREETYPE2_BUILDLINK_MK
|