used in recipes:<screen>S = "${WORKDIR}/postfix-${PV}"
PR = "r4"
CFLAGS += "-DNO_ASM"
-SRC_URI_append = "file://fixup.patch;patch=1"</screen></para>
+SRC_URI_append = "file://fixup.patch"</screen></para>
</listitem>
</varlistentry>
<para>You can append values to existing variables using the
<emphasis>+=</emphasis> operator. Note that this operator will add a
space between the existing content of the variable and the new
- content.<screen>SRC_URI += "file://fix-makefile.patch;patch=1"</screen></para>
+ content.<screen>SRC_URI += "file://fix-makefile.patch"</screen></para>
</listitem>
</varlistentry>
<para>The following example shows the space being explicitly added to
the start to ensure the appended value is not merged with the
- existing value:<screen>SRC_URI_append = " file://fix-makefile.patch;patch=1"</screen>The
+ existing value:<screen>SRC_URI_append = " file://fix-makefile.patch"</screen>The
<emphasis>_append</emphasis> method can also be used with overrides,
which results in the actions only being performed for the specified
- target or machine: [TODO: Link to section on overrides]<screen>SRC_URI_append_sh4 = " file://fix-makefile.patch;patch=1"</screen>Note
+ target or machine: [TODO: Link to section on overrides]<screen>SRC_URI_append_sh4 = " file://fix-makefile.patch"</screen>Note
that the appended information is a variable itself, and therefore
it's possible to use <emphasis>+=</emphasis> or
<emphasis>=+</emphasis> to assign variables to the
- <emphasis>_append</emphasis> information:<screen>SRC_URI_append = " file://fix-makefile.patch;patch=1"
-SRC_URI_append += "file://fix-install.patch;patch=1"</screen></para>
+ <emphasis>_append</emphasis> information:<screen>SRC_URI_append = " file://fix-makefile.patch"
+SRC_URI_append += "file://fix-install.patch"</screen></para>
</listitem>
</varlistentry>
<emphasis>_prepend</emphasis> method can also be used with
overrides, which result in the actions only being performed for the
specified target or machine: [TODO: Link to section on
- overrides]<screen>CFLAGS_prepend_sh4 = " file://fix-makefile.patch;patch=1"</screen>Note
+ overrides]<screen>CFLAGS_prepend_sh4 = " file://fix-makefile.patch"</screen>Note
that the appended information is a variable itself, and therefore
it's possible to use <emphasis>+=</emphasis> or
<emphasis>=+</emphasis> to assign variables to the
<para>The following example from the havp recipe shows a typical <emphasis
role="bold">SRC_URI</emphasis> definition:<screen>SRC_URI = "http://www.server-side.de/download/havp-${PV}.tar.gz \
- file://sysconfdir-is-etc.patch;patch=1 \
+ file://sysconfdir-is-etc.patch \
file://havp.init \
file://doc.configure.txt \
file://volatiles.05_havp"</screen></para>
</varlistentry>
<varlistentry>
- <term>file://sysconfdir-is-etc.patch;patch=1</term>
+ <term>file://sysconfdir-is-etc.patch</term>
<listitem>
<para>This is a local file that is used to patch the extracted
- source code. The patch=1 is what specifies that this is a patch. The
+ source code. If a filename ends in .patch or .diff then this is
+ treated as patch file and applied with striplevel 1. The
patch will be applied from the unpacked source directory, <emphasis
role="bold">${S}</emphasis>. In this case <emphasis
role="bold">${S}</emphasis> will be <emphasis
<para>If we take a look at the recipe for quagga we can see example
non patch files for configuration and init scripts:<screen>SRC_URI = "http://www.quagga.net/download/quagga-${PV}.tar.gz \
- file://fix-for-lib-inpath.patch;patch=1 \
+ file://fix-for-lib-inpath.patch \
file://quagga.init \
file://quagga.default \
file://watchquagga.init \
this recipe it permits the common code to be used for both old and new
recipes:<screen>PR = "r1"
-SRC_URI += "file://iproute2-2.6.15_no_strip.diff;patch=1;pnum=0 \
- file://new-flex-fix.patch;patch=1"
+SRC_URI += "file://iproute2-2.6.15_no_strip.diff;striplevel=0 \
+ file://new-flex-fix.patch"
require iproute2.inc
this version, thus replacing the <emphasis>configure</emphasis> task that
is provided by the common include:<screen>PR = "r7"
-SRC_URI_append = "file://configure.patch;patch=1 \
- file://Makefile.in.patch;patch=1 \
- file://Makefile.cget.patch;patch=1 \
- file://util.patch;patch=1"
+SRC_URI_append = "file://configure.patch \
+ file://Makefile.in.patch \
+ file://Makefile.cget.patch \
+ file://util.patch"
require cherokee.inc
SRC_URI = "${KERNEL_MIRROR}/v2./linux-${KV}.tar.bz2"
# where to get my specific patches
-SRC_URI_append = " ${MY_URL}/patches/linux-${KV}-${MYV}.patch.gz;patch=1"
+SRC_URI_append = " ${MY_URL}/patches/linux-${KV}-${MYV}.patch.gz;apply=yes"
# specify the source directory
# (only necessary where it differs from the package name)
DEPENDS = "flex-native"
SRC_URI = "${DEBIAN_MIRROR}/main/a/at/at_${PV}-11.tar.gz \
- file://configure.patch;patch=1 \
- file://nonrootinstall.patch;patch=1"
+ file://configure.patch \
+ file://nonrootinstall.patch"
inherit autotools
the main distribution tarball with the URL where to find it, and two
specific patches to build this package with OpenEmbedded.
These patches are located together with the package file.
-The <varname>patch=1</varname> specifies that this file is to be
-applied as patch with <option>-p1</option>.
+They are applied as patch with 1 striplevel same as <option>-p1</option>.
The <varname>${PV}</varname> in the tarball URL is expanded from the
recipe version
number. And the recipe version number is taken from the file name
<variablelist>
<varlistentry>
- <term>patch</term>
+ <term>apply={yes|no}</term>
<listitem>
- <para>Used as <command>"patch=1"</command> to define this file as a
- patch file. Patch files will be copied to
+ <para>If set to 'yes' it is used as <command>"patch=1"</command> to define this file as a
+ patch file. Patch files will be symlinked into
<command>${S}/patches</command> and then applied to source from
- within the source directory, <command>${S}</command>.</para>
+ within the source directory, <command>${S}</command>.
+ If set to 'no' the file will be copied to <command>${S}</command>
+ during unpack.
+ </para>
</listitem>
</varlistentry>
<varlistentry>
- <term>pnum</term>
+ <term>striplevel</term>
<listitem>
<para>By default patches are applied with the <command>"-p
the value passed to <command>"-p"</command>. The most typical use is
when the patches are relative to the source directory already and
need to be applied using <command>"-p 0"</command>, in which case
- the <command>"pnum=0"</command> option is supplied.</para>
+ the <command>"striplevel=0"</command> option is supplied.</para>
</listitem>
</varlistentry>
</variablelist>