From mboxrd@z Thu Jan 1 00:00:00 1970 From: Theodoros Foradis Subject: [PATCH v2 2/3] gnu: Add kicad. Date: Tue, 25 Oct 2016 19:09:06 +0300 Message-ID: <20161025160907.30181-3-theodoros.for@openmailbox.org> References: <20161025124841.GA887@jasmine> <20161025160907.30181-1-theodoros.for@openmailbox.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38493) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bz4LH-0001BK-HZ for guix-devel@gnu.org; Tue, 25 Oct 2016 12:12:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bz4LB-0001mk-BQ for guix-devel@gnu.org; Tue, 25 Oct 2016 12:12:47 -0400 Received: from smtp4.openmailbox.org ([62.4.1.38]:51468) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1bz4LB-0001mD-3O for guix-devel@gnu.org; Tue, 25 Oct 2016 12:12:41 -0400 In-Reply-To: <20161025160907.30181-1-theodoros.for@openmailbox.org> 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: guix-devel@gnu.org * gnu/packages/engineering.scm (kicad): New variable. --- gnu/packages/engineering.scm | 89 ++++++++++++++++++++++++++++++++++++++= ++++++ 1 file changed, 89 insertions(+) diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm index 829ceb0..e5a48fc 100644 --- a/gnu/packages/engineering.scm +++ b/gnu/packages/engineering.scm @@ -4,6 +4,7 @@ ;;; Copyright =C2=A9 2016 Efraim Flashner ;;; Copyright =C2=A9 2016 David Thompson ;;; Copyright =C2=A9 2016 Ludovic Court=C3=A8s +;;; Copyright =C2=A9 2016 Theodoros Foradis ;;; ;;; This file is part of GNU Guix. ;;; @@ -29,6 +30,7 @@ #:use-module (guix store) #:use-module (guix utils) #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) #:use-module (guix build-system cmake) #:use-module (gnu packages) @@ -39,6 +41,7 @@ #:use-module (gnu packages boost) #:use-module (gnu packages check) #:use-module (gnu packages compression) + #:use-module (gnu packages curl) #:use-module (gnu packages flex) #:use-module (gnu packages fontutils) #:use-module (gnu packages gd) @@ -55,9 +58,14 @@ #:use-module (gnu packages maths) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) + #:use-module (gnu packages python) #:use-module (gnu packages qt) + #:use-module (gnu packages swig) #:use-module (gnu packages tcl) + #:use-module (gnu packages tls) #:use-module (gnu packages tex) + #:use-module (gnu packages wxwidgets) + #:use-module (gnu packages xorg) #:use-module (srfi srfi-1)) =20 (define-public librecad @@ -562,3 +570,84 @@ fundamental, primitive shapes are represented as cod= e in the user-level language.") (license (list license:lgpl2.1+ ;library license:gpl2+))))) ;Guile bindings + +;; We use kicad from a git commit, because support for boost 1.61.0 +;; has been recently added. +(define-public kicad + (let ((commit "4ee344e150bfaf3a6f3f7bf935fb96ae07c423fa") + (hash "0kf6r92nps0658i9n3p9vp5dzbssmc22lvjv5flyvnlf83l63s4n")) + (package + (name "kicad") + (version (string-append "4.0-" (string-take commit 7))) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.launchpad.net/kicad.git") + (commit commit))) + (sha256 + (base32 hash)) + (file-name (string-append name "-" version "-checkout")))) + (build-system cmake-build-system) + (arguments + `(#:out-of-source? #t + #:tests? #f ; no tests + #:configure-flags + (list "-DKICAD_STABLE_VERSION=3DON" + "-DKICAD_REPO_NAME=3Dstable" + "-DKICAD_BUILD_VERSION=3D4.0" + "-DCMAKE_BUILD_TYPE=3DRelease" + "-DKICAD_SKIP_BOOST=3DON" + "-DKICAD_SCRIPTING=3DON" + "-DKICAD_SCRIPTING_MODULES=3DON" + "-DKICAD_SCRIPTING_WXPYTHON=3DON" + ;; Has to be set explicitely, as we don't have the wxPy= thon + ;; headers in the wxwidgets store item, but in wxPython= . + (string-append "-DCMAKE_CXX_FLAGS=3D-I" + (assoc-ref %build-inputs "wxpython") + "/include/wx-3.0") + "-DCMAKE_BUILD_WITH_INSTALL_RPATH=3DTRUE" + "-DBUILD_GITHUB_PLUGIN=3DOFF") + #:phases + (modify-phases %standard-phases + (add-after 'install 'wrap-program ;;Ensure correct python= at runtime + (lambda* (#:key inputs outputs #:allow-other-k= eys) + (let* ((out (assoc-ref outputs "out")) + (python (assoc-ref inputs "python")) + (file (string-append out "/bin/kicad"= )) + (path (string-append + out + "/lib/python2.7/site-packages:= " + (getenv "PYTHONPATH")))) + (wrap-program file + `("PYTHONPATH" ":" prefix (,path)) + `("PATH" ":" prefix + (,(string-append python "/bin:"))))) + #t))))) + (native-inputs + `(("boost" ,boost) + ("gettext" ,gnu-gettext) + ("pkg-config" ,pkg-config) + ("swig" ,swig) + ("zlib" ,zlib))) + (inputs + `(("cairo" ,cairo) + ("curl" ,curl) + ("desktop-file-utils" ,desktop-file-utils) + ("glew" ,glew) + ("glm" ,glm) + ("hicolor-icon-theme" ,hicolor-icon-theme) + ("libsm" ,libsm) + ("mesa" ,mesa) + ("openssl" ,openssl) + ("python" ,python-2) + ("wxwidgets" ,wxwidgets-gtk2) + ("wxpython" ,python2-wxpython))) + (home-page "http://http://kicad-pcb.org/") + (synopsis "Electronics Design Automation Suite") + (description + "Kicad is created for the formation of printed circuit boards and= electrical circuits. + The software has a number of programs that perform specific functions, = for example, + pcbnew (Editing PCB), eeschema (editing electrical diagrams), gerbview = (viewing Gerber + files) and others. ") + (license license:gpl3+)))) --=20 2.10.1