diff options
author | makc <makc@FreeBSD.org> | 2013-10-09 00:02:21 +0800 |
---|---|---|
committer | makc <makc@FreeBSD.org> | 2013-10-09 00:02:21 +0800 |
commit | 801467b3c33c575797a9d16b0cc1a5ad2012b1fc (patch) | |
tree | 82bc12ed636eda2553070bcb0ece9d6f5c481ac0 /Mk/Uses | |
parent | b6ce9f3774b478507aad818bedbc5e083cabe6c1 (diff) | |
download | freebsd-ports-gnome-801467b3c33c575797a9d16b0cc1a5ad2012b1fc.tar.gz freebsd-ports-gnome-801467b3c33c575797a9d16b0cc1a5ad2012b1fc.tar.zst freebsd-ports-gnome-801467b3c33c575797a9d16b0cc1a5ad2012b1fc.zip |
- Add new USES= qmake (with staging support)
Approved by: portmgr (bapt)
Diffstat (limited to 'Mk/Uses')
-rw-r--r-- | Mk/Uses/qmake.mk | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/Mk/Uses/qmake.mk b/Mk/Uses/qmake.mk new file mode 100644 index 000000000000..f22f2b560896 --- /dev/null +++ b/Mk/Uses/qmake.mk @@ -0,0 +1,66 @@ +# $FreeBSD$ +# +# Provide support for qmake based projects +# +# MAINTAINER: kde@FreeBSD.org +# +# Feature: qmake +# Usage: USES=qmake or USES=qmake:ARGS +# Must be used along with 'USE_QT4= qmake_build' +# Valid ARGS: norecursive +# ARGS description: +# norecursive Don't pass -recursive argument to qmake binary +# +# +# Variables for ports: +# QMAKE_ENV - Environment passed to qmake. +# Default: ${CONFIGURE_ENV} +# QMAKE_ARGS - Arguments passed to qmake +# Default: see below +# QMAKE_PRO - qmake project file. +# Default: empty (autodetect) +# +# User defined variables: +# QMAKE_VERBOSE - Enable verbose configure output +# + +.if !defined(_INCLUDE_USES_QMAKE_MK) +_INCLUDE_USES_QMAKE_MK= yes + +.if !defined(NO_STAGE) +DESTDIRNAME= INSTALL_ROOT +.endif + +.if defined(qmake_ARGS) +. if ${qmake_ARGS} == "norecursive" +QMAKE_NORECURSIVE= yes +. else +IGNORE= Incorrect 'USES+= qmake' usage: argument '${qmake_ARGS}' is not recognized +. endif +.endif + +.if ${USE_QT4:Mqmake_build} == "" && ${USE_QT4:Mqmake} == "" +IGNORE= 'USES+= qmake' must be accompanied with 'USE_QT4= qmake_build' +.endif + +# CC is respected via QMAKESPEC (see Mk/bsd.qt.mk) +QMAKE_ARGS+= -spec ${QMAKESPEC} \ + QMAKE_CFLAGS="${CFLAGS}" \ + QMAKE_CXXFLAGS="${CXXFLAGS}" \ + QMAKE_LFLAGS="${LDFLAGS}" \ + PREFIX=${PREFIX} + +.if !defined(QMAKE_NORECURSIVE) +QMAKE_ARGS+= -recursive +.endif + +.if defined(QMAKE_VERBOSE) +QMAKE_ARGS+= -d +.endif + +.if !target(do-configure) +do-configure: + @cd ${CONFIGURE_WRKSRC} && ${SETENV} ${QMAKE_ENV} ${QMAKE} ${QMAKE_ARGS} ${QMAKE_PRO} +.endif + +.endif #!defined(_INCLUDE_USES_QMAKE_MK) |