aboutsummaryrefslogtreecommitdiffstats
path: root/Mk/Uses/charsetfix.mk
blob: 06aca3b1f3948105fa80dbacd19c122e6ad0e593 (plain) (blame)
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
# $FreeBSD$
#
# Lookup in Makefile.in to prevent a package from installing/modifying charset.alias
#
# MAINTAINER: portmgr@FreeBSD.org
#
# Feature:  charsetfix
# Usage:    USES=charsetfix
# Valid ARGS:   does not require args
#
#
.if !defined(_INCLUDE_USES_CHARSETFIX_MK)
_INCLUDE_USES_CHARSETFIX_MK=    yes

.if defined(charsetfix_ARGS)
IGNORE= USES=charsetfix does not require args
.endif

CHARSETFIX_MAKEFILEIN?= Makefile.in

post-patch: charsetfix-post-patch

charsetfix-post-patch:
    @${FIND} ${WRKSRC} -name "${CHARSETFIX_MAKEFILEIN}" -type f | ${XARGS} ${REINPLACE_CMD} \
        -e 's|need_charset_alias=true|need_charset_alias=false|g ; \
        s|test -f $$(charset_alias)|false|g ;\
        s|test -f $$(DESTDIR)$$(libdir)/charset.alias|false|g'

.endif