You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

227 lines
8.9 KiB

;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <>
;;; Copyright © 2016 Ricardo Wurmus <>
;;; Copyright © 2016 Theodoros Foradis <>
;;; Copyright © 2016 Danny Milosavljevic <>
;;; Copyright © 2017 Rene Saavedra <>
;;; Copyright © 2017 Efraim Flashner <>
;;; Copyright © 2017 Thomas Danckaert <>
;;; This file is part of GNU Guix.
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; GNU General Public License for more details.
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix. If not, see <>.
(define-module (gnu packages wxwidgets)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module ((guix licenses) #:prefix l:)
#:use-module (guix build-system glib-or-gtk)
#:use-module (guix build-system python)
#:use-module (guix build utils)
#:use-module (guix utils)
#:use-module (gnu packages)
#:use-module (gnu packages compression)
#:use-module (gnu packages databases)
#:use-module (gnu packages gl)
#:use-module (gnu packages gstreamer)
#:use-module (gnu packages gtk)
#:use-module (gnu packages image)
#:use-module (gnu packages photo)
#:use-module (gnu packages video)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages sdl)
#:use-module (gnu packages webkit)
#:use-module (gnu packages xorg))
(define-public wxwidgets
(name "wxwidgets")
(version "3.0.3")
(method url-fetch)
(uri (string-append ""
"releases/download/v" version
"/wxWidgets-" version ".tar.bz2"))
(base32 "0yrhp5cs2g33cpbdwdzicmm5m4mfnlvxwv031x9266zc90zh7j08"))))
(build-system glib-or-gtk-build-system)
`(("glu" ,glu)
;; XXX gstreamer-0.10 builds fail
;; ("gstreamer" ,gstreamer-0.10)
("gtk" ,gtk+)
("libjpeg" ,libjpeg)
("libmspack" ,libmspack)
("libsm" ,libsm)
("libtiff" ,libtiff)
("mesa" ,mesa)
("webkitgtk" ,webkitgtk)
("sdl" ,sdl)))
`(("pkg-config" ,pkg-config)))
'("--with-regex" "--with-libmspack"
,@(if (string=? "aarch64-linux"
(list (string-append "LDFLAGS=-Wl,-rpath="
(assoc-ref %outputs "out") "/lib"))
;; No 'check' target.
#:tests? #f))
(home-page "")
(synopsis "Widget toolkit for creating graphical user interfaces")
"wxWidgets is a C++ library that lets developers create applications with
a graphical user interface. It has language bindings for Python, Perl, Ruby
and many other languages.")
(license (list l:lgpl2.0+ (l:fsf-free "file://doc/license.txt")))))
(define-public wxwidgets-gtk2
(package (inherit wxwidgets)
(inputs `(("gtk+" ,gtk+-2)
(package-inputs wxwidgets))))
(name "wxwidgets-gtk2")))
;; Development version of wxWidgets, required to build against gstreamer-1.x.
;; This can be removed when wxWidgets is updated to the next stable version.
(define-public wxwidgets-3.1
(package (inherit wxwidgets)
(version "3.1.0")
(method url-fetch)
(uri (string-append ""
version ".tar.gz"))
(file-name (string-append "wxwidgets-" version ".tar.gz"))
(base32 "1yan5ysjwh6a7xw82sfjd1xn0nsy1dn2s0cx9ac7cw19191blc3y"))))
(inputs `(("gstreamer" ,gstreamer)
("gst-plugins-base" ,gst-plugins-base)
,@(package-inputs wxwidgets)))
(substitute-keyword-arguments (package-arguments wxwidgets)
((#:configure-flags flags)
`(cons "--enable-mediactrl" ,flags))))))
(define-public python2-wxpython
(name "python2-wxpython")
(version "")
(method url-fetch)
(uri (string-append "mirror://sourceforge/wxpython/wxPython/"
version "/wxPython-src-" version ".tar.bz2"))
(modules '((guix build utils)))
(lambda (folder)
(delete-file-recursively (string-append "src/" folder))
'("expat" "jpeg" "png" "tiff" "zlib" "msw" "osx" "msdos"))
(substitute* '("wxPython/")
;; tries to keep its own license the same as wxwidget's
;; license (which it expects under $WXWIN/docs).
(("'preamble.txt', 'licence.txt', 'licendoc.txt', 'lgpl.txt'")
(build-system python-build-system)
`(#:python ,python-2
#:tests? #f ; tests fail
;; wxPython directly extends distutils command classes,
;; we can't easily make use setuptools.
#:use-setuptools? #f
#:configure-flags (list "WXPORT=gtk2"
(modify-phases %standard-phases
(add-before 'build 'chdir
(lambda _
(chdir "wxPython")
(add-after 'chdir 'set-wx-out-dir
(lambda* (#:key outputs #:allow-other-keys)
;; By default, install phase tries to copy the wxPython headers in
;; gnu/store/...-wxwidgets-3.0.2 , which it can't, so they are
;; redirected to the output directory by setting WXPREFIX.
(substitute* ""
(("= getWxConfigValue\\('--prefix'\\)")
(string-append "= '" (assoc-ref outputs "out") "'")))
(substitute* "wx/build/"
(("= getWxConfigValue\\('--prefix'\\)")
(string-append "= '" (assoc-ref outputs "out") "'")))
(add-after 'set-wx-out-dir 'setenv
(lambda* (#:key inputs outputs #:allow-other-keys)
(setenv "WXWIN" (assoc-ref inputs "wxwidgets"))
(use-modules (ice-9 popen) (ice-9 rdelim))
(let ((port (open-pipe* OPEN_READ
(string-append (assoc-ref inputs "wxwidgets")
"/bin/wx-config") "--cppflags")))
(setenv "CPPFLAGS" (read-string port))
(close-pipe port))
`(("mesa" ,mesa) ; for glcanvas
("pkg-config" ,pkg-config)))
`(("gtk+" ,gtk+-2) ; for wxPython/src/helpers.cpp
("wxwidgets" ,wxwidgets-gtk2)))
(synopsis "Python 2 Bindings for wxWidgets")
(description "@code{wxpython} provides Python 2 bindings for wxWidgets.")
(home-page "")
(license (package-license wxwidgets))))
(define-public wxsvg
(name "wxsvg")
(version "1.5.11")
(method url-fetch)
(uri (string-append "mirror://sourceforge/wxsvg/wxsvg/"
version "/wxsvg-" version ".tar.bz2"))
(build-system glib-or-gtk-build-system)
`(("wxwidgets" ,wxwidgets-3.1)
("cairo" ,cairo)
("pango" ,pango)
("libexif" ,libexif)
("ffmpeg" ,ffmpeg)))
`(("pkg-config" ,pkg-config)))
(synopsis "C++ library to create, manipulate and render SVG files")
(description "wxSVG is a C++ library to create, manipulate and render
@dfn{Scalable Vector Graphics} (SVG) files with the wxWidgets toolkit.")
(home-page "")
;; wxSVG is licenced under the "wxWindows library licence", which is
;; the LGPL2.0+, with a few extra permissions.
(license (list l:lgpl2.0+ (l:fsf-free "file://COPYING")))))