Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F105820910
D1017.id2129.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
13 KB
Referenced Files
None
Subscribers
None
D1017.id2129.diff
View Options
Index: en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml
===================================================================
--- en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml
+++ en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml
@@ -25,7 +25,7 @@
<title>The Original Source</title>
<para>Does it live in <varname>DISTDIR</varname> as a standard
- <command>gzip</command>ped tarball named something like
+ compressed tarball named something like
<filename>foozolix-1.2.tar.gz</filename>? If so, go on
to the next step. If not, the distribution file format might
require overriding one or more of
@@ -261,7 +261,7 @@
collection:</para>
<programlisting>PORTNAME= gtkmumble
- PORTVERSION= 0.10</programlisting>
+PORTVERSION= 0.10</programlisting>
<para><varname>PKGNAME</varname> becomes
<literal>gtkmumble-0.10</literal>.</para>
@@ -271,8 +271,8 @@
accordingly.</para>
<programlisting>PORTNAME= gtkmumble
- PORTVERSION= 0.10
- PORTREVISION= 1</programlisting>
+PORTVERSION= 0.10
+PORTREVISION= 1</programlisting>
<para><varname>PKGNAME</varname> becomes
<literal>gtkmumble-0.10_1</literal></para>
@@ -287,12 +287,12 @@
<varname>PORTEPOCH</varname> must be bumped to manually
force the new package to be detected as
<quote>newer</quote>. Since it is a new vendor release of
- the code, <varname>PORTREVISION</varname> is reset to 0 (or
- removed from the <filename>Makefile</filename>).</para>
+ the code, <varname>PORTREVISION</varname> is reset to 0
+ (removed from the <filename>Makefile</filename>).</para>
<programlisting>PORTNAME= gtkmumble
- PORTVERSION= 0.2
- PORTEPOCH= 1</programlisting>
+PORTVERSION= 0.2
+PORTEPOCH= 1</programlisting>
<para><varname>PKGNAME</varname> becomes
<literal>gtkmumble-0.2,1</literal></para>
@@ -302,8 +302,8 @@
variables are now:</para>
<programlisting>PORTNAME= gtkmumble
- PORTVERSION= 0.3
- PORTEPOCH= 1</programlisting>
+PORTVERSION= 0.3
+PORTEPOCH= 1</programlisting>
<para><varname>PKGNAME</varname> becomes
<literal>gtkmumble-0.3,1</literal></para>
@@ -1390,9 +1390,8 @@
we can discuss it before we import it. As a committer,
send a note to the &a.ports; so we can discuss it
first. Too often, new ports are imported to the wrong
- category only to be moved right away. This causes unnecessary
- and undesirable bloat in the master source repository.</para>
- </sect2>
+ category only to be moved right away.</para>
+ </sect3>
<sect2 xml:id="proposing-categories">
<title>Proposing a New Category</title>
@@ -1627,10 +1626,7 @@
<para>It is recommended that multiple sites are included on this
list, preferably from different continents. This will
- safeguard against wide-area network problems. We are even
- planning to add support for automatically determining the
- closest master site and fetching from there; having multiple
- sites will go a long way towards helping this effort.</para>
+ safeguard against wide-area network problems.</para>
<para>If the original tarball is part of one of the popular
archives such as SourceForge, GNU, or Perl CPAN, it may be
@@ -1646,7 +1642,7 @@
really is no reason to do so:</para>
<programlisting>MASTER_SITES= ${MASTER_SITE_GNU}
- MASTER_SITE_SUBDIR= make</programlisting>
+MASTER_SITE_SUBDIR= make</programlisting>
<para>These values and variables are defined in
<filename>/usr/ports/Mk/bsd.sites.mk</filename>. There are
@@ -1668,7 +1664,7 @@
<para>This can also be written as</para>
<programlisting>MASTER_SITES= SF
- MASTER_SITE_SUBDIR= stardict/WyabdcRealPeopleTTS/${PORTVERSION}</programlisting>
+MASTER_SITE_SUBDIR= stardict/WyabdcRealPeopleTTS/${PORTVERSION}</programlisting>
<table frame="none" xml:id="makefile-master_sites-popular">
<title>Popular Magic <varname>MASTER_SITES</varname>
@@ -1849,11 +1845,11 @@
this (slightly stripped for the example):</para>
<programlisting>PORTNAME= pkg
- PORTVERSION= 1.2.7
+PORTVERSION= 1.2.7
- USE_GITHUB= yes
- GH_ACCOUNT= freebsd
- GH_COMMIT= f53e577</programlisting>
+USE_GITHUB= yes
+GH_ACCOUNT= freebsd
+GH_COMMIT= f53e577</programlisting>
<para>It will automatically have
<varname>MASTER_SITES</varname> set to <literal>GH
@@ -1873,13 +1869,13 @@
this (slightly stripped for the example):</para>
<programlisting>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</programlisting>
+USE_GITHUB= yes
+GH_ACCOUNT= freebsd
+GH_PROJECT= pkg
+GH_TAGNAME= ${GH_COMMIT}
+GH_COMMIT= 6dbb17b</programlisting>
<para>It will automatically have
<varname>MASTER_SITES</varname> set to <literal>GH
@@ -1902,7 +1898,7 @@
<filename>foo.tar.gz</filename>, write:</para>
<programlisting>DISTNAME= foo
- EXTRACT_SUFX= .tar.gzip</programlisting>
+EXTRACT_SUFX= .tar.gzip</programlisting>
<para>The
<literal>USES=tar[:<replaceable>xxx</replaceable>]</literal>,
@@ -1949,7 +1945,7 @@
<varname>EXTRACT_ONLY</varname>.</para>
<programlisting>DISTFILES= source.tar.gz manual.html
- EXTRACT_ONLY= source.tar.gz</programlisting>
+EXTRACT_ONLY= source.tar.gz</programlisting>
<para>When none of the <varname>DISTFILES</varname> need to be
uncompressed, set <varname>EXTRACT_ONLY</varname> to the empty
@@ -1981,7 +1977,7 @@
<filename>.bz2</filename> or <filename>.xz</filename>.</para>
<para>If the patch is distributed with some other files, such as
- documentation, in a <command>gzip</command>ped tarball, using
+ documentation, in a compressed tarball, using
<varname>PATCHFILES</varname> is not possible. If that is the
case, add the name and the location of the patch tarball to
<varname>DISTFILES</varname> and
@@ -2010,9 +2006,8 @@
<note>
<para>The tarball will have been extracted alongside the
regular source by then, so there is no need to explicitly
- extract it if it is a regular <command>gzip</command>ped or
- <command>compress</command>ed tarball. Take extra care not
- to overwrite something that already exists in that
+ extract it if it is a regular compressed tarball. Take extra
+ care not to overwrite something that already exists in that
directory if extracting it manually. Also, do not forget to
add a command to remove the copied patch in the
<buildtarget>pre-clean</buildtarget> target.</para>
@@ -2113,9 +2108,9 @@
with One File Per Site</title>
<programlisting>MASTER_SITES= ftp://ftp.example1.com/:source1 \
- ftp://ftp.example2.com/:source2
- DISTFILES= source1.tar.gz:source1 \
- source2.tar.gz:source2</programlisting>
+ ftp://ftp.example2.com/:source2
+DISTFILES= source1.tar.gz:source1 \
+ source2.tar.gz:source2</programlisting>
</example>
<para>Multiple distribution files can have the same tag.
@@ -2134,10 +2129,10 @@
with More Than One File Per Site</title>
<programlisting>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</programlisting>
+ ftp://ftp.example2.com/:source2
+DISTFILES= source1.tar.gz:source1 \
+ source2.tar.gz:source2 \
+ source3.tar.gz:source2</programlisting>
</example>
</sect3>
@@ -2319,10 +2314,10 @@
http://site7/:DEFAULT,group6 \
http://site8/%SUBDIR%/:group6,group7 \
http://site9/:group8
- DISTFILES= file1 file2:DEFAULT file3:group3 \
+DISTFILES= file1 file2:DEFAULT file3:group3 \
file4:group4,group5,group6 file5:grouping \
file6:group7
- MASTER_SITE_SUBDIR= directory-trial:1 directory-n/:groupn \
+MASTER_SITE_SUBDIR= directory-trial:1 directory-n/:groupn \
directory-one/:group6,DEFAULT \
directory</programlisting>
@@ -2511,7 +2506,7 @@
<varname>MASTER_SITE_SOURCEFORGE</varname></title>
<programlisting>MASTER_SITES= http://site1/ ${MASTER_SITE_SOURCEFORGE:S/$/:sourceforge,TEST/}
- DISTFILES= something.tar.gz:sourceforge</programlisting>
+DISTFILES= something.tar.gz:sourceforge</programlisting>
</example>
<para><filename>something.tar.gz</filename> will be
@@ -2538,7 +2533,7 @@
<varname>PATCH_SITES</varname></title>
<programlisting>PATCH_SITES= http://site1/ http://site2/:test
- PATCHFILES= patch1:test</programlisting>
+PATCHFILES= patch1:test</programlisting>
</example>
</listitem>
</orderedlist>
@@ -2684,7 +2679,7 @@
<para>It will also look at the subdirectory with the same name
on the backup master site at
- <filename>ftp.FreeBSD.org</filename>. (Setting
+ <filename>http://distcache.FreeBSD.org</filename>. (Setting
<varname>DISTDIR</varname> explicitly in
<filename>Makefile</filename> will not accomplish this, so
please use <varname>DIST_SUBDIR</varname>.)</para>
@@ -2716,9 +2711,9 @@
<varname>ALWAYS_KEEP_DISTFILES</varname></title>
<programlisting>.if defined(PACKAGE_BUILDING)
- DISTFILES+= <replaceable>foo.tar.gz</replaceable>
- ALWAYS_KEEP_DISTFILES= yes
- .endif</programlisting>
+DISTFILES+= <replaceable>foo.tar.gz</replaceable>
+ALWAYS_KEEP_DISTFILES= yes
+.endif</programlisting>
</example>
<para>When adding extra files to <varname>DISTFILES</varname>,
@@ -3331,9 +3326,9 @@
<programlisting>.include <bsd.port.pre.mk>
- .if exists(${LOCALBASE}/bin/foo)
- LIB_DEPENDS= libbar.so:${PORTSDIR}/foo/bar
- .endif</programlisting>
+.if exists(${LOCALBASE}/bin/foo)
+LIB_DEPENDS= libbar.so:${PORTSDIR}/foo/bar
+.endif</programlisting>
</example>
<para>The problem with trying to automatically add dependencies
@@ -3350,9 +3345,9 @@
<title>Correct Declaration of an Optional Dependency</title>
<programlisting>OPTIONS_DEFINE= BAR
- BAR_DESC= Calling cellphones via bar
+BAR_DESC= Calling cellphones via bar
- BAR_LIB_DEPENDS= libbar.so:${PORTSDIR}/foo/bar</programlisting>
+BAR_LIB_DEPENDS= libbar.so:${PORTSDIR}/foo/bar</programlisting>
</example>
<para>Testing option variables is the correct method. It will
@@ -3420,18 +3415,18 @@
of <filename>japanese/xdvi300/Makefile</filename>;</para>
<programlisting>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</programlisting>
+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</programlisting>
<para><package role="port">japanese/xdvi300</package> also has all
the regular patches, package files, etc. Running
@@ -3443,9 +3438,9 @@
<filename>xdvi118/Makefile</filename>:</para>
<programlisting>RESOLUTION= 118
- MASTERDIR= ${.CURDIR}/../xdvi300
+MASTERDIR= ${.CURDIR}/../xdvi300
- .include "${MASTERDIR}/Makefile"</programlisting>
+.include "${MASTERDIR}/Makefile"</programlisting>
<para>(<filename>xdvi240/Makefile</filename> and
<filename>xdvi400/Makefile</filename> are similar).
@@ -3560,11 +3555,11 @@
described (optional, but strongly recommended):</para>
<programlisting>OPT1_DESC= Describe OPT1
- OPT2_DESC= Describe OPT2
- OPT3_DESC= Describe OPT3
- OPT4_DESC= Describe OPT4
- OPT5_DESC= Describe OPT5
- OPT6_DESC= Describe OPT6</programlisting>
+OPT2_DESC= Describe OPT2
+OPT3_DESC= Describe OPT3
+OPT4_DESC= Describe OPT4
+OPT5_DESC= Describe OPT5
+OPT6_DESC= Describe OPT6</programlisting>
<para><filename>ports/Mk/bsd.options.desc.mk</filename>
has descriptions for many common <varname>OPTIONS</varname>.
@@ -3595,7 +3590,7 @@
allowed:</para>
<programlisting>OPTIONS_SINGLE= SG1
- OPTIONS_SINGLE_SG1= OPT3 OPT4</programlisting>
+OPTIONS_SINGLE_SG1= OPT3 OPT4</programlisting>
<warning>
<para>There <emphasis>must</emphasis> be one of each
@@ -4435,10 +4430,13 @@
targets. Set ownership directly in
<filename>pkg-plist</filename> with the corresponding entries,
such as
+ <literal>@(<replaceable>owner</replaceable>,
+ <replaceable>group</replaceable>,
+ <replaceable>mode</replaceable>)</literal> or
<literal>@owner <replaceable>owner</replaceable></literal> and
<literal>@group <replaceable>group</replaceable></literal>.
- These operators work until being overridden, or until the end
- of <filename>pkg-plist</filename>, so do not forget to reset
+ The latter operators work until being overridden, or until the
+ end of <filename>pkg-plist</filename>, so do not forget to reset
them after they are no longer needed. The default ownership
is <literal>root:wheel</literal>.</para>
@@ -4653,10 +4651,8 @@
additional documentation installed in
<varname>DOCSDIR</varname>. It does not apply to standard
man pages and info pages. Things installed in
- <varname>DATADIR</varname> and
<varname>EXAMPLESDIR</varname> are controlled by
- <literal>DATA</literal> and <literal>EXAMPLES</literal>
- options, respectively.</para>
+ <literal>EXAMPLES</literal> option.</para>
</note>
<para>These variables are exported to
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 22, 5:10 AM (20 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15550816
Default Alt Text
D1017.id2129.diff (13 KB)
Attached To
Mode
D1017: Bring Porters Handbook up to date and fix small errors. CH 5
Attached
Detach File
Event Timeline
Log In to Comment