Re: [PATCH]: Add CUPS.

2015-01-09 Thread Ricardo Wurmus
Attached is a more comprehensive patch set to add CUPS.

CUPS on non-MacOS systems depends on cups-filters, which in turn depends
on QPDF and IJS.

* QPDF is added by the first patch.

* IJS is part of ghostscript, but for some reason is not built even when
  passing "--with-ijs" as a configure flag.  There is no configure
  script and no usable Makefile in ./ijs, so we actually have to run
  ./autogen.sh after generating macros that work with libtool 2.4.2.
  The second patch adds a new very ugly phase that does just that.  I'd
  love to change this if someone can come up with a better way to do
  this.

* cups-filters also depends on CUPS libraries and binaries, so
  cups-minimal has been added to satisfy this dependency.  During
  installation, cups-filters attempts to install files to the CUPS
  package output directory.  The install phase is modified to direct the
  files to the output directory of cups-filters.

* the CUPS package itself then adds links to the required files in
  cups-filters.  CUPS does not come with a mechanism to load filters,
  backends, charsets, mime files, etc from alternative directories, so I
  chose to use symlinks.

* the CUPS tests are run before the installation of any symlinks, so to
  establish a working test environment quite a lot of fixes to the test
  phase are needed.  Without the files from cups-filters seven tests
  fail.  With the files in place only three tests fail.  I have not been
  able to fix these remaining failures, even though I have been trying
  for a long time.

I have addressed your previous comments about outputs and the CUPS
license (gpl2 instead of gpl2+).

Thanks in advance for your review!

-- Ricardo

>From 8e671fdd888bf9548bf52acf8789500c90d4b072 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus 
Date: Wed, 7 Jan 2015 17:49:00 +0100
Subject: [PATCH 1/3] gnu: Add QPDF.

* gnu/packages/pdf.scm (qpdf): New variable.
---
 gnu/packages/pdf.scm | 42 ++
 1 file changed, 42 insertions(+)

diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm
index 0f9098d..02b55ac 100644
--- a/gnu/packages/pdf.scm
+++ b/gnu/packages/pdf.scm
@@ -37,6 +37,8 @@
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages lua)
   #:use-module (gnu packages curl)
+  #:use-module (gnu packages pcre)
+  #:use-module (gnu packages perl)
   #:use-module (srfi srfi-1))
 
 (define-public poppler
@@ -238,3 +240,43 @@ The library ships with a rudimentary X11 viewer, and a set of command
 line tools for batch rendering (pdfdraw), examining the file structure
 (pdfshow), and rewriting files (pdfclean).")
 (license license:agpl3+)))
+
+(define-public qpdf
+  (package
+   (name "qpdf")
+   (version "5.1.2")
+   (source (origin
+(method url-fetch)
+(uri (string-append "mirror://sourceforge/qpdf/qpdf-"
+version ".tar.gz"))
+(sha256 (base32
+ "1zbvhrp0zjzbi6q2bnbxbg6399r47pq5gw3kspzph81j19fqvpg9"
+   (build-system gnu-build-system)
+   (arguments
+  '(#:phases (alist-cons-before
+  'configure 'patch-paths
+  (lambda _
+(substitute* "make/libtool.mk"
+  (("SHELL=/bin/bash")
+   (string-append "SHELL=" (which "bash"
+(substitute* (append
+  '("qtest/bin/qtest-driver")
+  (find-files "." "\\.test"))
+  (("/usr/bin/env") (which "env"
+  %standard-phases)))
+   (native-inputs
+`(("pkg-config" ,pkg-config)))
+   (propagated-inputs
+`(("pcre" ,pcre)))
+   (inputs
+`(("zlib" ,zlib)
+  ("perl" ,perl)))
+   (synopsis "Command-line tools and library for transforming PDF files")
+   (description
+"QPDF is a command-line program that does structural, content-preserving
+transformations on PDF files.  It could have been called something like
+pdf-to-pdf.  It includes support for merging and splitting PDFs and to
+manipulate the list of pages in a PDF file.  It is not a PDF viewer or a
+program capable of converting PDF into other formats.")
+   (license license:clarified-artistic)
+   (home-page "http://qpdf.sourceforge.net/";)))
-- 
1.9.3

>From 36eac76f1aa129f2e22d4341fe4d64d4c5b8fd0a Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus 
Date: Fri, 9 Jan 2015 15:19:54 +0100
Subject: [PATCH 2/3] gnu: ghostscript: build IJS library

* gnu/packages/ghostscript.scm (ghostscript): build and install IJS library
  and header files.
---
 gnu/packages/ghostscript.scm | 61 +++-
 1 file changed, 49 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/ghostscript.scm b/gnu/packages/ghostscript.scm
index 405b4e7..bef0551 100644
--- a/gnu/packages/ghostscript.scm
+++ b/gnu/packages/ghostscript.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013 Andreas 

Re: [PATCH] gnu: Add ninja.

2015-01-09 Thread Ludovic Courtès
宋文武  skribis:

> * gnu/packages/ninja.scm: New file.
> * gnu-system.am (GNU_SYSTEM_MODULES): Add it.

[...]

> +  'check
> +  (lambda _
> +(and (zero? (system "./configure.py"))
> + (zero? (system "./ninja ninja_test"))
> + ;; SubprocessTest.InterruptChild fail when using 'system*'.
> + ;; SubprocessTest.SetWithLots was skipped.
> + ;; XXX: Raise [ulimit -n] well above 1025 to make this test 
> go.

Does it mean that the test is currently failing?

> + (zero? (system (string-append
> + "./ninja_test "
> + "--gtest_filter="
> + "-SubprocessTest.SetWithLots")

Please use ‘system*’ (with separate arguments) rather than ‘system’.
The latter runs “/bin/sh -c ...” whereas the former runs the program
directly.

Thanks,
Ludo’.



Re: [PATCH 4/4] import: Add CPAN importer.

2015-01-09 Thread Ludovic Courtès
Eric Bavier  skribis:

> * guix/import/cpan.scm, guix/scripts/import/cpan.scm, tests/cpan.scm:
>   New files.
> * Makefile.am (MODULE)[guile-json]: Add them.
> * guix/scripts/import.scm (importers): Add cpan.
> * doc/guix.texi (Requirements): Mention `guix import cpan` as a user
>   of guile-json.
>   (Invoking guix import): Document new `guix import cpan` command.

[...]

> +@item cpan
> +@cindex cpan

@cindex CPAN

> +(define-module (guix import cpan)
> +  #:use-module (ice-9 match)
> +  #:use-module (ice-9 regex)
> +  #:use-module (srfi srfi-1)
> +  #:use-module (json)
> +  #:use-module (guix store)
> +  #:use-module (guix base32)
> +  #:use-module ((guix download) #:select (download-to-store))
> +  #:use-module (guix import utils)
> +  #:use-module (guix import json)
> +  #:export (cpan->guix-package))

Could you add a short description in a “Commentary:” block?

Very nice, thank you!

Ludo’.



[PATCH] gnu: Add ninja.

2015-01-09 Thread 宋文武
* gnu/packages/ninja.scm: New file.
* gnu-system.am (GNU_SYSTEM_MODULES): Add it.
---
 gnu-system.am  |  1 +
 gnu/packages/ninja.scm | 82 ++
 2 files changed, 83 insertions(+)
 create mode 100644 gnu/packages/ninja.scm

diff --git a/gnu-system.am b/gnu-system.am
index 33d870c..acea574 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -191,6 +191,7 @@ GNU_SYSTEM_MODULES =\
   gnu/packages/ncurses.scm \
   gnu/packages/netpbm.scm  \
   gnu/packages/nettle.scm  \
+  gnu/packages/ninja.scm   \
   gnu/packages/node.scm\
   gnu/packages/noweb.scm   \
   gnu/packages/ntp.scm \
diff --git a/gnu/packages/ninja.scm b/gnu/packages/ninja.scm
new file mode 100644
index 000..8939750
--- /dev/null
+++ b/gnu/packages/ninja.scm
@@ -0,0 +1,82 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2015 Sou Bunnbu 
+;;;
+;;; 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
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; 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 ninja)
+  #:use-module ((guix licenses) #:select (asl2.0))
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix build-system gnu)
+  #:use-module (gnu packages)
+  #:use-module (gnu packages python))
+
+(define-public ninja
+  (package
+(name "ninja")
+(version "1.5.3")
+(source (origin
+  (method url-fetch)
+  (uri (string-append "https://github.com/martine/ninja/";
+  "archive/v" version ".tar.gz"))
+  (sha256
+   (base32
+"1h3yfwcfl61v493vna6jia2fizh8rpig7qw2504cvkr6gid3p5bw"
+(build-system gnu-build-system)
+(arguments
+ '(#:phases
+   (alist-replace
+'configure
+(lambda _
+  (substitute* "src/subprocess-posix.cc"
+(("/bin/sh") (which "sh"
+(alist-replace
+ 'build
+ (lambda _
+   (zero? (system "./configure.py --bootstrap")))
+ (alist-replace
+  'check
+  (lambda _
+(and (zero? (system "./configure.py"))
+ (zero? (system "./ninja ninja_test"))
+ ;; SubprocessTest.InterruptChild fail when using 'system*'.
+ ;; SubprocessTest.SetWithLots was skipped.
+ ;; XXX: Raise [ulimit -n] well above 1025 to make this test 
go.
+ (zero? (system (string-append
+ "./ninja_test "
+ "--gtest_filter="
+ "-SubprocessTest.SetWithLots")
+  (alist-replace
+   'install
+   (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+(bin (string-append out "/bin"))
+(doc (string-append out "/share/doc/ninja")))
+   (mkdir-p bin)
+   (copy-file "ninja" (string-append bin "/ninja"))
+   (mkdir-p doc)
+   (copy-file "doc/manual.asciidoc"
+  (string-append doc "/manual.asciidoc"
+   %standard-phases))
+(native-inputs `(("python" ,python-2)))
+(home-page "http://martine.github.io/ninja/";)
+(synopsis "Small build system")
+(description
+ "Ninja is a small build system with a focus on speed.  It differs from
+other build systems in two major respects: it is designed to have its input
+files generated by a higher-level build system, and it is designed to run
+builds as fast as possible.")
+(license asl2.0)))
-- 
2.1.2




Re: [PATCH 3/4] tests: import: Factorize utility function.

2015-01-09 Thread Ludovic Courtès
Eric Bavier  skribis:

> * tests/pypi.scm (mock): Move this...
> * guix/tests.scm: to here.

OK!

Ludo’.



Re: [PATCH 2/4] import: Factorize utility functions.

2015-01-09 Thread Ludovic Courtès
Eric Bavier  skribis:

> * guix/import/pypi.scm (hash-table->alist, flatten, assoc-ref*,
>   url-fetch, json-fetch): Pull functions from here and...
> * guix/import/gnu.scm (file-sha256): here out into...
> * guix/import/utils.scm: Here, and...
> * guix/import/json.scm: Here.  New file.
> * Makefile.am (MODULE)[guile-json]: Add it.

Should be:

  * Makefile.am (MODULES)[HAVE_GUILE_JSON]: Add it.

> * tests/pypi.scm (pypi->guix-package): Update mock module reference.

LGTM, but could you move ‘file-sha256’ to (guix hash) instead, below
‘port-sha256’?

> --- a/guix/import/gnu.scm
> +++ b/guix/import/gnu.scm
> @@ -1,4 +1,4 @@
> -;;; GNU Guix --- Functional package management for GNU
> +;; GNU Guix --- Functional package management for GNU

Typo.

Thanks,
Ludo’.



Re: [PATCH 1/4] import: gnu: Propagate the key-download argument.

2015-01-09 Thread Ludovic Courtès
Eric Bavier  skribis:

> * guix/import/gnu.scm (gnu->guix-package): Pass the key-download
>   argument on to gnu-package->sexp.

OK!  Good catch.

Ludo'.



Re: [PATCH] gnu: texlive: Drop input texlive-extra.

2015-01-09 Thread Ludovic Courtès
Andreas Enge  skribis:

> Actually, it turns out that tlpkg is also used by updmap; so please disregard
> my previous message.

Oh, that’s unexpected if tlmgr is some sort of package/update manager.

Ludo’.



Re: [PATCH 0/3]: openjpeg and poppler

2015-01-09 Thread Ricardo Wurmus
>> This patch series
>>
>> - fixes the home page URL for openjpeg
>> - adds openjpeg 1.5 (inheriting from openjpeg 2)
>> - updates poppler to build with openjpeg 1.5 and lcms
>> - updates openjpeg 2.0.0 to 2.0.1
>
> All looks good to me!
>
> Please make sure to add a copyright line for you in these two files.

Thanks for the review!

I updated the patches to include the copyright lines and pushed the
commits.

-- Ricardo



New Esperanto PO file for 'guix-packages' (version 0.8)

2015-01-09 Thread Translation Project Robot
Hello, gentle maintainer.

This is a message from the Translation Project robot.

A revised PO file for textual domain 'guix-packages' has been submitted
by the Esperanto team of translators.  The file is available at:

http://translationproject.org/latest/guix-packages/eo.po

(We can arrange things so that in the future such files are automatically
e-mailed to you when they arrive.  Ask at the address below if you want this.)

All other PO files for your package are available in:

http://translationproject.org/latest/guix-packages/

Please consider including all of these in your next release, whether
official or a pretest.

Whenever you have a new distribution with a new version number ready,
containing a newer POT file, please send the URL of that distribution
tarball to the address below.  The tarball may be just a pretest or a
snapshot, it does not even have to compile.  It is just used by the
translators when they need some extra translation context.

The following HTML page has been updated:

http://translationproject.org/domain/guix-packages.html

If any question arises, please contact the translation coordinator.

Thank you for all your work,

The Translation Project robot, in the
name of your translation coordinator.