Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Oct 2013 16:02:21 +0000 (UTC)
From:      Max Brazhnikov <makc@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r329802 - in head: . Mk/Uses
Message-ID:  <201310081602.r98G2L82006553@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: makc
Date: Tue Oct  8 16:02:21 2013
New Revision: 329802
URL: http://svnweb.freebsd.org/changeset/ports/329802

Log:
  - Add new USES= qmake (with staging support)
  
  Approved by:	portmgr (bapt)

Added:
  head/Mk/Uses/qmake.mk   (contents, props changed)
Modified:
  head/CHANGES

Modified: head/CHANGES
==============================================================================
--- head/CHANGES	Tue Oct  8 16:01:12 2013	(r329801)
+++ head/CHANGES	Tue Oct  8 16:02:21 2013	(r329802)
@@ -10,6 +10,14 @@ in the release notes and/or placed into 
 
 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
 

Added: head/Mk/Uses/qmake.mk
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/Mk/Uses/qmake.mk	Tue Oct  8 16:02:21 2013	(r329802)
@@ -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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310081602.r98G2L82006553>