Wed Oct 5 12:46:43 2016 UTC ()
Hook up the prepend support.


(joerg)
diff -r1.26 -r1.27 pkgsrc/mk/cwrappers.mk

cvs diff -r1.26 -r1.27 pkgsrc/mk/cwrappers.mk (expand / switch to unified diff)

--- pkgsrc/mk/cwrappers.mk 2015/05/04 19:23:19 1.26
+++ pkgsrc/mk/cwrappers.mk 2016/10/05 12:46:43 1.27
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: cwrappers.mk,v 1.26 2015/05/04 19:23:19 joerg Exp $ 1# $NetBSD: cwrappers.mk,v 1.27 2016/10/05 12:46:43 joerg Exp $
2# 2#
3# This Makefile fragment implements integration of pkgtools/cwrappers. 3# This Makefile fragment implements integration of pkgtools/cwrappers.
4 4
5.include "../../mk/wrapper/wrapper-defs.mk" 5.include "../../mk/wrapper/wrapper-defs.mk"
6.include "../../mk/buildlink3/bsd.buildlink3.mk" 6.include "../../mk/buildlink3/bsd.buildlink3.mk"
7 7
8BUILD_DEPENDS+= cwrappers>=20150314:../../pkgtools/cwrappers 8BUILD_DEPENDS+= cwrappers>=20150314:../../pkgtools/cwrappers
9 9
10# XXX This should be PREFIX, but USE_CROSSBASE overrides it. 10# XXX This should be PREFIX, but USE_CROSSBASE overrides it.
11CWRAPPERS_SRC_DIR= ${LOCALBASE}/libexec/cwrappers 11CWRAPPERS_SRC_DIR= ${LOCALBASE}/libexec/cwrappers
12CWRAPPERS_CONFIG_DIR= ${WRKDIR}/.cwrapper/config 12CWRAPPERS_CONFIG_DIR= ${WRKDIR}/.cwrapper/config
13CONFIGURE_ENV+= CWRAPPERS_CONFIG_DIR=${CWRAPPERS_CONFIG_DIR} 13CONFIGURE_ENV+= CWRAPPERS_CONFIG_DIR=${CWRAPPERS_CONFIG_DIR}
14MAKE_ENV+= CWRAPPERS_CONFIG_DIR=${CWRAPPERS_CONFIG_DIR} 14MAKE_ENV+= CWRAPPERS_CONFIG_DIR=${CWRAPPERS_CONFIG_DIR}
@@ -69,26 +69,29 @@ generate-cwrappers: @@ -69,26 +69,29 @@ generate-cwrappers:
69 ${RUN}echo wrksrc=${WRKSRC:Q} >> ${CWRAPPERS_CONFIG_DIR}/${CWRAPPERS_CONFIG.${wrappee}} 69 ${RUN}echo wrksrc=${WRKSRC:Q} >> ${CWRAPPERS_CONFIG_DIR}/${CWRAPPERS_CONFIG.${wrappee}}
70 ${RUN}case ${wrappee} in *libtool) ;; *) echo path=${_PATH_ORIG:Q} >> ${CWRAPPERS_CONFIG_DIR}/${CWRAPPERS_CONFIG.${wrappee}};; esac 70 ${RUN}case ${wrappee} in *libtool) ;; *) echo path=${_PATH_ORIG:Q} >> ${CWRAPPERS_CONFIG_DIR}/${CWRAPPERS_CONFIG.${wrappee}};; esac
71 ${RUN}echo exec_path=${WRAPPER_BINDIR}/${CWRAPPERS_ALIASES.${wrappee}:[1]} >> ${CWRAPPERS_CONFIG_DIR}/${CWRAPPERS_CONFIG.${wrappee}} 71 ${RUN}echo exec_path=${WRAPPER_BINDIR}/${CWRAPPERS_ALIASES.${wrappee}:[1]} >> ${CWRAPPERS_CONFIG_DIR}/${CWRAPPERS_CONFIG.${wrappee}}
72 ${RUN}echo exec=${CWRAPPERS_WRAPPEE.${wrappee}:Q} >> ${CWRAPPERS_CONFIG_DIR}/${CWRAPPERS_CONFIG.${wrappee}} 72 ${RUN}echo exec=${CWRAPPERS_WRAPPEE.${wrappee}:Q} >> ${CWRAPPERS_CONFIG_DIR}/${CWRAPPERS_CONFIG.${wrappee}}
73. for cmd in ${WRAPPER_REORDER_CMDS} 73. for cmd in ${WRAPPER_REORDER_CMDS}
74 ${RUN}echo reorder=${cmd:S/^reorder://:Q} >> ${CWRAPPERS_CONFIG_DIR}/${CWRAPPERS_CONFIG.${wrappee}} 74 ${RUN}echo reorder=${cmd:S/^reorder://:Q} >> ${CWRAPPERS_CONFIG_DIR}/${CWRAPPERS_CONFIG.${wrappee}}
75. endfor 75. endfor
76. for cmd in ${CWRAPPERS_TRANSFORM.${wrappee}} ${_CWRAPPERS_TRANSFORM} 76. for cmd in ${CWRAPPERS_TRANSFORM.${wrappee}} ${_CWRAPPERS_TRANSFORM}
77 ${RUN}echo transform=${cmd:u:Q} >> ${CWRAPPERS_CONFIG_DIR}/${CWRAPPERS_CONFIG.${wrappee}} 77 ${RUN}echo transform=${cmd:u:Q} >> ${CWRAPPERS_CONFIG_DIR}/${CWRAPPERS_CONFIG.${wrappee}}
78. endfor 78. endfor
79. for cmd in ${CWRAPPERS_APPEND.${wrappee}:U} 79. for cmd in ${CWRAPPERS_APPEND.${wrappee}:U}
80 ${RUN}echo append=${cmd:Q} >> ${CWRAPPERS_CONFIG_DIR}/${CWRAPPERS_CONFIG.${wrappee}} 80 ${RUN}echo append=${cmd:Q} >> ${CWRAPPERS_CONFIG_DIR}/${CWRAPPERS_CONFIG.${wrappee}}
81. endfor 81. endfor
 82. for cmd in ${CWRAPPERS_PREPEND.${wrappee}:U}
 83 ${RUN}echo prepend=${cmd:Q} >> ${CWRAPPERS_CONFIG_DIR}/${CWRAPPERS_CONFIG.${wrappee}}
 84. endfor
82. for cmd in ${_CWRAPPERS_UNWRAP} 85. for cmd in ${_CWRAPPERS_UNWRAP}
83 ${RUN}echo unwrap=${cmd:Q} >> ${CWRAPPERS_CONFIG_DIR}/${CWRAPPERS_CONFIG.${wrappee}} 86 ${RUN}echo unwrap=${cmd:Q} >> ${CWRAPPERS_CONFIG_DIR}/${CWRAPPERS_CONFIG.${wrappee}}
84. endfor 87. endfor
85. for alias in ${CWRAPPERS_ALIASES.${wrappee}} 88. for alias in ${CWRAPPERS_ALIASES.${wrappee}}
86 ${RUN}ln -s ${CWRAPPERS_SRC_DIR}/${CWRAPPERS_CONFIG.${wrappee}}-wrapper ${WRAPPER_BINDIR}/${alias} 89 ${RUN}ln -s ${CWRAPPERS_SRC_DIR}/${CWRAPPERS_CONFIG.${wrappee}}-wrapper ${WRAPPER_BINDIR}/${alias}
87. endfor 90. endfor
88.endfor 91.endfor
89 92
90PREPEND_PATH+= ${WRAPPER_BINDIR} 93PREPEND_PATH+= ${WRAPPER_BINDIR}
91 94
92_COOKIE.wrapper= ${WRKDIR}/.wrapper_done 95_COOKIE.wrapper= ${WRKDIR}/.wrapper_done
93 96
94.PHONY: wrapper 97.PHONY: wrapper