aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/mozilla/firefox_3.5b4.bb
AgeCommit message (Collapse)Author
2010-08-15firefox: removed 3.5.* versionsFrans Meulenbroeks
Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
2010-05-25Make the do_patch apply=yes param implicit if extension is .diff/.patchChris Larson
For .diff/.patch you need to apply manually, you can specify apply=no. Signed-off-by: Chris Larson <chris_larson@mentor.com> Acked-by: Denys Dmytriyenko <denis@denix.org> Acked-by: Khem Raj <raj.khem@gmail.com>
2010-05-25Rename url params patch=<ignored>/pnum=<n> to apply={yes,no}/striplevel=<n>Chris Larson
I think this makes the behavior rather more clear. Signed-off-by: Chris Larson <chris_larson@mentor.com> Acked-by: Denys Dmytriyenko <denis@denix.org> Acked-by: Khem Raj <raj.khem@gmail.com>
2010-04-12recipes: move checksums to recipes from checksums.ini, part 2 manual adjustementMartin Jansa
* all: multiple checked items in SRC_URI (needs name= param) * other fixes like non-existent URL, checksums moved ot .inc or included .bb (ie for -native) * ... * tested with micro/micro-uclibc/Angstrom/SHR with SOURCE_MIRROR_FETCH="True" (ignoring COMPATIBLE_* * also tested -c fetch with s/SRC_URI_append_[^ ]*/SRC_URI_append/g and s/SRC_URI_[^ ]*/SRC_URI_append/g to catch all URLs used only for distro/machine/virtual override (see http://build.shr-project.org/tests/jama/SRC_URI.removeOverrides.patch) * in case I downloaded different checksum then what was in checksums.ini I used the old one from checksums.ini and put my checksum in comment * I'll send to ML list of recipes which cannot be downloaded (weren't converted) and where I got different checksums Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2010-03-03firefox: Perform a number of cleanups and fix consistency issues.Tom Rini
- parallel builds need to happen via MOZ_MAKE_FLAGS and it gripes if still passed -jN, so keep the old value before we clear it. - Move the HOST_LIBIDL stuff into configure, otherwise bad things happen when you don't have pkg-config on the build host. - Prior to 3.6, wireless-tools can be, or not be built already and the Necko wifi options deals. With how 3.6 is configured, it must be disabled or DEPENDED on. For consistency, turn it off. - In 3.5 and newer, libnotify can be used, add it to DEPENDS (could be disabled). - Because of both of the above, bump PR. Signed-off-by: Tom Rini <tom_rini@mentor.com> Acked-by: Khem Raj <raj.khem@gmail.com>
2010-02-28OK, didn't look hard enough, my fault.Tom Rini
Revert "firefox: Add alsa-lib to DEPENDS (alread in firefox_hg)." This reverts commit 0b24f9f9ab2cca3da6822af09461db3e29b1df32.
2010-02-28firefox: Add alsa-lib to DEPENDS (alread in firefox_hg).Tom Rini
2010-01-20firefox: added sqlite3 as dependency for firefox >= 3.5Mario Domenech Goulart
Signed-off-by: Mario Domenech Goulart <mario.goulart@gmail.com>
2009-11-02firefox: add 3.5.4Koen Kooi
ngke/busybox-fix-sed-n-testcase-failure OpenEmbedded Core user contribution treesGrokmirror user
summaryrefslogtreecommitdiffstats
path: root/meta/classes/patch.bbclass
blob: 3d22ad8381496bba68ef28fcc1ea60a092bf4761 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
# Copyright (C) 2006  OpenedHand LTD

# Point to an empty file so any user's custom settings don't break things
QUILTRCFILE ?= "${STAGING_ETCDIR_NATIVE}/quiltrc"

PATCHDEPENDENCY = "${PATCHTOOL}-native:do_populate_sysroot"

inherit terminal

def src_patches(d, all = False ):
    workdir = d.getVar('WORKDIR', True)
    fetch = bb.fetch2.Fetch([], d)
    patches = []
    sources = []
    for url in fetch.urls:
        local = patch_path(url, fetch, workdir)
        if not local:
            if all:
                local = fetch.localpath(url)
                sources.append(local)
            continue

        urldata = fetch.ud[url]
        parm = urldata.parm
        patchname = parm.get('pname') or os.path.basename(local)

        apply, reason = should_apply(parm, d)
        if not apply:
            if reason:
                bb.note("Patch %s %s" % (patchname, reason))
            continue

        patchparm = {'patchname': patchname}
        if "striplevel" in parm:
            striplevel = parm["striplevel"]
        elif "pnum" in parm:
            #bb.msg.warn(None, "Deprecated usage of 'pnum' url parameter in '%s', please use 'striplevel'" % url)
            striplevel = parm["pnum"]
        else:
            striplevel = '1'
        patchparm['striplevel'] = striplevel

        patchdir = parm.get('patchdir')
        if patchdir:
            patchparm['patchdir'] = patchdir

        localurl = bb.fetch.encodeurl(('file', '', local, '', '', patchparm))
        patches.append(localurl)

    if all:
        return sources

    return patches

def patch_path(url, fetch, workdir):
    """Return the local path of a patch, or None if this isn't a patch"""

    local = fetch.localpath(url)
    base, ext = os.path.splitext(os.path.basename(local))
    if ext in ('.gz', '.bz2', '.Z'):
        local = os.path.join(workdir, base)
        ext = os.path.splitext(base)[1]

    urldata = fetch.ud[url]
    if "apply" in urldata.parm:
        apply = oe.types.boolean(urldata.parm["apply"])
        if not apply:
            return
    elif ext not in (".diff", ".patch"):
        return

    return local

def should_apply(parm, d):
    """Determine if we should apply the given patch"""

    if "mindate" in parm or "maxdate" in parm:
        pn = d.getVar('PN', True)
        srcdate = d.getVar('SRCDATE_%s' % pn, True)
        if not srcdate:
            srcdate = d.getVar('SRCDATE', True)

        if srcdate == "now":
            srcdate = d.getVar('DATE', True)

        if "maxdate" in parm and parm["maxdate"] < srcdate:
            return False, 'is outdated'

        if "mindate" in parm and parm["mindate"] > srcdate:
            return False, 'is predated'


    if "minrev" in parm:
        srcrev = d.getVar('SRCREV', True)
        if srcrev and srcrev < parm["minrev"]:
            return False, 'applies to later revisions'

    if "maxrev" in parm:
        srcrev = d.getVar('SRCREV', True)
        if srcrev and srcrev > parm["maxrev"]:
            return False, 'applies to earlier revisions'

    if "rev" in parm:
        srcrev = d.getVar('SRCREV', True)
        if srcrev and parm["rev"] not in srcrev:
            return False, "doesn't apply to revision"

    if "notrev" in parm:
        srcrev = d.getVar('SRCREV', True)
        if srcrev and parm["notrev"] in srcrev:
            return False, "doesn't apply to revision"

    return True, None

should_apply[vardepsexclude] = "DATE SRCDATE"

python patch_do_patch() {
    import oe.patch

    patchsetmap = {
        "patch": oe.patch.PatchTree,
        "quilt": oe.patch.QuiltTree,
        "git": oe.patch.GitApplyTree,
    }

    cls = patchsetmap[d.getVar('PATCHTOOL', True) or 'quilt']

    resolvermap = {
        "noop": oe.patch.NOOPResolver,
        "user": oe.patch.UserResolver,
    }

    rcls = resolvermap[d.getVar('PATCHRESOLVE', True) or 'user']

    classes = {}

    s = d.getVar('S', True)

    os.putenv('PATH', d.getVar('PATH', True))

    # We must use one TMPDIR per process so that the "patch" processes
    # don't generate the same temp file name.

    import tempfile
    process_tmpdir = tempfile.mkdtemp()
    os.environ['TMPDIR'] = process_tmpdir

    for patch in src_patches(d):
        _, _, local, _, _, parm = bb.fetch.decodeurl(patch)

        if "patchdir" in parm:
            patchdir = parm["patchdir"]
            if not os.path.isabs(patchdir):
                patchdir = os.path.join(s, patchdir)
        else:
            patchdir = s

        if not patchdir in classes:
            patchset = cls(patchdir, d)
            resolver = rcls(patchset, oe_terminal)
            classes[patchdir] = (patchset, resolver)
            patchset.Clean()
        else:
            patchset, resolver = classes[patchdir]

        bb.note("Applying patch '%s' (%s)" % (parm['patchname'], oe.path.format_display(local, d)))
        try:
            patchset.Import({"file":local, "strippath": parm['striplevel']}, True)
        except Exception as exc:
            bb.utils.remove(process_tmpdir, True)
            bb.fatal(str(exc))
        try:
            resolver.Resolve()
        except bb.BBHandledException as e:
            bb.utils.remove(process_tmpdir, True)
            bb.fatal(str(e))

    bb.utils.remove(process_tmpdir, True)
    del os.environ['TMPDIR']
}
patch_do_patch[vardepsexclude] = "PATCHRESOLVE"

addtask patch after do_unpack
do_patch[dirs] = "${WORKDIR}"
do_patch[depends] = "${PATCHDEPENDENCY}"

EXPORT_FUNCTIONS do_patch