1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-29 01:13:08 +00:00
freebsd-ports/Mk/Uses/pathfix.mk
Baptiste Daroussin 11e8713e2b Mark all targets defines in _SEQ and .ORDER has .PHONY which they all should be
If one day we are no adding a target actually correspond to an actual file, simply adding
the name of the target to the NOTPHONY will make it work as expected
2014-01-04 00:02:08 +00:00

36 lines
1.1 KiB
Makefile

# $FreeBSD$
#
# Lookup in Makefile.in and configure for common incorrect paths and set them
# to respect FreeBSD hier
#
# MAINTAINER: portmgr@FreeBSD.org
#
# Feature: pathfix
# Usage: USES=pathfix
# Valid ARGS: does not require args
#
#
.if !defined(_INCLUDE_USES_PATHFIX_MK)
_INCLUDE_USES_PATHFIX_MK= yes
.if defined(pathfix_ARGS)
IGNORE= USES=pathfix does not require args
.endif
PATHFIX_MAKEFILEIN?= Makefile.in
pathfix-pre-patch:
@${FIND} ${WRKSRC} -name "${PATHFIX_MAKEFILEIN}" -type f | ${XARGS} ${REINPLACE_CMD} -e \
's|[(]libdir[)]/locale|(prefix)/share/locale|g ; \
s|[(]libdir[)]/pkgconfig|(prefix)/libdata/pkgconfig|g ; \
s|[{]libdir[}]/pkgconfig|(prefix)/libdata/pkgconfig|g ; \
s|[(]datadir[)]/pkgconfig|(prefix)/libdata/pkgconfig|g ; \
s|[(]prefix[)]/lib/pkgconfig|(prefix)/libdata/pkgconfig|g ; \
s|[$$][(]localstatedir[)]/scrollkeeper|${SCROLLKEEPER_DIR}|g ; \
s|[(]libdir[)]/bonobo/servers|(prefix)/libdata/bonobo/servers|g' ; \
${FIND} ${WRKSRC} -name "configure" -type f | ${XARGS} ${REINPLACE_CMD} -e \
's|DATADIRNAME=lib|DATADIRNAME=share|g ; \
s|{libdir}/locale|{prefix}/share/locale|g'
.endif