diff --git a/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml b/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml
index 53d7cbd3d2..a6d6cffe4a 100644
--- a/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml
+++ b/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml
@@ -261,7 +261,7 @@
collection:
PORTNAME= gtkmumble
- PORTVERSION= 0.10
+PORTVERSION= 0.10
PKGNAME becomes
gtkmumble-0.10.
@@ -271,8 +271,8 @@
accordingly.
PORTNAME= gtkmumble
- PORTVERSION= 0.10
- PORTREVISION= 1
+PORTVERSION= 0.10
+PORTREVISION= 1
PKGNAME becomes
gtkmumble-0.10_1
@@ -291,8 +291,8 @@
removed from the Makefile).
PORTNAME= gtkmumble
- PORTVERSION= 0.2
- PORTEPOCH= 1
+PORTVERSION= 0.2
+PORTEPOCH= 1
PKGNAME becomes
gtkmumble-0.2,1
@@ -302,8 +302,8 @@
variables are now:
PORTNAME= gtkmumble
- PORTVERSION= 0.3
- PORTEPOCH= 1
+PORTVERSION= 0.3
+PORTEPOCH= 1
PKGNAME becomes
gtkmumble-0.3,1
@@ -1657,7 +1657,7 @@
really is no reason to do so:
MASTER_SITES= ${MASTER_SITE_GNU}
- MASTER_SITE_SUBDIR= make
+MASTER_SITE_SUBDIR= make
These values and variables are defined in
/usr/ports/Mk/bsd.sites.mk. There are
@@ -1679,7 +1679,7 @@
This can also be written as
MASTER_SITES= SF
- MASTER_SITE_SUBDIR= stardict/WyabdcRealPeopleTTS/${PORTVERSION}
+MASTER_SITE_SUBDIR= stardict/WyabdcRealPeopleTTS/${PORTVERSION}
Popular Magic MASTER_SITES
@@ -1860,11 +1860,11 @@
this (slightly stripped for the example):
PORTNAME= pkg
- PORTVERSION= 1.2.7
+PORTVERSION= 1.2.7
- USE_GITHUB= yes
- GH_ACCOUNT= freebsd
- GH_COMMIT= f53e577
+USE_GITHUB= yes
+GH_ACCOUNT= freebsd
+GH_COMMIT= f53e577
It will automatically have
MASTER_SITES set to GH
@@ -1884,13 +1884,13 @@
this (slightly stripped for the example):
PORTNAME= pkg-devel
- PORTVERSION= 1.3.0.a.20140411
+PORTVERSION= 1.3.0.a.20140411
- USE_GITHUB= yes
- GH_ACCOUNT= freebsd
- GH_PROJECT= pkg
- GH_TAGNAME= ${GH_COMMIT}
- GH_COMMIT= 6dbb17b
+USE_GITHUB= yes
+GH_ACCOUNT= freebsd
+GH_PROJECT= pkg
+GH_TAGNAME= ${GH_COMMIT}
+GH_COMMIT= 6dbb17b
It will automatically have
MASTER_SITES set to GH
@@ -1913,7 +1913,7 @@
foo.tar.gz, write:
DISTNAME= foo
- EXTRACT_SUFX= .tar.gzip
+EXTRACT_SUFX= .tar.gzip
The
USES=tar[:xxx],
@@ -1960,7 +1960,7 @@
EXTRACT_ONLY.
DISTFILES= source.tar.gz manual.html
- EXTRACT_ONLY= source.tar.gz
+EXTRACT_ONLY= source.tar.gz
When none of the DISTFILES need to be
uncompressed, set EXTRACT_ONLY to the empty
@@ -2123,10 +2123,10 @@
Simplified Use of MASTER_SITES:n
with One File Per Site
- MASTER_SITES= ftp://ftp.example1.com/:source1 \
- ftp://ftp.example2.com/:source2
- DISTFILES= source1.tar.gz:source1 \
- source2.tar.gz:source2
+ MASTER_SITES= ftp://ftp1.example.com/:source1 \
+ http://www.example.com/:source2
+DISTFILES= source1.tar.gz:source1 \
+ source2.tar.gz:source2
Multiple distribution files can have the same tag.
@@ -2144,11 +2144,11 @@
Simplified Use of MASTER_SITES:n
with More Than One File Per Site
- MASTER_SITES= ftp://ftp.example1.com/:source1 \
- ftp://ftp.example2.com/:source2
- DISTFILES= source1.tar.gz:source1 \
- source2.tar.gz:source2 \
- source3.tar.gz:source2
+ MASTER_SITES= ftp://ftp.example.com/:source1 \
+ http://www.example.com/:source2
+DISTFILES= source1.tar.gz:source1 \
+ source2.tar.gz:source2 \
+ source3.tar.gz:source2
@@ -2325,17 +2325,17 @@
Multiple Subdirectories
MASTER_SITES= http://site1/%SUBDIR%/ http://site2/:DEFAULT \
- http://site3/:group3 http://site4/:group4 \
- http://site5/:group5 http://site6/:group6 \
- http://site7/:DEFAULT,group6 \
- http://site8/%SUBDIR%/:group6,group7 \
- http://site9/:group8
- DISTFILES= file1 file2:DEFAULT file3:group3 \
- file4:group4,group5,group6 file5:grouping \
- file6:group7
- MASTER_SITE_SUBDIR= directory-trial:1 directory-n/:groupn \
- directory-one/:group6,DEFAULT \
- directory
+ http://site3/:group3 http://site4/:group4 \
+ http://site5/:group5 http://site6/:group6 \
+ http://site7/:DEFAULT,group6 \
+ http://site8/%SUBDIR%/:group6,group7 \
+ http://site9/:group8
+DISTFILES= file1 file2:DEFAULT file3:group3 \
+ file4:group4,group5,group6 file5:grouping \
+ file6:group7
+MASTER_SITE_SUBDIR= directory-trial:1 directory-n/:groupn \
+ directory-one/:group6,DEFAULT \
+ directory
The previous example results in this
fine grained fetching. Sites are listed in the
@@ -2522,7 +2522,7 @@
MASTER_SITE_SOURCEFORGE
MASTER_SITES= http://site1/ ${MASTER_SITE_SOURCEFORGE:S/$/:sourceforge,TEST/}
- DISTFILES= something.tar.gz:sourceforge
+DISTFILES= something.tar.gz:sourceforge
something.tar.gz will be
@@ -2549,7 +2549,7 @@
PATCH_SITES
PATCH_SITES= http://site1/ http://site2/:test
- PATCHFILES= patch1:test
+PATCHFILES= patch1:test
@@ -2727,9 +2727,9 @@
ALWAYS_KEEP_DISTFILES
.if defined(PACKAGE_BUILDING)
- DISTFILES+= foo.tar.gz
- ALWAYS_KEEP_DISTFILES= yes
- .endif
+DISTFILES+= foo.tar.gz
+ALWAYS_KEEP_DISTFILES= yes
+.endif
When adding extra files to DISTFILES,
@@ -2992,7 +2992,7 @@
For example,
RUN_DEPENDS= ${LOCALBASE}/news/bin/innd:${PORTSDIR}/news/inn \
- xmlcatmgr:${PORTSDIR}/textproc/xmlcatmgr
+xmlcatmgr:${PORTSDIR}/textproc/xmlcatmgr
will check if the file or directory
/usr/local/news/bin/innd exists, and
@@ -3362,9 +3362,9 @@
Correct Declaration of an Optional Dependency
OPTIONS_DEFINE= BAR
- BAR_DESC= Calling cellphones via bar
+BAR_DESC= Calling cellphones via bar
- BAR_LIB_DEPENDS= libbar.so:${PORTSDIR}/foo/bar
+BAR_LIB_DEPENDS= libbar.so:${PORTSDIR}/foo/bar
Testing option variables is the correct method. It will
@@ -3432,18 +3432,18 @@
of japanese/xdvi300/Makefile;
PORTNAME= xdvi
- PORTVERSION= 17
- PKGNAMEPREFIX= ja-
- PKGNAMESUFFIX= ${RESOLUTION}
- :
- # default
- RESOLUTION?= 300
- .if ${RESOLUTION} != 118 && ${RESOLUTION} != 240 && \
- ${RESOLUTION} != 300 && ${RESOLUTION} != 400
- @${ECHO_MSG} "Error: invalid value for RESOLUTION: \"${RESOLUTION}\""
- @${ECHO_MSG} "Possible values are: 118, 240, 300 (default) and 400."
- @${FALSE}
- .endif
+PORTVERSION= 17
+PKGNAMEPREFIX= ja-
+PKGNAMESUFFIX= ${RESOLUTION}
+
+# default
+RESOLUTION?= 300
+.if ${RESOLUTION} != 118 && ${RESOLUTION} != 240 && \
+${RESOLUTION} != 300 && ${RESOLUTION} != 400
+@${ECHO_MSG} "Error: invalid value for RESOLUTION: \"${RESOLUTION}\""
+@${ECHO_MSG} "Possible values are: 118, 240, 300 (default) and 400."
+@${FALSE}
+.endif
japanese/xdvi300 also has all
the regular patches, package files, etc. Running
@@ -3455,9 +3455,9 @@
xdvi118/Makefile:
RESOLUTION= 118
- MASTERDIR= ${.CURDIR}/../xdvi300
+MASTERDIR= ${.CURDIR}/../xdvi300
- .include "${MASTERDIR}/Makefile"
+.include "${MASTERDIR}/Makefile"
(xdvi240/Makefile and
xdvi400/Makefile are similar).
@@ -3572,11 +3572,11 @@
described (optional, but strongly recommended):
OPT1_DESC= Describe OPT1
- OPT2_DESC= Describe OPT2
- OPT3_DESC= Describe OPT3
- OPT4_DESC= Describe OPT4
- OPT5_DESC= Describe OPT5
- OPT6_DESC= Describe OPT6
+OPT2_DESC= Describe OPT2
+OPT3_DESC= Describe OPT3
+OPT4_DESC= Describe OPT4
+OPT5_DESC= Describe OPT5
+OPT6_DESC= Describe OPT6
ports/Mk/bsd.options.desc.mk
has descriptions for many common OPTIONS.
@@ -3607,7 +3607,7 @@
allowed:
OPTIONS_SINGLE= SG1
- OPTIONS_SINGLE_SG1= OPT3 OPT4
+OPTIONS_SINGLE_SG1= OPT3 OPT4
There must be one of each
@@ -4382,7 +4382,7 @@ CFLAGS+= -DTEST
For example:
OPTIONS_DEFINE= OPT1
-OPT1_USES_OFF=gmake
+OPT1_USES_OFF= gmake
is equivalent to:
@@ -4638,16 +4638,16 @@ PORTVERSION= 1.0
target.
post-install:
- ${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
- (cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR})
+ ${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
+ (cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR})
This example will install the contents of the
examples directory in the vendor distfile
to the proper examples location of the port.
post-install:
- ${MKDIR} ${STAGEDIR}${DATADIR}/summer
- (cd ${WRKSRC}/temperatures && ${COPYTREE_SHARE} "June July August" ${STAGEDIR}${DATADIR}/summer)
+ ${MKDIR} ${STAGEDIR}${DATADIR}/summer
+ (cd ${WRKSRC}/temperatures && ${COPYTREE_SHARE} "June July August" ${STAGEDIR}${DATADIR}/summer)
And this example will install the data of summer months to
the summer subdirectory of a
@@ -4660,7 +4660,7 @@ PORTVERSION= 1.0
these commands.
post-install:
- ${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
+ ${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
(cd ${WRKSRC}/examples && \
${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR} "! -name Makefile")
@@ -4698,8 +4698,8 @@ PORTVERSION= 1.0
enough to cause significant I/O overhead.
post-install:
- ${MKDIR} ${STAGEDIR}${DOCSDIR}
- ${INSTALL_MAN} ${WRKSRC}/docs/xvdocs.ps ${STAGEDIR}${DOCSDIR}
+ ${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_MAN} ${WRKSRC}/docs/xvdocs.ps ${STAGEDIR}${DOCSDIR}
Here are some handy variables and how they are expanded by
default when used in the Makefile: