diff options
author | Juro Bystricky <juro.bystricky@intel.com> | 2018-03-01 14:53:18 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-03-04 11:35:42 +0000 |
commit | e76cba5ae12335f9cdefb41302217cf9281aaaaf (patch) | |
tree | 666fe3ad81b9664ae123a635f0dd3c0573bdd51a /meta | |
parent | 5925bfe4122d3fb883a8bab258ec2f570c5e10cb (diff) | |
download | poky-e76cba5ae12335f9cdefb41302217cf9281aaaaf.tar.gz |
libjpeg-turbo: improve reproducibility
Build date ends up embbedded in binary images, breaking reproducibility
of jpeg-tools and libturbojpeg. To enable reproducible builds, build date can be
specified during configuration, via "--with_build_date=<date>".
If SOURCE_DATE_EPOCH is specified we configure libjpeg-turbo with this value as
build date. Although the build date is a generic string, we keep it in the same
format YYYYMMDD.
[YOCTO #12526]
(From OE-Core rev: 46a39fe9fa2bc8f58ec822434b9ace9ab5572c82)
Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-graphics/jpeg/libjpeg-turbo_1.5.3.bb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/meta/recipes-graphics/jpeg/libjpeg-turbo_1.5.3.bb b/meta/recipes-graphics/jpeg/libjpeg-turbo_1.5.3.bb index 8809f2c7cc..50a5ae0850 100644 --- a/meta/recipes-graphics/jpeg/libjpeg-turbo_1.5.3.bb +++ b/meta/recipes-graphics/jpeg/libjpeg-turbo_1.5.3.bb | |||
@@ -40,6 +40,14 @@ EXTRA_OECONF_append_class-target = " ${@bb.utils.contains("MIPSPKGSFX_FPU", "-nf | |||
40 | EXTRA_OECONF_append_class-target_powerpc = " ${@bb.utils.contains("TUNE_FEATURES", "altivec", "", "--without-simd", d)}" | 40 | EXTRA_OECONF_append_class-target_powerpc = " ${@bb.utils.contains("TUNE_FEATURES", "altivec", "", "--without-simd", d)}" |
41 | EXTRA_OECONF_append_class-target_powerpc64 = " ${@bb.utils.contains("TUNE_FEATURES", "altivec", "", "--without-simd", d)}" | 41 | EXTRA_OECONF_append_class-target_powerpc64 = " ${@bb.utils.contains("TUNE_FEATURES", "altivec", "", "--without-simd", d)}" |
42 | 42 | ||
43 | def get_build_time(d): | ||
44 | if d.getVar('SOURCE_DATE_EPOCH') != None: | ||
45 | import datetime | ||
46 | return " --with-build-date="+ datetime.datetime.fromtimestamp(float(d.getVar('SOURCE_DATE_EPOCH'))).strftime("%Y%m%d") | ||
47 | return "" | ||
48 | |||
49 | EXTRA_OECONF_append_class-target = "${@get_build_time(d)}" | ||
50 | |||
43 | PACKAGES =+ "jpeg-tools libturbojpeg" | 51 | PACKAGES =+ "jpeg-tools libturbojpeg" |
44 | 52 | ||
45 | DESCRIPTION_jpeg-tools = "The jpeg-tools package includes client programs to access libjpeg functionality. These tools allow for the compression, decompression, transformation and display of JPEG files and benchmarking of the libjpeg library." | 53 | DESCRIPTION_jpeg-tools = "The jpeg-tools package includes client programs to access libjpeg functionality. These tools allow for the compression, decompression, transformation and display of JPEG files and benchmarking of the libjpeg library." |