new bblfs: dev-libs/udis86-1.7.2

This commit is contained in:
2026-01-08 12:44:58 -05:00
parent 69dfd24826
commit 31f45e1388
4 changed files with 131 additions and 0 deletions

View File

@@ -0,0 +1,49 @@
pkgname=udis86
pkgver=1.7.2
pkgdesc="Disassembler library for the x86/-64 architecture sets"
homepage="https://udis86.sourceforge.net/"
depends=(python yasm)
_patches=(
"udis86-1.7.2-docdir.patch"
"udis86-1.7.2-python3.patch"
"udis86-1.7.2-uninitialized-variable.patch"
)
_patch_sums=(
"8741aaf78c386373fc622d344b11f3ab"
"b8a6d5d57daca7ac7126bd6554137504"
"0cc762c2900dc53af4e8456f7200d48f"
)
sources=("${pkgname}-${pkgver}.tar.gz"
${_patches[@]})
urls=("https://downloads.sourceforge.net/${pkgname}/${sources[0]}"
${_patches[@]})
md5sums=("b7def25257afb612e8da052ee6759dac"
${_patch_sums[@]})
src_prepare() {
tar -xf ${distdir}/${sources[0]} --strip-components=1
for _patch in ${_patches[@]}; do
patch -p1 -i ${filedir}/${_patch}
done
autoreconf
}
src_build() {
./configure --prefix=/usr \
--disable-static \
--enable-shared \
--with-pic
make
}
src_check() {
make -k check
}
src_install() {
make DESTDIR="${pkgdir}" install
}
# vim:ft=sh syn=sh et sw=2:

View File

@@ -0,0 +1,18 @@
diff -ur a/docs/manual/Makefile.am b/docs/manual/Makefile.am
--- a/docs/manual/Makefile.am 2013-09-02 05:46:56.000000000 +0200
+++ b/docs/manual/Makefile.am 2015-03-05 11:22:03.645828113 +0100
@@ -1,4 +1,4 @@
-docdir = ${datadir}/docs/udis86/manual
+docdir = @docdir@/manual
rst_sources = \
index.rst \
diff -ur a/docs/x86/Makefile.am b/docs/x86/Makefile.am
--- a/docs/x86/Makefile.am 2013-06-29 21:58:38.000000000 +0200
+++ b/docs/x86/Makefile.am 2015-03-05 11:22:30.477826105 +0100
@@ -1,4 +1,4 @@
-docdir = ${datadir}/docs/udis86/x86
+docdir = @docdir@/x86
dist_doc_DATA = optable.xml optable.xsl
MAINTAINERCLEANFILES = Makefile.in

View File

@@ -0,0 +1,42 @@
--- a/scripts/ud_opcode.py
+++ b/scripts/ud_opcode.py
@@ -130,8 +130,8 @@
'/mod' : lambda v: '00' if v == '!11' else '01',
# Mode extensions:
# (16, 32, 64) => (00, 01, 02)
- '/o' : lambda v: "%02x" % (int(v) / 32),
- '/a' : lambda v: "%02x" % (int(v) / 32),
+ '/o' : lambda v: "%02x" % (int(v) // 32),
+ '/a' : lambda v: "%02x" % (int(v) // 32),
'/m' : lambda v: '00' if v == '!64' else '01',
# SSE
'/sse' : lambda v: UdOpcodeTables.OpcExtIndex['sse'][v],
@@ -227,7 +227,7 @@
def print_table( self, table, pfxs ):
print("%s |" % pfxs)
- keys = table[ 'entries' ].keys()
+ keys = list(table[ 'entries' ].keys())
if ( len( keys ) ):
keys.sort()
for idx in keys:
--- a/tests/oprgen.py
+++ b/tests/oprgen.py
@@ -686,7 +686,7 @@
def generate_yasm( self, mode, seed ):
opr_combos = {}
random.seed( seed )
- print "[bits %s]" % mode
+ print("[bits %s]" % mode)
for insn in self.InsnTable:
if insn[ 'mnemonic' ] in self.ExcludeList:
continue
@@ -728,7 +728,7 @@
else:
operands = None
if operands is not None:
- print "\t%s %s" % (insn['mnemonic'], operands)
+ print("\t%s %s" % (insn['mnemonic'], operands))
opr_combos[fusedName]['covered'] = True
# stats

View File

@@ -0,0 +1,22 @@
From cce390dd61996e569bd8a3bca78e7aa4b286d6df Mon Sep 17 00:00:00 2001
From: Vivek Thampi <vivek.mt@gmail.com>
Date: Sun, 22 Sep 2013 12:13:05 -0700
Subject: [PATCH] Minor fix for an uninitialized var
---
libudis86/decode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libudis86/decode.c b/libudis86/decode.c
index 3dab9ad..55638bd 100644
--- a/libudis86/decode.c
+++ b/libudis86/decode.c
@@ -228,7 +228,7 @@ static int
decode_prefixes(struct ud *u)
{
int done = 0;
- uint8_t curr, last = 0;
+ uint8_t curr = 0, last = 0;
UD_RETURN_ON_ERROR(u);
do {