2013-03-06 14:28:57 +00:00
|
|
|
# $FreeBSD$
|
2013-03-06 15:12:29 +00:00
|
|
|
#
|
2014-04-09 12:45:54 +00:00
|
|
|
# Lookup common paths in Makefile.in, configure and similar files, and replace
|
|
|
|
# their values to respect FreeBSD hier(7) for file installation.
|
2013-03-06 14:28:57 +00:00
|
|
|
#
|
2013-03-08 15:04:18 +00:00
|
|
|
# Feature: pathfix
|
|
|
|
# Usage: USES=pathfix
|
2013-03-11 06:43:13 +00:00
|
|
|
# Valid ARGS: does not require args
|
2013-03-08 15:04:18 +00:00
|
|
|
#
|
2014-03-15 10:31:54 +00:00
|
|
|
# MAINTAINER: portmgr@FreeBSD.org
|
|
|
|
|
2013-03-11 06:43:13 +00:00
|
|
|
.if !defined(_INCLUDE_USES_PATHFIX_MK)
|
|
|
|
_INCLUDE_USES_PATHFIX_MK= yes
|
2013-03-06 14:28:57 +00:00
|
|
|
|
2013-03-08 15:04:18 +00:00
|
|
|
.if defined(pathfix_ARGS)
|
|
|
|
IGNORE= USES=pathfix does not require args
|
|
|
|
.endif
|
|
|
|
|
2013-03-06 14:28:57 +00:00
|
|
|
PATHFIX_MAKEFILEIN?= Makefile.in
|
|
|
|
|
2014-05-22 06:42:20 +00:00
|
|
|
pathfix:
|
2013-03-06 14:28:57 +00:00
|
|
|
@${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 ; \
|
2014-04-09 12:45:54 +00:00
|
|
|
s|[(]LIBDIR[)]/pkgconfig|(PREFIX)/libdata/pkgconfig|g ; \
|
2013-04-16 15:45:03 +00:00
|
|
|
s|[{]libdir[}]/pkgconfig|(prefix)/libdata/pkgconfig|g ; \
|
2014-04-09 12:45:54 +00:00
|
|
|
s|[{]LIBDIR[}]/pkgconfig|(PREFIX)/libdata/pkgconfig|g ; \
|
2013-03-06 14:28:57 +00:00
|
|
|
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
|