commit: 6f9553b8e4808e115ab38f1178c875fd8748a803
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 11 07:23:59 2018 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Sep 11 07:25:28 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6f9553b8
dev-python/llvmlite: Use parallel make for shared library
dev-python/llvmlite/llvmlite-0.25.0_rc1.ebuild | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/dev-python/llvmlite/llvmlite-0.25.0_rc1.ebuild
b/dev-python/llvmlite/llvmlite-0.25.0_rc1.ebuild
index c882b6bc864..64fcac01111 100644
--- a/dev-python/llvmlite/llvmlite-0.25.0_rc1.ebuild
+++ b/dev-python/llvmlite/llvmlite-0.25.0_rc1.ebuild
@@ -34,13 +34,20 @@ PATCHES=(
"${FILESDIR}"/llvmlite-0.15.0-use-system-six.patch
)
-python_prepare_all() {
- # disable -flto, we do not force it against user's wishes
- # add -fPIC, needed to link against shared libraries
- # plus use those vars to force our CXXFLAGS/LDFLAGS in...
- export CXX_FLTO_FLAGS="${CXXFLAGS} -fPIC"
- export LD_FLTO_FLAGS="${LDFLAGS} -fPIC"
- distutils-r1_python_prepare_all
+python_configure_all() {
+ # upstream's build system is just horrible, and they ignored the PR
+ # fixing it, so let's build the shared lib properly using implicit
+ # make rules
+
+ export LDLIBS=$(llvm-config --libs all)
+ export CXXFLAGS="$(llvm-config --cxxflags) -fPIC ${CXXFLAGS}"
+ export LDFLAGS="$(llvm-config --ldflags) ${LDFLAGS}"
+
+ local files=( ffi/*.cpp )
+ emake -f - <<EOF
+ffi/libllvmlite.so: ${files[*]/.cpp/.o}
+ \$(CXX) -shared \$(CXXFLAGS) \$(LDFLAGS) -o \$@ \$^ \$(LDLIBS)
+EOF
}
python_test() {