From afe1c610c5538d4f3541c4167bee6b135e5985e6 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 1 Apr 2025 16:40:39 -0700 Subject: python3-lief: Upgrade to latest on tip of trunk Adds new dependency on typing-inspection module Fix build with GCC-15 while here Signed-off-by: Khem Raj --- .../python3-lief/0001-Add-cstdio-include.patch | 134 +++++++++++++++++++++ .../recipes-devtools/python/python3-lief_0.16.3.bb | 34 ------ .../recipes-devtools/python/python3-lief_0.16.4.bb | 37 ++++++ 3 files changed, 171 insertions(+), 34 deletions(-) create mode 100644 meta-python/recipes-devtools/python/python3-lief/0001-Add-cstdio-include.patch delete mode 100644 meta-python/recipes-devtools/python/python3-lief_0.16.3.bb create mode 100644 meta-python/recipes-devtools/python/python3-lief_0.16.4.bb diff --git a/meta-python/recipes-devtools/python/python3-lief/0001-Add-cstdio-include.patch b/meta-python/recipes-devtools/python/python3-lief/0001-Add-cstdio-include.patch new file mode 100644 index 0000000000..396e935ddd --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-lief/0001-Add-cstdio-include.patch @@ -0,0 +1,134 @@ +From a9b7a9f5c5572fc839d05457da073dc817722ace Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 1 Apr 2025 17:27:46 -0700 +Subject: [PATCH] Add cstdio include + +This is needed for uintXX_t types, GCC-15 is defauling to C23 and will error +about it. + +e.g. + +include/LIEF/PE/LoadConfigurations/VolatileMetadata.hpp:145:3: note: 'uint32_t' is defined in header ''; this is probably fixable by adding '#include ' + +Upstream-Status: Submitted [https://github.com/lief-project/LIEF/pull/1184] +Signed-off-by: Khem Raj +--- + include/LIEF/DWARF/Scope.hpp | 1 + + include/LIEF/ObjC/Method.hpp | 1 + + include/LIEF/PDB/PublicSymbol.hpp | 1 + + include/LIEF/PDB/types/Attribute.hpp | 1 + + include/LIEF/PE/LoadConfigurations/VolatileMetadata.hpp | 1 + + include/LIEF/PE/Relocation.hpp | 1 + + include/LIEF/PE/signature/attributes/PKCS9AtSequenceNumber.hpp | 1 + + include/LIEF/PE/signature/attributes/SpcRelaxedPeMarkerCheck.hpp | 1 + + src/MachO/TrieNode.hpp | 1 + + 9 files changed, 9 insertions(+) + +diff --git a/include/LIEF/DWARF/Scope.hpp b/include/LIEF/DWARF/Scope.hpp +index 78752847..61977c21 100644 +--- a/include/LIEF/DWARF/Scope.hpp ++++ b/include/LIEF/DWARF/Scope.hpp +@@ -15,6 +15,7 @@ + #ifndef LIEF_DWARF_SCOPE_H + #define LIEF_DWARF_SCOPE_H + ++#include + #include + #include + +diff --git a/include/LIEF/ObjC/Method.hpp b/include/LIEF/ObjC/Method.hpp +index b4e82c6e..b9f37288 100644 +--- a/include/LIEF/ObjC/Method.hpp ++++ b/include/LIEF/ObjC/Method.hpp +@@ -16,6 +16,7 @@ + #define LIEF_OBJC_METHOD_H + #include + ++#include + #include + #include + +diff --git a/include/LIEF/PDB/PublicSymbol.hpp b/include/LIEF/PDB/PublicSymbol.hpp +index b8904a5b..0e105435 100644 +--- a/include/LIEF/PDB/PublicSymbol.hpp ++++ b/include/LIEF/PDB/PublicSymbol.hpp +@@ -14,6 +14,7 @@ + */ + #ifndef LIEF_PDB_PUBLIC_SYMBOL_H + #define LIEF_PDB_PUBLIC_SYMBOL_H ++#include + #include + #include + #include +diff --git a/include/LIEF/PDB/types/Attribute.hpp b/include/LIEF/PDB/types/Attribute.hpp +index a41270c0..fc961be5 100644 +--- a/include/LIEF/PDB/types/Attribute.hpp ++++ b/include/LIEF/PDB/types/Attribute.hpp +@@ -17,6 +17,7 @@ + + #include "LIEF/visibility.h" + ++#include + #include + #include + +diff --git a/include/LIEF/PE/LoadConfigurations/VolatileMetadata.hpp b/include/LIEF/PE/LoadConfigurations/VolatileMetadata.hpp +index 41b9e36b..073ccabc 100644 +--- a/include/LIEF/PE/LoadConfigurations/VolatileMetadata.hpp ++++ b/include/LIEF/PE/LoadConfigurations/VolatileMetadata.hpp +@@ -15,6 +15,7 @@ + */ + #ifndef LIEF_PE_LOAD_CONFIGURATION_VOLATILE_METADATA_H + #define LIEF_PE_LOAD_CONFIGURATION_VOLATILE_METADATA_H ++#include + #include + #include + #include +diff --git a/include/LIEF/PE/Relocation.hpp b/include/LIEF/PE/Relocation.hpp +index a4cd2e96..cd81bf68 100644 +--- a/include/LIEF/PE/Relocation.hpp ++++ b/include/LIEF/PE/Relocation.hpp +@@ -15,6 +15,7 @@ + */ + #ifndef LIEF_PE_RELOCATION_H + #define LIEF_PE_RELOCATION_H ++#include + #include + #include + #include +diff --git a/include/LIEF/PE/signature/attributes/PKCS9AtSequenceNumber.hpp b/include/LIEF/PE/signature/attributes/PKCS9AtSequenceNumber.hpp +index a89901fa..32db1470 100644 +--- a/include/LIEF/PE/signature/attributes/PKCS9AtSequenceNumber.hpp ++++ b/include/LIEF/PE/signature/attributes/PKCS9AtSequenceNumber.hpp +@@ -15,6 +15,7 @@ + */ + #ifndef LIEF_PE_ATTRIBUTES_PKCS9_AT_SEQUENCE_NUMBER_H + #define LIEF_PE_ATTRIBUTES_PKCS9_AT_SEQUENCE_NUMBER_H ++#include + + #include "LIEF/visibility.h" + #include "LIEF/PE/signature/Attribute.hpp" +diff --git a/include/LIEF/PE/signature/attributes/SpcRelaxedPeMarkerCheck.hpp b/include/LIEF/PE/signature/attributes/SpcRelaxedPeMarkerCheck.hpp +index f84fbcbf..5cce98b4 100644 +--- a/include/LIEF/PE/signature/attributes/SpcRelaxedPeMarkerCheck.hpp ++++ b/include/LIEF/PE/signature/attributes/SpcRelaxedPeMarkerCheck.hpp +@@ -15,6 +15,7 @@ + */ + #ifndef LIEF_PE_ATTRIBUTES_SPC_RELAXED_PE_MARKER_CHECK_H + #define LIEF_PE_ATTRIBUTES_SPC_RELAXED_PE_MARKER_CHECK_H ++#include + + #include "LIEF/visibility.h" + #include "LIEF/PE/signature/Attribute.hpp" +diff --git a/src/MachO/TrieNode.hpp b/src/MachO/TrieNode.hpp +index f6c411b8..6bdde9ec 100644 +--- a/src/MachO/TrieNode.hpp ++++ b/src/MachO/TrieNode.hpp +@@ -15,6 +15,7 @@ + */ + #ifndef LIEF_MACHO_TRIE_NODE_H_ + #define LIEF_MACHO_TRIE_NODE_H_ ++#include + #include + #include + #include diff --git a/meta-python/recipes-devtools/python/python3-lief_0.16.3.bb b/meta-python/recipes-devtools/python/python3-lief_0.16.3.bb deleted file mode 100644 index 925baa655c..0000000000 --- a/meta-python/recipes-devtools/python/python3-lief_0.16.3.bb +++ /dev/null @@ -1,34 +0,0 @@ -SUMMARY = "Library to instrument executable formats" -DESCRIPTION = "LIEF: Library to Instrument Executable Formats" -HOMEPAGE = "https://github.com/lief-project/LIEF" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=9ab5db472ff936b441055522f5000547" -SECTION = "libs" - -SRC_URI = " \ - git://github.com/lief-project/LIEF.git;protocol=https;branch=main \ - file://0001-build-requirements.txt-Allow-newer-versions.patch \ - file://0002-api-python-config-default.toml-Debug.patch \ -" -SRCREV = "646af9f6ced8e827916648f26617998de834db78" -PV .= "+git" - -S = "${WORKDIR}/git" -PEP517_SOURCE_PATH = "${S}/api/python" - -export LIEF_BUILD_DIR = "${B}" - -inherit python_setuptools_build_meta - -DEPENDS += "\ - python3-scikit-build-native \ - python3-scikit-build-core-native \ - python3-tomli-native \ - python3-pydantic-native \ - ninja-native \ - ccache-native \ -" -# https://github.com/lief-project/LIEF/commit/3def579f75965aa19c021d840a759bce2afc0a31#r152197203 -COMPATIBLE_HOST:x86 = "null" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-python/recipes-devtools/python/python3-lief_0.16.4.bb b/meta-python/recipes-devtools/python/python3-lief_0.16.4.bb new file mode 100644 index 0000000000..294f8fd1ad --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-lief_0.16.4.bb @@ -0,0 +1,37 @@ +SUMMARY = "Library to instrument executable formats" +DESCRIPTION = "LIEF: Library to Instrument Executable Formats" +HOMEPAGE = "https://github.com/lief-project/LIEF" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=9ab5db472ff936b441055522f5000547" +SECTION = "libs" + +SRC_URI = " \ + git://github.com/lief-project/LIEF.git;protocol=https;branch=main \ + file://0001-build-requirements.txt-Allow-newer-versions.patch \ + file://0002-api-python-config-default.toml-Debug.patch \ + file://0001-Add-cstdio-include.patch \ +" +SRCREV = "1e9b12bd14cbe087d52355b8b9af578f1b04d8ca" + +PV .= "+git" + +S = "${WORKDIR}/git" +PEP517_SOURCE_PATH = "${S}/api/python" + +export LIEF_BUILD_DIR = "${B}" + +inherit python_setuptools_build_meta + +DEPENDS += "\ + python3-scikit-build-native \ + python3-scikit-build-core-native \ + python3-tomli-native \ + python3-pydantic-native \ + ninja-native \ + ccache-native \ + python3-typing-inspection \ +" +# https://github.com/lief-project/LIEF/commit/3def579f75965aa19c021d840a759bce2afc0a31#r152197203 +COMPATIBLE_HOST:x86 = "null" + +BBCLASSEXTEND = "native nativesdk" -- cgit v1.2.3-54-g00ecf