Merge pull request #2075 from blshkv/master

lief
This commit is contained in:
github-actions[bot] 2024-08-26 22:18:25 +00:00 committed by GitHub
commit 83d4e7a324
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 9 additions and 71 deletions

View file

@ -1,2 +1 @@
DIST nanobind-1.7.0.r7.gfd1f04b.zip 936501 BLAKE2B 36865e778fc2ebe6e011fa5f3f090eca7afe9f68b98f788904bdf01930c54029023b5b17ff7e4b5b6c02ea9414ced734adc1fd60e47df4fd3f87d7fa0981930d SHA512 3095706fac8e735acd36f4d41b0505b8036233543d2a72592e488da9e6541da38bc7413c277a01daf58958d4979f22644e4407e780af7bb604c27f97fcc5148b
DIST nanobind-1.8.0.gh.tar.gz 778020 BLAKE2B 0374d8380a9de88e9ef0551f2a26eecaa7ea934f4b233f0976159245de80d24768f589010c52cb63f68e53e64509907135854acfca4c468cb19ef05652bd3520 SHA512 72bb066f6884c0ceb2672f26087daf4eb6453a339b7bc81d8abc6b52a0380663d69797193d863979118a5fbc29487a9f6aed4b0e60a53be297ab6b4e0f7f828c

View file

@ -1,60 +0,0 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{10..12} )
inherit distutils-r1 cmake
DESCRIPTION="tiny and efficient C++/Python bindings"
HOMEPAGE="https://github.com/wjakob/nanobind"
SRC_URI="https://github.com/wjakob/nanobind/archive/refs/tags/v${PV}.tar.gz -> ${P}.gh.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="amd64 ~arm64 x86"
IUSE="test"
RESTRICT="!test? ( test )"
RDEPEND="dev-cpp/robin-map"
DEPEND="${RDEPEND}"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
src_test(){
#cmake_src_test
cmake_build
}
src_prepare(){
#FIXME unbundle robin-map using NB_USE_SUBMODULE_DEPS in the next version
#https://github.com/wjakob/nanobind/issues/410
#fool cmake script to use external module
mkdir -p ext/robin_map/include
if use test; then
cmake_src_prepare
fi
distutils-r1_src_prepare
eapply_user
}
src_configure(){
if use test; then
einfo "==== running configure test"
local mycmakeargs=(
-DNB_TEST=ON
-DNB_TEST_STABLE_ABI=ON
)
cmake_src_configure
fi
distutils-r1_src_configure
}
src_compile(){
distutils-r1_src_compile
}
src_install(){
distutils-r1_src_install
}

View file

@ -19,18 +19,17 @@ S=${WORKDIR}/LIEF-${PV}
LICENSE="Apache-2.0"
SLOT="0"
#https://github.com/pentoo/pentoo-overlay/issues/2073
#KEYWORDS="amd64 x86"
KEYWORDS="amd64 x86"
IUSE="examples +python static-libs"
# keep nanobind in sync with LIEF-0.15.1/api/python/CMakeLists.txt
# lief requires a forked version of nanobind, see LIEF-0.15.1/api/python/CMakeLists.txt
# So don't try to use a standard one
RDEPEND="python? ( ${PYTHON_DEPS}
dev-python/pydantic[${PYTHON_USEDEP}]
dev-python/pydantic-core[${PYTHON_USEDEP}]
dev-python/tomli[${PYTHON_USEDEP}]
dev-python/xtract[${PYTHON_USEDEP}]
>=dev-python/nanobind-1.8.0[${PYTHON_USEDEP}]
)"
DEPEND="${RDEPEND}
python? ( dev-python/scikit-build-core[${PYTHON_USEDEP}] )"
@ -67,13 +66,13 @@ src_configure() {
use x86 && FORCE32=YES
local PYTHON_API=NO
local NANOBIND_DIR
# local NANOBIND_DIR
if use python; then
#set EPYTHON variable for python_get_sitedir
python_setup
PYTHON_API=YES
NANOBIND_DIR=$(python_get_sitedir)/nanobind/cmake
# NANOBIND_DIR=$(python_get_sitedir)/nanobind/cmake
fi
local mycmakeargs=(
@ -82,10 +81,10 @@ src_configure() {
-DLIEF_PYTHON_API="$PYTHON_API"
-DLIEF_FORCE32="$FORCE32"
)
use python && mycmakeargs+=(
-DLIEF_OPT_NANOBIND_EXTERNAL=1
-Dnanobind_DIR="${NANOBIND_DIR}"
)
# use python && mycmakeargs+=(
# -DLIEF_OPT_NANOBIND_EXTERNAL=1
# -Dnanobind_DIR="${NANOBIND_DIR}"
# )
cmake_src_configure
wrap_python ${FUNCNAME}