diff options
author | Jason E. Hale <jhale@FreeBSD.org> | 2016-01-07 14:54:03 +0000 |
---|---|---|
committer | Jason E. Hale <jhale@FreeBSD.org> | 2016-01-07 14:54:03 +0000 |
commit | 42b0bae34ff92cc7167eae163af6202f56373487 (patch) | |
tree | 4c39cc3e209fa61d7dc838b0786cec751eee2548 /Mk/Uses/pathfix.mk | |
parent | - Clarify LICENSE (diff) |
Add USES=pathfix support for CMake. Some ports that use CMake to build
already had USES=pathfix, although it did nothing. For those ports, I
either removed it as they were handling the pkgconfig files differently
or I removed patches and substitutions that accomplished the same thing
as pathfix.
Differential Revision: https://reviews.freebsd.org/D850
Reviewed by: antoine, bapt, tijl
Approved by: portmgr (bapt)
Notes
Notes:
svn path=/head/; revision=405449
Diffstat (limited to 'Mk/Uses/pathfix.mk')
-rw-r--r-- | Mk/Uses/pathfix.mk | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Mk/Uses/pathfix.mk b/Mk/Uses/pathfix.mk index f191f9ea4026..b587574d76a2 100644 --- a/Mk/Uses/pathfix.mk +++ b/Mk/Uses/pathfix.mk @@ -16,11 +16,23 @@ _INCLUDE_USES_PATHFIX_MK= yes IGNORE= USES=pathfix does not require args .endif +PATHFIX_CMAKELISTSTXT?= CMakeLists.txt PATHFIX_MAKEFILEIN?= Makefile.in PATHFIX_WRKSRC?= ${WRKSRC} _USES_patch+= 190:pathfix pathfix: +.if ${USES:Mcmake*} + @${FIND} ${PATHFIX_WRKSRC} -name "${PATHFIX_CMAKELISTSTXT}" -type f | ${XARGS} ${REINPLACE_CMD} -e \ + 's|[{]CMAKE_INSTALL_LIBDIR[}]/pkgconfig|{CMAKE_INSTALL_PREFIX}/libdata/pkgconfig|g ; \ + s|[{]INSTALL_LIB_DIR[}]/pkgconfig|{CMAKE_INSTALL_PREFIX}/libdata/pkgconfig|g ; \ + s|[{]INSTALL_LIBDIR[}]/pkgconfig|{CMAKE_INSTALL_PREFIX}/libdata/pkgconfig|g ; \ + s|[{]LIB_DIR[}]/pkgconfig|{CMAKE_INSTALL_PREFIX}/libdata/pkgconfig|g ; \ + s|[{]LIB_INSTALL_DIR[}]/pkgconfig|{CMAKE_INSTALL_PREFIX}/libdata/pkgconfig|g ; \ + s|[{]LIBRARY_INSTALL_DIR[}]/pkgconfig|{CMAKE_INSTALL_PREFIX}/libdata/pkgconfig|g ; \ + s|[{]libdir[}]/pkgconfig|{CMAKE_INSTALL_PREFIX}/libdata/pkgconfig|g ; \ + s|lib/pkgconfig|libdata/pkgconfig|g' +.else @${FIND} ${PATHFIX_WRKSRC} -name "${PATHFIX_MAKEFILEIN}" -type f | ${XARGS} ${REINPLACE_CMD} -e \ 's|[(]libdir[)]/locale|(prefix)/share/locale|g ; \ s|[(]libdir[)]/pkgconfig|(prefix)/libdata/pkgconfig|g ; \ @@ -31,5 +43,6 @@ pathfix: s|[(]prefix[)]/lib/pkgconfig|(prefix)/libdata/pkgconfig|g ; \ s|[$$][(]localstatedir[)]/scrollkeeper|${SCROLLKEEPER_DIR}|g ; \ s|[(]libdir[)]/bonobo/servers|(prefix)/libdata/bonobo/servers|g' +.endif .endif |