* [gentoo-commits] repo/gentoo:master commit in: dev-libs/udis86/files/, dev-libs/udis86/
@ 2021-01-23 23:38 David Seifert
0 siblings, 0 replies; only message in thread
From: David Seifert @ 2021-01-23 23:38 UTC (permalink / raw
To: gentoo-commits
commit: d8d68e4b7e09155d1a4569c365780fe48908c7c4
Author: David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 23 23:37:50 2021 +0000
Commit: David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sat Jan 23 23:37:50 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d8d68e4b
dev-libs/udis86: Port to EAPI 7
* Fix python automagic
* Fix python tests scripts
Closes: https://bugs.gentoo.org/632251
Closes: https://bugs.gentoo.org/737214
Closes: https://bugs.gentoo.org/765862
Package-Manager: Portage-3.0.14, Repoman-3.0.2
Signed-off-by: David Seifert <soap <AT> gentoo.org>
dev-libs/udis86/files/udis86-1.7.2-python3.patch | 42 ++++++++++++++++++
dev-libs/udis86/udis86-1.7.2-r1.ebuild | 54 ++++++++++++++++++++++++
dev-libs/udis86/udis86-1.7.2.ebuild | 39 -----------------
3 files changed, 96 insertions(+), 39 deletions(-)
diff --git a/dev-libs/udis86/files/udis86-1.7.2-python3.patch b/dev-libs/udis86/files/udis86-1.7.2-python3.patch
new file mode 100644
index 00000000000..b708072195c
--- /dev/null
+++ b/dev-libs/udis86/files/udis86-1.7.2-python3.patch
@@ -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
diff --git a/dev-libs/udis86/udis86-1.7.2-r1.ebuild b/dev-libs/udis86/udis86-1.7.2-r1.ebuild
new file mode 100644
index 00000000000..5cc32041f20
--- /dev/null
+++ b/dev-libs/udis86/udis86-1.7.2-r1.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7..9} )
+
+inherit autotools multilib-minimal python-any-r1
+
+DESCRIPTION="Disassembler library for the x86/-64 architecture sets"
+HOMEPAGE="http://udis86.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+BDEPEND="
+ test? (
+ ${PYTHON_DEPS}
+ amd64? ( dev-lang/yasm )
+ x86? ( dev-lang/yasm )
+ )"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-docdir.patch
+ "${FILESDIR}"/${P}-python3.patch
+)
+
+pkg_setup() {
+ use test && python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" econf \
+ --disable-static \
+ --enable-shared \
+ --with-pic \
+ PYTHON="${EPYTHON}"
+}
+
+multilib_src_install_all() {
+ einstalldocs
+
+ # no static archives
+ find "${ED}" -name '*.la' -delete || die
+}
diff --git a/dev-libs/udis86/udis86-1.7.2.ebuild b/dev-libs/udis86/udis86-1.7.2.ebuild
deleted file mode 100644
index 7c7ecf4c0e9..00000000000
--- a/dev-libs/udis86/udis86-1.7.2.ebuild
+++ /dev/null
@@ -1,39 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-AUTOTOOLS_AUTORECONF=1
-inherit autotools-multilib eutils
-
-DESCRIPTION="Disassembler library for the x86/-64 architecture sets"
-HOMEPAGE="http://udis86.sourceforge.net/"
-SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~amd64 ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
-IUSE="test"
-RESTRICT="!test? ( test )"
-
-DEPEND="test? (
- amd64? ( dev-lang/yasm )
- x86? ( dev-lang/yasm )
- x86-fbsd? ( dev-lang/yasm )
- )"
-RDEPEND=""
-
-PATCHES=(
- "${FILESDIR}"/${P}-docdir.patch
-)
-
-src_configure() {
- local myeconfargs=(
- --docdir="${EPREFIX}"/usr/share/doc/${PF}
- --disable-static
- --enable-shared
- --with-pic
- )
-
- autotools-multilib_src_configure
-}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-01-23 23:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-23 23:38 [gentoo-commits] repo/gentoo:master commit in: dev-libs/udis86/files/, dev-libs/udis86/ David Seifert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox