summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-01-28 04:40:40 +0000
committerSam James <sam@gentoo.org>2022-01-28 05:16:47 +0000
commit64bedcd835cc05c4397317c094909d3764f2ba56 (patch)
treeaec63bcd6d94ed7b2c3f03969b619cb1d3bd8e55 /dev-util
parentdev-python/filebytes: convert to PEP517 (diff)
downloadgentoo-64bedcd835cc05c4397317c094909d3764f2ba56.tar.gz
gentoo-64bedcd835cc05c4397317c094909d3764f2ba56.tar.bz2
gentoo-64bedcd835cc05c4397317c094909d3764f2ba56.zip
dev-util/unicorn: minor cleanups
- Define subslot (tools like this often end up breaking ABI and it's useful to set it proactively here) - Use PEP517 - Add a missing `|| die` - Minor whitespace changes - HTTPSify HOMEPAGE See: https://github.com/gentoo/gentoo/pull/23806 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-util')
-rw-r--r--dev-util/unicorn/unicorn-2.0.0_rc5.ebuild31
-rw-r--r--dev-util/unicorn/unicorn-9999.ebuild30
2 files changed, 33 insertions, 28 deletions
diff --git a/dev-util/unicorn/unicorn-2.0.0_rc5.ebuild b/dev-util/unicorn/unicorn-2.0.0_rc5.ebuild
index c0be1c278b68..1a1090444ff1 100644
--- a/dev-util/unicorn/unicorn-2.0.0_rc5.ebuild
+++ b/dev-util/unicorn/unicorn-2.0.0_rc5.ebuild
@@ -5,12 +5,13 @@ EAPI=8
MY_PV=${PV/_/-}
+DISTUTILS_USE_PEP517=setuptools
DISTUTILS_OPTIONAL=1
PYTHON_COMPAT=( python3_{9..10} )
inherit cmake distutils-r1
DESCRIPTION="A lightweight multi-platform, multi-architecture CPU emulator framework"
-HOMEPAGE="http://www.unicorn-engine.org"
+HOMEPAGE="https://www.unicorn-engine.org"
if [[ ${PV} == *9999 ]]; then
inherit git-r3
@@ -20,21 +21,19 @@ else
KEYWORDS="~amd64 ~x86"
fi
-LICENSE="GPL-2"
-SLOT="0"
-
-UNICORN_TARGETS="x86 arm aarch64 riscv mips sparc m68k ppc"
+S="${WORKDIR}/${PN}-${MY_PV}"
+LICENSE="GPL-2"
+SLOT="0/2"
IUSE="python static-libs"
-
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-DEPEND="dev-libs/glib:2
- virtual/pkgconfig
- ${PYTHON_DEPS}"
+DEPEND="${PYTHON_DEPS}
+ dev-libs/glib:2"
RDEPEND="python? ( ${PYTHON_DEPS} )"
+BDEPEND="virtual/pkgconfig"
-S="${WORKDIR}/${PN}-${MY_PV}"
+UNICORN_TARGETS="x86 arm aarch64 riscv mips sparc m68k ppc"
wrap_python() {
if use python; then
@@ -44,13 +43,14 @@ wrap_python() {
pushd bindings/python >/dev/null || die
distutils-r1_${1} "$@"
- popd >/dev/null
+ popd >/dev/null || die
fi
}
src_prepare() {
- # build from sources
- rm -r bindings/python/prebuilt || die "failed to remove prebuild"
+ # Build from sources
+ rm -r bindings/python/prebuilt || die "failed to remove prebuilt files"
+
cmake_src_prepare
wrap_python ${FUNCNAME}
}
@@ -58,15 +58,18 @@ src_prepare() {
src_configure(){
local mycmakeargs=(
-DBUILD_SHARED_LIBS=OFF
- -DUNICORN_BUILD_SHARED="$(usex static-libs OFF ON)"
+ -DUNICORN_BUILD_SHARED=$(usex !static-libs)
-DUNICORN_ARCH="${UNICORN_TARGETS}"
)
+
cmake_src_configure
+
wrap_python ${FUNCNAME}
}
src_compile() {
cmake_src_compile
+
wrap_python ${FUNCNAME}
}
diff --git a/dev-util/unicorn/unicorn-9999.ebuild b/dev-util/unicorn/unicorn-9999.ebuild
index c0be1c278b68..0c2d81bebca9 100644
--- a/dev-util/unicorn/unicorn-9999.ebuild
+++ b/dev-util/unicorn/unicorn-9999.ebuild
@@ -10,7 +10,7 @@ PYTHON_COMPAT=( python3_{9..10} )
inherit cmake distutils-r1
DESCRIPTION="A lightweight multi-platform, multi-architecture CPU emulator framework"
-HOMEPAGE="http://www.unicorn-engine.org"
+HOMEPAGE="https://www.unicorn-engine.org"
if [[ ${PV} == *9999 ]]; then
inherit git-r3
@@ -20,21 +20,19 @@ else
KEYWORDS="~amd64 ~x86"
fi
-LICENSE="GPL-2"
-SLOT="0"
-
-UNICORN_TARGETS="x86 arm aarch64 riscv mips sparc m68k ppc"
+S="${WORKDIR}/${PN}-${MY_PV}"
+LICENSE="GPL-2"
+SLOT="0/2"
IUSE="python static-libs"
-
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-DEPEND="dev-libs/glib:2
- virtual/pkgconfig
- ${PYTHON_DEPS}"
+DEPEND="${PYTHON_DEPS}
+ dev-libs/glib:2"
RDEPEND="python? ( ${PYTHON_DEPS} )"
+BDEPEND="virtual/pkgconfig"
-S="${WORKDIR}/${PN}-${MY_PV}"
+UNICORN_TARGETS="x86 arm aarch64 riscv mips sparc m68k ppc"
wrap_python() {
if use python; then
@@ -44,13 +42,14 @@ wrap_python() {
pushd bindings/python >/dev/null || die
distutils-r1_${1} "$@"
- popd >/dev/null
+ popd >/dev/null || die
fi
}
src_prepare() {
- # build from sources
- rm -r bindings/python/prebuilt || die "failed to remove prebuild"
+ # Build from sources
+ rm -r bindings/python/prebuilt || die "failed to remove prebuilt files"
+
cmake_src_prepare
wrap_python ${FUNCNAME}
}
@@ -58,15 +57,18 @@ src_prepare() {
src_configure(){
local mycmakeargs=(
-DBUILD_SHARED_LIBS=OFF
- -DUNICORN_BUILD_SHARED="$(usex static-libs OFF ON)"
+ -DUNICORN_BUILD_SHARED=$(usex !static-libs)
-DUNICORN_ARCH="${UNICORN_TARGETS}"
)
+
cmake_src_configure
+
wrap_python ${FUNCNAME}
}
src_compile() {
cmake_src_compile
+
wrap_python ${FUNCNAME}
}