Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lief: add version 0.14.1 #23607

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions recipes/lief/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"0.14.1":
url: "https://github.com/lief-project/LIEF/archive/0.14.1.tar.gz"
sha256: "92916dcb3178353d863aef4f409186889983c56e025b774741d5316a72ec3a7d"
"0.13.1":
url: "https://github.com/lief-project/LIEF/archive/0.13.1.tar.gz"
sha256: "a3a846e9b6ce2acf89ef4687e870f41ca703f18fee3e7f501ebb05ee1aeb1847"
Expand All @@ -15,6 +18,13 @@
url: "https://github.com/lief-project/LIEF/archive/0.10.1.tar.gz"
sha256: "6f30c98a559f137e08b25bcbb376c0259914b33c307b8b901e01ca952241d00a"
patches:
"0.14.1":
- patch_file: "patches/0.14.1-001_link-to-conan.patch"
patch_description: "find conan package and link these"
patch_type: "conan"
- patch_file: "patches/0.14.1-002_fix-build.patch"
patch_description: "fix build"
patch_type: "fix"

Check warning on line 27 in recipes/lief/all/conandata.yml

View workflow job for this annotation

GitHub Actions / Lint changed files (YAML files)

conandata.yml schema warning

Schema outlined in https://github.com/conan-io/conan-center-index/blob/master/docs/adding_packages/conandata_yml_format.md#patches-fields is not followed. found arbitrary text in patch_type: fix ^ (line: 27)
"0.13.1":
- patch_file: "patches/0.13.0-001_link_to_conan.patch"
patch_description: "find conan package and link these"
Expand Down Expand Up @@ -44,17 +54,17 @@
patch_description: "find conan package and link these"
patch_type: "conan"
- patch_file: "patches/002_fix_resources_manager.patch"
patch_description: "use rang for colorizing"
patch_type: "backport"

Check warning on line 58 in recipes/lief/all/conandata.yml

View workflow job for this annotation

GitHub Actions / Lint changed files (YAML files)

conandata.yml schema warning

Schema outlined in https://github.com/conan-io/conan-center-index/blob/master/docs/adding_packages/conandata_yml_format.md#patches-fields is not followed. found arbitrary text in patch_type: backport ^ (line: 58)
- patch_file: "patches/003_fix_json_include_path.patch"
patch_description: "fix include path for conan package"
patch_type: "conan"
- patch_file: "patches/004_fix_elf_parser.patch"
patch_description: "remove LIEF_API"
patch_type: "backport"

Check warning on line 64 in recipes/lief/all/conandata.yml

View workflow job for this annotation

GitHub Actions / Lint changed files (YAML files)

conandata.yml schema warning

Schema outlined in https://github.com/conan-io/conan-center-index/blob/master/docs/adding_packages/conandata_yml_format.md#patches-fields is not followed. found arbitrary text in patch_type: backport ^ (line: 64)
- patch_file: "patches/005_fix_compiler_detection.patch"
patch_description: "fix check logic for compiler C++17 support"
patch_type: "backport"

Check warning on line 67 in recipes/lief/all/conandata.yml

View workflow job for this annotation

GitHub Actions / Lint changed files (YAML files)

conandata.yml schema warning

Schema outlined in https://github.com/conan-io/conan-center-index/blob/master/docs/adding_packages/conandata_yml_format.md#patches-fields is not followed. found arbitrary text in patch_type: backport ^ (line: 67)
- patch_file: "patches/006_fix_binary_cpp.patch"
patch_description: "include cctype"
patch_type: "backport"

Check warning on line 70 in recipes/lief/all/conandata.yml

View workflow job for this annotation

GitHub Actions / Lint changed files (YAML files)

conandata.yml schema warning

Schema outlined in https://github.com/conan-io/conan-center-index/blob/master/docs/adding_packages/conandata_yml_format.md#patches-fields is not followed. found arbitrary text in patch_type: backport ^ (line: 70)
66 changes: 66 additions & 0 deletions recipes/lief/all/patches/0.14.1-001_link-to-conan.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
From 1a7db96b9be9316a9caaa44efc6c0087584db61f Mon Sep 17 00:00:00 2001
From: Arenoros <arenoros@gmail.com>
Date: Wed, 17 Apr 2024 20:01:56 +0300
Subject: [PATCH] link to conan

---
CMakeLists.txt | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 50ba8cec..197b5211 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -74,6 +74,11 @@ endif()
# ============
set(THIRD_PARTY_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/third-party/")
include(LIEFDependencies)
+set(LIEF_FROZEN_ENABLED 0)
+if (LIEF_SUPPORT_CXX14 AND NOT LIEF_DISABLE_FROZEN)
+ message(STATUS "Enable Frozen (C++14 support)")
+ set(LIEF_FROZEN_ENABLED 1)
+endif()

# iOS specific config
# ===================
@@ -286,8 +291,7 @@ endif()

# Flags definition
# ----------------
-set_target_properties(LIB_LIEF
- PROPERTIES POSITION_INDEPENDENT_CODE ON
+set_target_properties(LIB_LIEF PROPERTIES
CXX_STANDARD 17
CXX_STANDARD_REQUIRED ON
CXX_VISIBILITY_PRESET hidden
@@ -466,9 +470,9 @@ if(LIEF_INSTALL)

# Installation
# ======================
-
+ include(GNUInstallDirs)
+ if(0)
if(UNIX)
- include(GNUInstallDirs)
set(CMAKE_INSTALL_LIBDIR "lib")
else()
if(WIN32)
@@ -482,13 +486,14 @@ if(LIEF_INSTALL)
message(FATAL_ERROR "System not UNIX nor WIN32 - not implemented yet")
endif()
endif()
+ endif()

install(
TARGETS LIB_LIEF lief_spdlog
EXPORT LIEFExport
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
- RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT libraries
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})

install(
--
2.43.0.windows.1

27 changes: 27 additions & 0 deletions recipes/lief/all/patches/0.14.1-002_fix-build.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
From 63fe35fb1c7f0b41590a7da4a2dacbabb0f86ef1 Mon Sep 17 00:00:00 2001
From: Arenoros <arenoros@gmail.com>
Date: Wed, 17 Apr 2024 20:49:11 +0300
Subject: [PATCH 2/2] fix build

---
src/PE/ResourcesManager.cpp | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/src/PE/ResourcesManager.cpp b/src/PE/ResourcesManager.cpp
index dcdbc97e..73b34725 100644
--- a/src/PE/ResourcesManager.cpp
+++ b/src/PE/ResourcesManager.cpp
@@ -33,6 +33,10 @@
#include "fmt_formatter.hpp"

FMT_FORMATTER(LIEF::PE::ResourcesManager::TYPE, LIEF::PE::to_string);
+template <> struct fmt::formatter<LIEF::PE::ResourceVersion> : ostream_formatter {};
+template <> struct fmt::formatter<LIEF::PE::ResourceIcon> : ostream_formatter {};
+template <> struct fmt::formatter<LIEF::PE::ResourceDialog> : ostream_formatter {};
+template <> struct fmt::formatter<LIEF::PE::ResourceStringTable> : ostream_formatter {};

namespace LIEF {
namespace PE {
--
2.43.0.windows.1

2 changes: 2 additions & 0 deletions recipes/lief/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
versions:
"0.14.1":
folder: "all"
"0.13.1":
folder: "all"
"0.13.0":
Expand Down
Loading