blob: 467ce17c6ae7573cbc805d9216538079d69f57e3 (
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
|
# $NetBSD: buildlink2.mk,v 1.2 2003/07/09 08:07:09 grant Exp $
.if !defined(GSED_BUILDLINK2_MK)
GSED_BUILDLINK2_MK= # defined
.include "../../mk/bsd.prefs.mk"
BUILDLINK_DEPENDS.gsed?= gsed>=3.02
BUILDLINK_PKGSRCDIR.gsed?= ../../textproc/gsed
#
# Some packages may really need GNU sed, but most just demand a
# working sed.
#
.if defined(USE_GNU_SED)
_NEED_GNU_SED= YES
.else
_NEED_GNU_SED= NO
# Not sure about IRIX, mark it incompatible for now
_INCOMPAT_SED= IRIX-*-*
INCOMPAT_SED?= # empty
. for _pattern_ in ${_INCOMPAT_SED} ${INCOMPAT_SED}
. if !empty(MACHINE_PLATFORM:M${_pattern_})
_NEED_GNU_SED= YES
. endif
. endfor
.endif
.if ${_NEED_GNU_SED} == "YES"
BUILDLINK_DEPMETHOD.gsed?= build
BUILDLINK_PACKAGES+= gsed
BUILDLINK_PREFIX.gsed_DEFAULT= ${LOCALBASE}
BUILDLINK_FILES.gsed= bin/${GNU_PROGRAM_PREFIX}sed
EVAL_PREFIX+= BUILDLINK_PREFIX.gsed=gsed
.endif
BUILDLINK_TARGETS+= gsed-buildlink gsed-buildlink-bin
gsed-buildlink: _BUILDLINK_USE
gsed-buildlink-bin:
.if ${_NEED_GNU_SED} == "YES"
${_PKG_SILENT}${_PKG_DEBUG} \
[ ! -f ${BUILDLINK_DIR}/bin/sed ] && \
${LN} -fs ${GNU_PROGRAM_PREFIX}sed ${BUILDLINK_DIR}/bin/sed
.else
${_PKG_SILENT}${_PKG_DEBUG} \
[ ! -f ${BUILDLINK_DIR}/bin/sed ] && \
${LN} -fs ${SED} ${BUILDLINK_DIR}/bin/sed
.endif
.endif # GSED_BUILDLINK2_MK
|