Github messages for voidlinux
 help / color / mirror / Atom feed
From: classabbyamp <classabbyamp@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] New package: imhex-1.19.1
Date: Wed, 03 Aug 2022 18:59:12 +0200	[thread overview]
Message-ID: <20220803165912.7g1aGSkn3e0dkzMtdSDEVxYwR5CVLO0wDcOMyFdDm8c@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-36967@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 942 bytes --]

There is an updated pull request by classabbyamp against master on the void-packages repository

https://github.com/classabbyamp/void-packages new/imhex
https://github.com/void-linux/void-packages/pull/36967

New package: imhex-1.19.1
closes #36954

This template will be able to be cleaned up a bit once capstone v5 is released (currently at rc2).

most of the arch limitations have been informed by [alpine's template](https://git.alpinelinux.org/aports/tree/testing/imhex/APKBUILD)

v1.19.2 and further will not be packagable until GCC is updated, as upstream has decided to move to C++23.

#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**



A patch file from https://github.com/void-linux/void-packages/pull/36967.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-new/imhex-36967.patch --]
[-- Type: text/x-diff, Size: 7132 bytes --]

From 486c38fd7ce819ad6ab3796698cb4f7a8f0ff087 Mon Sep 17 00:00:00 2001
From: classabbyamp <dev@placeviolette.net>
Date: Tue, 3 May 2022 02:27:08 -0400
Subject: [PATCH] New package: imhex-1.19.1

closes #36954
---
 srcpkgs/imhex-patterns                    |  1 +
 srcpkgs/imhex/patches/no-Werror.patch     | 37 +++++++++++++++
 srcpkgs/imhex/patches/offline-build.patch | 58 +++++++++++++++++++++++
 srcpkgs/imhex/template                    | 52 ++++++++++++++++++++
 4 files changed, 148 insertions(+)
 create mode 120000 srcpkgs/imhex-patterns
 create mode 100644 srcpkgs/imhex/patches/no-Werror.patch
 create mode 100644 srcpkgs/imhex/patches/offline-build.patch
 create mode 100644 srcpkgs/imhex/template

diff --git a/srcpkgs/imhex-patterns b/srcpkgs/imhex-patterns
new file mode 120000
index 000000000000..9f335cad9f82
--- /dev/null
+++ b/srcpkgs/imhex-patterns
@@ -0,0 +1 @@
+imhex
\ No newline at end of file
diff --git a/srcpkgs/imhex/patches/no-Werror.patch b/srcpkgs/imhex/patches/no-Werror.patch
new file mode 100644
index 000000000000..0dcc3eded0da
--- /dev/null
+++ b/srcpkgs/imhex/patches/no-Werror.patch
@@ -0,0 +1,37 @@
+--- a/lib/libimhex/CMakeLists.txt
++++ b/lib/libimhex/CMakeLists.txt
+@@ -149,7 +149,7 @@
+ 
+ add_library(libimhex SHARED ${LIBIMHEX_SOURCES})
+ set_target_properties(libimhex PROPERTIES POSITION_INDEPENDENT_CODE ON)
+-target_compile_options(libimhex PRIVATE -Wall -Wextra -Werror)
++target_compile_options(libimhex PRIVATE -Wall -Wextra)
+ 
+ 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_link_directories(libimhex PUBLIC ${MBEDTLS_LIBRARY_DIR} ${CAPSTONE_LIBRARY_DIRS} ${MAGIC_LIBRARY_DIRS})
+--- a/main/CMakeLists.txt
++++ b/main/CMakeLists.txt
+@@ -15,7 +15,7 @@
+ )
+ 
+ target_include_directories(main PUBLIC include)
+-target_compile_options(main PRIVATE -Wall -Wextra -Werror)
++target_compile_options(main PRIVATE -Wall -Wextra)
+ 
+ set_target_properties(main PROPERTIES
+         OUTPUT_NAME "imhex"
+@@ -33,4 +33,4 @@
+ 
+ if (APPLE)
+     add_compile_definitions(GL_SILENCE_DEPRECATION)
+-endif ()
+\ No newline at end of file
++endif ()
+--- a/plugins/builtin/CMakeLists.txt
++++ b/plugins/builtin/CMakeLists.txt
+@@ -75,4 +75,4 @@
+ 
+ add_compile_definitions(IMHEX_PROJECT_NAME="${PROJECT_NAME}")
+ set_target_properties(${PROJECT_NAME} PROPERTIES POSITION_INDEPENDENT_CODE ON)
+-target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wextra -Werror)
++target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wextra)
diff --git a/srcpkgs/imhex/patches/offline-build.patch b/srcpkgs/imhex/patches/offline-build.patch
new file mode 100644
index 000000000000..4aa26ac5678c
--- /dev/null
+++ b/srcpkgs/imhex/patches/offline-build.patch
@@ -0,0 +1,58 @@
+From a57fa34f82d8c2c3305dc862b6b27e0d4f8394f8 Mon Sep 17 00:00:00 2001
+From: WerWolv <werwolv98@gmail.com>
+Date: Fri, 8 Jul 2022 14:17:22 +0200
+Subject: [PATCH] build: Added option for Offline builds
+
+---
+ CMakeLists.txt            |  2 ++
+ cmake/build_helpers.cmake | 22 ++++++++++++----------
+ 2 files changed, 14 insertions(+), 10 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index cfddb10612e..1cabaa6d4ab 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -10,6 +10,8 @@ set(IMHEX_BASE_FOLDER ${CMAKE_CURRENT_SOURCE_DIR})
+ set(CMAKE_MODULE_PATH "${IMHEX_BASE_FOLDER}/cmake/modules")
+ include("${IMHEX_BASE_FOLDER}/cmake/build_helpers.cmake")
+ 
++option(IMHEX_OFFLINE_BUILD "Enable offline build" OFF)
++
+ # Make sure project is configured correctly
+ setDefaultBuiltTypeIfUnset()
+ detectBadClone()
+diff --git a/cmake/build_helpers.cmake b/cmake/build_helpers.cmake
+index e50b026c9b4..366aba89163 100644
+--- a/cmake/build_helpers.cmake
++++ b/cmake/build_helpers.cmake
+@@ -290,17 +290,19 @@ endmacro()
+ 
+ 
+ function(downloadImHexPatternsFiles dest)
+-    FetchContent_Declare(
+-        imhex_patterns
+-        GIT_REPOSITORY https://github.com/WerWolv/ImHex-Patterns.git
+-        GIT_TAG master
+-    )
++    if (NOT IMHEX_OFFLINE_BUILD)
++        FetchContent_Declare(
++            imhex_patterns
++            GIT_REPOSITORY https://github.com/WerWolv/ImHex-Patterns.git
++            GIT_TAG master
++        )
+ 
+-    FetchContent_Populate(imhex_patterns)
++        FetchContent_Populate(imhex_patterns)
+ 
+-    set(PATTERNS_FOLDERS_TO_INSTALL constants encodings includes patterns magic)
+-    foreach (FOLDER ${PATTERNS_FOLDERS_TO_INSTALL})
+-        install(DIRECTORY "${imhex_patterns_SOURCE_DIR}/${FOLDER}" DESTINATION ${dest})
+-    endforeach()
++        set(PATTERNS_FOLDERS_TO_INSTALL constants encodings includes patterns magic)
++        foreach (FOLDER ${PATTERNS_FOLDERS_TO_INSTALL})
++            install(DIRECTORY "${imhex_patterns_SOURCE_DIR}/${FOLDER}" DESTINATION ${dest})
++        endforeach ()
++    endif ()
+ 
+ endfunction()
+\ No newline at end of file
diff --git a/srcpkgs/imhex/template b/srcpkgs/imhex/template
new file mode 100644
index 000000000000..3cdcbc8e05d5
--- /dev/null
+++ b/srcpkgs/imhex/template
@@ -0,0 +1,52 @@
+# Template file for 'imhex'
+# TODO: when capstone v5 is out, -DUSE_SYSTEM_CAPSTONE=ON
+pkgname=imhex
+# cannot update further until gcc is updated
+version=1.19.1
+revision=1
+_patterns_version=48dd8f68ca04f56a6111b4c0e936648f271638de
+create_wrksrc=yes
+build_wrksrc="ImHex"
+build_style=cmake
+configure_args="-DIMHEX_OFFLINE_BUILD=ON -DUSE_SYSTEM_CURL=ON -DUSE_SYSTEM_FMT=ON
+ -DUSE_SYSTEM_LLVM=ON -DUSE_SYSTEM_YARA=ON -DUSE_SYSTEM_NLOHMANN_JSON=ON"
+hostmakedepends="pkg-config clang-tools-extra"
+makedepends="libcurl-devel fmt-devel llvm12 jansson-devel yara-devel json-c++
+ freetype-devel glfw-devel gtk+3-devel python3-devel file-devel mbedtls-devel"
+short_desc="Hex editor for reverse engineers and programmers"
+maintainer="classabbyamp <dev@placeviolette.net>"
+license="GPL-2.0-or-later"
+homepage="https://imhex.werwolv.net/"
+changelog="https://github.com/WerWolv/ImHex/releases"
+distfiles="https://github.com/WerWolv/ImHex/releases/download/v${version}/Full.Sources.tar.gz>imhex-${version}.tar.gz
+ https://github.com/WerWolv/ImHex-Patterns/archive/${_patterns_version}.tar.gz"
+checksum="b6f1195986402bae72c3776fb092ebfe6adf4365939e1744b29d29e49039042e
+ d456f564247c012ec8bd6c8ec06d5714ece824380f806276fd30a1b0e310ac0e"
+
+patch_args="-Np1 -d $build_wrksrc"
+ignore_elf_files="/usr/share/imhex/plugins/builtin.hexplug"
+
+# cmake can't deal with clang-tools-extra stuff (sancov)
+nocross=yes
+
+if [ "$XBPS_TARGET_WORDSIZE" = 32 ]; then
+	broken="uses i128"
+fi
+
+do_check() {
+	cd build
+	ninja ${makejobs} unit_tests
+	# StoreAPI, TipsAPI, ContentAPI tests are flaky
+	ctest ${makejobs} -E '^.*API$'
+}
+
+imhex-patterns_package() {
+	short_desc+=" - patterns and magic files"
+	depends="imhex"
+	pkg_install() {
+		vmkdir usr/share/imhex
+		for d in constants includes magic patterns tips; do
+			vcopy $wrksrc/ImHex-Patterns-${_patterns_version}/$d usr/share/imhex
+		done
+	}
+}

  parent reply	other threads:[~2022-08-03 16:59 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-03  6:28 [PR PATCH] New package: imhex-1.17.0 classabbyamp
2022-05-03  6:54 ` [PR PATCH] [Updated] " classabbyamp
2022-05-03  7:06 ` classabbyamp
2022-05-03  7:14 ` classabbyamp
2022-05-03 12:38 ` dmarto
2022-05-03 17:09 ` [PR PATCH] [Updated] " classabbyamp
2022-05-03 17:09 ` classabbyamp
2022-05-07 20:58 ` [PR PATCH] [Updated] " classabbyamp
2022-05-17 17:07 ` classabbyamp
2022-05-28  6:56 ` classabbyamp
2022-05-28 19:43 ` classabbyamp
2022-05-28 19:52 ` classabbyamp
2022-05-28 20:11 ` classabbyamp
2022-06-04 15:31 ` [PR PATCH] [Updated] New package: imhex-1.18.1 classabbyamp
2022-06-04 19:48 ` classabbyamp
2022-06-23 22:35 ` New package: imhex-1.18.2 iTrooz
2022-06-23 22:58 ` classabbyamp
2022-07-05 15:00 ` [PR PATCH] [Updated] " classabbyamp
2022-07-07 15:58 ` classabbyamp
2022-07-18  5:20 ` [PR PATCH] [Updated] New package: imhex-1.19.1 classabbyamp
2022-08-03 15:52 ` classabbyamp
2022-08-03 15:52 ` classabbyamp
2022-08-03 16:14 ` classabbyamp
2022-08-03 16:32 ` classabbyamp
2022-08-03 16:59 ` classabbyamp [this message]
2022-11-02  2:13 ` github-actions
2022-12-19  1:36 ` [PR PATCH] [Updated] New package: imhex-1.25.0 classabbyamp
2022-12-19  6:28 ` classabbyamp
2022-12-19  7:33 ` classabbyamp
2022-12-19  7:52 ` classabbyamp
2022-12-19  7:57 ` classabbyamp
2022-12-20 22:55 ` [PR PATCH] [Merged]: " classabbyamp
2022-12-22  0:16 ` iTrooz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220803165912.7g1aGSkn3e0dkzMtdSDEVxYwR5CVLO0wDcOMyFdDm8c@z \
    --to=classabbyamp@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).