Thu May 17 15:47:47 2018 UTC ()
devel/py-llvmlite: Import version 0.22.0
llvmlite provides a Python binding to LLVM for use in Numba.
The old llvmpy binding exposes a lot of LLVM APIs but the mapping of
C++-style memory management to Python is error prone. Numba and many
JIT compilers do not need a full LLVM API. Only the IR builder,
optimizer, and JIT compiler APIs are necessary.
llvmlite is a project originally tailored for Numba's needs, using the
following approach:
* A small C wrapper around the parts of the LLVM C++ API we need that
are not already exposed by the LLVM C API.
* A ctypes Python wrapper around the C API.
* A pure Python implementation of the subset of the LLVM IR builder
that we need for Numba.
Packaged by Kamil Rytarowski for pkgsrc-wip and updated by me.
(minskim)
diff -r0 -r1.1 pkgsrc/devel/py-llvmlite/DESCR
diff -r0 -r1.1 pkgsrc/devel/py-llvmlite/Makefile
diff -r0 -r1.1 pkgsrc/devel/py-llvmlite/PLIST
diff -r0 -r1.1 pkgsrc/devel/py-llvmlite/distinfo
diff -r0 -r1.1 pkgsrc/devel/py-llvmlite/patches/patch-ffi_Makefile.netbsd
diff -r0 -r1.1 pkgsrc/devel/py-llvmlite/patches/patch-ffi_build.py
llvmlite provides a Python binding to LLVM for use in Numba.
The old llvmpy binding exposes a lot of LLVM APIs but the mapping of
C++-style memory management to Python is error prone. Numba and many
JIT compilers do not need a full LLVM API. Only the IR builder,
optimizer, and JIT compiler APIs are necessary.
llvmlite is a project originally tailored for Numba's needs, using the
following approach:
* A small C wrapper around the parts of the LLVM C++ API we need that
are not already exposed by the LLVM C API.
* A ctypes Python wrapper around the C API.
* A pure Python implementation of the subset of the LLVM IR builder
that we need for Numba.
# $NetBSD: Makefile,v 1.1 2018/05/17 15:47:46 minskim Exp $
DISTNAME= llvmlite-0.22.0
PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
CATEGORIES= devel python
MASTER_SITES= ${MASTER_SITE_GITHUB:=numba/}
GITHUB_PROJECT= llvmlite
GITHUB_TAG= v${PKGVERSION_NOREV}
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://llvmlite.pydata.org/
COMMENT= Lightweight LLVM Python binding for writing JIT compilers
LICENSE= 2-clause-bsd
USE_LANGUAGES= c++
.include "../../lang/python/pyversion.mk"
.if "${PYPKGPREFIX}" == "py27"
DEPENDS+= ${PYPKGPREFIX}-enum-[0-9]*:../../devel/py-enum
.endif
BUILDLINK_API_DEPENDS.llvm+= llvm>=5.0.0
.include "../../lang/llvm/buildlink3.mk"
.include "../../lang/python/application.mk"
.include "../../lang/python/egg.mk"
.include "../../mk/bsd.pkg.mk"
@comment $NetBSD: PLIST,v 1.1 2018/05/17 15:47:46 minskim Exp $
${PYSITELIB}/${EGG_INFODIR}/PKG-INFO
${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt
${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt
${PLIST.py2x}${PYSITELIB}/${EGG_INFODIR}/requires.txt
${PYSITELIB}/${EGG_INFODIR}/top_level.txt
${PYSITELIB}/llvmlite/__init__.py
${PYSITELIB}/llvmlite/__init__.pyc
${PYSITELIB}/llvmlite/__init__.pyo
${PYSITELIB}/llvmlite/_version.py
${PYSITELIB}/llvmlite/_version.pyc
${PYSITELIB}/llvmlite/_version.pyo
${PYSITELIB}/llvmlite/binding/__init__.py
${PYSITELIB}/llvmlite/binding/__init__.pyc
${PYSITELIB}/llvmlite/binding/__init__.pyo
${PYSITELIB}/llvmlite/binding/analysis.py
${PYSITELIB}/llvmlite/binding/analysis.pyc
${PYSITELIB}/llvmlite/binding/analysis.pyo
${PYSITELIB}/llvmlite/binding/common.py
${PYSITELIB}/llvmlite/binding/common.pyc
${PYSITELIB}/llvmlite/binding/common.pyo
${PYSITELIB}/llvmlite/binding/dylib.py
${PYSITELIB}/llvmlite/binding/dylib.pyc
${PYSITELIB}/llvmlite/binding/dylib.pyo
${PYSITELIB}/llvmlite/binding/executionengine.py
${PYSITELIB}/llvmlite/binding/executionengine.pyc
${PYSITELIB}/llvmlite/binding/executionengine.pyo
${PYSITELIB}/llvmlite/binding/ffi.py
${PYSITELIB}/llvmlite/binding/ffi.pyc
${PYSITELIB}/llvmlite/binding/ffi.pyo
${PYSITELIB}/llvmlite/binding/initfini.py
${PYSITELIB}/llvmlite/binding/initfini.pyc
${PYSITELIB}/llvmlite/binding/initfini.pyo
${PYSITELIB}/llvmlite/binding/libllvmlite.so
${PYSITELIB}/llvmlite/binding/linker.py
${PYSITELIB}/llvmlite/binding/linker.pyc
${PYSITELIB}/llvmlite/binding/linker.pyo
${PYSITELIB}/llvmlite/binding/module.py
${PYSITELIB}/llvmlite/binding/module.pyc
${PYSITELIB}/llvmlite/binding/module.pyo
${PYSITELIB}/llvmlite/binding/object_file.py
${PYSITELIB}/llvmlite/binding/object_file.pyc
${PYSITELIB}/llvmlite/binding/object_file.pyo
${PYSITELIB}/llvmlite/binding/options.py
${PYSITELIB}/llvmlite/binding/options.pyc
${PYSITELIB}/llvmlite/binding/options.pyo
${PYSITELIB}/llvmlite/binding/passmanagers.py
${PYSITELIB}/llvmlite/binding/passmanagers.pyc
${PYSITELIB}/llvmlite/binding/passmanagers.pyo
${PYSITELIB}/llvmlite/binding/targets.py
${PYSITELIB}/llvmlite/binding/targets.pyc
${PYSITELIB}/llvmlite/binding/targets.pyo
${PYSITELIB}/llvmlite/binding/transforms.py
${PYSITELIB}/llvmlite/binding/transforms.pyc
${PYSITELIB}/llvmlite/binding/transforms.pyo
${PYSITELIB}/llvmlite/binding/value.py
${PYSITELIB}/llvmlite/binding/value.pyc
${PYSITELIB}/llvmlite/binding/value.pyo
${PYSITELIB}/llvmlite/ir/__init__.py
${PYSITELIB}/llvmlite/ir/__init__.pyc
${PYSITELIB}/llvmlite/ir/__init__.pyo
${PYSITELIB}/llvmlite/ir/_utils.py
${PYSITELIB}/llvmlite/ir/_utils.pyc
${PYSITELIB}/llvmlite/ir/_utils.pyo
${PYSITELIB}/llvmlite/ir/builder.py
${PYSITELIB}/llvmlite/ir/builder.pyc
${PYSITELIB}/llvmlite/ir/builder.pyo
${PYSITELIB}/llvmlite/ir/context.py
${PYSITELIB}/llvmlite/ir/context.pyc
${PYSITELIB}/llvmlite/ir/context.pyo
${PYSITELIB}/llvmlite/ir/instructions.py
${PYSITELIB}/llvmlite/ir/instructions.pyc
${PYSITELIB}/llvmlite/ir/instructions.pyo
${PYSITELIB}/llvmlite/ir/module.py
${PYSITELIB}/llvmlite/ir/module.pyc
${PYSITELIB}/llvmlite/ir/module.pyo
${PYSITELIB}/llvmlite/ir/transforms.py
${PYSITELIB}/llvmlite/ir/transforms.pyc
${PYSITELIB}/llvmlite/ir/transforms.pyo
${PYSITELIB}/llvmlite/ir/types.py
${PYSITELIB}/llvmlite/ir/types.pyc
${PYSITELIB}/llvmlite/ir/types.pyo
${PYSITELIB}/llvmlite/ir/values.py
${PYSITELIB}/llvmlite/ir/values.pyc
${PYSITELIB}/llvmlite/ir/values.pyo
${PYSITELIB}/llvmlite/llvmpy/__init__.py
${PYSITELIB}/llvmlite/llvmpy/__init__.pyc
${PYSITELIB}/llvmlite/llvmpy/__init__.pyo
${PYSITELIB}/llvmlite/llvmpy/core.py
${PYSITELIB}/llvmlite/llvmpy/core.pyc
${PYSITELIB}/llvmlite/llvmpy/core.pyo
${PYSITELIB}/llvmlite/llvmpy/passes.py
${PYSITELIB}/llvmlite/llvmpy/passes.pyc
${PYSITELIB}/llvmlite/llvmpy/passes.pyo
${PYSITELIB}/llvmlite/six.py
${PYSITELIB}/llvmlite/six.pyc
${PYSITELIB}/llvmlite/six.pyo
${PYSITELIB}/llvmlite/tests/__init__.py
${PYSITELIB}/llvmlite/tests/__init__.pyc
${PYSITELIB}/llvmlite/tests/__init__.pyo
${PYSITELIB}/llvmlite/tests/__main__.py
${PYSITELIB}/llvmlite/tests/__main__.pyc
${PYSITELIB}/llvmlite/tests/__main__.pyo
${PYSITELIB}/llvmlite/tests/customize.py
${PYSITELIB}/llvmlite/tests/customize.pyc
${PYSITELIB}/llvmlite/tests/customize.pyo
${PYSITELIB}/llvmlite/tests/test_binding.py
${PYSITELIB}/llvmlite/tests/test_binding.pyc
${PYSITELIB}/llvmlite/tests/test_binding.pyo
${PYSITELIB}/llvmlite/tests/test_ir.py
${PYSITELIB}/llvmlite/tests/test_ir.pyc
${PYSITELIB}/llvmlite/tests/test_ir.pyo
${PYSITELIB}/llvmlite/tests/test_llvmpy.py
${PYSITELIB}/llvmlite/tests/test_llvmpy.pyc
${PYSITELIB}/llvmlite/tests/test_llvmpy.pyo
${PYSITELIB}/llvmlite/tests/test_valuerepr.py
${PYSITELIB}/llvmlite/tests/test_valuerepr.pyc
${PYSITELIB}/llvmlite/tests/test_valuerepr.pyo
${PYSITELIB}/llvmlite/utils.py
${PYSITELIB}/llvmlite/utils.pyc
${PYSITELIB}/llvmlite/utils.pyo
$NetBSD: distinfo,v 1.1 2018/05/17 15:47:46 minskim Exp $
SHA1 (llvmlite-0.22.0.tar.gz) = e6028adef7c3ba85f671021f5989e0d6d6e5ed19
RMD160 (llvmlite-0.22.0.tar.gz) = b2a45e3f0142d37f9bf9df4d225b2124b97b15db
SHA512 (llvmlite-0.22.0.tar.gz) = f52da5f0a528502f94dd84e2106f95817111ede4dba50bd10da183d2f1dbdcefed62598f461ac3849ecbea3556d31085ea9abe8b37198f2341b93b191113a124
Size (llvmlite-0.22.0.tar.gz) = 156065 bytes
SHA1 (patch-ffi_Makefile.netbsd) = 28a7a3363376e7b4e13a78afea5705b6009ba5f8
SHA1 (patch-ffi_build.py) = a86eb25dd4172c61ed782bebf84597a910c7b030
$NetBSD: patch-ffi_Makefile.netbsd,v 1.1 2018/05/17 15:47:46 minskim Exp $
Add NetBSD support
--- ffi/Makefile.netbsd.orig 2016-09-19 01:45:04.243949019 +0000
+++ ffi/Makefile.netbsd
@@ -0,0 +1,18 @@
+
+CXX = clang++ -std=c++11 -stdlib=libstdc++
+CXXFLAGS = $(LLVM_CXXFLAGS)
+LDFLAGS = $(LLVM_LDFLAGS)
+LIBS = $(LLVM_LIBS)
+INCLUDE = core.h
+SRC = assembly.cpp bitcode.cpp core.cpp initfini.cpp module.cpp value.cpp \
+ executionengine.cpp transforms.cpp passmanagers.cpp targets.cpp dylib.cpp \
+ linker.cpp
+OUTPUT = libllvmlite.so
+
+all: $(OUTPUT)
+
+$(OUTPUT): $(SRC) $(INCLUDE)
+ $(CXX) -shared $(CXXFLAGS) $(SRC) -o $(OUTPUT) $(LDFLAGS) $(LIBS)
+
+clean:
+ rm -rf test
$NetBSD: patch-ffi_build.py,v 1.1 2018/05/17 15:47:46 minskim Exp $
Add NetBSD support
--- ffi/build.py.orig 2016-08-24 14:49:54.000000000 +0000
+++ ffi/build.py
@@ -142,6 +142,8 @@ def main():
main_posix('linux', '.so')
elif sys.platform.startswith('freebsd'):
main_posix('freebsd', '.so')
+ elif sys.platform.startswith('netbsd'):
+ main_posix('netbsd', '.so')
elif sys.platform == 'darwin':
main_posix('osx', '.dylib')
else: