View | Details | Raw Unified | Return to bug 182833
Collapse All | Expand All

(-)en_US.ISO8859-1/books/porters-handbook/book.xml (-41 / +51 lines)
Lines 6539-6553 Link Here
6539
	  <tgroup cols="2">
6539
	  <tgroup cols="2">
6540
	    <tbody>
6540
	    <tbody>
6541
	      <row>
6541
	      <row>
6542
		<entry><makevar>USE_QT_VER</makevar></entry>
6543
		<entry>The port uses the Qt toolkit.  The only
6544
		  possible value is <literal>3</literal>.
6545
		  Appropriate parameters are passed to
6546
		  <command>configure</command> script and
6547
		  <command>make</command>.</entry>
6548
	      </row>
6549
6550
	      <row>
6551
		<entry><makevar>USE_QT4</makevar></entry>
6542
		<entry><makevar>USE_QT4</makevar></entry>
6552
		<entry>Specify tool and library dependencies for ports
6543
		<entry>Specify tool and library dependencies for ports
6553
		  that use Qt 4.  See
6544
		  that use Qt 4.  See
Lines 6648-6666 Link Here
6648
	  </tgroup>
6639
	  </tgroup>
6649
	</table>
6640
	</table>
6650
6641
6651
	<para>When <makevar>USE_QT_VER</makevar> is set to
6642
	<para>When <makevar>USE_QT4</makevar> is set, the following
6652
	  <literal>3</literal>, some useful settings are passed to the
6653
	  <command>configure</command> script:</para>
6654
6655
	<programlisting>CONFIGURE_ARGS+=	--with-qt-includes=${QT_PREFIX}/include \
6656
			--with-qt-libraries=${QT_PREFIX}/lib \
6657
			--with-extra-libs=${LOCALBASE}/lib \
6658
			--with-extra-includes=${LOCALBASE}/include
6659
CONFIGURE_ENV+=	MOC="${MOC}" LIBS="${QTCFGLIBS}" \
6660
		QTDIR="${QT_PREFIX}" KDEDIR="${KDE_PREFIX}"
6661
CPPFLAGS+=	${QTCPPFLAGS}</programlisting>
6662
6663
	<para>If <makevar>USE_QT4</makevar> is set, the following
6664
	  settings are deployed:</para>
6643
	  settings are deployed:</para>
6665
6644
6666
	<programlisting>CONFIGURE_ARGS+=	--with-qt-includes=${QT_INCDIR} \
6645
	<programlisting>CONFIGURE_ARGS+=	--with-qt-includes=${QT_INCDIR} \
Lines 6677-6683 Link Here
6677
      </sect2>
6656
      </sect2>
6678
6657
6679
      <sect2 id="qt4-components">
6658
      <sect2 id="qt4-components">
6680
	<title>Component Selection (Qt 4.x Only)</title>
6659
	<title>Component Selection</title>
6681
6660
6682
	<para>Individual Qt 4 tool and library dependencies must be
6661
	<para>Individual Qt 4 tool and library dependencies must be
6683
	  specified in the <makevar>USE_QT4</makevar> variable.  Every
6662
	  specified in the <makevar>USE_QT4</makevar> variable.  Every
Lines 6847-6875 Link Here
6847
	</example>
6826
	</example>
6848
      </sect2>
6827
      </sect2>
6849
6828
6850
      <sect2 id="qt-additional">
6829
      <sect2 id="using-qmake">
6851
	<title>Additional Considerations</title>
6830
	<title>Using <command>qmake</command></title>
6852
6831
6832
	<table frame="none">
6833
	  <title>Variables for Ports That Use
6834
	    <command>qmake</command></title>
6835
6836
	  <tgroup cols="2">
6837
	    <thead>
6838
	      <row>
6839
		<entry>Variable</entry>
6840
		<entry>Means</entry>
6841
	      </row>
6842
	    </thead>
6843
6844
	    <tbody>
6845
	      <row>
6846
		<entry><makevar>QMAKE_ARGS</makevar></entry>
6847
		<entry>Port specific <application>QMake</application>
6848
		  flags to be passed to the <command>qmake</command>
6849
		  binary.</entry>
6850
	      </row>
6851
6852
	      <row>
6853
		<entry><makevar>QMAKE_ENV</makevar></entry>
6854
		<entry>Environment variables to be set for
6855
		  <command>qmake</command> binary.  Default is
6856
		  <literal>&dollar;{CONFIGURE_ENV}</literal>.</entry>
6857
	      </row>
6858
6859
	      <row>
6860
		<entry><makevar>QMAKE_PRO</makevar></entry>
6861
		<entry>Name of the project <filename>.pro</filename> file.
6862
		  Default is empty (using autodetection).</entry>
6863
	      </row>
6864
	    </tbody>
6865
	  </tgroup>
6866
	</table>
6867
6853
	<para>If the application does not provide a
6868
	<para>If the application does not provide a
6854
	  <filename>configure</filename> file but a
6869
	  <filename>configure</filename> script but a
6855
	  <filename>.pro</filename> file, you can use the
6870
	  <filename>.pro</filename> file, you can use the
6856
	  following:</para>
6871
	  following:</para>
6857
6872
6858
	<programlisting>HAS_CONFIGURE=	yes
6873
	<programlisting>USES=	qmake
6874
USE_QT4=	qmake_build</programlisting>
6859
6875
6860
do-configure:
6876
	<para><literal>USES= qmake</literal> instructs the port to
6861
	@cd ${WRKSRC} &amp;&amp; ${SETENV} ${CONFIGURE_ENV} \
6877
	  use <command>qmake</command> for configuring.
6862
		${QMAKE} ${QMAKEFLAGS} PREFIX=${PREFIX} texmaker.pro</programlisting>
6878
	  Note that <literal>USES= qmake</literal> does not imply
6879
	  dependency on Qt 4 <command>qmake</command>, thus
6880
	  <literal>USE_QT4</literal> has to be populated with
6881
	  <literal>qmake_build</literal> component.</para>
6863
6882
6864
	<para>Note the similarity to the <command>qmake</command> line
6865
	  from the provided <filename>BUILD.sh</filename> script.
6866
	  Passing <makevar>CONFIGURE_ENV</makevar> ensures
6867
	  <command>qmake</command> will see the
6868
	  <makevar>QMAKESPEC</makevar> variable, without which it
6869
	  cannot work.  <command>qmake</command> generates standard
6870
	  Makefiles, so it is not necessary to write our own
6871
	  <maketarget>build</maketarget> target.</para>
6872
6873
	<para>Qt applications often are written to be cross-platform
6883
	<para>Qt applications often are written to be cross-platform
6874
	  and often X11/Unix is not the platform they are developed
6884
	  and often X11/Unix is not the platform they are developed
6875
	  on, which in turn often leads to certain loose ends,
6885
	  on, which in turn often leads to certain loose ends,
Lines 6885-6892 Link Here
6885
	      the include and library search paths via the command
6895
	      the include and library search paths via the command
6886
	      line, for example:</para>
6896
	      line, for example:</para>
6887
6897
6888
	    <programlisting>${QMAKE} ${QMAKEFLAGS} PREFIX=${PREFIX} INCLUDEPATH+=${LOCALBASE}/include \
6898
	    <programlisting>QMAKE_ARGS+= INCLUDEPATH+=${LOCALBASE}/include \
6889
	LIBS+=-L${LOCALBASE}/lib sillyapp.pro</programlisting>
6899
	LIBS+=-L${LOCALBASE}/lib</programlisting>
6890
	  </listitem>
6900
	  </listitem>
6891
6901
6892
	  <listitem>
6902
	  <listitem>
(-)en_US.ISO8859-1/books/porters-handbook/uses.xml (+9 lines)
Lines 179-184 Link Here
179
</row>
179
</row>
180
180
181
<row>
181
<row>
182
  <entry><literal>qmake</literal></entry>
183
  <entry>(none), <literal>norecursive</literal></entry>
184
185
  <entry>The port will use <application>QMake</application> for
186
    configuring.  For more information see
187
    <xref linkend="using-qmake"/>.</entry>
188
</row>
189
190
<row>
182
  <entry><literal>readline</literal></entry>
191
  <entry><literal>readline</literal></entry>
183
  <entry>(none), port</entry>
192
  <entry>(none), port</entry>
184
  <entry>Implies that the port uses
193
  <entry>Implies that the port uses

Return to bug 182833