Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Aug 2017 13:42:30 +0000 (UTC)
From:      Mathieu Arnold <mat@FreeBSD.org>
To:        doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org
Subject:   svn commit: r50636 - head/en_US.ISO8859-1/books/porters-handbook/makefiles
Message-ID:  <201708041342.v74DgU9H049311@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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">



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201708041342.v74DgU9H049311>