Bug 182833

Summary: [porters-handbook]: document QMake usage, update Qt section
Product: Documentation Reporter: Max Brazhnikov <makc>
Component: Books & ArticlesAssignee: Rene Ladan <rene>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Max Brazhnikov freebsd_committer freebsd_triage 2013-10-08 16:40:00 UTC
Document new USES= qmake
Remove Qt 3.x stuff

http://people.freebsd.org/~makc/patches/ph-qmake.diff

Fix: Patch attached with submission follows:
Comment 1 Eitan Adler freebsd_committer freebsd_triage 2013-11-17 22:04:14 UTC
Patch fails to apply :(

Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|Index: en_US.ISO8859-1/books/porters-handbook/book.xml
|===================================================================
|--- en_US.ISO8859-1/books/porters-handbook/book.xml    (revision 42890)
|+++ en_US.ISO8859-1/books/porters-handbook/book.xml    (working copy)
--------------------------
Patching file en_US.ISO8859-1/books/porters-handbook/book.xml using Plan A...
Hunk #1 failed at 6539.
Hunk #2 failed at 6639.
Hunk #3 failed at 6656.
Hunk #4 failed at 6826.
Hunk #5 succeeded at 6894 (offset -1 lines).
4 out of 5 hunks failed--saving rejects to
en_US.ISO8859-1/books/porters-handbook/book.xml.rej
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|Index: en_US.ISO8859-1/books/porters-handbook/uses.xml
|===================================================================
|--- en_US.ISO8859-1/books/porters-handbook/uses.xml    (revision 42890)
|+++ en_US.ISO8859-1/books/porters-handbook/uses.xml    (working copy)
--------------------------
Patching file en_US.ISO8859-1/books/porters-handbook/uses.xml using Plan A...
Hunk #1 succeeded at 221 (offset 42 lines).
done


-- 
Eitan Adler
Comment 2 Rene Ladan freebsd_committer freebsd_triage 2013-11-22 16:07:43 UTC
Responsible Changed
From-To: freebsd-doc->rene

Take
Comment 3 dfilter service freebsd_committer freebsd_triage 2013-11-22 17:17:18 UTC
Author: rene
Date: Fri Nov 22 17:17:10 2013
New Revision: 43218
URL: http://svnweb.freebsd.org/changeset/doc/43218

Log:
  - Document new USES=qmake in the USES list
  - Remove texts about Qt 3.X
  - Update texts about Qt 4.X, describing new variables and integrating
    USES=qmake
  
  PR:		docs/182833 (small language/DocBook modifications)
  Submitted by:	makc

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

Modified: head/en_US.ISO8859-1/books/porters-handbook/book.xml
==============================================================================
--- head/en_US.ISO8859-1/books/porters-handbook/book.xml	Fri Nov 22 16:34:57 2013	(r43217)
+++ head/en_US.ISO8859-1/books/porters-handbook/book.xml	Fri Nov 22 17:17:10 2013	(r43218)
@@ -5715,7 +5715,7 @@ IGNORE=	may not be redistributed because
 
 	      <row>
 		<entry><varname>CMAKE_ENV</varname></entry>
-		<entry>Environment variables to be set for
+		<entry>Environment variables to be set for the
 		  <command>cmake</command> binary.  Default is
 		  <literal>&dollar;{CONFIGURE_ENV}</literal>.</entry>
 	      </row>
@@ -6544,15 +6544,6 @@ USE_XORG=	x11 xpm</programlisting>
 	  <tgroup cols="2">
 	    <tbody>
 	      <row>
-		<entry><varname>USE_QT_VER</varname></entry>
-		<entry>The port uses the Qt toolkit.  The only
-		  possible value is <literal>3</literal>.
-		  Appropriate parameters are passed to
-		  <command>configure</command> script and
-		  <command>make</command>.</entry>
-	      </row>
-
-	      <row>
 		<entry><varname>USE_QT4</varname></entry>
 		<entry>Specify tool and library dependencies for ports
 		  that use Qt 4.  See
@@ -6653,19 +6644,7 @@ USE_XORG=	x11 xpm</programlisting>
 	  </tgroup>
 	</table>
 
-	<para>When <varname>USE_QT_VER</varname> is set to
-	  <literal>3</literal>, some useful settings are passed to the
-	  <command>configure</command> script:</para>
-
-	<programlisting>CONFIGURE_ARGS+=	--with-qt-includes=${QT_PREFIX}/include \
-			--with-qt-libraries=${QT_PREFIX}/lib \
-			--with-extra-libs=${LOCALBASE}/lib \
-			--with-extra-includes=${LOCALBASE}/include
-CONFIGURE_ENV+=	MOC="${MOC}" LIBS="${QTCFGLIBS}" \
-		QTDIR="${QT_PREFIX}" KDEDIR="${KDE_PREFIX}"
-CPPFLAGS+=	${QTCPPFLAGS}</programlisting>
-
-	<para>If <varname>USE_QT4</varname> is set, the following
+	<para>When <varname>USE_QT4</varname> is set, the following
 	  settings are deployed:</para>
 
 	<programlisting>CONFIGURE_ARGS+=	--with-qt-includes=${QT_INCDIR} \
@@ -6682,7 +6661,7 @@ PLIST_SUB+=	QT_INCDIR_REL=${QT_INCDIR_RE
       </sect2>
 
       <sect2 xml:id="qt4-components">
-	<title>Component Selection (Qt 4.x Only)</title>
+	<title>Component Selection</title>
 
 	<para>Individual Qt 4 tool and library dependencies must be
 	  specified in the <varname>USE_QT4</varname> variable.  Every
@@ -6852,28 +6831,59 @@ PLIST_SUB+=	QT_INCDIR_REL=${QT_INCDIR_RE
 	</example>
       </sect2>
 
-      <sect2 xml:id="qt-additional">
-	<title>Additional Considerations</title>
+      <sect2 xml:id="using-qmake">
+	<title>Using <command>qmake</command></title>
+
+	<table frame="none">
+	  <title>Variables for Ports That Use
+	    <command>qmake</command></title>
+
+	  <tgroup cols="2">
+	    <thead>
+	      <row>
+		<entry>Variable</entry>
+		<entry>Means</entry>
+	      </row>
+	    </thead>
+
+	    <tbody>
+	      <row>
+		<entry><varname>QMAKE_ARGS</varname></entry>
+		<entry>Port specific <application>QMake</application>
+		  flags to be passed to the <command>qmake</command>
+		  binary.</entry>
+	      </row>
+
+	      <row>
+		<entry><varname>QMAKE_ENV</varname></entry>
+		<entry>Environment variables to be set for the
+		  <command>qmake</command> binary.   The default is
+		  <literal>&dollar;{CONFIGURE_ENV}</literal>.</entry>
+	      </row>
+
+	      <row>
+		<entry><varname>QMAKE_PRO</varname></entry>
+		<entry>Name of the project <filename>.pro</filename> file.
+		  The default is empty (using autodetection).</entry>
+	      </row>
+	    </tbody>
+	  </tgroup>
+	</table>
 
 	<para>If the application does not provide a
-	  <filename>configure</filename> file but a
+	  <filename>configure</filename> script but a
 	  <filename>.pro</filename> file, you can use the
 	  following:</para>
 
-	<programlisting>HAS_CONFIGURE=	yes
+	<programlisting>USES=	qmake
+USE_QT4=	qmake_build</programlisting>
 
-do-configure:
-	@cd ${WRKSRC} &amp;&amp; ${SETENV} ${CONFIGURE_ENV} \
-		${QMAKE} ${QMAKEFLAGS} PREFIX=${PREFIX} texmaker.pro</programlisting>
-
-	<para>Note the similarity to the <command>qmake</command> line
-	  from the provided <filename>BUILD.sh</filename> script.
-	  Passing <varname>CONFIGURE_ENV</varname> ensures
-	  <command>qmake</command> will see the
-	  <varname>QMAKESPEC</varname> variable, without which it
-	  cannot work.  <command>qmake</command> generates standard
-	  Makefiles, so it is not necessary to write our own
-	  <buildtarget>build</buildtarget> target.</para>
+	<para><literal>USES=qmake</literal> instructs the port to
+	  use <command>qmake</command> for configuring.
+	  Note that <literal>USES=qmake</literal> does not imply a
+	  dependency on Qt 4 <command>qmake</command>, thus
+	  <literal>USE_QT4</literal> has to be populated with the
+	  <literal>qmake_build</literal> component.</para>
 
 	<para>Qt applications often are written to be cross-platform
 	  and often X11/Unix is not the platform they are developed
@@ -6890,8 +6900,8 @@ do-configure:
 	      the include and library search paths via the command
 	      line, for example:</para>
 
-	    <programlisting>${QMAKE} ${QMAKEFLAGS} PREFIX=${PREFIX} INCLUDEPATH+=${LOCALBASE}/include \
-	LIBS+=-L${LOCALBASE}/lib sillyapp.pro</programlisting>
+	    <programlisting>QMAKE_ARGS+= INCLUDEPATH+=${LOCALBASE}/include \
+	LIBS+=-L${LOCALBASE}/lib</programlisting>
 	  </listitem>
 
 	  <listitem>

Modified: head/en_US.ISO8859-1/books/porters-handbook/uses.xml
==============================================================================
--- head/en_US.ISO8859-1/books/porters-handbook/uses.xml	Fri Nov 22 16:34:57 2013	(r43217)
+++ head/en_US.ISO8859-1/books/porters-handbook/uses.xml	Fri Nov 22 17:17:10 2013	(r43218)
@@ -282,6 +282,15 @@
 </row>
 
 <row>
+  <entry><literal>qmake</literal></entry>
+  <entry>(none), <literal>norecursive</literal></entry>
+
+  <entry>The port will use <application>QMake</application> for
+    configuring.  For more information see
+    <xref linkend="using-qmake"/>.</entry>
+</row>
+
+<row>
   <entry><literal>readline</literal></entry>
   <entry>(none), port</entry>
   <entry>Implies that the port uses
_______________________________________________
svn-doc-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-doc-all
To unsubscribe, send any mail to "svn-doc-all-unsubscribe@freebsd.org"
Comment 4 Rene Ladan freebsd_committer freebsd_triage 2013-11-22 17:17:27 UTC
State Changed
From-To: open->closed

Committed with small modifications, thanks!