Thu Oct 20 10:14:01 2022 UTC ()
qore: add plist awk modifiers so that PLISTS of modules get generated correctly using print-PLIST


(nros)
diff -r1.2 -r1.3 pkgsrc/lang/qore/module.mk

cvs diff -r1.2 -r1.3 pkgsrc/lang/qore/module.mk (expand / switch to unified diff)

--- pkgsrc/lang/qore/module.mk 2016/07/20 11:58:40 1.2
+++ pkgsrc/lang/qore/module.mk 2022/10/20 10:14:01 1.3
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: module.mk,v 1.2 2016/07/20 11:58:40 nros Exp $ 1# $NetBSD: module.mk,v 1.3 2022/10/20 10:14:01 nros Exp $
2# 2#
3# This file should be included in the makefile of packages that install 3# This file should be included in the makefile of packages that install
4# Qore modules. 4# Qore modules.
5# 5#
6# PLIST variables: 6# PLIST variables:
7# 7#
8# QORE_VERSION To be used by packages that install files in 8# QORE_VERSION To be used by packages that install files in
9# ${QORE_MODULE_DIR}/${QORE_VERSION}/ 9# ${QORE_MODULE_DIR}/${QORE_VERSION}/
10# 10#
11# QORE_MODULE_API This should be used by packages that install 11# QORE_MODULE_API This should be used by packages that install
12# modules that uses the compatible module api 12# modules that uses the compatible module api
13# version. 13# version.
14# 14#
@@ -27,13 +27,16 @@ @@ -27,13 +27,16 @@
27# 27#
28 28
29qore-module: post-install .PHONY 29qore-module: post-install .PHONY
30qore-version=qore --short-version | ${SED} -e s/-.*// 30qore-version=qore --short-version | ${SED} -e s/-.*//
31qore-module-api=qore --module-api 31qore-module-api=qore --module-api
32qore-module-dir=qore --module-dir 32qore-module-dir=qore --module-dir
33qore-latest-module-api=qore --latest-module-api 33qore-latest-module-api=qore --latest-module-api
34qore-user-module-dir=qore --user-module-dir 34qore-user-module-dir=qore --user-module-dir
35PLIST_SUBST+=QORE_VERSION="${qore-version:sh}" 35PLIST_SUBST+=QORE_VERSION="${qore-version:sh}"
36PLIST_SUBST+=QORE_MODULE_API="${qore-module-api:sh}" 36PLIST_SUBST+=QORE_MODULE_API="${qore-module-api:sh}"
37PLIST_SUBST+=QORE_MODULE_DIR="${qore-module-dir:sh:C,^${PREFIX}/,,W}" 37PLIST_SUBST+=QORE_MODULE_DIR="${qore-module-dir:sh:C,^${PREFIX}/,,W}"
38PLIST_SUBST+=QORE_LATEST_MODULE_API="${qore-latest-module-api:sh}" 38PLIST_SUBST+=QORE_LATEST_MODULE_API="${qore-latest-module-api:sh}"
39PLIST_SUBST+=QORE_USER_MODULE_DIR="${qore-user-module-dir:sh:C,^${PREFIX}/,,W}" 39PLIST_SUBST+=QORE_USER_MODULE_DIR="${qore-user-module-dir:sh:C,^${PREFIX}/,,W}"
 40PRINT_PLIST_AWK+= { gsub("^${qore-module-dir:sh:C,^${PREFIX}/,,W}", "$${QORE_MODULE_DIR}"); }
 41PRINT_PLIST_AWK+= { gsub("^${qore-user-module-dir:sh:C,^${PREFIX}/,,W}", "$${QORE_USER_MODULE_DIR}"); }
 42PRINT_PLIST_AWK+= /.*\.qmod$$/ { gsub("${qore-latest-module-api:sh}", "$${QORE_LATEST_MODULE_API}"); }