diff options
author | bapt <bapt@FreeBSD.org> | 2013-03-18 19:40:04 +0800 |
---|---|---|
committer | bapt <bapt@FreeBSD.org> | 2013-03-18 19:40:04 +0800 |
commit | cd6cb91f6fc3a0aea1f5f46650af0a4b87487f59 (patch) | |
tree | 6b707abf8d8621e9bcb4f385129f5e95769e9154 /Mk | |
parent | 884ad2690ee76c497ad1c40bb4dac951731a4bbb (diff) | |
download | freebsd-ports-gnome-cd6cb91f6fc3a0aea1f5f46650af0a4b87487f59.tar.gz freebsd-ports-gnome-cd6cb91f6fc3a0aea1f5f46650af0a4b87487f59.tar.zst freebsd-ports-gnome-cd6cb91f6fc3a0aea1f5f46650af0a4b87487f59.zip |
Fix a long standing bug of lib/charset.alias being overwritten, modified, and badly tracked by ports.
Make lib/charset.alias a file only provided by converters/libiconv
Create a new USES: charsetfix, that will modify in post patch the Makefile.in to prevent a port from modifying/overwritting the charset.alias file during make install.
Prevent devel/gettext from installing that files.
Fix a couple of ports that actually touch charset.alias during the build phase.
Based on a patch by ale (http://lists.freebsd.org/pipermail/freebsd-gnome/2012-October/027747.html)
Approved by: kwm (gnome)
Exp-run by: miwi
Diffstat (limited to 'Mk')
-rw-r--r-- | Mk/Uses/charsetfix.mk | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/Mk/Uses/charsetfix.mk b/Mk/Uses/charsetfix.mk new file mode 100644 index 000000000000..06aca3b1f394 --- /dev/null +++ b/Mk/Uses/charsetfix.mk @@ -0,0 +1,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 |