summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO16
-rw-r--r--0002-archlinux-compat-Remove-unused-mbedTLS-code-from-lib.patch68
-rw-r--r--0002-archlinux-compat-Replace-mbedTLS-by-OpenSSL-for-CURL.patch87
-rw-r--r--0003-Fix-capstone-include-path.patch4
-rw-r--r--PKGBUILD18
5 files changed, 87 insertions, 106 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 76aea5b614c1..9dad76f483a9 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = imhex
pkgdesc = A Hex Editor for Reverse Engineers, Programmers and people that value their eye sight when working at 3 AM
pkgver = 1.14.0
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/WerWolv/ImHex
arch = x86_64
license = GPL2
@@ -29,7 +29,7 @@ pkgbase = imhex
source = libromfs::git+https://github.com/WerWolv/libromfs
source = capstone::git+https://github.com/capstone-engine/capstone#branch=next
source = 0001-makepkg-Remove-external-dependencies-check.patch
- source = 0002-archlinux-compat-Replace-mbedTLS-by-OpenSSL-for-CURL.patch
+ source = 0002-archlinux-compat-Remove-unused-mbedTLS-code-from-lib.patch
source = 0003-Fix-capstone-include-path.patch
source = imhex.desktop
cksums = SKIP
@@ -38,8 +38,8 @@ pkgbase = imhex
cksums = SKIP
cksums = SKIP
cksums = 3961896925
- cksums = 4052484622
- cksums = 177396866
+ cksums = 114465395
+ cksums = 2337567663
cksums = 4178124713
sha256sums = SKIP
sha256sums = SKIP
@@ -47,8 +47,8 @@ pkgbase = imhex
sha256sums = SKIP
sha256sums = SKIP
sha256sums = 04bf8dca14ddf7d5e21ca5b657673e2a18b61d4209945322e8cae66d1bcc7fe3
- sha256sums = 0a618afc6ddf3a7ddb8b0c692dc6f8a34b1dd1e152b411df8d1df3b96faa3d45
- sha256sums = d831796811e42c2c3e680fff439a3543582426bc99d4556c4ab58f4c27575242
+ sha256sums = c6438cba236ddc69b31a69a800f9db9f842babf48484376f86745495daea9265
+ sha256sums = 34cb39c53cdfcadce4b556fed1ced1a4280f2fb2a37db724cf112fd896965145
sha256sums = 72525512a241589cecd6141f32ad36cbe1b5b6f2629dd8ead0e37812321bdde6
b2sums = SKIP
b2sums = SKIP
@@ -56,8 +56,8 @@ pkgbase = imhex
b2sums = SKIP
b2sums = SKIP
b2sums = 8bbbb346abfab740e102720ba84eca9b8b3dc7925874d4623042a2d027d6b7644592e118c4f5ade8498f3232cc9bf393da208a97492b5a5de5d02a393be1f40e
- b2sums = 3b488502cc454f1daebe30ecf9d152da925c8416ffe6ee2d85fe74f419de8cb5f0e3f074938de13f3353f7bc1ec7036f882b6b9a549cf206dd47db4593372316
- b2sums = bc181d76e20b5365580da9da796d1ca955b441dc2a53bb79d81bd2a5344343b19e16b5512e188604599fc4a587d5a6b38f38aebad95b8e744794053250f395c1
+ b2sums = cc62ff2933d9cff5a501ee8b76e7d2f89676b1e3030b87157b3a655806bd0a95eb0ce022ab651cb91b40345e2c4b548b02b5ae8b270f4611596d95f96b197a80
+ b2sums = a1b6fd1bf30fa982580790e4593cffb0670471be9df9eb2ac2415a5be22cd6c140b5ca46019a09f11815b1a1022b823f2f1771a150e5760a5d37f7513f2c36cf
b2sums = 7b2d029de385fdc2536f57a4364add9752b9a5dc31df501e07bff1fd69fdd1de2afa19a5ac5a4c87fbf21c5d87cc96d3fe30d58825c050f5a7d25f6d85d08efc
pkgname = imhex
diff --git a/0002-archlinux-compat-Remove-unused-mbedTLS-code-from-lib.patch b/0002-archlinux-compat-Remove-unused-mbedTLS-code-from-lib.patch
new file mode 100644
index 000000000000..25faaf43c2ce
--- /dev/null
+++ b/0002-archlinux-compat-Remove-unused-mbedTLS-code-from-lib.patch
@@ -0,0 +1,68 @@
+From de0c264f425311abaf91aa461d53d91a1aac6072 Mon Sep 17 00:00:00 2001
+From: KokaKiwi <kokakiwi+git@kokakiwi.net>
+Date: Mon, 31 Jan 2022 20:20:40 +0100
+Subject: [PATCH 2/3] archlinux-compat: Remove unused mbedTLS code from libcurl
+ usage
+
+---
+ lib/libimhex/source/helpers/net.cpp | 25 +------------------------
+ 1 file changed, 1 insertion(+), 24 deletions(-)
+
+diff --git a/lib/libimhex/source/helpers/net.cpp b/lib/libimhex/source/helpers/net.cpp
+index af86328..9a1362e 100644
+--- a/lib/libimhex/source/helpers/net.cpp
++++ b/lib/libimhex/source/helpers/net.cpp
+@@ -7,8 +7,6 @@
+ #include <filesystem>
+ #include <cstdio>
+
+-#include <mbedtls/ssl.h>
+-
+ #include <curl/curl.h>
+ #include <nlohmann/json.hpp>
+
+@@ -50,20 +48,6 @@ namespace hex {
+ return fwrite(contents, size, nmemb, file);
+ }
+
+- static CURLcode sslCtxFunction(CURL *ctx, void *sslctx, void *userdata) {
+- auto *cfg = static_cast<mbedtls_ssl_config *>(sslctx);
+-
+- static mbedtls_x509_crt crt;
+- mbedtls_x509_crt_init(&crt);
+-
+- auto cacert = romfs::get("cacert.pem").string();
+- mbedtls_x509_crt_parse(&crt, reinterpret_cast<const u8 *>(cacert.data()), cacert.size());
+-
+- mbedtls_ssl_conf_ca_chain(cfg, &crt, nullptr);
+-
+- return CURLE_OK;
+- }
+-
+ int progressCallback(void *contents, curl_off_t dlTotal, curl_off_t dlNow, curl_off_t ulTotal, curl_off_t ulNow) {
+ auto &net = *static_cast<Net *>(contents);
+
+@@ -109,13 +93,6 @@ namespace hex {
+ curl_easy_setopt(this->m_ctx, CURLOPT_XFERINFOFUNCTION, progressCallback);
+ curl_easy_setopt(this->m_ctx, CURLOPT_NOSIGNAL, 1L);
+ curl_easy_setopt(this->m_ctx, CURLOPT_NOPROGRESS, 0L);
+-
+- #if defined(OS_WINDOWS)
+- curl_easy_setopt(this->m_ctx, CURLOPT_CAINFO, nullptr);
+- curl_easy_setopt(this->m_ctx, CURLOPT_CAPATH, nullptr);
+- curl_easy_setopt(this->m_ctx, CURLOPT_SSLCERTTYPE, "PEM");
+- curl_easy_setopt(this->m_ctx, CURLOPT_SSL_CTX_FUNCTION, sslCtxFunction);
+- #endif
+ }
+
+ std::optional<i32> Net::execute() {
+@@ -244,4 +221,4 @@ namespace hex {
+ return {};
+ }
+
+-}
+\ No newline at end of file
++}
+--
+2.35.1
+
diff --git a/0002-archlinux-compat-Replace-mbedTLS-by-OpenSSL-for-CURL.patch b/0002-archlinux-compat-Replace-mbedTLS-by-OpenSSL-for-CURL.patch
deleted file mode 100644
index f743b02370c3..000000000000
--- a/0002-archlinux-compat-Replace-mbedTLS-by-OpenSSL-for-CURL.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-From beba8c5a3d44b240d5e77273d71b2d7ca61046a6 Mon Sep 17 00:00:00 2001
-From: KokaKiwi <kokakiwi+git@kokakiwi.net>
-Date: Mon, 10 Jan 2022 15:48:20 +0100
-Subject: [PATCH 2/3] archlinux-compat: Replace mbedTLS by OpenSSL for CURL
-
----
- lib/libimhex/CMakeLists.txt | 6 ++++--
- lib/libimhex/source/helpers/net.cpp | 20 ++++++++++++--------
- 2 files changed, 16 insertions(+), 10 deletions(-)
-
-diff --git a/lib/libimhex/CMakeLists.txt b/lib/libimhex/CMakeLists.txt
-index c23cd36..55d0ab6 100644
---- a/lib/libimhex/CMakeLists.txt
-+++ b/lib/libimhex/CMakeLists.txt
-@@ -82,6 +82,7 @@ endif()
-
-
- find_package(mbedTLS 2.26.0 REQUIRED)
-+find_package(OpenSSL REQUIRED)
- configurePython()
-
- pkg_search_module(MAGIC libmagic>=5.39)
-@@ -156,7 +157,7 @@ endif ()
- add_library(libimhex SHARED ${LIBIMHEX_SOURCES})
- set_target_properties(libimhex PROPERTIES POSITION_INDEPENDENT_CODE ON)
-
--target_include_directories(libimhex PUBLIC include ${XDGPP_INCLUDE_DIRS} ${MBEDTLS_INCLUDE_DIRS} ${CAPSTONE_INCLUDE_DIRS} ${MAGIC_INCLUDE_DIRS} ${Python_INCLUDE_DIRS} ${LLVM_INCLUDE_DIRS} ${FMT_INCLUDE_DIRS} ${CURL_INCLUDE_DIRS} ${YARA_INCLUDE_DIRS})
-+target_include_directories(libimhex PUBLIC include ${XDGPP_INCLUDE_DIRS} ${MBEDTLS_INCLUDE_DIRS} ${OPENSSL_INCLUDE_DIRS} ${CAPSTONE_INCLUDE_DIRS} ${MAGIC_INCLUDE_DIRS} ${Python_INCLUDE_DIRS} ${LLVM_INCLUDE_DIRS} ${FMT_INCLUDE_DIRS} ${CURL_INCLUDE_DIRS} ${YARA_INCLUDE_DIRS})
- target_link_directories(libimhex PUBLIC ${MBEDTLS_LIBRARY_DIR} ${CAPSTONE_LIBRARY_DIRS} ${MAGIC_LIBRARY_DIRS})
-
- if (APPLE)
-@@ -164,4 +165,5 @@ if (APPLE)
- target_link_libraries(libimhex PUBLIC ${FOUNDATION})
- endif ()
-
--target_link_libraries(libimhex PUBLIC imgui nfd magic ${CAPSTONE_LIBRARIES} LLVMDemangle microtar ${NLOHMANN_JSON_LIBRARIES} ${YARA_LIBRARIES} ${LIBCURL_LIBRARIES} ${MBEDTLS_LIBRARIES} ${FMT_LIBRARIES} ${Python_LIBRARIES} libromfs)
-+target_link_libraries(libimhex PUBLIC imgui nfd magic ${CAPSTONE_LIBRARIES} LLVMDemangle microtar
-+ ${NLOHMANN_JSON_LIBRARIES} ${YARA_LIBRARIES} ${LIBCURL_LIBRARIES} ${MBEDTLS_LIBRARIES} ${OPENSSL_LIBRARIES} ${FMT_LIBRARIES} ${Python_LIBRARIES} libromfs)
-diff --git a/lib/libimhex/source/helpers/net.cpp b/lib/libimhex/source/helpers/net.cpp
-index af86328..f6d8b63 100644
---- a/lib/libimhex/source/helpers/net.cpp
-+++ b/lib/libimhex/source/helpers/net.cpp
-@@ -7,7 +7,7 @@
- #include <filesystem>
- #include <cstdio>
-
--#include <mbedtls/ssl.h>
-+#include <openssl/ssl.h>
-
- #include <curl/curl.h>
- #include <nlohmann/json.hpp>
-@@ -51,15 +51,19 @@ namespace hex {
- }
-
- static CURLcode sslCtxFunction(CURL *ctx, void *sslctx, void *userdata) {
-- auto *cfg = static_cast<mbedtls_ssl_config *>(sslctx);
-+ SSL_CTX *opensslctx = static_cast<SSL_CTX*>(sslctx);
-
-- static mbedtls_x509_crt crt;
-- mbedtls_x509_crt_init(&crt);
-+ auto cacert = romfs::get("cacert.pem");
-+ BIO *bio = BIO_new_mem_buf(reinterpret_cast<const u8 *>(cacert.data()), cacert.size());
-
-- auto cacert = romfs::get("cacert.pem").string();
-- mbedtls_x509_crt_parse(&crt, reinterpret_cast<const u8 *>(cacert.data()), cacert.size());
-+ X509 *cert = nullptr;
-+ PEM_read_bio_X509(bio, &cert, 0, nullptr);
-
-- mbedtls_ssl_conf_ca_chain(cfg, &crt, nullptr);
-+ X509_STORE *store = SSL_CTX_get_cert_store(opensslctx);
-+ X509_STORE_add_cert(store, cert);
-+
-+ X509_free(cert);
-+ BIO_free(bio);
-
- return CURLE_OK;
- }
-@@ -244,4 +248,4 @@ namespace hex {
- return {};
- }
-
--}
-\ No newline at end of file
-+}
---
-2.35.1
-
diff --git a/0003-Fix-capstone-include-path.patch b/0003-Fix-capstone-include-path.patch
index 75adc50e8c8a..7d91e53547e2 100644
--- a/0003-Fix-capstone-include-path.patch
+++ b/0003-Fix-capstone-include-path.patch
@@ -1,7 +1,7 @@
-From 8288cead3dc58ee1f6614f2ac4e37691b6bee23d Mon Sep 17 00:00:00 2001
+From 29b7ab56439379e00d805a93f36c81ee416100a1 Mon Sep 17 00:00:00 2001
From: KokaKiwi <kokakiwi+git@kokakiwi.net>
Date: Mon, 31 Jan 2022 16:31:07 +0100
-Subject: [PATCH 3/3] Fix capstone include path.
+Subject: [PATCH 3/3] Fix capstone include path
---
lib/libimhex/include/hex/helpers/disassembler.hpp | 6 +++---
diff --git a/PKGBUILD b/PKGBUILD
index d952b71e51ef..aff2cdbe2069 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@
_pkgname=ImHex
pkgname=${_pkgname,,}
pkgver=1.14.0
-pkgrel=1
+pkgrel=2
pkgdesc='A Hex Editor for Reverse Engineers, Programmers and people that value their eye sight when working at 3 AM'
url='https://github.com/WerWolv/ImHex'
license=('GPL2')
@@ -19,7 +19,7 @@ source=("$pkgname::git+https://github.com/WerWolv/ImHex.git#tag=v$pkgver"
"libromfs::git+https://github.com/WerWolv/libromfs"
"capstone::git+https://github.com/capstone-engine/capstone#branch=next"
0001-makepkg-Remove-external-dependencies-check.patch
- 0002-archlinux-compat-Replace-mbedTLS-by-OpenSSL-for-CURL.patch
+ 0002-archlinux-compat-Remove-unused-mbedTLS-code-from-lib.patch
0003-Fix-capstone-include-path.patch
imhex.desktop)
cksums=('SKIP'
@@ -28,8 +28,8 @@ cksums=('SKIP'
'SKIP'
'SKIP'
'3961896925'
- '4052484622'
- '177396866'
+ '114465395'
+ '2337567663'
'4178124713')
sha256sums=('SKIP'
'SKIP'
@@ -37,8 +37,8 @@ sha256sums=('SKIP'
'SKIP'
'SKIP'
'04bf8dca14ddf7d5e21ca5b657673e2a18b61d4209945322e8cae66d1bcc7fe3'
- '0a618afc6ddf3a7ddb8b0c692dc6f8a34b1dd1e152b411df8d1df3b96faa3d45'
- 'd831796811e42c2c3e680fff439a3543582426bc99d4556c4ab58f4c27575242'
+ 'c6438cba236ddc69b31a69a800f9db9f842babf48484376f86745495daea9265'
+ '34cb39c53cdfcadce4b556fed1ced1a4280f2fb2a37db724cf112fd896965145'
'72525512a241589cecd6141f32ad36cbe1b5b6f2629dd8ead0e37812321bdde6')
b2sums=('SKIP'
'SKIP'
@@ -46,8 +46,8 @@ b2sums=('SKIP'
'SKIP'
'SKIP'
'8bbbb346abfab740e102720ba84eca9b8b3dc7925874d4623042a2d027d6b7644592e118c4f5ade8498f3232cc9bf393da208a97492b5a5de5d02a393be1f40e'
- '3b488502cc454f1daebe30ecf9d152da925c8416ffe6ee2d85fe74f419de8cb5f0e3f074938de13f3353f7bc1ec7036f882b6b9a549cf206dd47db4593372316'
- 'bc181d76e20b5365580da9da796d1ca955b441dc2a53bb79d81bd2a5344343b19e16b5512e188604599fc4a587d5a6b38f38aebad95b8e744794053250f395c1'
+ 'cc62ff2933d9cff5a501ee8b76e7d2f89676b1e3030b87157b3a655806bd0a95eb0ce022ab651cb91b40345e2c4b548b02b5ae8b270f4611596d95f96b197a80'
+ 'a1b6fd1bf30fa982580790e4593cffb0670471be9df9eb2ac2415a5be22cd6c140b5ca46019a09f11815b1a1022b823f2f1771a150e5760a5d37f7513f2c36cf'
'7b2d029de385fdc2536f57a4364add9752b9a5dc31df501e07bff1fd69fdd1de2afa19a5ac5a4c87fbf21c5d87cc96d3fe30d58825c050f5a7d25f6d85d08efc')
prepare() {
@@ -64,7 +64,7 @@ prepare() {
git apply \
"$srcdir/0001-makepkg-Remove-external-dependencies-check.patch" \
- "$srcdir/0002-archlinux-compat-Replace-mbedTLS-by-OpenSSL-for-CURL.patch" \
+ "$srcdir/0002-archlinux-compat-Remove-unused-mbedTLS-code-from-lib.patch" \
"$srcdir/0003-Fix-capstone-include-path.patch"
}