git: f7694584ff4f - main - sysutils/elfx86exts: new port

From: Kurt Jaeger <pi_at_FreeBSD.org>
Date: Mon, 20 May 2024 06:54:35 UTC
The branch main has been updated by pi:

URL: https://cgit.FreeBSD.org/ports/commit/?id=f7694584ff4fb96f3b89df63e660281bba7145ec

commit f7694584ff4fb96f3b89df63e660281bba7145ec
Author:     Jamie Landeg-Jones <jamie@catflap.org>
AuthorDate: 2024-05-20 06:52:03 +0000
Commit:     Kurt Jaeger <pi@FreeBSD.org>
CommitDate: 2024-05-20 06:54:27 +0000

    sysutils/elfx86exts: new port
    
    Disassemble a binary and print out which instruction set extensions it uses.
    
    Despite the utterly misleading name, this tool supports ELF and MachO
    binaries, and perhaps other formats as well, and has preliminary
    support for ARM64 as well as X86/64.
    
    PR:             277939
    Author:    Jamie Landeg-Jones <jamie@catflap.org>
    Date:      Mon May 20 08:52:03 2024 +0200
---
 sysutils/Makefile             |   1 +
 sysutils/elfx86exts/Makefile  |  89 +++++++++++++++++++++++++++
 sysutils/elfx86exts/distinfo  | 139 ++++++++++++++++++++++++++++++++++++++++++
 sysutils/elfx86exts/pkg-descr |   6 ++
 4 files changed, 235 insertions(+)

diff --git a/sysutils/Makefile b/sysutils/Makefile
index 72ba1aa6cf5c..4aa471ac7af0 100644
--- a/sysutils/Makefile
+++ b/sysutils/Makefile
@@ -367,6 +367,7 @@
     SUBDIR += egress-monitor
     SUBDIR += eject
     SUBDIR += eksctl
+    SUBDIR += elfx86exts
     SUBDIR += endian
     SUBDIR += enteruser
     SUBDIR += entr
diff --git a/sysutils/elfx86exts/Makefile b/sysutils/elfx86exts/Makefile
new file mode 100644
index 000000000000..ca88fd8b200b
--- /dev/null
+++ b/sysutils/elfx86exts/Makefile
@@ -0,0 +1,89 @@
+PORTNAME=	elfx86exts
+DISTVERSIONPREFIX=	${PORTNAME}@
+DISTVERSION=	0.6.2
+CATEGORIES=	sysutils
+
+MAINTAINER=	jamie@catflap.org
+COMMENT=	Decode binaries and show which instruction set extensions they use
+WWW=		https://github.com/pkgw/elfx86exts
+
+LICENSE=	MIT
+
+USES=		cargo
+USE_GITHUB=	yes
+GH_ACCOUNT=	pkgw
+
+CARGO_CRATES=	adler-1.0.2 \
+		anstream-0.6.4 \
+		anstyle-1.0.4 \
+		anstyle-parse-0.2.2 \
+		anstyle-query-1.0.0 \
+		anstyle-wincon-3.0.1 \
+		assert_cmd-2.0.12 \
+		bstr-1.7.0 \
+		byteorder-1.5.0 \
+		capstone-0.11.0 \
+		capstone-sys-0.15.0 \
+		cc-1.0.83 \
+		cfg-if-1.0.0 \
+		clap-4.4.6 \
+		clap_builder-4.4.6 \
+		clap_derive-4.4.2 \
+		clap_lex-0.5.1 \
+		colorchoice-1.0.0 \
+		crc32fast-1.3.2 \
+		difflib-0.4.0 \
+		doc-comment-0.3.3 \
+		either-1.9.0 \
+		escargot-0.5.8 \
+		flate2-1.0.27 \
+		heck-0.4.1 \
+		itertools-0.11.0 \
+		itoa-1.0.9 \
+		libc-0.2.149 \
+		log-0.4.20 \
+		memchr-2.6.4 \
+		memmap-0.7.0 \
+		miniz_oxide-0.7.1 \
+		object-0.32.1 \
+		once_cell-1.18.0 \
+		predicates-3.0.4 \
+		predicates-core-1.0.6 \
+		predicates-tree-1.0.9 \
+		proc-macro2-1.0.69 \
+		quote-1.0.33 \
+		regex-automata-0.4.1 \
+		ruzstd-0.4.0 \
+		ryu-1.0.15 \
+		serde-1.0.188 \
+		serde_derive-1.0.188 \
+		serde_json-1.0.107 \
+		static_assertions-1.1.0 \
+		strsim-0.10.0 \
+		syn-1.0.109 \
+		syn-2.0.38 \
+		termtree-0.4.1 \
+		thiserror-core-1.0.38 \
+		thiserror-core-impl-1.0.38 \
+		twox-hash-1.6.3 \
+		unicode-ident-1.0.12 \
+		utf8parse-0.2.1 \
+		wait-timeout-0.2.0 \
+		winapi-0.3.9 \
+		winapi-i686-pc-windows-gnu-0.4.0 \
+		winapi-x86_64-pc-windows-gnu-0.4.0 \
+		windows-sys-0.48.0 \
+		windows-targets-0.48.5 \
+		windows_aarch64_gnullvm-0.48.5 \
+		windows_aarch64_msvc-0.48.5 \
+		windows_i686_gnu-0.48.5 \
+		windows_i686_msvc-0.48.5 \
+		windows_x86_64_gnu-0.48.5 \
+		windows_x86_64_gnullvm-0.48.5 \
+		windows_x86_64_msvc-0.48.5
+
+WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTNAME}-${DISTVERSION}
+
+PLIST_FILES=	bin/elfx86exts
+
+.include <bsd.port.mk>
diff --git a/sysutils/elfx86exts/distinfo b/sysutils/elfx86exts/distinfo
new file mode 100644
index 000000000000..6fc8c9f7aec4
--- /dev/null
+++ b/sysutils/elfx86exts/distinfo
@@ -0,0 +1,139 @@
+TIMESTAMP = 1710808611
+SHA256 (rust/crates/adler-1.0.2.crate) = f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe
+SIZE (rust/crates/adler-1.0.2.crate) = 12778
+SHA256 (rust/crates/anstream-0.6.4.crate) = 2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44
+SIZE (rust/crates/anstream-0.6.4.crate) = 20593
+SHA256 (rust/crates/anstyle-1.0.4.crate) = 7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87
+SIZE (rust/crates/anstyle-1.0.4.crate) = 13998
+SHA256 (rust/crates/anstyle-parse-0.2.2.crate) = 317b9a89c1868f5ea6ff1d9539a69f45dffc21ce321ac1fd1160dfa48c8e2140
+SIZE (rust/crates/anstyle-parse-0.2.2.crate) = 24696
+SHA256 (rust/crates/anstyle-query-1.0.0.crate) = 5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b
+SIZE (rust/crates/anstyle-query-1.0.0.crate) = 8620
+SHA256 (rust/crates/anstyle-wincon-3.0.1.crate) = f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628
+SIZE (rust/crates/anstyle-wincon-3.0.1.crate) = 11279
+SHA256 (rust/crates/assert_cmd-2.0.12.crate) = 88903cb14723e4d4003335bb7f8a14f27691649105346a0f0957466c096adfe6
+SIZE (rust/crates/assert_cmd-2.0.12.crate) = 25347
+SHA256 (rust/crates/bstr-1.7.0.crate) = c79ad7fb2dd38f3dabd76b09c6a5a20c038fc0213ef1e9afd30eb777f120f019
+SIZE (rust/crates/bstr-1.7.0.crate) = 380090
+SHA256 (rust/crates/byteorder-1.5.0.crate) = 1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b
+SIZE (rust/crates/byteorder-1.5.0.crate) = 23288
+SHA256 (rust/crates/capstone-0.11.0.crate) = 1097e608594dad3bad608295567f757742b883606fe150faf7a9740b849730d8
+SIZE (rust/crates/capstone-0.11.0.crate) = 103100
+SHA256 (rust/crates/capstone-sys-0.15.0.crate) = 2e7f651d5ec4c2a2e6c508f2c8032655003cd728ec85663e9796616990e25b5a
+SIZE (rust/crates/capstone-sys-0.15.0.crate) = 4894588
+SHA256 (rust/crates/cc-1.0.83.crate) = f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0
+SIZE (rust/crates/cc-1.0.83.crate) = 68343
+SHA256 (rust/crates/cfg-if-1.0.0.crate) = baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd
+SIZE (rust/crates/cfg-if-1.0.0.crate) = 7934
+SHA256 (rust/crates/clap-4.4.6.crate) = d04704f56c2cde07f43e8e2c154b43f216dc5c92fc98ada720177362f953b956
+SIZE (rust/crates/clap-4.4.6.crate) = 54823
+SHA256 (rust/crates/clap_builder-4.4.6.crate) = 0e231faeaca65ebd1ea3c737966bf858971cd38c3849107aa3ea7de90a804e45
+SIZE (rust/crates/clap_builder-4.4.6.crate) = 162450
+SHA256 (rust/crates/clap_derive-4.4.2.crate) = 0862016ff20d69b84ef8247369fabf5c008a7417002411897d40ee1f4532b873
+SIZE (rust/crates/clap_derive-4.4.2.crate) = 29019
+SHA256 (rust/crates/clap_lex-0.5.1.crate) = cd7cc57abe963c6d3b9d8be5b06ba7c8957a930305ca90304f24ef040aa6f961
+SIZE (rust/crates/clap_lex-0.5.1.crate) = 11793
+SHA256 (rust/crates/colorchoice-1.0.0.crate) = acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7
+SIZE (rust/crates/colorchoice-1.0.0.crate) = 6857
+SHA256 (rust/crates/crc32fast-1.3.2.crate) = b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d
+SIZE (rust/crates/crc32fast-1.3.2.crate) = 38661
+SHA256 (rust/crates/difflib-0.4.0.crate) = 6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8
+SIZE (rust/crates/difflib-0.4.0.crate) = 7638
+SHA256 (rust/crates/doc-comment-0.3.3.crate) = fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10
+SIZE (rust/crates/doc-comment-0.3.3.crate) = 4123
+SHA256 (rust/crates/either-1.9.0.crate) = a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07
+SIZE (rust/crates/either-1.9.0.crate) = 16660
+SHA256 (rust/crates/escargot-0.5.8.crate) = 768064bd3a0e2bedcba91dc87ace90beea91acc41b6a01a3ca8e9aa8827461bf
+SIZE (rust/crates/escargot-0.5.8.crate) = 20748
+SHA256 (rust/crates/flate2-1.0.27.crate) = c6c98ee8095e9d1dcbf2fcc6d95acccb90d1c81db1e44725c6a984b1dbdfb010
+SIZE (rust/crates/flate2-1.0.27.crate) = 73460
+SHA256 (rust/crates/heck-0.4.1.crate) = 95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8
+SIZE (rust/crates/heck-0.4.1.crate) = 11567
+SHA256 (rust/crates/itertools-0.11.0.crate) = b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57
+SIZE (rust/crates/itertools-0.11.0.crate) = 125074
+SHA256 (rust/crates/itoa-1.0.9.crate) = af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38
+SIZE (rust/crates/itoa-1.0.9.crate) = 10492
+SHA256 (rust/crates/libc-0.2.149.crate) = a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b
+SIZE (rust/crates/libc-0.2.149.crate) = 715592
+SHA256 (rust/crates/log-0.4.20.crate) = b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f
+SIZE (rust/crates/log-0.4.20.crate) = 38307
+SHA256 (rust/crates/memchr-2.6.4.crate) = f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167
+SIZE (rust/crates/memchr-2.6.4.crate) = 94439
+SHA256 (rust/crates/memmap-0.7.0.crate) = 6585fd95e7bb50d6cc31e20d4cf9afb4e2ba16c5846fc76793f11218da9c475b
+SIZE (rust/crates/memmap-0.7.0.crate) = 15214
+SHA256 (rust/crates/miniz_oxide-0.7.1.crate) = e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7
+SIZE (rust/crates/miniz_oxide-0.7.1.crate) = 55194
+SHA256 (rust/crates/object-0.32.1.crate) = 9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0
+SIZE (rust/crates/object-0.32.1.crate) = 275463
+SHA256 (rust/crates/once_cell-1.18.0.crate) = dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d
+SIZE (rust/crates/once_cell-1.18.0.crate) = 32969
+SHA256 (rust/crates/predicates-3.0.4.crate) = 6dfc28575c2e3f19cb3c73b93af36460ae898d426eba6fc15b9bd2a5220758a0
+SIZE (rust/crates/predicates-3.0.4.crate) = 23240
+SHA256 (rust/crates/predicates-core-1.0.6.crate) = b794032607612e7abeb4db69adb4e33590fa6cf1149e95fd7cb00e634b92f174
+SIZE (rust/crates/predicates-core-1.0.6.crate) = 8084
+SHA256 (rust/crates/predicates-tree-1.0.9.crate) = 368ba315fb8c5052ab692e68a0eefec6ec57b23a36959c14496f0b0df2c0cecf
+SIZE (rust/crates/predicates-tree-1.0.9.crate) = 7960
+SHA256 (rust/crates/proc-macro2-1.0.69.crate) = 134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da
+SIZE (rust/crates/proc-macro2-1.0.69.crate) = 44271
+SHA256 (rust/crates/quote-1.0.33.crate) = 5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae
+SIZE (rust/crates/quote-1.0.33.crate) = 28090
+SHA256 (rust/crates/regex-automata-0.4.1.crate) = 465c6fc0621e4abc4187a2bda0937bfd4f722c2730b29562e19689ea796c9a4b
+SIZE (rust/crates/regex-automata-0.4.1.crate) = 616973
+SHA256 (rust/crates/ruzstd-0.4.0.crate) = ac3ffab8f9715a0d455df4bbb9d21e91135aab3cd3ca187af0cd0c3c3f868fdc
+SIZE (rust/crates/ruzstd-0.4.0.crate) = 50778
+SHA256 (rust/crates/ryu-1.0.15.crate) = 1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741
+SIZE (rust/crates/ryu-1.0.15.crate) = 46906
+SHA256 (rust/crates/serde-1.0.188.crate) = cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e
+SIZE (rust/crates/serde-1.0.188.crate) = 76230
+SHA256 (rust/crates/serde_derive-1.0.188.crate) = 4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2
+SIZE (rust/crates/serde_derive-1.0.188.crate) = 55563
+SHA256 (rust/crates/serde_json-1.0.107.crate) = 6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65
+SIZE (rust/crates/serde_json-1.0.107.crate) = 146458
+SHA256 (rust/crates/static_assertions-1.1.0.crate) = a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f
+SIZE (rust/crates/static_assertions-1.1.0.crate) = 18480
+SHA256 (rust/crates/strsim-0.10.0.crate) = 73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623
+SIZE (rust/crates/strsim-0.10.0.crate) = 11355
+SHA256 (rust/crates/syn-1.0.109.crate) = 72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237
+SIZE (rust/crates/syn-1.0.109.crate) = 237611
+SHA256 (rust/crates/syn-2.0.38.crate) = e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b
+SIZE (rust/crates/syn-2.0.38.crate) = 243284
+SHA256 (rust/crates/termtree-0.4.1.crate) = 3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76
+SIZE (rust/crates/termtree-0.4.1.crate) = 4557
+SHA256 (rust/crates/thiserror-core-1.0.38.crate) = 0d97345f6437bb2004cd58819d8a9ef8e36cdd7661c2abc4bbde0a7c40d9f497
+SIZE (rust/crates/thiserror-core-1.0.38.crate) = 18128
+SHA256 (rust/crates/thiserror-core-impl-1.0.38.crate) = 10ac1c5050e43014d16b2f94d0d2ce79e65ffdd8b38d8048f9c8f6a8a6da62ac
+SIZE (rust/crates/thiserror-core-impl-1.0.38.crate) = 15084
+SHA256 (rust/crates/twox-hash-1.6.3.crate) = 97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675
+SIZE (rust/crates/twox-hash-1.6.3.crate) = 21842
+SHA256 (rust/crates/unicode-ident-1.0.12.crate) = 3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b
+SIZE (rust/crates/unicode-ident-1.0.12.crate) = 42168
+SHA256 (rust/crates/utf8parse-0.2.1.crate) = 711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a
+SIZE (rust/crates/utf8parse-0.2.1.crate) = 13435
+SHA256 (rust/crates/wait-timeout-0.2.0.crate) = 9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6
+SIZE (rust/crates/wait-timeout-0.2.0.crate) = 12441
+SHA256 (rust/crates/winapi-0.3.9.crate) = 5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419
+SIZE (rust/crates/winapi-0.3.9.crate) = 1200382
+SHA256 (rust/crates/winapi-i686-pc-windows-gnu-0.4.0.crate) = ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6
+SIZE (rust/crates/winapi-i686-pc-windows-gnu-0.4.0.crate) = 2918815
+SHA256 (rust/crates/winapi-x86_64-pc-windows-gnu-0.4.0.crate) = 712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f
+SIZE (rust/crates/winapi-x86_64-pc-windows-gnu-0.4.0.crate) = 2947998
+SHA256 (rust/crates/windows-sys-0.48.0.crate) = 677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9
+SIZE (rust/crates/windows-sys-0.48.0.crate) = 2628884
+SHA256 (rust/crates/windows-targets-0.48.5.crate) = 9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c
+SIZE (rust/crates/windows-targets-0.48.5.crate) = 6904
+SHA256 (rust/crates/windows_aarch64_gnullvm-0.48.5.crate) = 2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8
+SIZE (rust/crates/windows_aarch64_gnullvm-0.48.5.crate) = 418492
+SHA256 (rust/crates/windows_aarch64_msvc-0.48.5.crate) = dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc
+SIZE (rust/crates/windows_aarch64_msvc-0.48.5.crate) = 798483
+SHA256 (rust/crates/windows_i686_gnu-0.48.5.crate) = a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e
+SIZE (rust/crates/windows_i686_gnu-0.48.5.crate) = 844891
+SHA256 (rust/crates/windows_i686_msvc-0.48.5.crate) = 8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406
+SIZE (rust/crates/windows_i686_msvc-0.48.5.crate) = 864300
+SHA256 (rust/crates/windows_x86_64_gnu-0.48.5.crate) = 53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e
+SIZE (rust/crates/windows_x86_64_gnu-0.48.5.crate) = 801619
+SHA256 (rust/crates/windows_x86_64_gnullvm-0.48.5.crate) = 0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc
+SIZE (rust/crates/windows_x86_64_gnullvm-0.48.5.crate) = 418486
+SHA256 (rust/crates/windows_x86_64_msvc-0.48.5.crate) = ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538
+SIZE (rust/crates/windows_x86_64_msvc-0.48.5.crate) = 798412
+SHA256 (pkgw-elfx86exts-elfx86exts@0.6.2_GH0.tar.gz) = 55e2ee8c6481e46749b622910597a01e86207250d57e4430b7ce31a22b982e1a
+SIZE (pkgw-elfx86exts-elfx86exts@0.6.2_GH0.tar.gz) = 15630
diff --git a/sysutils/elfx86exts/pkg-descr b/sysutils/elfx86exts/pkg-descr
new file mode 100644
index 000000000000..ff9d30e672f5
--- /dev/null
+++ b/sysutils/elfx86exts/pkg-descr
@@ -0,0 +1,6 @@
+Disassemble a binary and print out which instruction set extensions it uses.
+
+Despite the utterly misleading name, this tool supports ELF and MachO
+binaries, and perhaps other formats as well, and has preliminary
+support for ARM64 as well as X86/64.
+