svn commit: r50636 - head/en_US.ISO8859-1/books/porters-handbook/makefiles

Mathieu Arnold <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.doc
Message-ID <[email protected]>
Author: mat
Date: Fri Aug  4 13:42:30 2017
New Revision: 50636
URL: https://svnweb.freebsd.org/changeset/doc/50636

Log:
  Fix the MASTERDIR/slave example with an actually existing port.
  
  PR:		212937
  Reported by:	zzdudcjfzz hotmail com
  Sponsored by:	Absolight, The FreeBSD Foundation

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

Modified: head/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml
==============================================================================
--- head/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml	Fri Aug  4 13:42:27 2017	(r50635)
+++ head/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml	Fri Aug  4 13:42:30 2017	(r50636)
@@ -5467,48 +5467,53 @@ BAR_LIB_DEPENDS=	libbar.so:foo/bar</programlisting>
       so the packages will have different names.</para>
 
     <para>This will be best demonstrated by an example.  This is part
-      of <filename>japanese/xdvi300/Makefile</filename>;</para>
+      of <filename>print/pkfonts300/Makefile</filename>;</para>
 
-    <programlisting>PORTNAME=	xdvi
-DISTVERSION=	17
-PKGNAMEPREFIX=	ja-
-PKGNAMESUFFIX=	${RESOLUTION}
+    <programlisting>PORTNAME=	pkfonts${RESOLUTION}
+PORTVERSION=	1.0
+DISTFILES=	pk${RESOLUTION}.tar.gz
 
-# default
-RESOLUTION?=	300
+PLIST=		${PKGDIR}/pkg-plist.${RESOLUTION}
+
+.if !defined(RESOLUTION)
+RESOLUTION=	300
+.else
 .if ${RESOLUTION} != 118 &amp;&amp; ${RESOLUTION} != 240 &amp;&amp; \
-    ${RESOLUTION} != 300 &amp;&amp; ${RESOLUTION} != 400
-pre-everything::
+	${RESOLUTION} != 300 &amp;&amp; ${RESOLUTION} != 360 &amp;&amp; \
+	${RESOLUTION} != 400 &amp;&amp; ${RESOLUTION} != 600
+.BEGIN:
 	@${ECHO_MSG} "Error: invalid value for RESOLUTION: \"${RESOLUTION}\""
-	@${ECHO_MSG} "Possible values are: 118, 240, 300 (default) and 400."
+	@${ECHO_MSG} "Possible values are: 118, 240, 300, 360, 400 and 600."
 	@${FALSE}
+.endif
 .endif</programlisting>
 
-    <para><package role="port">japanese/xdvi300</package> also has all
+    <para><package role="port">print/pkfonts300</package> also has all
       the regular patches, package files, etc.  Running
       <command>make</command> there, it will take the default value
       for the resolution (300) and build the port normally.</para>
 
     <para>As for other resolutions, this is the
       <emphasis>entire</emphasis>
-      <filename>xdvi118/Makefile</filename>:</para>
+      <filename>print/pkfonts360/Makefile</filename>:</para>
 
-    <programlisting>RESOLUTION=	118
-MASTERDIR=	${.CURDIR}/../xdvi300
+    <programlisting>RESOLUTION=	360
+MASTERDIR=	${.CURDIR}/../pkfonts300
 
-.include "${MASTERDIR}/Makefile"</programlisting>
+.include	"${MASTERDIR}/Makefile"</programlisting>
 
-    <para>(<filename>xdvi240/Makefile</filename> and
-      <filename>xdvi400/Makefile</filename> are similar).
+    <para>(<filename>print/pkfonts118/Makefile</filename>,
+      <filename>print/pkfonts600/Makefile</filename>, and all the
+      other are similar).
       <varname>MASTERDIR</varname> definition tells
       <filename>bsd.port.mk</filename> that the regular set of
       subdirectories like <varname>FILESDIR</varname> and
       <varname>SCRIPTDIR</varname> are to be found under
-      <filename>xdvi300</filename>.  The
-      <literal>RESOLUTION=118</literal> line will override the
+      <filename>pkfonts300</filename>.  The
+      <literal>RESOLUTION=360</literal> line will override the
       <literal>RESOLUTION=300</literal> line in
-      <filename>xdvi300/Makefile</filename> and the port will be built
-      with resolution set to 118.</para>
+      <filename>pkfonts300/Makefile</filename> and the port will be
+      built with resolution set to 360.</para>
   </sect1>
 
   <sect1 xml:id="makefile-manpages">
_______________________________________________
[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.