From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leo Famulari Subject: Stuck on KiCad dependency wxPython Date: Wed, 6 Jul 2016 20:22:28 -0400 Message-ID: <20160707002228.GA16818@jasmine> References: <20160215084046.62d5307a@scratchpost.org> <20160523041319.GA10803@jasmine> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="9jxsPFA5p3P2qPhR" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50638) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bKx5Z-0002Lh-Lw for guix-devel@gnu.org; Wed, 06 Jul 2016 20:22:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bKx5V-00087W-8Z for guix-devel@gnu.org; Wed, 06 Jul 2016 20:22:44 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:55249) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bKx5T-00085l-U2 for guix-devel@gnu.org; Wed, 06 Jul 2016 20:22:41 -0400 Content-Disposition: inline In-Reply-To: <20160523041319.GA10803@jasmine> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Danny Milosavljevic Cc: guix-devel@gnu.org --9jxsPFA5p3P2qPhR Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, May 23, 2016 at 12:13:19AM -0400, Leo Famulari wrote: > On Mon, Feb 15, 2016 at 08:40:46AM +0100, Danny Milosavljevic wrote: > > this patch adds kicad, an electronics design automation tool, to "engin= eering.scm". >=20 > Cool, I would really like to offer KiCad in Guix. This fell through the > cracks but I'd like to resurrect it! KiCad recommends we build with support for scripting with wxPython [0], so I'm packaging that, but I'm stuck. It's a complicated package. It ./configures with Autotools, but builds and installs with Python setuptools. I've attached my rough WIP patch. Parts of the package definition are cribbed from Debian [1], Nix [2], and Arch [3]. It fails to find the wx headers, as below. I've tried adding them to C_INCLUDE_PATH or setting -I/gnu/store/...-wxwidgets... in #:make-flags. Any advice? gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wst= rict-prototypes -fPIC -DSWIG_TYPE_TABLE=3D_wxPython_table -DSWIG_PYTHON_OUT= PUT_TUPLE -DSWIG_PYTHON_SILENT_MEMLEAK -DWXP_USE_THREAD=3D1 -UNDEBUG -Iincl= ude -Isrc -I/gnu/store/2kf45v7w0iypnbcyk53ghihdqqlphay4-gtk+-2.24.30/includ= e/gtk-2.0 -I/gnu/store/2kf45v7w0iypnbcyk53ghihdqqlphay4-gtk+-2.24.30/lib/gt= k-2.0/include -I/gnu/store/pmqssiwi3sdpgyxfiyv9g5w1dmhzg662-libpng-1.5.26/i= nclude/libpng15 -I/gnu/store/1qsvhrcgji1bgzq16cg96n8ahd2yhb7d-pango-1.40.1/= include/pango-1.0 -I/gnu/store/fqnr5fllihp95kan3a6cwg28b9fnqjd5-gdk-pixbuf+= svg-2.34.0/include/gdk-pixbuf-2.0 -I/gnu/store/qizy1vd86sxvn7dgwafi1c8vqhnq= 8nrr-atk-2.20.0/include/atk-1.0 -I/gnu/store/vl3fs2xf64mgy4rw69fhddgh5zx3vw= bf-harfbuzz-1.2.4/include/harfbuzz -I/gnu/store/7hkzdkd6svcmc76hxqzlj5s7im0= 1791r-cairo-1.14.6/include/cairo -I/gnu/store/6m4xdh1rj3np9w2fikf8wlq6lka1h= msg-glib-2.48.0/include/glib-2.0 -I/gnu/store/6m4xdh1rj3np9w2fikf8wlq6lka1h= msg-glib-2.48.0/lib/glib-2.0/include -I/gnu/store/8ifqb1iyyz2vgaap51izb2d30= 6kfpqv4-pixman-0.34.0/include/pixman-1 -I/gnu/store/fcxz8rsfkwvjmwc5xrx446n= dl0hrc702-freetype-2.6.3/include/freetype2 -I/gnu/store/pmqssiwi3sdpgyxfiyv= 9g5w1dmhzg662-libpng-1.5.26/include/libpng15 -I/gnu/store/jd5qm8r971dyh4h7d= nfc07kmpfifspsb-python-2.7.10/include/python2.7 -c src/helpers.cpp -o build= /temp.linux-x86_64-2.7/src/helpers.o -O3 -pthread cc1plus: warning: command line option =E2=80=98-Wstrict-prototypes=E2=80=99= is valid for C/ObjC but not for C++ In file included from src/helpers.cpp:17:0: include/wx/wxPython/wxPython_int.h:35:19: fatal error: wx/wx.h: No such fil= e or directory #include ^ compilation terminated. error: command 'gcc' failed with exit status 1 phase `build' failed after 0.7 seconds builder for `/gnu/store/lnvf3rz9nggjybrb7kx1pxca57qqmxbn-python-wxpython-3.= 0.2.0.drv' failed with exit code 1 [0] http://kicad-pcb.org/download/source/ [1] https://anonscm.debian.org/cgit/freewx/wx.git/tree/debian/repack.sh?id=3Dre= fs/heads/wxpy3.0-debian [2] https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/python-module= s/wxPython/3.0.nix [3] https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=3Dpac= kages/wxpython --9jxsPFA5p3P2qPhR Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001-Non-working-WIP-wxPython.-Asking-for-help.patch" >From 7ebb17757b0d39c92b54719a814faeb639a6af00 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Wed, 6 Jul 2016 20:21:27 -0400 Subject: [PATCH] Non-working WIP wxPython. Asking for help. --- gnu/packages/wxwidgets.scm | 69 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 68 insertions(+), 1 deletion(-) diff --git a/gnu/packages/wxwidgets.scm b/gnu/packages/wxwidgets.scm index 3231e3d..c3ab368 100644 --- a/gnu/packages/wxwidgets.scm +++ b/gnu/packages/wxwidgets.scm @@ -22,6 +22,8 @@ #:use-module (guix download) #:use-module ((guix licenses) #:prefix l:) #:use-module (guix build-system glib-or-gtk) + #:use-module (guix build-system gnu) + #:use-module (guix build-system python) #:use-module (guix build utils) #:use-module (gnu packages) #:use-module (gnu packages compression) @@ -31,9 +33,12 @@ #:use-module (gnu packages gtk) #:use-module (gnu packages image) #: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)) + #:use-module (gnu packages xorg) + #:use-module (gnu packages xml) + ) (define-public wxwidgets (package @@ -107,3 +112,65 @@ and many other languages.") (assoc-ref %outputs "out") "/lib")) ;; No 'check' target. #:tests? #f)))) + +(define-public python-wxpython + (package + (name "python-wxpython") + (version "3.0.2.0") + (source (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/wxpython/wxPython/" + version "/wxPython-src-" version ".tar.bz2")) + (sha256 + (base32 + "0qfzx3sqx4mwxv99sfybhsij4b5pc03ricl73h4vhkzazgjjjhfm")) + (modules '((guix build utils))) + (snippet + '(begin + ;; TODO Audit fully + (delete-file-recursively "src/expat") + (delete-file-recursively "src/jpeg") + (delete-file-recursively "src/png") + (delete-file-recursively "src/tiff") + (delete-file-recursively "src/zlib") + + + (delete-file-recursively "src/msw") + (delete-file-recursively "src/osx") + )))) + (build-system gnu-build-system) + (arguments + `( + #:tests? #f + #:configure-flags + (list "--enable-unicode" ; any effect? + "--disable-precomp-headers" + "--with-regex=sys") + #:make-flags + (list (string-append "LDFLAGS=-Wl,-rpath=" + (assoc-ref %outputs "out") "/lib")) + #:phases + (modify-phases %standard-phases + (add-before 'build 'chdir + (lambda _ (chdir "wxPython"))) + (replace 'build + (lambda _ + (zero? + (system* "python" "setup.py" "WXPORT=gtk2" "UNICODE=1" "build"))))))) + (native-inputs + `(("pkg-config" ,pkg-config) + ("python2-setuptools" ,python2-setuptools))) + (inputs + `(("expat" ,expat) + ("gtk+" ,gtk+-2) + ("libjpeg" ,libjpeg) + ("libpng" ,libpng) + ("libtiff" ,libtiff) + ("libx11" ,libx11) + ("python-2" ,python-2) + ("wxwidgets" ,wxwidgets) + ("zlib" ,zlib))) + (synopsis "Hello, GNU world: An example GNU package") + (description "Guess what GNU Hello prints!") + (home-page "http://www.gnu.org/software/hello/") + (license l:fsf-free))) ; TODO Audit -- 2.9.0 --9jxsPFA5p3P2qPhR--