mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-27 00:57:50 +00:00
bcd640815d
Add support for matching additional pkgconfig libdir entries that were found in Python's Makefile.pre.in. It can also be used by other ports [1] by setting PATHFIX_MAKEFILEIN to the appropriate filename in ${WRKSRC}. If this file grows support for other pathfix'es beyond Makefile's and autoconf sources, it may be worth renaming PATHFIX_MAKEFILEIN in future to suit the broader scope. [1] Examples: devel/ptlib, graphics/zathura (thanks antoine) Reviewed by: antoine Approved by: antoine (exp-run) MFH: 2014Q2
37 lines
1.3 KiB
Makefile
37 lines
1.3 KiB
Makefile
# $FreeBSD$
|
|
#
|
|
# Lookup common paths in Makefile.in, configure and similar files, and replace
|
|
# their values to respect FreeBSD hier(7) for file installation.
|
|
#
|
|
# Feature: pathfix
|
|
# Usage: USES=pathfix
|
|
# Valid ARGS: does not require args
|
|
#
|
|
# MAINTAINER: portmgr@FreeBSD.org
|
|
|
|
.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|[{]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
|