diff options
-rw-r--r-- | .SRCINFO | 27 | ||||
-rw-r--r-- | 0001-fix-cmake-Fix-when-multiple-.NET-packages-are-instal.patch | 26 | ||||
-rw-r--r-- | 0001-makepkg-Fix-compiler-check.patch | 82 | ||||
-rw-r--r-- | PKGBUILD | 65 | ||||
-rw-r--r-- | pl-0001-Use-C-23-standard.patch | 6 | ||||
-rw-r--r-- | pl-0002-makepkg-Remove-extraneous-compiler-flags.patch | 25 |
6 files changed, 104 insertions, 127 deletions
@@ -1,6 +1,6 @@ pkgbase = imhex-git pkgdesc = A Hex Editor for Reverse Engineers, Programmers and people that value their eye sight when working at 3 AM - pkgver = 1.28.0.r73.gb0028b0e + pkgver = 1.31.0.r53.g5a71cc2d pkgrel = 1 url = https://imhex.werwolv.net arch = x86_64 @@ -11,9 +11,10 @@ pkgbase = imhex-git makedepends = nlohmann-json makedepends = librsvg makedepends = python + makedepends = cli11 + makedepends = dotnet-runtime depends = glfw depends = mbedtls - depends = libssh2 depends = curl depends = dbus depends = freetype2 @@ -22,20 +23,24 @@ pkgbase = imhex-git depends = xdg-desktop-portal depends = fmt depends = yara - optdepends = imhex-patterns-git: ImHex base patterns + optdepends = dotnet-runtime: support for .NET scripts provides = imhex + provides = imhex-patterns conflicts = imhex + conflicts = imhex-patterns-git options = !lto options = !strip source = imhex-git::git+https://github.com/WerWolv/ImHex.git source = nativefiledialog::git+https://github.com/btzy/nativefiledialog-extended.git source = xdgpp::git+https://git.sr.ht/~danyspin97/xdgpp source = libromfs::git+https://github.com/WerWolv/libromfs - source = capstone::git+https://github.com/capstone-engine/capstone#branch=next + source = capstone::git+https://github.com/capstone-engine/capstone source = libwolv::git+https://github.com/WerWolv/libwolv source = pattern_language::git+https://github.com/WerWolv/PatternLanguage - source = 0001-makepkg-Fix-compiler-check.patch + source = imhex-patterns::git+https://github.com/WerWolv/ImHex-Patterns + source = 0001-fix-cmake-Fix-when-multiple-.NET-packages-are-instal.patch source = pl-0001-Use-C-23-standard.patch + source = pl-0002-makepkg-Remove-extraneous-compiler-flags.patch sha256sums = SKIP sha256sums = SKIP sha256sums = SKIP @@ -43,8 +48,11 @@ pkgbase = imhex-git sha256sums = SKIP sha256sums = SKIP sha256sums = SKIP - sha256sums = 43bdbbb6edf567201fa52f1c695f77fea9a27dd5c62de615ef74d64a5e676a98 - sha256sums = 4c3e667d40eabe2a5ea724125c69f73bcb6774c01db9ad97bc6b633e1c284fc5 + sha256sums = SKIP + sha256sums = 6db78e5899e4ed3eb9170cb30f321706e8f8c7531b38ebf43a1e6595e6f9fc18 + sha256sums = 9fad69a15f24d932353c1500a885640031699265dcced403d2c8e97e581274e3 + sha256sums = 1d45242b1090daeec4b028e64598b678a2099af4ec82ab71040082c24520f314 + b2sums = SKIP b2sums = SKIP b2sums = SKIP b2sums = SKIP @@ -52,7 +60,8 @@ pkgbase = imhex-git b2sums = SKIP b2sums = SKIP b2sums = SKIP - b2sums = 99e8c5fb5dc0ad07039731c3245bec097de25e675be0f5c52c799738d794ee26df6506adf34fac42663dd39f1c84e7e1675aac5b2f47ef4f2d5ebb903ad4b3a3 - b2sums = ca3779e974709fa15e55255973eb2ff34fb21251c9f8b00c5b2efcfb175add34b503063984589c8d716b650a9543aa19dc2185b2f531ab8d4363635724114199 + b2sums = d393cc7a6aa26fabac6ede2e435b6df1a334c74ba981af902bcfbb77841f89dba2f110c7e025ef20a808d10fda4865c7d1ed28a39debccb1e1f797765c7bb1ee + b2sums = d9967d5d82b3457fe3065dd3aa69887a4f07d2c74afd686250065bf438677e1b26801c9d2b5795003b22c1224c4447864559248a29bfd34a9af2bb637bc1d515 + b2sums = 4b38b83a9c70a05f119e2d7704ca0721ac755dda05f1f23f81e5c2d41751ea2db8212b537db133d5ab75eee7c858f103ca5825ab182b3b53c35e59278fbed527 pkgname = imhex-git diff --git a/0001-fix-cmake-Fix-when-multiple-.NET-packages-are-instal.patch b/0001-fix-cmake-Fix-when-multiple-.NET-packages-are-instal.patch new file mode 100644 index 000000000000..8d417167076b --- /dev/null +++ b/0001-fix-cmake-Fix-when-multiple-.NET-packages-are-instal.patch @@ -0,0 +1,26 @@ +From c982ce67525c28554dacd03e697f034510d84e3f Mon Sep 17 00:00:00 2001 +From: KokaKiwi <kokakiwi+git@kokakiwi.net> +Date: Tue, 26 Sep 2023 14:52:25 +0200 +Subject: [PATCH] fix(cmake): Fix when multiple .NET packages are installed + +--- + cmake/modules/FindCoreClrEmbed.cmake | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/cmake/modules/FindCoreClrEmbed.cmake b/cmake/modules/FindCoreClrEmbed.cmake +index 41ea53a7..145b71d7 100644 +--- a/cmake/modules/FindCoreClrEmbed.cmake ++++ b/cmake/modules/FindCoreClrEmbed.cmake +@@ -49,7 +49,8 @@ endif() + set(CoreClrEmbed_ROOT_PATH "${CORECLR_RUNTIME_ROOT_PATH}") + + +-file(GLOB _CORECLR_HOST_ARCH_PATH "${CORECLR_RUNTIME_ROOT_PATH}/packs/Microsoft.NETCore.App.Host.*-${CORECLR_SUBARCH}") ++file(GLOB _CORECLR_HOST_ARCH_PATH_LIST "${CORECLR_RUNTIME_ROOT_PATH}/packs/Microsoft.NETCore.App.Host.*-${CORECLR_SUBARCH}") ++list(POP_FRONT _CORECLR_HOST_ARCH_PATH_LIST _CORECLR_HOST_ARCH_PATH) + if (_CORECLR_HOST_ARCH_PATH) + get_filename_component(_CORECLR_HOST_ARCH_FILENAME ${_CORECLR_HOST_ARCH_PATH} NAME) + string(REPLACE "Microsoft.NETCore.App.Host." "" _CORECLR_COMPUTED_ARCH "${_CORECLR_HOST_ARCH_FILENAME}") +-- +2.42.0 + diff --git a/0001-makepkg-Fix-compiler-check.patch b/0001-makepkg-Fix-compiler-check.patch deleted file mode 100644 index 6a870a396317..000000000000 --- a/0001-makepkg-Fix-compiler-check.patch +++ /dev/null @@ -1,82 +0,0 @@ -From 935af505d61e4f7e2324cd34833d24e6f789e61a Mon Sep 17 00:00:00 2001 -From: KokaKiwi <kokakiwi+git@kokakiwi.net> -Date: Mon, 14 Nov 2022 11:58:59 +0100 -Subject: [PATCH] makepkg: Fix compiler check - ---- - cmake/build_helpers.cmake | 23 +++++++++++++---------- - 1 file changed, 13 insertions(+), 10 deletions(-) - -diff --git a/cmake/build_helpers.cmake b/cmake/build_helpers.cmake -index 0227511b..048e350c 100644 ---- a/cmake/build_helpers.cmake -+++ b/cmake/build_helpers.cmake -@@ -238,27 +238,27 @@ macro(createPackage) - elseif(UNIX AND NOT APPLE) - - set_target_properties(libimhex PROPERTIES SOVERSION ${IMHEX_VERSION}) -- -+ - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/dist/DEBIAN/control.in ${CMAKE_BINARY_DIR}/DEBIAN/control) -- -+ - install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE DESTINATION ${CMAKE_INSTALL_PREFIX}/share/licenses/imhex) - install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/dist/imhex.desktop DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications) - install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/resources/icon.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/pixmaps RENAME imhex.png) - install(FILES "$<TARGET_FILE:libimhex>" DESTINATION "${CMAKE_INSTALL_LIBDIR}" PERMISSIONS ${LIBRARY_PERMISSIONS}) - downloadImHexPatternsFiles("./share/imhex") -- -+ - # install AppStream file - install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/dist/net.werwolv.imhex.metainfo.xml DESTINATION ${CMAKE_INSTALL_PREFIX}/share/metainfo) -- -+ - # install symlink for the old standard name - file(CREATE_LINK net.werwolv.imhex.metainfo.xml ${CMAKE_CURRENT_BINARY_DIR}/net.werwolv.imhex.appdata.xml SYMBOLIC) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/net.werwolv.imhex.appdata.xml DESTINATION ${CMAKE_INSTALL_PREFIX}/share/metainfo) - - endif() -- -+ - if (CREATE_BUNDLE) - include(PostprocessBundle) -- -+ - set_target_properties(libimhex PROPERTIES SOVERSION ${IMHEX_VERSION}) - - set_property(TARGET main PROPERTY MACOSX_BUNDLE_INFO_PLIST ${MACOSX_BUNDLE_INFO_PLIST}) -@@ -271,7 +271,7 @@ macro(createPackage) - add_custom_target(build-time-make-resources-directory ALL COMMAND ${CMAKE_COMMAND} -E make_directory "${IMHEX_BUNDLE_PATH}/Contents/Resources") - - downloadImHexPatternsFiles("${IMHEX_BUNDLE_PATH}/Contents/MacOS") -- -+ - install(FILES ${IMHEX_ICON} DESTINATION "${IMHEX_BUNDLE_PATH}/Contents/Resources") - install(TARGETS main BUNDLE DESTINATION ".") - install(FILES $<TARGET_FILE:main> DESTINATION "${IMHEX_BUNDLE_PATH}") -@@ -391,8 +391,11 @@ function(downloadImHexPatternsFiles dest) - endfunction() - - macro(setupCompilerWarnings target) -- set(IMHEX_COMMON_FLAGS "-Wall -Wextra -Wpedantic -Werror") -- set(IMHEX_C_FLAGS "${IMHEX_COMMON_FLAGS} -Wno-restrict -Wno-stringop-overread -Wno-stringop-overflow -Wno-array-bounds") -+ set(IMHEX_C_FLAGS "") -+ -+ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") -+ set(IMHEX_C_FLAGS "${IMHEX_C_FLAGS} -Wno-restrict -Wno-stringop-overread -Wno-stringop-overflow -Wno-array-bounds") -+ endif() - - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${IMHEX_C_FLAGS}") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${IMHEX_C_FLAGS}") -@@ -406,7 +409,7 @@ macro(setUninstallTarget) - "${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in" - "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" - IMMEDIATE @ONLY) -- -+ - add_custom_target(uninstall - COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) - endif() --- -2.40.0 - @@ -8,30 +8,32 @@ # NOTE : This PKGBUILD is a copy of https://aur.archlinux.org/packages/imhex (maintained by KokaKiwi) with trivial modifications to fetch the latest commit. pkgname=imhex-git -pkgver=1.28.0.r73.gb0028b0e +pkgver=1.31.0.r53.g5a71cc2d pkgrel=1 pkgdesc='A Hex Editor for Reverse Engineers, Programmers and people that value their eye sight when working at 3 AM' url='https://imhex.werwolv.net' license=('GPL2') arch=('x86_64') -depends=('glfw' 'mbedtls' 'libssh2' 'curl' 'dbus' +depends=('glfw' 'mbedtls' 'curl' 'dbus' 'freetype2' 'file' 'hicolor-icon-theme' 'xdg-desktop-portal' 'fmt' 'yara') -makedepends=('git' 'cmake' 'llvm' 'nlohmann-json' 'librsvg' 'python') -optdepends=( - 'imhex-patterns-git: ImHex base patterns' -) -provides=(imhex) -conflicts=(imhex) +makedepends=('git' 'cmake' + 'llvm' 'nlohmann-json' 'librsvg' + 'python' 'cli11' 'dotnet-runtime') +optdepends=('dotnet-runtime: support for .NET scripts') +provides=('imhex' 'imhex-patterns') +conflicts=('imhex' 'imhex-patterns-git') source=("$pkgname::git+https://github.com/WerWolv/ImHex.git" "nativefiledialog::git+https://github.com/btzy/nativefiledialog-extended.git" "xdgpp::git+https://git.sr.ht/~danyspin97/xdgpp" "libromfs::git+https://github.com/WerWolv/libromfs" - "capstone::git+https://github.com/capstone-engine/capstone#branch=next" + "capstone::git+https://github.com/capstone-engine/capstone" "libwolv::git+https://github.com/WerWolv/libwolv" "pattern_language::git+https://github.com/WerWolv/PatternLanguage" - 0001-makepkg-Fix-compiler-check.patch - pl-0001-Use-C-23-standard.patch) + "imhex-patterns::git+https://github.com/WerWolv/ImHex-Patterns" + 0001-fix-cmake-Fix-when-multiple-.NET-packages-are-instal.patch + pl-0001-Use-C-23-standard.patch + pl-0002-makepkg-Remove-extraneous-compiler-flags.patch) sha256sums=('SKIP' 'SKIP' 'SKIP' @@ -39,8 +41,10 @@ sha256sums=('SKIP' 'SKIP' 'SKIP' 'SKIP' - '43bdbbb6edf567201fa52f1c695f77fea9a27dd5c62de615ef74d64a5e676a98' - '4c3e667d40eabe2a5ea724125c69f73bcb6774c01db9ad97bc6b633e1c284fc5') + 'SKIP' + '6db78e5899e4ed3eb9170cb30f321706e8f8c7531b38ebf43a1e6595e6f9fc18' + '9fad69a15f24d932353c1500a885640031699265dcced403d2c8e97e581274e3' + '1d45242b1090daeec4b028e64598b678a2099af4ec82ab71040082c24520f314') b2sums=('SKIP' 'SKIP' 'SKIP' @@ -48,8 +52,10 @@ b2sums=('SKIP' 'SKIP' 'SKIP' 'SKIP' - '99e8c5fb5dc0ad07039731c3245bec097de25e675be0f5c52c799738d794ee26df6506adf34fac42663dd39f1c84e7e1675aac5b2f47ef4f2d5ebb903ad4b3a3' - 'ca3779e974709fa15e55255973eb2ff34fb21251c9f8b00c5b2efcfb175add34b503063984589c8d716b650a9543aa19dc2185b2f531ab8d4363635724114199') + 'SKIP' + 'd393cc7a6aa26fabac6ede2e435b6df1a334c74ba981af902bcfbb77841f89dba2f110c7e025ef20a808d10fda4865c7d1ed28a39debccb1e1f797765c7bb1ee' + 'd9967d5d82b3457fe3065dd3aa69887a4f07d2c74afd686250065bf438677e1b26801c9d2b5795003b22c1224c4447864559248a29bfd34a9af2bb637bc1d515' + '4b38b83a9c70a05f119e2d7704ca0721ac755dda05f1f23f81e5c2d41751ea2db8212b537db133d5ab75eee7c858f103ca5825ab182b3b53c35e59278fbed527') options=(!lto !strip) pkgver() { @@ -64,7 +70,7 @@ prepare() { for name in nativefiledialog xdgpp libromfs capstone libwolv pattern_language; do git config submodule.lib/external/$name.url "$srcdir/$name" done - for name in fmt curl yara/yara; do + for name in fmt yara/yara; do git config --remove-section submodule.lib/external/$name done git -c protocol.file.allow=always submodule update @@ -77,10 +83,11 @@ prepare() { submodule update git apply \ - "$srcdir/0001-makepkg-Fix-compiler-check.patch" + "$srcdir/0001-fix-cmake-Fix-when-multiple-.NET-packages-are-instal.patch" git -C lib/external/pattern_language apply \ - "$srcdir/pl-0001-Use-C-23-standard.patch" + "$srcdir/pl-0001-Use-C-23-standard.patch" \ + "$srcdir/pl-0002-makepkg-Remove-extraneous-compiler-flags.patch" } build() { @@ -94,32 +101,27 @@ build() { -D IMHEX_OFFLINE_BUILD=ON \ -D IMHEX_IGNORE_BAD_CLONE=ON \ -D IMHEX_STRIP_RELEASE=OFF \ + -D IMHEX_STRICT_WARNINGS=OFF \ + -D IMHEX_BUNDLE_DOTNET=OFF \ -D USE_SYSTEM_LLVM=ON \ -D USE_SYSTEM_YARA=ON \ -D USE_SYSTEM_FMT=ON \ - -D USE_SYSTEM_CURL=ON \ -D USE_SYSTEM_NLOHMANN_JSON=ON \ -D USE_SYSTEM_CAPSTONE=OFF \ - -D LIBPL_ENABLE_CLI=OFF + -D IMHEX_VERSION="$pkgver" cmake --build build } package() { - # Executable - install -Dm0755 build/imhex "$pkgdir/usr/bin/imhex" - - # Shared lib and plugins - install -Dm0755 -t "$pkgdir/usr/lib" build/lib/libimhex/libimhex.so - - for plugin in builtin; do - install -Dm0755 -t "$pkgdir/usr/lib/imhex/plugins" "build/plugins/$plugin.hexplug" - done + DESTDIR="$pkgdir" cmake --install build + # Patterns install -dm0755 "$pkgdir/usr/share/imhex" + cp -r -t "$pkgdir/usr/share/imhex" \ + "$srcdir/imhex-patterns"/{constants,encodings,includes,magic,patterns,themes,tips} # Desktop file(s) - install -Dm0644 -t "$pkgdir/usr/share/applications" "$pkgname/dist/imhex.desktop" install -Dm0644 "$pkgname/resources/icon.svg" "$pkgdir/usr/share/icons/hicolor/scalable/apps/imhex.svg" for size in 32 48 64 128 256; do install -dm0755 "$pkgdir/usr/share/icons/hicolor/${size}x${size}/apps" @@ -127,9 +129,6 @@ package() { "$pkgname/resources/icon.svg" done - # License - install -Dm0644 "$pkgname/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" - # Documentation install -Dm0644 -t "$pkgdir/usr/share/doc/$pkgname" \ "$pkgname/README.md" diff --git a/pl-0001-Use-C-23-standard.patch b/pl-0001-Use-C-23-standard.patch index 225c1c0b8874..179cd30adcf7 100644 --- a/pl-0001-Use-C-23-standard.patch +++ b/pl-0001-Use-C-23-standard.patch @@ -1,4 +1,4 @@ -From 5ca59e77063effc934988c16301dbc7ac821755e Mon Sep 17 00:00:00 2001 +From 9abb10e5a8aeb1fea1f3feaff56b89fcae0cf3a8 Mon Sep 17 00:00:00 2001 From: KokaKiwi <kokakiwi+git@kokakiwi.net> Date: Thu, 18 Aug 2022 00:57:02 +0200 Subject: [PATCH 1/2] Use C++23 standard @@ -8,7 +8,7 @@ Subject: [PATCH 1/2] Use C++23 standard 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt -index f7e8c68..e1a1384 100644 +index dab1499..8bb2cfa 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -1,4 +1,4 @@ @@ -18,5 +18,5 @@ index f7e8c68..e1a1384 100644 set(CMAKE_CXX_STANDARD 23) -- -2.40.0 +2.42.0 diff --git a/pl-0002-makepkg-Remove-extraneous-compiler-flags.patch b/pl-0002-makepkg-Remove-extraneous-compiler-flags.patch new file mode 100644 index 000000000000..da14455a966d --- /dev/null +++ b/pl-0002-makepkg-Remove-extraneous-compiler-flags.patch @@ -0,0 +1,25 @@ +From f7502522f865185717c74308070739d3255d579e Mon Sep 17 00:00:00 2001 +From: KokaKiwi <kokakiwi+git@kokakiwi.net> +Date: Sat, 17 Sep 2022 16:27:17 +0200 +Subject: [PATCH 2/2] makepkg: Remove extraneous compiler flags + +--- + lib/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt +index 8bb2cfa..74ed841 100644 +--- a/lib/CMakeLists.txt ++++ b/lib/CMakeLists.txt +@@ -71,7 +71,7 @@ add_library(libpl ${LIBRARY_TYPE} + ) + + if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") +- target_compile_options(libpl PRIVATE -Wall -Wextra -Werror -Wpedantic -Wno-unknown-pragmas -Wno-array-bounds) ++ target_compile_options(libpl PRIVATE -Wno-unknown-pragmas -Wno-array-bounds) + if(CMAKE_CXX_COMPILER_ID MATCHES "GNU") + target_compile_options(libpl PRIVATE -Wno-stringop-overflow) + endif() +-- +2.42.0 + |