>Number:         182833
>Category:       docs
>Synopsis:       [porters-handbook]: document QMake usage, update Qt section
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-doc
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Tue Oct 08 15:40:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Max Brazhnikov
>Release:        FreeBSD 9.2-PRERELEASE amd64
>Organization:
>Environment:
>Description:
Document new USES= qmake
Remove Qt 3.x stuff

http://people.freebsd.org/~makc/patches/ph-qmake.diff
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

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)
@@ -6539,15 +6539,6 @@
          <tgroup cols="2">
            <tbody>
              <row>
-               <entry><makevar>USE_QT_VER</makevar></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><makevar>USE_QT4</makevar></entry>
                <entry>Specify tool and library dependencies for ports
                  that use Qt 4.  See
@@ -6648,19 +6639,7 @@
          </tgroup>
        </table>
 
-       <para>When <makevar>USE_QT_VER</makevar> 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 <makevar>USE_QT4</makevar> is set, the following
+       <para>When <makevar>USE_QT4</makevar> is set, the following
          settings are deployed:</para>
 
        <programlisting>CONFIGURE_ARGS+=        --with-qt-includes=${QT_INCDIR} 
\
@@ -6677,7 +6656,7 @@
       </sect2>
 
       <sect2 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 <makevar>USE_QT4</makevar> variable.  Every
@@ -6847,29 +6826,60 @@
        </example>
       </sect2>
 
-      <sect2 id="qt-additional">
-       <title>Additional Considerations</title>
+      <sect2 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><makevar>QMAKE_ARGS</makevar></entry>
+               <entry>Port specific <application>QMake</application>
+                 flags to be passed to the <command>qmake</command>
+                 binary.</entry>
+             </row>
+
+             <row>
+               <entry><makevar>QMAKE_ENV</makevar></entry>
+               <entry>Environment variables to be set for
+                 <command>qmake</command> binary.  Default is
+                 <literal>&dollar;{CONFIGURE_ENV}</literal>.</entry>
+             </row>
+
+             <row>
+               <entry><makevar>QMAKE_PRO</makevar></entry>
+               <entry>Name of the project <filename>.pro</filename> file.
+                 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><literal>USES= qmake</literal> instructs the port to
+         use <command>qmake</command> for configuring.
+         Note that <literal>USES= qmake</literal> does not imply
+         dependency on Qt 4 <command>qmake</command>, thus
+         <literal>USE_QT4</literal> has to be populated with
+         <literal>qmake_build</literal> component.</para>
 
-       <para>Note the similarity to the <command>qmake</command> line
-         from the provided <filename>BUILD.sh</filename> script.
-         Passing <makevar>CONFIGURE_ENV</makevar> ensures
-         <command>qmake</command> will see the
-         <makevar>QMAKESPEC</makevar> variable, without which it
-         cannot work.  <command>qmake</command> generates standard
-         Makefiles, so it is not necessary to write our own
-         <maketarget>build</maketarget> target.</para>
-
        <para>Qt applications often are written to be cross-platform
          and often X11/Unix is not the platform they are developed
          on, which in turn often leads to certain loose ends,
@@ -6885,8 +6895,8 @@
              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>
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)
@@ -179,6 +179,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


>Release-Note:
>Audit-Trail:
>Unformatted:
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-doc
To unsubscribe, send any mail to "[email protected]"

Reply via email to