Index: mk/subst.mk =================================================================== RCS file: /cvs/cvsroot/pkgsrc/mk/subst.mk,v retrieving revision 1.53 diff -u -r1.53 subst.mk --- mk/subst.mk 26 Jan 2008 15:23:21 -0000 1.53 +++ mk/subst.mk 4 Sep 2013 08:22:11 -0000 @@ -48,6 +48,11 @@ # before any substitutions are done to it. Since that test is not # perfect, it can be disabled by setting this variable to "yes". # +# SUBST_COND. +# Add condition to substitute. Default is 1 (True), do always. +# Typical example in Makefile is +# SUBST_COND.= X11_TYPE:Mmodular +# # See also: # PLIST_SUBST # @@ -85,6 +90,8 @@ . endfor SUBST_POSTCMD.${_class_}?= ${RM} -f "$$tmpfile" SUBST_SKIP_TEXT_CHECK.${_class_}?= no +# default: Have something, meaning true, do always +SUBST_COND.${_class_}?= doit .if !empty(SUBST_SKIP_TEXT_CHECK.${_class_}:M[Yy][Ee][Ss]) _SUBST_IS_TEXT_FILE.${_class_}= ${TRUE} @@ -105,6 +112,7 @@ subst-${_class_}: ${_SUBST_COOKIE.${_class_}} ${_SUBST_COOKIE.${_class_}}: +. if !empty(SUBST_COND.${_class_}) . if !empty(SUBST_MESSAGE.${_class_}) ${RUN} ${ECHO_SUBST_MSG} ${SUBST_MESSAGE.${_class_}:Q} . endif @@ -135,4 +143,7 @@ fi; \ done ${RUN} ${TOUCH} ${TOUCH_FLAGS} ${.TARGET:Q} +. else + ${INFO_MSG} "[subst.mk:${_class_}] Skipping SUBST due to SUBST_COND " +. endif .endfor ? wip/trustedQSL/work Index: wip/trustedQSL/Makefile =================================================================== RCS file: /cvsroot/pkgsrc-wip/wip/trustedQSL/Makefile,v retrieving revision 1.28 diff -u -r1.28 Makefile --- wip/trustedQSL/Makefile 4 Sep 2013 04:49:03 -0000 1.28 +++ wip/trustedQSL/Makefile 4 Sep 2013 08:22:20 -0000 @@ -19,6 +19,52 @@ WRKSRC= ${WRKDIR}/${DISTNAME} ## CMAKE RPATH_CHANGE issue, modify at post-build +#.if !empty(X11_TYPE:Mmodular) +SUBST_CLASSES+= x11r7 +.if empty(X11_TYPE:Mmodular) +SUBST_COND.x11r7= # empty, doit only for modular +.endif +SUBST_STAGE.x11r7= post-build +SUBST_FILES.x11r7= apps/cmake_install.cmake +SUBST_MESSAGE.x11r7= Remove X11R7/lib from RPATH_CHANGE, for modular only +SUBST_SED.x11r7= -e 's,:/usr/X11R7/lib,,' +#.endif + +## CMAKE RPATH_CHANGE claims the the order is not the same, so the work around. +## /usr/pkgsrc/wip/trustedQSL/work/tqsl-114/src:/usr/pkg/lib: +## v +## /usr/pkg/lib:/usr/pkgsrc/wip/trustedQSL/work/tqsl-114/src + +SUBST_CLASSES+= swap_m +.if empty(X11_TYPE:Mmodular) +SUBST_COND.swap_m= # empty, doit only for modular +.endif +SUBST_STAGE.swap_m= post-build +SUBST_FILES.swap_m= apps/cmake_install.cmake +SUBST_MESSAGE.swap_m= Swap SRC and LIB of OLD_RPATH in RPATH_CHANGE +SUBST_SED.swap_m= -e '/OLD_RPATH/s,${WRKSRC}/src:${PREFIX}/lib:',${PREFIX}/lib:${WRKSRC}/src, +# /usr/pkg/lib:/usr/X11R7/lib:/export/CHROOT/usr/pkgsrc/wip/trustedQSL/work/tqsl-2.0/src + +SUBST_CLASSES+= swap_n +.if !empty(X11_TYPE:Mmodular) +SUBST_COND.swap_n= # empty, doit only for native +.endif +SUBST_STAGE.swap_n= post-build +SUBST_FILES.swap_n= apps/cmake_install.cmake +SUBST_MESSAGE.swap_n= Swap SRC and LIB of OLD_RPATH in RPATH_CHANGE +# +SUBST_SED.swap_n= -e '/OLD_RPATH/s,${WRKSRC}/src${PREFIX}/lib:/usr/X11R7/lib:,/usr/X11R7/lib:${WRKSRC}/src,' +# (instead two step approach) +SUBST_SED.swap_n= -e '/OLD_RPATH/s,${WRKSRC}/src:,,' +SUBST_SED.swap_n+= -e '/OLD_RPATH/s,/usr/X11R7/lib:,/usr/X11R7/lib:${WRKSRC}/src,' + +# X11_TYPE=native case, this will skip due to OLD_RPATH won't match. +SUBST_CLASSES+= rpath-link +SUBST_STAGE.rpath-link= post-build +SUBST_FILES.rpath-link= src/cmake_install.cmake +SUBST_MESSAGE.rpath-link= Truely experimental and interim fix for RPATH-LINK +SUBST_SED.rpath-link= -e '/OLD_RPATH/s,::::::::::::,,' +SUBST_SED.rpath-link+= -e '/NEW_RPATH/s,:${PREFIX}/lib,,' SUBST_CLASSES+= lastcolon SUBST_STAGE.lastcolon= post-build @@ -44,6 +90,17 @@ .include "../../textproc/expat/buildlink3.mk" .include "../../databases/db5/buildlink3.mk" .include "../../x11/wxGTK28/buildlink3.mk" + +.include "../../graphics/MesaLib/buildlink3.mk" +.include "../../graphics/freetype2/buildlink3.mk" +.include "../../graphics/glu/buildlink3.mk" +.include "../../x11/libXcomposite/buildlink3.mk" +.include "../../x11/libXcursor/buildlink3.mk" +.include "../../x11/libXinerama/buildlink3.mk" +.include "../../x11/libXrandr/buildlink3.mk" +.include "../../x11/libXrender/buildlink3.mk" +.include "../../x11/pixman/buildlink3.mk" + .include "../../www/curl/buildlink3.mk" .include "../../mk/bsd.pkg.mk"