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 | |
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)
-rw-r--r-- | CHANGES | 8 | ||||
-rw-r--r-- | Mk/Uses/qmake.mk | 66 |
2 files changed, 74 insertions, 0 deletions
@@ -10,6 +10,14 @@ in the release notes and/or placed into UPDATING. All ports committers are allowed to commit to this file. +20131008: +AUTHOR: makc@FreeBSD.org + + New USES: qmake, configure tool widely used among Qt based projects. + New framework is stage-friendly. To convert existing ports remove + custom configure target, adjust QMAKE_ENV, QMAKE_ARGS, QMAKE_PRO if + required (see Mk/Uses/qmake.mk for details). + 20131005: AUTHOR: bdrewery@FreeBSD.org 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) |