summaryrefslogtreecommitdiff
path: root/dev-python/llvmlite
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-06-13 10:39:22 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-06-13 10:39:22 +0100
commit9452a6e87b6c2c70513bc47a2470bf9f1168920e (patch)
tree8ac67e26b45f34d71c5aab3621813b100a0d5f00 /dev-python/llvmlite
parentf516638b7fe9592837389826a6152a7e1b251c54 (diff)
gentoo resync : 13.06.2020
Diffstat (limited to 'dev-python/llvmlite')
-rw-r--r--dev-python/llvmlite/Manifest4
-rw-r--r--dev-python/llvmlite/files/llvmlite-0.33.0-llvm-10.patch32
-rw-r--r--dev-python/llvmlite/llvmlite-0.33.0-r1.ebuild70
-rw-r--r--dev-python/llvmlite/llvmlite-0.33.0.ebuild66
4 files changed, 172 insertions, 0 deletions
diff --git a/dev-python/llvmlite/Manifest b/dev-python/llvmlite/Manifest
index 5159470ec73c..9b51476c30dd 100644
--- a/dev-python/llvmlite/Manifest
+++ b/dev-python/llvmlite/Manifest
@@ -1,8 +1,12 @@
AUX llvmlite-0.15.0-use-system-six.patch 1274 BLAKE2B 366bc8425139e8b56d4bae78e21088b49d1bab059c2a246497f45ea377aefd3df1bdfe3dbc9692eb5d00538466aee689118b907d01a45f211ea26ed6c7215992 SHA512 5db6b819e0a9e0d6b7963272ef7fd9c9fee778cb4c2d577325de6602e7a283a98752e870b83df4978d063c84b73045e2f65bc9aeb482dd487255efe24792db69
+AUX llvmlite-0.33.0-llvm-10.patch 1140 BLAKE2B 175f1a5596e7ce1f20e7e89978066cea345af361eb0db9413bf105e657128d45fca1c170aa516d74376f4aa4dcff9699d5c48120378f239c61ee59cc29a61713 SHA512 666e2dd798d2598139a72560ae0a63a397dfb643645c3eb3d92f0d2dfbd3030484b7e59e3aec8fa071d314b974f8d54b1a174473c3fbf4534d69492331ebd456
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
+DIST llvmlite-0.33.0.gh.tar.gz 196450 BLAKE2B 3b1842b53eabf5cbc30aa642e12d214bd0cf8473f39873ad2b83de830a251ceac20281e2c8a528fff4623faeebf1583ab539cac74587bcb49ccaac22c922a16f SHA512 50b35db717ccc9d78cb7faa2e0b43cf4a622c5fca662ceb18c14163a26456fb79ed844db9a50e4566a2ea5c26089a419ca130d16b18a2486d4137e8a410ee3b9
EBUILD llvmlite-0.29.0.ebuild 1451 BLAKE2B 0b5f4787b0ebd81640f9b71ce15b2ae93d14777ef20ae2cfee01b24cd1f22c125581759776ad0289d4581492b60be229f27a0e69e1f195c8af5fad719e1b77c2 SHA512 67dcd7ae4afc3b72fefa2484c7392d621866f7cad0fcba4c2f5732baf3f7c5be7f4af036e425167aab02acc366033ff87cbe87463a42ded54b8c85bc3a14ea17
EBUILD llvmlite-0.30.0.ebuild 1455 BLAKE2B 16be8211b855c6ca41cd7fd86caebfecfe528c0fb9329b247b889aa6a4bbbbe0f67aa2a6548c9c951bd868820e0c98346aef663ccf9c2b2a4deb707f92237f87 SHA512 7d2fb4b689d6a1eccc89051d1beaf827ee18d271746b877c0bc95695ab373bc9aea9421ecdfaa31832a916676deb33863e0c515755593486c9032162733c8909
EBUILD llvmlite-0.32.1.ebuild 1608 BLAKE2B 2f588519db4c9def2d1bff835cec129fc90a16ca4e9196172d319dae75ecb9331696d591338f80f5e1ec2be6e9374e1be4535a336b71329309c1119dade752f9 SHA512 21e7f355dfa1835cc64849a29fc37bcd2cc46354a25b524e770a0d0083db98f66ed8a7c911c7476b974c46229dcc18046df568440cdd43e190ddc8752475253f
+EBUILD llvmlite-0.33.0-r1.ebuild 1655 BLAKE2B 1770b375b9d01fbfc50d939ea0c44a67243e301bacefe7fd58c45937cc16887dfebea2811a5607515b4f6439d6eeb00061482768c234bfefe328760bb7f64656 SHA512 38c39ec06953791cd24096dd7969d83524d195f3c2cbc913540057a6fcfe853083f60d63b50476c170488c64d6e658abab4f54c4f4492682368ad613b97d07e6
+EBUILD llvmlite-0.33.0.ebuild 1607 BLAKE2B ab085835ea02ccc0729079da07089428625f9e5a196886406facf49cd7cf80614ce71acc9e9b7ee11e24d8518b1adb4250561fd84d3e4742ce93e4ccaf79aa54 SHA512 d24723298c85bf17f218595e0515b168de3157693370a00083cb57473202677ca87909013c5e9274d710d14c0f3473c3ae6de96f404f5a219dbc308efdc3af8a
MISC metadata.xml 792 BLAKE2B 8247c0ac546df47bc70b8e525d776dd391fa553d75d7bb0507986ac2f7efe1d023db7259f8938c13b383ef719a10acb3e1357bca4dc398a42b68ba756c0c351a SHA512 8dab7bc4b6d33f9a3c458dde08e07fe22680238185e8f144ada7ce7374ecb3fbd38149f67d2a11cba7a816384c556edf618e45ec331e6054b97aee60c529a35a
diff --git a/dev-python/llvmlite/files/llvmlite-0.33.0-llvm-10.patch b/dev-python/llvmlite/files/llvmlite-0.33.0-llvm-10.patch
new file mode 100644
index 000000000000..b6c4242e4459
--- /dev/null
+++ b/dev-python/llvmlite/files/llvmlite-0.33.0-llvm-10.patch
@@ -0,0 +1,32 @@
+From 87a2de4b22e141d37b796dce77a6daef243145eb Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Thu, 11 Jun 2020 09:22:32 +0200
+Subject: [PATCH] Use std::make_unique on LLVM 10
+
+LLVM 10 removes llvm::make_unique in favor of std::make_unique.
+However, this requires C++14 and is therefore unsuitable for LLVM 9
+that forces -std=c++11. Update the code to use both conditionally.
+This fixes all issues with LLVM 10.
+---
+ ffi/linker.cpp | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/ffi/linker.cpp b/ffi/linker.cpp
+index 57bb80b..585b261 100644
+--- a/ffi/linker.cpp
++++ b/ffi/linker.cpp
+@@ -42,7 +42,11 @@ LLVMPY_LinkModules(LLVMModuleRef Dest, LLVMModuleRef Src, const char **Err)
+ auto OldDiagnosticHandler = Ctx.getDiagnosticHandler();
+
+ // set the handler to a new one
++#if LLVM_VERSION_MAJOR >= 10
++ Ctx.setDiagnosticHandler(std::make_unique<ReportNotAbortDiagnosticHandler>(errstream));
++#else
+ Ctx.setDiagnosticHandler(llvm::make_unique<ReportNotAbortDiagnosticHandler>(errstream));
++#endif
+
+ // link
+ bool failed = LLVMLinkModules2(Dest, Src);
+--
+2.27.0
+
diff --git a/dev-python/llvmlite/llvmlite-0.33.0-r1.ebuild b/dev-python/llvmlite/llvmlite-0.33.0-r1.ebuild
new file mode 100644
index 000000000000..5b5f7d1db25e
--- /dev/null
+++ b/dev-python/llvmlite/llvmlite-0.33.0-r1.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6..9} )
+
+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=10
+
+RDEPEND="
+ sys-devel/llvm:${LLVM_MAX_SLOT}
+ sys-libs/zlib:0=
+"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-llvm-10.patch
+)
+
+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
+}
diff --git a/dev-python/llvmlite/llvmlite-0.33.0.ebuild b/dev-python/llvmlite/llvmlite-0.33.0.ebuild
new file mode 100644
index 000000000000..89ee4202cbb9
--- /dev/null
+++ b/dev-python/llvmlite/llvmlite-0.33.0.ebuild
@@ -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..9} )
+
+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
+}