From 04945ef3be3a7c1d006e752e0a21f946c9bf06e6 Mon Sep 17 00:00:00 2001 From: John Soo Date: Sat, 6 Jul 2019 09:13:50 -0700 Subject: [PATCH 03/10] gnu: Add python-shiboken-2. * gnu/packages/qt.scm (python-shiboken-2): New variable. --- gnu/packages/qt.scm | 55 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 52eb46cce0..ce64ab5d09 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -11,6 +11,7 @@ ;;; Copyright © 2018 Nicolas Goaziou ;;; Copyright © 2018 Hartmut Goebel ;;; Copyright © 2018 Eric Bavier +;;; Copyright © 2018 John Soo ;;; ;;; This file is part of GNU Guix. ;;; @@ -38,7 +39,9 @@ #:use-module (guix packages) #:use-module (guix utils) #:use-module (gnu packages) + #:use-module (gnu packages base) #:use-module (gnu packages bison) + #:use-module (gnu packages cmake) #:use-module (gnu packages compression) #:use-module (gnu packages cups) #:use-module (gnu packages databases) @@ -54,6 +57,7 @@ #:use-module (gnu packages icu4c) #:use-module (gnu packages image) #:use-module (gnu packages linux) + #:use-module (gnu packages llvm) #:use-module (gnu packages maths) #:use-module (gnu packages nss) #:use-module (gnu packages pciutils) @@ -67,6 +71,7 @@ #:use-module (gnu packages sdl) #:use-module (gnu packages sqlite) #:use-module (gnu packages tls) + #:use-module (gnu packages version-control) #:use-module (gnu packages vulkan) #:use-module (gnu packages xdisorg) #:use-module (gnu packages xorg) @@ -2277,3 +2282,53 @@ user-friendly than the default @code{QColorDialog} and several other color-related widgets.") ;; Includes a license exception for combining with GPL2 code. (license license:lgpl3+)))) + +(define-public python-shiboken-2 + (let ((revision "1") + ;; Pinned to branches with support for qt 5.11.3 + (commit "4018787a3cc01d632fdca7891ac8aa9487110c26")) + (package + (name "python-shiboken-2") + (version (git-version "v5.11.3" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + ;; The latest versions of Shiboken live in the pyside repo. + ;; There is another standalone repo only for Shiboken + ;; but it is outdated + (url "https://code.qt.io/pyside/pyside-setup") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0g8jacm2iqd7lw2m7f1dp1nnrsk38bl3m8pihm8zz9gxs8d31sf5")))) + (build-system cmake-build-system) + (inputs + `(("llvm-toolchain-6" ,llvm-toolchain-6) + ("libxml2" ,libxml2) + ("libxslt" ,libxslt) + ("python-wrapper" ,python-wrapper) + ("qtbase" ,qtbase) + ("qtxmlpatterns" ,qtxmlpatterns))) + (arguments + `(#:tests? #f + ;; FIXME: Building tests fails + #:configure-flags '("-DBUILD_TESTS=off") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'use-shiboken-dir-only + (lambda _ (chdir "sources/shiboken2") #t)) + (add-before 'configure 'set-build-env + (lambda* (#:key inputs #:allow-other-keys) + (let ((llvm (assoc-ref inputs "llvm-toolchain-6"))) + (setenv "CLANG_INSTALL_DIR" llvm) + #t)))))) + (home-page "https://wiki.qt.io/Qt_for_Python") + (synopsis + "Shiboken generates bindings for C++ libraries using CPython source code") + (description + "Shiboken generates bindings for C++ libraries using CPython source code") + ;; Help! + (license `(,license:gpl2+ + ,license:llgpl))))) -- 2.23.0