svn commit: r52352 - in head/en_US.ISO8859-1/books/porters-handbook: special uses

Tobias Kortkamp <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.doc
Message-ID <[email protected]>
Author: tobik (ports committer)
Date: Thu Oct 11 06:30:19 2018
New Revision: 52352
URL: https://svnweb.freebsd.org/changeset/doc/52352

Log:
  Introduce USES=qt to the Porter's Handbook
  
  Approved by:	mat, tcberner
  Differential Revision:	https://reviews.freebsd.org/D17429

Modified:
  head/en_US.ISO8859-1/books/porters-handbook/special/chapter.xml
  head/en_US.ISO8859-1/books/porters-handbook/uses/chapter.xml

Modified: head/en_US.ISO8859-1/books/porters-handbook/special/chapter.xml
==============================================================================
--- head/en_US.ISO8859-1/books/porters-handbook/special/chapter.xml	Wed Oct 10 13:29:03 2018	(r52351)
+++ head/en_US.ISO8859-1/books/porters-handbook/special/chapter.xml	Thu Oct 11 06:30:19 2018	(r52352)
@@ -2548,14 +2548,13 @@ GLIB_SCHEMAS=	 org.regexxer.gschema.xml
 
       <para>The Ports Collection provides support for Qt 4 and Qt 5
 	frameworks with
-	<varname>USE_QT<replaceable>x</replaceable></varname>,
+	<varname>USES+=qt:<replaceable>x</replaceable></varname>,
 	where <replaceable>x</replaceable> is
 	<literal>4</literal> or <literal>5</literal>.
-	Set <varname>USE_QT<replaceable>x</replaceable></varname>
-	to the list of required Qt components (libraries,
-	tools, plugins).  The Qt 4 and Qt 5 frameworks are quite
-	similar.  The main difference is the set of supported
-	components.</para>
+	Set <varname>USE_QT</varname> to the list of required
+	Qt components (libraries, tools, plugins).  The Qt 4
+	and Qt 5 frameworks are quite similar.  The main
+	difference is the set of supported components.</para>
 
       <para>The Qt framework exports a number of variables which can
 	be used by ports, some of them listed below:</para>
@@ -2566,12 +2565,6 @@ GLIB_SCHEMAS=	 org.regexxer.gschema.xml
 	<tgroup cols="2">
 	  <tbody>
 	    <row>
-	      <entry><varname>QT_PREFIX</varname></entry>
-	      <entry>Set to the path where Qt was installed
-		(<literal>&dollar;{LOCALBASE}</literal>).</entry>
-	    </row>
-
-	    <row>
 	      <entry><varname>QMAKE</varname></entry>
 	      <entry>Full path to <command>qmake</command>
 		binary.</entry>
@@ -2616,34 +2609,13 @@ GLIB_SCHEMAS=	 org.regexxer.gschema.xml
 	</tgroup>
       </table>
 
-      <para>When using the Qt framework, these
-	settings are deployed:</para>
-
-      <programlisting>CONFIGURE_ARGS+=	--with-qt-includes=${QT_INCDIR} \
-			--with-qt-libraries=${QT_LIBDIR} \
-			--with-extra-libs=${LOCALBASE}/lib \
-			--with-extra-includes=${LOCALBASE}/include
-
-CONFIGURE_ENV+=	QTDIR="${QT_PREFIX}" QMAKE="${QMAKE}" \
-		MOC="${MOC}" RCC="${RCC}" UIC="${UIC}" \
-		QMAKESPEC="${QMAKESPEC}"
-
-PLIST_SUB+=	QT_INCDIR=${QT_INCDIR_REL} \
-		QT_LIBDIR=${QT_LIBDIR_REL} \
-		QT_PLUGINDIR=${QT_PLUGINDIR_REL}</programlisting>
-
-      <para>Some configure scripts do not support the arguments above.
-	To suppress modification of<varname>CONFIGURE_ENV</varname>
-	and <varname>CONFIGURE_ARGS</varname>, set
-	<varname>QT_NONSTANDARD</varname>.</para>
     </sect2>
 
     <sect2 xml:id="qt-components">
       <title>Component Selection</title>
 
       <para>Individual Qt tool and library dependencies must be
-	specified in
-	<varname>USE_QT<replaceable>x</replaceable></varname>.
+	specified in <varname>USE_QT</varname>.
 	Every component can be suffixed with
 	<literal>_build</literal> or <literal>_run</literal>, the
 	suffix indicating whether the dependency on the component is
@@ -2657,7 +2629,7 @@ PLIST_SUB+=	QT_INCDIR=${QT_INCDIR_REL} \
 	listed in <varname>_USE_QT_ALL</varname>,
 	<varname>_USE_QT4_ONLY</varname>, and
 	<varname>_USE_QT5_ONLY</varname> in
-	<filename>/usr/ports/Mk/bsd.qt.mk</filename>):</para>
+	<filename>/usr/ports/Mk/Uses/qt.mk</filename>):</para>
 
       <table frame="none" xml:id="using-qt-library-list">
 	<title>Available Qt Library Components</title>
@@ -2835,31 +2807,79 @@ PLIST_SUB+=	QT_INCDIR=${QT_INCDIR_REL} \
 	  only needed at buildtime, thus they are specified with the
 	  <literal>_build</literal> suffix:</para>
 
-	<programlisting>USE_QT4=	gui moc_build qmake_build rcc_build uic_build</programlisting>
+	<programlisting>USES=	qt:4
+USE_QT=	gui moc_build qmake_build rcc_build uic_build</programlisting>
       </example>
     </sect2>
 
     <sect2 xml:id="using-qmake">
       <title>Using <command>qmake</command></title>
 
-
       <para>If the application provides a
 	<application>qmake</application> project file
 	(<filename>*.pro</filename>), define
 	<literal>USES= qmake</literal> along with
-	<literal>USE_QT<replaceable>x</replaceable></literal>.  Note
-	that <literal>USES= qmake</literal> already implies a build
-	dependency on qmake, therefore the qmake component can be
-	omitted from
-	<literal>USE_QT<replaceable>x</replaceable></literal>.
-	Similar to <link
+	<literal>USE_QT</literal>.  <literal>USES= qmake</literal>
+	already implies a build dependency on qmake, therefore the
+	qmake component can be omitted from
+	<literal>USE_QT</literal>.  Similar to <link
 	  linkend="using-cmake"><application>CMake</application></link>,
 	<application>qmake</application> supports out-of-source
 	builds, which can be enabled by specifying the
 	<literal>outsource</literal> argument (see <link
 	  linkend="using-qmake-example"><literal>USES= qmake</literal>
-	  example</link>).</para>
+	example</link>).  Also see <xref
+	  linkend="using-qmake-arguments" />.</para>
 
+      <table frame="none" xml:id="using-qmake-arguments">
+	<title>Possible Arguments for
+	  <literal>USES= qmake</literal></title>
+
+	<tgroup cols="2">
+	  <thead>
+	    <row>
+	      <entry>Variable</entry>
+	      <entry>Description</entry>
+	    </row>
+	  </thead>
+
+	  <tbody>
+	    <row>
+	      <entry><literal>no_configure</literal></entry>
+	      <entry>Do not add the configure target.  This is
+		implied by <literal>HAS_CONFIGURE=yes</literal>
+		and <literal>GNU_CONFIGURE=yes</literal>.
+		It is required when the build only needs the
+		environment setup from
+		<literal>USES= qmake</literal>, but otherwise runs
+		<command>qmake</command> on its own.</entry>
+	    </row>
+
+	    <row>
+	      <entry><literal>no_env</literal></entry>
+	      <entry>Suppress modification of the configure and make
+		environments.  It is only required when
+		<command>qmake</command> is used to configure the
+		software and the build fails to understand the
+		environment setup by
+		<literal>USES= qmake</literal>.</entry>
+	    </row>
+
+	    <row>
+	      <entry><literal>norecursive</literal></entry>
+	      <entry>Do not pass the <literal>-recursive</literal>
+		argument to <command>qmake</command>.</entry>
+	    </row>
+
+	    <row>
+	      <entry><literal>outsource</literal></entry>
+	      <entry>Perform an out-of-source build.</entry>
+	    </row>
+
+	  </tbody>
+	</tgroup>
+      </table>
+
       <table frame="none" xml:id="using-qmake-variables">
 	<title>Variables for Ports That Use
 	  <command>qmake</command></title>
@@ -2868,7 +2888,7 @@ PLIST_SUB+=	QT_INCDIR=${QT_INCDIR_REL} \
 	  <thead>
 	    <row>
 	      <entry>Variable</entry>
-	      <entry>Means</entry>
+	      <entry>Description</entry>
 	    </row>
 	  </thead>
 
@@ -2900,18 +2920,39 @@ PLIST_SUB+=	QT_INCDIR=${QT_INCDIR_REL} \
 	</tgroup>
       </table>
 
+      <para>When using <literal>USES= qmake</literal>, these
+	settings are deployed:</para>
+
+      <programlisting>CONFIGURE_ARGS+=	--with-qt-includes=${QT_INCDIR} \
+			--with-qt-libraries=${QT_LIBDIR} \
+			--with-extra-libs=${LOCALBASE}/lib \
+			--with-extra-includes=${LOCALBASE}/include
+
+CONFIGURE_ENV+=	QTDIR="${QT_PREFIX}" QMAKE="${QMAKE}" \
+		MOC="${MOC}" RCC="${RCC}" UIC="${UIC}" \
+		QMAKESPEC="${QMAKESPEC}"
+
+PLIST_SUB+=	QT_INCDIR=${QT_INCDIR_REL} \
+		QT_LIBDIR=${QT_LIBDIR_REL} \
+		QT_PLUGINDIR=${QT_PLUGINDIR_REL}</programlisting>
+
+      <para>Some configure scripts do not support the arguments above.
+	To suppress modification of <varname>CONFIGURE_ENV</varname>
+	and <varname>CONFIGURE_ARGS</varname>, set
+	<literal>USES= qmake:no_env</literal>.</para>
+
       <example xml:id="using-qmake-example">
 	<title><literal>USES= qmake</literal> Example</title>
 
 	<para>This snippet demonstrates the use of
 	  <application>qmake</application> for a Qt 4 port:</para>
 
-	<programlisting>USES=		qmake:outsource
-USE_QT4=	moc_build</programlisting>
+	<programlisting>USES=	qmake:outsource qt:4
+USE_QT=	moc_build</programlisting>
 
 	<para>For a Qt 5 port:</para>
-	<programlisting>USES=		qmake:outsource
-USE_QT5=	buildtools_build</programlisting>
+	<programlisting>USES=	qmake:outsource qt:5
+USE_QT=	buildtools_build</programlisting>
       </example>
 
       <para>Qt applications are often written to be cross-platform
@@ -3135,13 +3176,13 @@ USE_QT5=	buildtools_build</programlisting>
 	  Required KDE components and other dependencies can be
 	  determined through configure log.
 	  <varname>USE_KDE</varname> does not imply
-	  <varname>USE_QT4</varname>.  If a port requires some
+	  <varname>USE_QT</varname>.  If a port requires some
 	  Qt 4 components, specify them in
-	  <varname>USE_QT4</varname>.</para>
+	  <varname>USE_QT</varname>.</para>
 
-	<programlisting>USES=		cmake:outsource kde:4
+	<programlisting>USES=		cmake:outsource kde:4 qt:4
 USE_KDE=	kdelibs kdeprefix automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build</programlisting>
+USE_QT=		moc_build qmake_build rcc_build uic_build</programlisting>
       </example>
     </sect2>
   </sect1>
@@ -3198,9 +3239,9 @@ USE_QT4=	moc_build qmake_build rcc_build uic_build</pr
 	LXQt libraries.  Required LXQt components and
 	other dependencies can be determined from the
 	configure log.</para>
-      <programlisting>USES=   cmake:outsource lxqt tar:xz
-USE_QT5=        buildtools_build qmake_build core dbus widgets
-USE_LXQT=       buildtools libfmqt</programlisting>
+      <programlisting>USES=	cmake:outsource lxqt qt:5 tar:xz
+USE_QT=		core dbus widgets buildtools_build qmake_build
+USE_LXQT=	buildtools libfmqt</programlisting>
     </example>
   </sect1>
 

Modified: head/en_US.ISO8859-1/books/porters-handbook/uses/chapter.xml
==============================================================================
--- head/en_US.ISO8859-1/books/porters-handbook/uses/chapter.xml	Wed Oct 10 13:29:03 2018	(r52351)
+++ head/en_US.ISO8859-1/books/porters-handbook/uses/chapter.xml	Thu Oct 11 06:30:19 2018	(r52352)
@@ -1381,7 +1381,8 @@ GSSAPI_NONE_CONFIGURE_ON=	--without-gssapi</programlis
   <sect1 xml:id="uses-kde">
     <title><literal>kde</literal></title>
 
-    <para>Possible arguments: <literal>4</literal></para>
+    <para>Possible arguments: <literal>4</literal>,
+      <literal>5</literal></para>
 
     <para>Add dependency on <application>KDE</application> components.
       See <xref linkend="using-kde"/> for more information.</para>
@@ -2658,10 +2659,23 @@ USE_PYQT=	core doc_build designer_run</programlisting>
     <title><literal>qmake</literal></title>
 
     <para>Possible arguments: (none), <literal>norecursive</literal>,
-      <literal>outsource</literal></para>
+      <literal>outsource</literal>, <literal>no_env</literal>,
+      <literal>no_configure</literal></para>
 
     <para>Uses <application>QMake</application> for configuring.  For
       more information see <xref linkend="using-qmake"/>.</para>
+  </sect1>
+
+  <sect1 xml:id="uses-qt">
+    <title><literal>qt</literal></title>
+
+    <para>Possible arguments: <literal>4</literal>,
+      <literal>5</literal>, <literal>no_env</literal></para>
+
+    <para>Add dependency on <application>Qt</application> components.
+      <literal>no_env</literal> is passed directly to
+      <literal>USES= qmake</literal>.  See <xref linkend="using-qt"/>
+      for more information.</para>
   </sect1>
 
   <sect1 xml:id="uses-readline">
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-doc-all
To unsubscribe, send any mail to "[email protected]"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.