diff options
author | KokaKiwi | 2021-02-19 14:21:53 +0100 |
---|---|---|
committer | KokaKiwi | 2021-02-19 14:40:07 +0100 |
commit | 609ecbf4f5644776bb2c11f1f4f893897f79fc6d (patch) | |
tree | ba1d661346bd976884dedc7bf3fe5f698a85a701 | |
parent | 2e1159bbade0cb3af2a3a43307aa7bbc0b4b249e (diff) | |
download | aur-609ecbf4f5644776bb2c11f1f4f893897f79fc6d.tar.gz |
Update: 1.7.0
-rw-r--r-- | .SRCINFO | 23 | ||||
-rw-r--r-- | 0001-Arch-Linux-customisations.patch | 83 | ||||
-rw-r--r-- | PKGBUILD | 57 |
3 files changed, 143 insertions, 20 deletions
@@ -1,26 +1,31 @@ pkgbase = imhex pkgdesc = A Hex Editor for Reverse Engineers, Programmers and people that value their eye sight when working at 3 AM - pkgver = 1.6.1 - pkgrel = 2 + pkgver = 1.7.0 + pkgrel = 1 url = https://github.com/WerWolv/ImHex arch = x86_64 license = GPL2 makedepends = cmake + makedepends = glm + makedepends = llvm + makedepends = nlohmann-json depends = glfw - depends = glm depends = capstone - depends = llvm - depends = nlohmann-json + depends = llvm-libs + depends = mbedtls depends = python depends = freetype2 depends = file - depends = openssl - depends = libiconv depends = hicolor-icon-theme - source = imhex-1.6.1.tar.gz::https://github.com/WerWolv/ImHex/archive/v1.6.1.tar.gz + source = imhex-1.7.0.tar.gz::https://github.com/WerWolv/ImHex/archive/v1.7.0.tar.gz source = imhex.desktop - b2sums = 6dcf7461fa15a396c5351942347e62e8a4bfdac47591761006001e8bd8d149d9208e01795eebc27fbdc2b5023021f783e7c6142a4da1b0fc484531b181d6b00f + source = 0001-Arch-Linux-customisations.patch + sha256sums = 891c9268dda958922698c6fdfcba34ec7b20853f3764fe9d58c4a932a6b0d3d8 + sha256sums = 72525512a241589cecd6141f32ad36cbe1b5b6f2629dd8ead0e37812321bdde6 + sha256sums = 8b73bc50fd0dd8c94c78a02361a974b7e3d813afe2c0a69ad1ecc22e70217206 + b2sums = cd725290af8afdf83d08c78399e52420d983bd4cb3d91cbbd10d871fba2ee240286eae0de1495a63425f22ddd0c1d95ca8fe4cbcaf6164b3e13e6efb5875218e b2sums = 7b2d029de385fdc2536f57a4364add9752b9a5dc31df501e07bff1fd69fdd1de2afa19a5ac5a4c87fbf21c5d87cc96d3fe30d58825c050f5a7d25f6d85d08efc + b2sums = 17d04544f0170716d68bb2e7d186302e29b094c3f416abe9b65f7e73b90ec03bf4234c42afbfc63c9adbb53585094e4dc443d1b44a77df639a1f344337c9235f pkgname = imhex diff --git a/0001-Arch-Linux-customisations.patch b/0001-Arch-Linux-customisations.patch new file mode 100644 index 000000000000..4258f2af32af --- /dev/null +++ b/0001-Arch-Linux-customisations.patch @@ -0,0 +1,83 @@ +From cc618e03d290581bc7ec935ac65f31889fc73c1b Mon Sep 17 00:00:00 2001 +From: KokaKiwi <kokakiwi+git@kokakiwi.net> +Date: Fri, 19 Feb 2021 13:47:42 +0100 +Subject: [PATCH] Arch Linux customisations. + +--- + source/views/view_pattern.cpp | 8 ++++---- + source/window.cpp | 9 +++------ + 2 files changed, 7 insertions(+), 10 deletions(-) + +diff --git a/source/views/view_pattern.cpp b/source/views/view_pattern.cpp +index ad0553a..41b50d5 100644 +--- a/source/views/view_pattern.cpp ++++ b/source/views/view_pattern.cpp +@@ -104,7 +104,7 @@ namespace hex { + std::string magicFiles; + + std::error_code error; +- for (const auto &entry : std::filesystem::directory_iterator("magic", error)) { ++ for (const auto &entry : std::filesystem::directory_iterator("/usr/share/imhex", error)) { + if (entry.is_regular_file() && entry.path().extension() == ".mgc") + magicFiles += entry.path().string() + MAGIC_PATH_SEPARATOR; + } +@@ -140,7 +140,7 @@ namespace hex { + + + std::error_code errorCode; +- for (auto &entry : std::filesystem::directory_iterator("patterns", errorCode)) { ++ for (auto &entry : std::filesystem::directory_iterator("/usr/share/imhex/patterns", errorCode)) { + if (!entry.is_regular_file()) + continue; + +@@ -277,7 +277,7 @@ namespace hex { + ImGui::Text("hex.view.pattern.accept_pattern.question"_lang); + + confirmButtons("hex.common.yes"_lang, "hex.common.no"_lang, [this]{ +- this->loadPatternFile("patterns/" + this->m_possiblePatternFiles[this->m_selectedPatternFile]); ++ this->loadPatternFile("/usr/share/patterns/patterns/" + this->m_possiblePatternFiles[this->m_selectedPatternFile]); + ImGui::CloseCurrentPopup(); + }, []{ + ImGui::CloseCurrentPopup(); +@@ -344,4 +344,4 @@ namespace hex { + } + } + +-} +\ No newline at end of file ++} +diff --git a/source/window.cpp b/source/window.cpp +index 27c8e91..9938a8c 100644 +--- a/source/window.cpp ++++ b/source/window.cpp +@@ -558,7 +558,7 @@ namespace hex { + #if defined(OS_WINDOWS) + std::filesystem::path resourcePath = std::filesystem::path((SharedData::mainArgv)[0]).parent_path(); + #elif defined(OS_LINUX) || defined(OS_MACOS) +- std::filesystem::path resourcePath = "/usr/share/ImHex"; ++ std::filesystem::path resourcePath = "/usr/share/imhex"; + #else + std::filesystem::path resourcePath = ""; + #warning "Unsupported OS for custom font support" +@@ -594,10 +594,7 @@ namespace hex { + } + + void Window::initPlugins() { +- try { +- auto pluginFolderPath = std::filesystem::path((SharedData::mainArgv)[0]).parent_path() / "plugins"; +- PluginHandler::load(pluginFolderPath.string()); +- } catch (std::runtime_error &e) { return; } ++ PluginHandler::load("/usr/lib/imhex/plugins"); + + for (const auto &plugin : PluginHandler::getPlugins()) { + plugin.initializePlugin(); +@@ -619,4 +616,4 @@ namespace hex { + PluginHandler::unload(); + } + +-} +\ No newline at end of file ++} +-- +2.30.1 + @@ -3,29 +3,64 @@ _pkgname=ImHex pkgname=${_pkgname,,} -pkgver=1.6.1 -pkgrel=2 +pkgver=1.7.0 +pkgrel=1 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') arch=('x86_64') -depends=('glfw' 'glm' 'capstone' 'llvm' 'nlohmann-json' 'python' 'freetype2' 'file' 'openssl' 'libiconv' 'hicolor-icon-theme') -makedepends=('cmake') -source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz" - "$pkgname.desktop") -b2sums=('6dcf7461fa15a396c5351942347e62e8a4bfdac47591761006001e8bd8d149d9208e01795eebc27fbdc2b5023021f783e7c6142a4da1b0fc484531b181d6b00f' - '7b2d029de385fdc2536f57a4364add9752b9a5dc31df501e07bff1fd69fdd1de2afa19a5ac5a4c87fbf21c5d87cc96d3fe30d58825c050f5a7d25f6d85d08efc') +depends=('glfw' 'capstone' 'llvm-libs' 'mbedtls' 'python' 'freetype2' 'file' 'hicolor-icon-theme') +makedepends=('cmake' 'glm' 'llvm' 'nlohmann-json') +source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz" + imhex.desktop + 0001-Arch-Linux-customisations.patch) +sha256sums=('891c9268dda958922698c6fdfcba34ec7b20853f3764fe9d58c4a932a6b0d3d8' + '72525512a241589cecd6141f32ad36cbe1b5b6f2629dd8ead0e37812321bdde6' + '8b73bc50fd0dd8c94c78a02361a974b7e3d813afe2c0a69ad1ecc22e70217206') +b2sums=('cd725290af8afdf83d08c78399e52420d983bd4cb3d91cbbd10d871fba2ee240286eae0de1495a63425f22ddd0c1d95ca8fe4cbcaf6164b3e13e6efb5875218e' + '7b2d029de385fdc2536f57a4364add9752b9a5dc31df501e07bff1fd69fdd1de2afa19a5ac5a4c87fbf21c5d87cc96d3fe30d58825c050f5a7d25f6d85d08efc' + '17d04544f0170716d68bb2e7d186302e29b094c3f416abe9b65f7e73b90ec03bf4234c42afbfc63c9adbb53585094e4dc443d1b44a77df639a1f344337c9235f') + +prepare() { + cd "${_pkgname}-${pkgver}" + + for f in "${srcdir}"/*.patch; do + patch -Np1 -i $f + done +} build() { - cmake -B build -S "$_pkgname-$pkgver" \ - -DCMAKE_BUILD_TYPE=Release \ + cmake -B build -S "${_pkgname}-${pkgver}" \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_INSTALL_PREFIX=/usr \ - -DPROJECT_VERSION="$pkgver" \ + -DPROJECT_VERSION="${pkgver}" \ -Wno-dev make -C build } package() { + # Executable + install -Dm0755 build/imhex "${pkgdir}/usr/bin/imhex" + + # Shared lib and plugins + install -Dm0755 -t "${pkgdir}/usr/lib" build/plugins/libimhex/libimhex.so + + for plugin in builtin; do + install -Dm0755 -t "${pkgdir}/usr/lib/imhex/plugins" "build/plugins/$plugin/$plugin.hexplug" + done + + # Desktop file(s) + install -Dm0644 -t "${pkgdir}/usr/share/applications" imhex.desktop + install -Dm0644 "${_pkgname}-${pkgver}/res/icon.png" "${pkgdir}/usr/share/icons/hicolor/72x72/apps/imhex.png" + + # Misc files + install -Dm0644 -t "${pkgdir}/usr/share/imhex" \ + build/magic_dbs.mgc + + # License + install -Dm0644 "${_pkgname}-${pkgver}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + + # binary install -Dm0755 -t "$pkgdir/usr/bin" "build/$pkgname" |