From owner-svn-doc-all@freebsd.org Fri Aug 4 13:42:31 2017 Return-Path: Delivered-To: svn-doc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CBC14DAB44C; Fri, 4 Aug 2017 13:42:31 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A8E5C68B1A; Fri, 4 Aug 2017 13:42:31 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v74DgUJS049328; Fri, 4 Aug 2017 13:42:30 GMT (envelope-from mat@FreeBSD.org) Received: (from mat@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v74DgU9H049311; Fri, 4 Aug 2017 13:42:30 GMT (envelope-from mat@FreeBSD.org) Message-Id: <201708041342.v74DgU9H049311@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mat set sender to mat@FreeBSD.org using -f From: Mathieu Arnold Date: Fri, 4 Aug 2017 13:42:30 +0000 (UTC) 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 X-SVN-Group: doc-head X-SVN-Commit-Author: mat X-SVN-Commit-Paths: head/en_US.ISO8859-1/books/porters-handbook/makefiles X-SVN-Commit-Revision: 50636 X-SVN-Commit-Repository: doc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-doc-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire doc trees \(except for " user" , " projects" , and " translations" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Aug 2017 13:42:31 -0000 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 so the packages will have different names. This will be best demonstrated by an example. This is part - of japanese/xdvi300/Makefile; + of print/pkfonts300/Makefile; - PORTNAME= xdvi -DISTVERSION= 17 -PKGNAMEPREFIX= ja- -PKGNAMESUFFIX= ${RESOLUTION} + 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 && ${RESOLUTION} != 240 && \ - ${RESOLUTION} != 300 && ${RESOLUTION} != 400 -pre-everything:: + ${RESOLUTION} != 300 && ${RESOLUTION} != 360 && \ + ${RESOLUTION} != 400 && ${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 - japanese/xdvi300 also has all + print/pkfonts300 also has all the regular patches, package files, etc. Running make there, it will take the default value for the resolution (300) and build the port normally. As for other resolutions, this is the entire - xdvi118/Makefile: + print/pkfonts360/Makefile: - RESOLUTION= 118 -MASTERDIR= ${.CURDIR}/../xdvi300 + RESOLUTION= 360 +MASTERDIR= ${.CURDIR}/../pkfonts300 -.include "${MASTERDIR}/Makefile" +.include "${MASTERDIR}/Makefile" - (xdvi240/Makefile and - xdvi400/Makefile are similar). + (print/pkfonts118/Makefile, + print/pkfonts600/Makefile, and all the + other are similar). MASTERDIR definition tells bsd.port.mk that the regular set of subdirectories like FILESDIR and SCRIPTDIR are to be found under - xdvi300. The - RESOLUTION=118 line will override the + pkfonts300. The + RESOLUTION=360 line will override the RESOLUTION=300 line in - xdvi300/Makefile and the port will be built - with resolution set to 118. + pkfonts300/Makefile and the port will be + built with resolution set to 360.