From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: [PATCH] Add gerbv. Date: Mon, 31 Aug 2015 08:50:46 +0200 Message-ID: <87y4gsgddl.fsf@elephly.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43652) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWIvm-0006Vo-KH for guix-devel@gnu.org; Mon, 31 Aug 2015 02:51:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZWIvi-0000zi-9U for guix-devel@gnu.org; Mon, 31 Aug 2015 02:51:02 -0400 Received: from sender163-mail.zoho.com ([74.201.84.163]:25714) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWIvi-0000z8-0S for guix-devel@gnu.org; Mon, 31 Aug 2015 02:50:58 -0400 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-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Attached is a patch for gerbv (and its input “po4a”), a Gerber file viewer. When designing a PCB, the layout is usually exported in the common Gerber file format and sent to the PCB manufacturers. --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-gnu-Add-po4a.patch Content-Transfer-Encoding: 8bit >From e992f3d52f99219f25f00d1917ca6f83f9e805f3 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Mon, 31 Aug 2015 08:46:12 +0200 Subject: [PATCH 1/2] gnu: Add po4a. * gnu/packages/gettext.scm (po4a): New variable. --- gnu/packages/gettext.scm | 71 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 70 insertions(+), 1 deletion(-) diff --git a/gnu/packages/gettext.scm b/gnu/packages/gettext.scm index 6be3093..a4487ef 100644 --- a/gnu/packages/gettext.scm +++ b/gnu/packages/gettext.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2012 Nikita Karetnikov ;;; Copyright © 2014 Mark H Weaver +;;; Copyright © 2015 Ricardo Wurmus ;;; ;;; This file is part of GNU Guix. ;;; @@ -18,11 +19,15 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu packages gettext) - #:use-module ((guix licenses) #:select (gpl3+)) + #:use-module ((guix licenses) #:select (gpl2+ gpl3+)) #:use-module (gnu packages) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system gnu) + #:use-module (guix build-system perl) + #:use-module (gnu packages docbook) + #:use-module (gnu packages perl) + #:use-module (gnu packages texlive) #:use-module (gnu packages xml)) ;; Use that name to avoid clashes with Guile's 'gettext' procedure. @@ -91,3 +96,67 @@ with the means to create message catalogs, as well as an Emacs mode to work with them, and a runtime library to load translated messages from the catalogs. Nearly all GNU packages use Gettext.") (license gpl3+))) ;some files are under GPLv2+ + +(define-public po4a + (package + (name "po4a") + (version "0.47") + (source (origin + (method url-fetch) + (uri (string-append "https://alioth.debian.org/frs/download.php" + "/file/4142/po4a-" version ".tar.gz")) + (sha256 + (base32 + "01vm0750aq0h2lphrflv3wq9gz7y0py8frglfpacn58ivyvy242h")))) + (build-system perl-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + ;; FIXME: One test fails as we don't have SGMLS.pm + (add-before 'check 'disable-sgml-test + (lambda _ + (delete-file "t/20-sgml.t") + #t)) + (add-after 'unpack 'fix-builder + (lambda* (#:key inputs outputs #:allow-other-keys) + (substitute* "Po4aBuilder.pm" + ;; By default it tries to install into perl's manpath. + (("my \\$mandir = .*$") + (string-append "my $mandir = \"" (assoc-ref outputs "out") + "/share/man\";\n")) + ;; Use local docbook XSL + (((string-append "--nonet http://docbook.sourceforge.net/" + "release/xsl/current" + "/manpages/docbook.xsl")) + (string-append "--nonet " + (assoc-ref inputs "docbook-xsl") + ;; TODO: replace version string + "/xml/xsl/docbook-xsl-" "1.78.1" + "/manpages/docbook.xsl"))) + #t)) + (add-after 'install 'wrap-programs + (lambda* (#:key outputs #:allow-other-keys) + ;; Make sure all executables in "bin" find the Perl modules + ;; provided by this package at runtime. + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin/")) + (path (string-append out "/lib/perl5/site_perl"))) + (for-each (lambda (file) + (wrap-program file + `("PERL5LIB" ":" prefix (,path)))) + (find-files bin "\\.*$")) + #t)))))) + (native-inputs + `(("gettext" ,gnu-gettext) + ("perl-module-build" ,perl-module-build) + ("docbook-xsl" ,docbook-xsl) + ("docbook-xml" ,docbook-xml) ;for tests + ("texlive-bin" ,texlive-bin) ;for tests + ("xsltproc" ,libxslt))) + (home-page "http://po4a.alioth.debian.org/") + (synopsis "Scripts to ease maintenance of translations") + (description + "The po4a (PO for anything) project goal is to ease translations (and +more interestingly, the maintenance of translations) using gettext tools on +areas where they were not expected like documentation.") + (license gpl2+))) -- 2.5.0 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0002-gnu-Add-gerbv.patch >From 87f3d5df4cb7672e6dcdaa1e4e2b7fc59ff37e11 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Mon, 31 Aug 2015 08:47:09 +0200 Subject: [PATCH 2/2] gnu: Add gerbv. * gnu/packages/engineering.scm (gerbv): New variable. --- gnu/packages/engineering.scm | 47 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm index 7faf61e..76da6e7 100644 --- a/gnu/packages/engineering.scm +++ b/gnu/packages/engineering.scm @@ -28,6 +28,7 @@ #:use-module ((guix licenses) #:prefix license:) #:use-module (guix build-system gnu) #:use-module (gnu packages) + #:use-module (gnu packages autotools) #:use-module (gnu packages base) #:use-module (gnu packages bison) #:use-module (gnu packages boost) @@ -35,6 +36,7 @@ #:use-module (gnu packages flex) #:use-module (gnu packages fontutils) #:use-module (gnu packages gd) + #:use-module (gnu packages gettext) #:use-module (gnu packages ghostscript) #:use-module (gnu packages gl) #:use-module (gnu packages glib) @@ -364,3 +366,48 @@ multipole-accelerated algorithm.") "Fasthenry is an inductance extraction program based on a multipole-accelerated algorithm.") (license (license:non-copyleft #f "See induct.c.")))) + +(define-public gerbv + (package + (name "gerbv") + (version "2.6.1") + (source (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/gerbv/gerbv/gerbv-" + version "/gerbv-" version ".tar.gz")) + (sha256 + (base32 + "0v6ry0mxi5qym4z0y0lpblxsw9dfjpgxs4c4v2ngg7yw4b3a59ks")))) + (build-system gnu-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-before 'configure 'autoconf + (lambda _ + ;; Build rules contain references to Russian translation, but the + ;; needed files are missing; see + ;; http://sourceforge.net/p/gerbv/bugs/174/ + (delete-file "po/LINGUAS") + (substitute* "man/Makefile.am" + (("PO_FILES= gerbv.ru.1.in.po") "") + (("man_MANS = gerbv.1 gerbv.ru.1") "man_MANS = gerbv.1")) + (zero? (system* "autoreconf" "-vfi"))))))) + (native-inputs + `(("autoconf" ,autoconf) + ("automake" ,automake) + ("libtool" ,libtool) + ("gettext" ,gnu-gettext) + ("po4a" ,po4a) + ("pkg-config" ,pkg-config))) + (inputs + `(("cairo" ,cairo) + ("gtk" ,gtk+-2) + ("desktop-file-utils" ,desktop-file-utils))) + (home-page "http://gerbv.geda-project.org/") + (synopsis "Gerber file viewer") + (description + "Gerbv is a Gerber file (RS-274X only) viewer. Gerbv lets you load +several files on top of each other, do measurements on the displayed image, +etc. Besides viewing Gerbers, you may also view Excellon drill files as well +as pick-place file.") + (license license:gpl2+))) -- 2.5.0 --=-=-=--