summaryrefslogtreecommitdiffstats
path: root/rules
diff options
context:
space:
mode:
authorRobin van der Gracht <robin@protonic.nl>2018-01-31 12:16:43 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2018-02-01 11:56:10 +0100
commiteb3135421484501f9a3a8603b8c659a4710f2bbb (patch)
tree49bfecaaa2e8d1ddd21e8f9e728261e4bfb8ba1a /rules
parentdfd19f2946abbb86df9230c6ee7d03491b8199a7 (diff)
downloadptxdist-eb3135421484501f9a3a8603b8c659a4710f2bbb.tar.gz
ptxdist-eb3135421484501f9a3a8603b8c659a4710f2bbb.tar.xz
python3-shiboken: new package
The patches directory patches/shiboken-1.2.2 is ready and compile-time tested with python2 and python3. Because we could not really test shiboken 1.2.2 (python2), we did not do a version bump for it. Signed-off-by: Robin van der Gracht <robin@protonic.nl> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'rules')
-rw-r--r--rules/python3-shiboken.in13
-rw-r--r--rules/python3-shiboken.make90
2 files changed, 103 insertions, 0 deletions
diff --git a/rules/python3-shiboken.in b/rules/python3-shiboken.in
new file mode 100644
index 000000000..ccdcf17fc
--- /dev/null
+++ b/rules/python3-shiboken.in
@@ -0,0 +1,13 @@
+## SECTION=qt
+
+config PYTHON3_SHIBOKEN
+ tristate
+ prompt "python3-shiboken"
+ select HOST_CMAKE
+ select HOST_PYTHON3_SHIBOKEN
+ select LIBXML2
+ select LIBXSLT
+ select PYTHON3
+ select QT4
+ help
+ Shiboken generates bindings for C++ libraries using CPython source code.
diff --git a/rules/python3-shiboken.make b/rules/python3-shiboken.make
new file mode 100644
index 000000000..ffbbdfba8
--- /dev/null
+++ b/rules/python3-shiboken.make
@@ -0,0 +1,90 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2016 by Robin van der Gracht <robin@protonic.nl>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_PYTHON3_SHIBOKEN) += python3-shiboken
+
+#
+# Paths and names
+#
+PYTHON3_SHIBOKEN_VERSION := 1.2.2
+PYTHON3_SHIBOKEN_MD5 := 9f5bee9d414ce51be07ff7a20054a48d
+PYTHON3_SHIBOKEN := shiboken-$(PYTHON3_SHIBOKEN_VERSION)
+PYTHON3_SHIBOKEN_SUFFIX := tar.bz2
+PYTHON3_SHIBOKEN_URL := https://download.qt.io/official_releases/pyside/shiboken-$(PYTHON3_SHIBOKEN_VERSION).$(PYTHON3_SHIBOKEN_SUFFIX)
+PYTHON3_SHIBOKEN_SOURCE := $(SRCDIR)/$(PYTHON3_SHIBOKEN).$(PYTHON3_SHIBOKEN_SUFFIX)
+PYTHON3_SHIBOKEN_DIR := $(BUILDDIR)/$(PYTHON3_SHIBOKEN)
+PYTHON3_SHIBOKEN_LICENSE := GPL-2.0
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+#
+# cmake
+#
+PYTHON3_SHIBOKEN_CONF_TOOL := cmake
+PYTHON3_SHIBOKEN_CONF_OPT = \
+ $(CROSS_CMAKE_USR) \
+ -DBUILD_TESTS:BOOL=OFF \
+ -DUSE_PYTHON3:BOOL=ON \
+ -DPython3_PREFERRED_VERSION=python$(PYTHON3_MAJORMINOR)
+
+PYTHON3_SHIBOKEN_MAKE_OPT := -C libshiboken
+PYTHON3_SHIBOKEN_INSTALL_OPT := -C libshiboken install
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/python3-shiboken.install:
+ @$(call targetinfo)
+ @$(call world/install, PYTHON3_SHIBOKEN)
+ @cd $(PYTHON3_SHIBOKEN_DIR)-build && $(MAKE) -C data install DESTDIR='$(PYTHON3_SHIBOKEN_PKGDIR)'
+ @sed -i -e 's,"$(SYSROOT)/usr,"SYSROOT/usr,g' \
+ -e 's,"$(PTXCONF_SYSROOT_CROSS),"SYSROOT_CROSS,g' \
+ $(PYTHON3_SHIBOKEN_PKGDIR)/usr/lib/cmake/Shiboken-$(PYTHON3_SHIBOKEN_VERSION)/ShibokenConfig.cpython*.cmake
+ @$(call touch)
+
+$(STATEDIR)/python3-shiboken.install.post:
+ @$(call targetinfo)
+ @$(call world/install.post, PYTHON3_SHIBOKEN)
+ @sed -i -e 's,(/usr,($(SYSROOT)/usr,g' \
+ '$(SYSROOT)/usr/lib/cmake/Shiboken-$(PYTHON3_SHIBOKEN_VERSION)/ShibokenConfig.cmake'
+ @sed -i -e 's,"SYSROOT_CROSS,"$(PTXCONF_SYSROOT_CROSS),g' \
+ -e 's,"SYSROOT/usr,"$(SYSROOT)/usr,g' \
+ -e 's,"/usr/bin,"$(PTXCONF_SYSROOT_HOST)/bin,g' \
+ -e 's,"/usr,"$(SYSROOT)/usr,g' \
+ $(SYSROOT)/usr/lib/cmake/Shiboken-$(PYTHON3_SHIBOKEN_VERSION)/ShibokenConfig.cpython*.cmake
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/python3-shiboken.targetinstall:
+ @$(call targetinfo)
+
+ @$(call install_init, python3-shiboken)
+ @$(call install_fixup, python3-shiboken, PRIORITY, optional)
+ @$(call install_fixup, python3-shiboken, SECTION, base)
+ @$(call install_fixup, python3-shiboken, AUTHOR, "Robin van der Gracht <robin@protonic.nl>")
+ @$(call install_fixup, python3-shiboken, DESCRIPTION, missing)
+
+ @$(call install_lib, python3-shiboken, 0, 0, 0644, \
+ libshiboken.cpython-*)
+
+ @$(call install_finish, python3-shiboken)
+
+ @$(call touch)
+
+# vim: syntax=make