summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/psplash/psplash_git.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/psplash/psplash_git.bb')
-rw-r--r--meta/recipes-core/psplash/psplash_git.bb11
1 files changed, 6 insertions, 5 deletions
diff --git a/meta/recipes-core/psplash/psplash_git.bb b/meta/recipes-core/psplash/psplash_git.bb
index 5122d38a29..1cab2962b2 100644
--- a/meta/recipes-core/psplash/psplash_git.bb
+++ b/meta/recipes-core/psplash/psplash_git.bb
@@ -23,8 +23,8 @@ python __anonymous() {
23 haspng = False 23 haspng = False
24 for uri in splashfiles: 24 for uri in splashfiles:
25 fetcher = bb.fetch2.Fetch([uri], d) 25 fetcher = bb.fetch2.Fetch([uri], d)
26 flocal = fetcher.localpath(uri) 26 flocal = os.path.basename(fetcher.localpath(uri))
27 fbase = os.path.splitext(os.path.basename(flocal))[0] 27 fbase = os.path.splitext(flocal)[0]
28 outsuffix = fetcher.ud[uri].parm.get("outsuffix") 28 outsuffix = fetcher.ud[uri].parm.get("outsuffix")
29 if not outsuffix: 29 if not outsuffix:
30 if fbase.startswith("psplash-"): 30 if fbase.startswith("psplash-"):
@@ -74,18 +74,19 @@ python do_compile () {
74 import shutil 74 import shutil
75 75
76 # Build a separate executable for each splash image 76 # Build a separate executable for each splash image
77 workdir = d.getVar('WORKDIR', True)
77 convertscript = "%s/make-image-header.sh" % d.getVar('S', True) 78 convertscript = "%s/make-image-header.sh" % d.getVar('S', True)
78 destfile = "%s/psplash-poky-img.h" % d.getVar('S', True) 79 destfile = "%s/psplash-poky-img.h" % d.getVar('S', True)
79 localfiles = d.getVar('SPLASH_LOCALPATHS', True).split() 80 localfiles = d.getVar('SPLASH_LOCALPATHS', True).split()
80 outputfiles = d.getVar('SPLASH_INSTALL', True).split() 81 outputfiles = d.getVar('SPLASH_INSTALL', True).split()
81 for localfile, outputfile in zip(localfiles, outputfiles): 82 for localfile, outputfile in zip(localfiles, outputfiles):
82 if localfile.endswith(".png"): 83 if localfile.endswith(".png"):
83 outp = oe.utils.getstatusoutput('%s %s POKY' % (convertscript, localfile)) 84 outp = oe.utils.getstatusoutput('%s %s POKY' % (convertscript, os.path.join(workdir, localfile)))
84 print(outp[1]) 85 print(outp[1])
85 fbase = os.path.splitext(os.path.basename(localfile))[0] 86 fbase = os.path.splitext(localfile)[0]
86 shutil.copyfile("%s-img.h" % fbase, destfile) 87 shutil.copyfile("%s-img.h" % fbase, destfile)
87 else: 88 else:
88 shutil.copyfile(localfile, destfile) 89 shutil.copyfile(os.path.join(workdir, localfile), destfile)
89 # For some reason just updating the header is not enough, we have to touch the .c 90 # For some reason just updating the header is not enough, we have to touch the .c
90 # file in order to get it to rebuild 91 # file in order to get it to rebuild
91 os.utime("%s/psplash.c" % d.getVar('S', True), None) 92 os.utime("%s/psplash.c" % d.getVar('S', True), None)