diff options
author | Nisha Parrakat <nishaparrakat@gmail.com> | 2021-05-26 19:59:28 +0000 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2021-05-28 06:55:33 -0700 |
commit | 3c36a8efe2a964c3aa9bfcd836cee3f80a837fcd (patch) | |
tree | f100c9ca155382d253df52beca4cecbc9de535fa /meta-oe | |
parent | 4b6175892985a6016df1a38824ccbb5989f00b33 (diff) | |
download | meta-openembedded-3c36a8efe2a964c3aa9bfcd836cee3f80a837fcd.tar.gz |
p7zip: build and package lib7z.so needed for fastboot
a) use option 7z to build the lib7z.so library
This is needed for android-tools for building fastboot
from android-tools
b) Packaged the lib7z.so and codec libraries as a part of this recipe
Fastboot RDepends on it lib7z.so
c) Fixed a C++17 forbidden error when lib7z.so is built
fixes the below error
| ../../../../CPP/7zip/Archive/Wim/WimHandler.cpp: In member function 'virtual LONG NArchive::NWim::CHandler::GetArchiveProperty(PROPID, PROPVARIANT*)':
| ../../../../CPP/7zip/Archive/Wim/WimHandler.cpp:308:11: error: use of an operand of type 'bool' in 'operator++' is forbidden in C++17
| 308 | numMethods++;
| | ^~~~~~~~~~
| ../../../../CPP/7zip/Archive/Wim/WimHandler.cpp:318:9: error: use of an operand of type 'bool' in 'operator++' is forbidden in C++17
| 318 | numMethods++;
Signed-off-by: Nisha Parrakat <Nisha.Parrakat@kpit.com>
Signed-off-by: Nisha Parrakat <nishaparrakat@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe')
-rw-r--r-- | meta-oe/recipes-extended/p7zip/files/change_numMethods_from_bool_to_unsigned.patch | 25 | ||||
-rw-r--r-- | meta-oe/recipes-extended/p7zip/p7zip_16.02.bb | 21 |
2 files changed, 44 insertions, 2 deletions
diff --git a/meta-oe/recipes-extended/p7zip/files/change_numMethods_from_bool_to_unsigned.patch b/meta-oe/recipes-extended/p7zip/files/change_numMethods_from_bool_to_unsigned.patch new file mode 100644 index 0000000000..edde525933 --- /dev/null +++ b/meta-oe/recipes-extended/p7zip/files/change_numMethods_from_bool_to_unsigned.patch | |||
@@ -0,0 +1,25 @@ | |||
1 | fixes the below error | ||
2 | |||
3 | | ../../../../CPP/7zip/Archive/Wim/WimHandler.cpp: In member function 'virtual LONG NArchive::NWim::CHandler::GetArchiveProperty(PROPID, PROPVARIANT*)': | ||
4 | | ../../../../CPP/7zip/Archive/Wim/WimHandler.cpp:308:11: error: use of an operand of type 'bool' in 'operator++' is forbidden in C++17 | ||
5 | | 308 | numMethods++; | ||
6 | | | ^~~~~~~~~~ | ||
7 | | ../../../../CPP/7zip/Archive/Wim/WimHandler.cpp:318:9: error: use of an operand of type 'bool' in 'operator++' is forbidden in C++17 | ||
8 | | 318 | numMethods++; | ||
9 | |||
10 | |||
11 | use unsigned instead of bool | ||
12 | Signed-off-by: Nisha Parrakat <Nisha.Parrakat@kpit.com> | ||
13 | |||
14 | Upstream-Status: Pending | ||
15 | --- ./CPP/7zip/Archive/Wim/WimHandler.cpp 2021-05-20 10:51:56.997402701 +0000 | ||
16 | +++ ./CPP/7zip/Archive/Wim/WimHandler.cpp 2021-05-20 10:52:16.665604125 +0000 | ||
17 | @@ -298,7 +298,7 @@ | ||
18 | |||
19 | AString res; | ||
20 | |||
21 | - bool numMethods = 0; | ||
22 | + unsigned numMethods = 0; | ||
23 | for (unsigned i = 0; i < ARRAY_SIZE(k_Methods); i++) | ||
24 | { | ||
25 | if (methodMask & ((UInt32)1 << i | ||
diff --git a/meta-oe/recipes-extended/p7zip/p7zip_16.02.bb b/meta-oe/recipes-extended/p7zip/p7zip_16.02.bb index 13479a90fe..ada49114c8 100644 --- a/meta-oe/recipes-extended/p7zip/p7zip_16.02.bb +++ b/meta-oe/recipes-extended/p7zip/p7zip_16.02.bb | |||
@@ -9,6 +9,7 @@ SRC_URI = "http://downloads.sourceforge.net/p7zip/p7zip/${PV}/p7zip_${PV}_src_al | |||
9 | file://do_not_override_compiler_and_do_not_strip.patch \ | 9 | file://do_not_override_compiler_and_do_not_strip.patch \ |
10 | file://CVE-2017-17969.patch \ | 10 | file://CVE-2017-17969.patch \ |
11 | file://0001-Fix-narrowing-errors-Wc-11-narrowing.patch \ | 11 | file://0001-Fix-narrowing-errors-Wc-11-narrowing.patch \ |
12 | file://change_numMethods_from_bool_to_unsigned.patch \ | ||
12 | " | 13 | " |
13 | 14 | ||
14 | SRC_URI[md5sum] = "a0128d661cfe7cc8c121e73519c54fbf" | 15 | SRC_URI[md5sum] = "a0128d661cfe7cc8c121e73519c54fbf" |
@@ -16,10 +17,26 @@ SRC_URI[sha256sum] = "5eb20ac0e2944f6cb9c2d51dd6c4518941c185347d4089ea89087ffdd6 | |||
16 | 17 | ||
17 | S = "${WORKDIR}/${BPN}_${PV}" | 18 | S = "${WORKDIR}/${BPN}_${PV}" |
18 | 19 | ||
20 | do_compile_append() { | ||
21 | oe_runmake 7z | ||
22 | } | ||
23 | FILES_${PN} += "${libdir}/* ${bindir}/7z" | ||
24 | |||
25 | FILES_SOLIBSDEV = "" | ||
26 | INSANE_SKIP_${PN} += "dev-so" | ||
27 | |||
19 | do_install() { | 28 | do_install() { |
20 | install -d ${D}${bindir} | 29 | install -d ${D}${bindir} |
21 | install -m 0755 ${S}/bin/* ${D}${bindir} | 30 | install -d ${D}${bindir}/Codecs |
31 | install -d ${D}${libdir} | ||
32 | install -d ${D}${libdir}/Codecs | ||
33 | install -m 0755 ${S}/bin/7za ${D}${bindir} | ||
22 | ln -s 7za ${D}${bindir}/7z | 34 | ln -s 7za ${D}${bindir}/7z |
35 | install -m 0755 ${S}/bin/Codecs/* ${D}${libdir}/Codecs/ | ||
36 | install -m 0755 ${S}/bin/7z.so ${D}${libdir}/lib7z.so | ||
23 | } | 37 | } |
24 | 38 | ||
25 | BBCLASSEXTEND = "native" | 39 | RPROVIDES_${PN} += "lib7z.so()(64bit) 7z lib7z.so" |
40 | RPROVIDES_${PN}-dev += "lib7z.so()(64bit) 7z lib7z.so" | ||
41 | |||
42 | BBCLASSEXTEND = "native nativesdk" | ||