summaryrefslogtreecommitdiff
path: root/cad
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2006-07-10 22:59:26 +0000
committerjlam <jlam@pkgsrc.org>2006-07-10 22:59:26 +0000
commitf3372729ab2e1dd6f8e5969862c77666d8b45bdb (patch)
treecb614cea1d624a5581e700c292825cf7d5a200cb /cad
parent9e4ca2161b90f8703d5aea28362f561d5d727b0a (diff)
downloadpkgsrc-f3372729ab2e1dd6f8e5969862c77666d8b45bdb.tar.gz
Completely nuke the concept of PKG_PHASE from pkgsrc except for the
purposes of caching MAKEVARS within bsd.pkg.mk and bsd.makevars.mk.
Diffstat (limited to 'cad')
-rw-r--r--cad/mex-wcalc/Makefile29
-rw-r--r--cad/qcad/Makefile4
2 files changed, 27 insertions, 6 deletions
diff --git a/cad/mex-wcalc/Makefile b/cad/mex-wcalc/Makefile
index fc96f37a1d9..816d777f57f 100644
--- a/cad/mex-wcalc/Makefile
+++ b/cad/mex-wcalc/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.5 2006/02/05 23:08:22 joerg Exp $
+# $NetBSD: Makefile,v 1.6 2006/07/10 22:59:26 jlam Exp $
#
.include "../../cad/wcalc/Makefile.common"
@@ -67,13 +67,34 @@ MATLAB_MEX?= ${DEF_MATLAB_MEX}
PLIST_SUBST+= MEX_SUFX=${MEX_SUFX:Q}
-.if !empty(PHASES_AFTER_EXTRACT:M${PKG_PHASE})
-MATLAB_DIR!= ${MATLAB_MEX} -v 2>/dev/null | ${AWK} '/[ \t]MATLAB[ \t]/ {print $$NF}'
+.if !defined(MATLAB_DIR)
+MATLAB_DIR!= \
+ case ${MATLAB_MEX:Q}"" in \
+ /*) matlab_mex=${MATLAB_MEX:Q} ;; \
+ *) SAVEIFS="$$IFS"; IFS=:; \
+ for p in $$PATH; do \
+ ${TEST} ! -x $$p/${MATLAB_MEX} || \
+ matlab_mex=$$p/${MATLAB_MEX}; \
+ done; \
+ IFS="$$SAVEIFS"; \
+ ;; \
+ esac; \
+ if ${TEST} -z "$$matlab_mex"; then \
+ ${ECHO} "MATLAB_DIR_not_set"; \
+ else \
+ $$matlab_mex -v 2>/dev/null | \
+ ${AWK} 'BEGIN { s = "MATLAB_DIR_not_set" } \
+ /[ \t]MATLAB[ \t]/ { s = $$NF } \
+ END { print s }'; \
+ fi
+. if empty(MATLAB_DIR:M*not_set)
+MAKEVARS+= MATLAB_DIR
+. endif
+.endif
BUILDLINK_PASSTHRU_DIRS+= ${MATLAB_DIR}/extern/include
BUILDLINK_PASSTHRU_DIRS+= ${MATLAB_DIR}/simulink/include
BUILDLINK_PASSTHRU_DIRS+= ${MATLAB_DIR}/bin/${MATLAB_ARCH}
-.endif
.include "../../cad/libwcalc/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/cad/qcad/Makefile b/cad/qcad/Makefile
index a84819a42b8..3b2aff735e9 100644
--- a/cad/qcad/Makefile
+++ b/cad/qcad/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.39 2006/06/15 08:26:58 chap Exp $
+# $NetBSD: Makefile,v 1.40 2006/07/10 22:59:26 jlam Exp $
#
DISTNAME= qcad-2.0.5.0-1-community.src
@@ -27,7 +27,7 @@ MAKE_ENV+= QMAKESPEC=${QTDIR}/mkspecs/default
PREPEND_PATH+= ${QTDIR}/bin
# I really want this to be post-*patch* where it makes sense, but QTDIR isn't
-# available until PHASES_AFTER_WRAPPER because it depends on
+# available until after the wrapper phase because it depends on
# BUILDLINK_PREFIX.qt3-libs, which buildlink3 sets. Nothing is easy. :) The
# patches have replaced old hardcoded paths with fixed cookies @PREFIX@ and
# @QTDIR@. The SUBST framework will replace the cookies with the proper