dev-python/llvmlite: Bump to 0.32.1, permit LLVM 9
authorMichał Górny <mgorny@gentoo.org>
Mon, 11 May 2020 06:34:20 +0000 (08:34 +0200)
committerMichał Górny <mgorny@gentoo.org>
Mon, 11 May 2020 09:03:55 +0000 (11:03 +0200)
Thanks to Aisha Tammy for pointing out that this release actually works
with LLVM 9 even though upstream does not want to officially support
it.

Signed-off-by: Michał Górny <mgorny@gentoo.org>
dev-python/llvmlite/Manifest
dev-python/llvmlite/llvmlite-0.32.1.ebuild [new file with mode: 0644]

index aee8d21a2e8e3746e9928aef34c15df1ff8dc75c..1164e21cbb25b3931f462d90baf05cd12644d4b1 100644 (file)
@@ -1,2 +1,3 @@
 DIST llvmlite-0.29.0.gh.tar.gz 196507 BLAKE2B d4870ca042d446857b7409c0c50c370458747ee744c24611e88da4bc8780c26125b2e8db3db7fe9d4f553f9aae5769b62effe1ac94cfaf234bab54d43c8086e9 SHA512 8735b46b1a3053b89306bf6e05c8c6c375d15371d33635f1d27e5533d7a78a85f773e04b7ed8d39ebab40a892c374839e1324665d81459cb797f760d6d2c81d1
 DIST llvmlite-0.30.0.gh.tar.gz 199354 BLAKE2B 71ba1b0572d115a28d838a7fa5daca136fb793d41cdebca5834d2977813b4a02837e99d8b1b48d0fa965c5d3bdfe7783314ecbd2a7e7075b82247ea5fa4f90a4 SHA512 e3a64a3170efe1bffb6eeb8d6cfdc5a9bf8cc9e123da0b317b6b8dd93dacd3a54d5117c22eca43226915e7ff2793ab66cdee00c5e6ada442d9c2f7fed6e40763
+DIST llvmlite-0.32.1.gh.tar.gz 194191 BLAKE2B 4d35ce0f4903a17285b6f6296f0260787cc102804f1144c1b329815d41ca7471e1942aaecac26f06aa76804cc1b8a77130063de22376c78f30819554e459716f SHA512 00ce075deb8048350f4d4ac23e2e8a629b7c12aefefe3855e430aaf5e2df8170cf97a043001397a84101a7d0065671b30eb327837b24f86dd36b855309c19bfa
diff --git a/dev-python/llvmlite/llvmlite-0.32.1.ebuild b/dev-python/llvmlite/llvmlite-0.32.1.ebuild
new file mode 100644 (file)
index 0000000..a733f96
--- /dev/null
@@ -0,0 +1,66 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6,7,8} )
+
+inherit distutils-r1 llvm
+
+DESCRIPTION="Python wrapper around the llvm C++ library"
+HOMEPAGE="https://llvmlite.pydata.org/"
+SRC_URI="https://github.com/numba/llvmlite/archive/v${PV/_/}.tar.gz -> ${P/_/}.gh.tar.gz"
+S=${WORKDIR}/${P/_/}
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="examples"
+
+LLVM_MAX_SLOT=9
+
+RDEPEND="
+       sys-devel/llvm:${LLVM_MAX_SLOT}
+       sys-libs/zlib:0=
+"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+       # test_version hardcodes permitted versions
+       # test_parse* relies on exact error message
+       sed -e 's:test_version:_&:' \
+               -e 's:test_parse_bitcode_error:_&:' \
+               -i llvmlite/tests/test_binding.py || die
+
+       distutils-r1_src_prepare
+}
+
+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
+
+       export LLVMLITE_SKIP_LLVM_VERSION_CHECK=1
+}
+
+python_test() {
+       "${EPYTHON}" runtests.py -v || die "Tests failed under ${EPYTHON}"
+}
+
+python_install_all() {
+       distutils-r1_python_install_all
+       if use examples; then
+               dodoc -r examples
+               docompress -x /usr/share/doc/${PF}/examples
+       fi
+}