weechat: Use SUBST framework to adjust hardcoded pkg-config python checks The previous ${LN} incantation missed possible python3-embed.pc file (present in python38) ending up in a not-working python support. Do not adjust file under ${BUILDLINK_DIR} and use the SUBST framework to adjust all python3 pkg-config invocations. Index: Makefile =================================================================== RCS file: /cvsroot/pkgsrc/chat/weechat/Makefile,v retrieving revision 1.113 diff -u -p -r1.113 Makefile --- Makefile 30 Mar 2020 11:07:18 -0000 1.113 +++ Makefile 21 Apr 2020 17:02:15 -0000 @@ -37,10 +37,12 @@ BUILDLINK_TRANSFORM+= rm:-Werror-implici .include "options.mk" -pre-configure: .if !empty(PKG_OPTIONS:Mpython) - ${LN} -sf ${BUILDLINK_DIR}/lib/pkgconfig/python-${PYVERSSUFFIX}.pc \ - ${BUILDLINK_DIR}/lib/pkgconfig/python3.pc +SUBST_CLASSES+= python +SUBST_STAGE.python= pre-configure +SUBST_MESSAGE.python= Adjust pkg-config python checks +SUBST_FILES.python= configure.ac cmake/FindPython.cmake +SUBST_SED.python= -e 's,python3,python-${PYVERSSUFFIX},g' .endif .include "../../graphics/hicolor-icon-theme/buildlink3.mk"