Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/chat/weechat weechat: Use SUBST framework to adjust ha...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/dfbc931a8483
branches:  trunk
changeset: 429629:dfbc931a8483
user:      leot <leot%pkgsrc.org@localhost>
date:      Wed Apr 22 16:16:12 2020 +0000

description:
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.

diffstat:

 chat/weechat/Makefile |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (25 lines):

diff -r 417247aebffb -r dfbc931a8483 chat/weechat/Makefile
--- a/chat/weechat/Makefile     Wed Apr 22 10:47:47 2020 +0000
+++ b/chat/weechat/Makefile     Wed Apr 22 16:16:12 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.113 2020/03/30 11:07:18 nia Exp $
+# $NetBSD: Makefile,v 1.114 2020/04/22 16:16:12 leot Exp $
 
 DISTNAME=      weechat-2.8
 CATEGORIES=    chat
@@ -37,10 +37,12 @@
 
 .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"



Home | Main Index | Thread Index | Old Index