From a25362a5c12507360953b507a18320edef81167f Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Wed, 18 Nov 2020 14:09:56 +0100 Subject: gnu: splix: Update to 2.0.0-315.76268c4. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/cups.scm (splix): Update to 2.0.0-315.76268c4. [source]: Fetch from a more maintained git repository. [arguments]: Add an ‘enter-subdirectory’ phase. [inputs]: Remove instructions for building without JBIG. It's no longer patented. --- gnu/packages/cups.scm | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) (limited to 'gnu/packages/cups.scm') diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm index 173f8ca0f5..3f0cdb7468 100644 --- a/gnu/packages/cups.scm +++ b/gnu/packages/cups.scm @@ -49,7 +49,7 @@ #:use-module (guix build-system gnu) #:use-module (guix build-system python) #:use-module (guix download) - #:use-module (guix svn-download) + #:use-module (guix git-download) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix utils) @@ -797,24 +797,26 @@ language.") (license license:gpl2+))) (define-public splix - ;; The last release was in 2009. The SVN repository contains 5 years of - ;; unreleased bug fixes and support for newer printer models. - (let ((revision 315)) + ;; Last released in 2009 . + ;; Last SVN commit was 2013 . + ;; Use a more maintained fork with several bug fixes and support for newer + ;; printer models. + (let ((commit "76268c4dd7dbc8218ea7426401104c3b40cc707a") + (revision "315")) (package (name "splix") - (version (string-append "2.0.0-" (number->string revision))) + (version (git-version "2.0.0" revision commit)) (source (origin - (method svn-fetch) - (uri (svn-reference - (url "https://svn.code.sf.net/p/splix/code/splix/") - (revision revision))) - (file-name (string-append name "-" version "-checkout")) + (method git-fetch) + (uri (git-reference + (url "https://gitlab.com/ScumCoder/splix") + (commit commit))) + (file-name (git-file-name name version)) (sha256 - (base32 "16wbm4xnz35ca3mw2iggf5f4jaxpyna718ia190ka6y4ah932jxl")))) + (base32 "1mxsvllwwr1v8sgrax0b7gkajjhnm0l06s67spmaxz47lyll1qab")))) (build-system gnu-build-system) - ;; 90% (3.8 MiB) of output are .ppd files. Don't install them by default: - ;; CUPS has been able to read the .drv sources directly since version 1.2. + ;; PPDs have been obsolete since CUPS 1.2 and make up 90% of total size. (outputs (list "out" "ppd")) (arguments '(#:make-flags @@ -828,6 +830,11 @@ language.") "THREADS=4") ; compress and print faster #:phases (modify-phases %standard-phases + (add-after 'unpack 'enter-subdirectory + ;; The git repository replicates the top-level SVN layout. + (lambda _ + (chdir "splix") + #t)) (delete 'configure) ; no configure script (add-before 'build 'build-.drv-files (lambda* (#:key make-flags #:allow-other-keys) @@ -838,11 +845,8 @@ language.") #:tests? #f)) ; no test suite (inputs `(("cups" ,cups-minimal) - ("zlib" ,zlib) - - ;; This dependency can be dropped by setting DISABLE_JBIG=1, but the - ;; result will not support some printers like the Samsung CLP-600. - ("jbigkit" ,jbigkit))) + ("jbigkit" ,jbigkit) + ("zlib" ,zlib))) (synopsis "QPDL (SPL2) printer driver") (description "SpliX is a set of CUPS drivers for printers that speak @acronym{QPDL, -- cgit 1.4.1 From 359a195eff63d16f36e411409abe6cd71c13a4d1 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Wed, 18 Nov 2020 15:52:26 +0100 Subject: gnu: splix: Compress PPDs. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/cups.scm (splix)[arguments]: Import SRFI-26 and add a ‘compress-PPDs’ phase. --- gnu/packages/cups.scm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'gnu/packages/cups.scm') diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm index 3f0cdb7468..cdfb9643c0 100644 --- a/gnu/packages/cups.scm +++ b/gnu/packages/cups.scm @@ -819,7 +819,10 @@ language.") ;; PPDs have been obsolete since CUPS 1.2 and make up 90% of total size. (outputs (list "out" "ppd")) (arguments - '(#:make-flags + `(#:modules + ((srfi srfi-26) + ,@%gnu-build-system-modules) + #:make-flags (list (string-append "CUPSDRV=" (assoc-ref %outputs "out") "/share/cups/drv") (string-append "CUPSFILTER=" @@ -841,7 +844,12 @@ language.") (apply invoke "make" "drv" make-flags))) (add-after 'install 'install-.drv-files (lambda* (#:key make-flags #:allow-other-keys) - (apply invoke "make" "install" "DRV_ONLY=1" make-flags)))) + (apply invoke "make" "install" "DRV_ONLY=1" make-flags))) + (add-after 'install 'compress-PPDs + (lambda* (#:key outputs #:allow-other-keys) + (let ((ppd (assoc-ref outputs "ppd"))) + (for-each (cut invoke "gzip" "-9" <>) + (find-files ppd "\\.ppd$")))))) #:tests? #f)) ; no test suite (inputs `(("cups" ,cups-minimal) -- cgit 1.4.1 From 12abf24c85a1b8ea503f2ac6b0f21165c98fd25a Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Wed, 18 Nov 2020 18:25:44 +0100 Subject: gnu: escpr: Update to 1.7.8. * gnu/packages/cups.scm (escpr): Update to 1.7.8. --- gnu/packages/cups.scm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'gnu/packages/cups.scm') diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm index cdfb9643c0..727af501e1 100644 --- a/gnu/packages/cups.scm +++ b/gnu/packages/cups.scm @@ -747,7 +747,7 @@ HP@tie{}LaserJet, and possibly other printers. See @file{README} for details.") (define-public escpr (package (name "escpr") - (version "1.7.7") + (version "1.7.8") ;; XXX: This currently works. But it will break as soon as a newer ;; version is available since the URLs for older versions are not ;; preserved. An alternative source will be added as soon as @@ -755,11 +755,11 @@ HP@tie{}LaserJet, and possibly other printers. See @file{README} for details.") (source (origin (method url-fetch) - (uri (string-append "https://download3.ebz.epson.net/dsc/f/03/00/10/49/18/" - "f3016be6120a7271a6d9cb64872f817bce1920b8/" - "epson-inkjet-printer-escpr-1.7.7-1lsb3.2.tar.gz")) + (uri (string-append "https://download3.ebz.epson.net/dsc/f/03/00/12/04/32/" + "1a455ef8618def65700ca4e446311c2fb43cd839/" + "epson-inkjet-printer-escpr-1.7.8-1lsb3.2.tar.gz")) (sha256 - (base32 "0khdf2a9iwh9aplj2gzyzl53yyfnfv0kszk3p018jnirl5l475ld")))) + (base32 "1pygg2bd2gh27dc65h3dzwrpvi6bq5c87wl0ldchqlc2b3blsx6p")))) (build-system gnu-build-system) (arguments `(#:configure-flags -- cgit 1.4.1 From 61eba7271b2fee92743297a44b7caae8b5c52f90 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Wed, 18 Nov 2020 18:32:50 +0100 Subject: gnu: escpr: Use HTTPS, more relevant home page. * gnu/packages/cups.scm (escpr)[home-page]: Use HTTPS. Pre-set the OSC parameter most relevant to GNU. --- gnu/packages/cups.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gnu/packages/cups.scm') diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm index 727af501e1..d1d6978758 100644 --- a/gnu/packages/cups.scm +++ b/gnu/packages/cups.scm @@ -793,7 +793,7 @@ HP@tie{}LaserJet, and possibly other printers. See @file{README} for details.") System} that offers high-quality printing with Seiko@tie{}Epson color ink jet printers. It can be used only with printers that support the Epson@tie{}ESC/P-R language.") - (home-page "http://download.ebz.epson.net/dsc/search/01/search") + (home-page "http://download.ebz.epson.net/dsc/search/01/search/?OSC=LX") (license license:gpl2+))) (define-public splix -- cgit 1.4.1 From aa954ec3664738f3d7b75a5ba96f787b93ad50c8 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Wed, 18 Nov 2020 23:52:17 +0100 Subject: gnu: escpr: Compress PPDs. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/cups.scm (escpr)[arguments]: Import SRFI-26 and add a ‘compress-PPDs’ phase. --- gnu/packages/cups.scm | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'gnu/packages/cups.scm') diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm index d1d6978758..1e25d545b2 100644 --- a/gnu/packages/cups.scm +++ b/gnu/packages/cups.scm @@ -762,7 +762,10 @@ HP@tie{}LaserJet, and possibly other printers. See @file{README} for details.") (base32 "1pygg2bd2gh27dc65h3dzwrpvi6bq5c87wl0ldchqlc2b3blsx6p")))) (build-system gnu-build-system) (arguments - `(#:configure-flags + `(#:modules + ((srfi srfi-26) + ,@%gnu-build-system-modules) + #:configure-flags `(,(string-append "--prefix=" (assoc-ref %outputs "out")) ,(string-append "--with-cupsfilterdir=" @@ -781,7 +784,13 @@ HP@tie{}LaserJet, and possibly other printers. See @file{README} for details.") (string-append match "aclocal")) (("^(AUTOMAKE=).*" _ match) (string-append match "automake"))) - #t))))) + #t)) + (add-after 'install 'compress-PPDs + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (with-directory-excursion out + (for-each (cut invoke "gzip" "-9" <>) + (find-files "share/cups" "\\.ppd$"))))))))) (native-inputs `(("autoconf" ,autoconf) ("automake" ,automake))) -- cgit 1.4.1 From 3b2a26219f4291565edc39f5e48a8c9b3ca76381 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sat, 21 Nov 2020 15:15:57 +0100 Subject: gnu: escpr: Omit static library. * gnu/packages/cups.scm (escpr)[arguments]: Add "--disable-static" to #:configure-flags. --- gnu/packages/cups.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gnu/packages/cups.scm') diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm index 1e25d545b2..b2d7b952b9 100644 --- a/gnu/packages/cups.scm +++ b/gnu/packages/cups.scm @@ -766,7 +766,8 @@ HP@tie{}LaserJet, and possibly other printers. See @file{README} for details.") ((srfi srfi-26) ,@%gnu-build-system-modules) #:configure-flags - `(,(string-append "--prefix=" + `("--disable-static" + ,(string-append "--prefix=" (assoc-ref %outputs "out")) ,(string-append "--with-cupsfilterdir=" (assoc-ref %outputs "out") "/lib/cups/filter") -- cgit 1.4.1 From 0b57c1b09efb74f0b30fd74c7c1eb2da1f5957bc Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Thu, 19 Nov 2020 00:01:51 +0100 Subject: gnu: Rename escpr to epson-inkjet-printer-escpr. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ‘escpr’ is nice and short, but everyone else calls this package ‘epson-inkjet-printer-escpr’. More importantly, so does upstream. * gnu/packages/cups.scm (escpr, epson-inkjet-printer-escpr,): Rename escpr to epson-inkjet-printer-escpr, redefining escpr as deprecated-package. Adjust all users. --- doc/guix.texi | 11 ++++++----- gnu/packages/cups.scm | 7 +++++-- gnu/services/cups.scm | 3 ++- 3 files changed, 13 insertions(+), 8 deletions(-) (limited to 'gnu/packages/cups.scm') diff --git a/doc/guix.texi b/doc/guix.texi index d021384b73..1f1510f5f5 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -17503,16 +17503,17 @@ CUPS service will generate a self-signed certificate if needed, for secure connections to the print server. Suppose you want to enable the Web interface of CUPS and also add -support for Epson printers @i{via} the @code{escpr} package and for HP -printers @i{via} the @code{hplip-minimal} package. You can do that directly, -like this (you need to use the @code{(gnu packages cups)} module): +support for Epson printers @i{via} the @code{epson-inkjet-printer-escpr} +package and for HP printers @i{via} the @code{hplip-minimal} package. +You can do that directly, like this (you need to use the +@code{(gnu packages cups)} module): @lisp (service cups-service-type (cups-configuration (web-interface? #t) (extensions - (list cups-filters escpr hplip-minimal)))) + (list cups-filters epson-inkjet-printer-escpr hplip-minimal)))) @end lisp Note: If you wish to use the Qt5 based GUI which comes with the hplip @@ -17541,7 +17542,7 @@ Available @code{cups-configuration} fields are: The CUPS package. @end deftypevr -@deftypevr {@code{cups-configuration} parameter} package-list extensions (default: @code{(list escpr hplip-minimal foomatic-filters)}) +@deftypevr {@code{cups-configuration} parameter} package-list extensions (default: @code{(list epson-inkjet-printer-escpr hplip-minimal foomatic-filters)}) Drivers and other extensions to the CUPS package. @end deftypevr diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm index b2d7b952b9..bfe24027fb 100644 --- a/gnu/packages/cups.scm +++ b/gnu/packages/cups.scm @@ -744,9 +744,9 @@ HP@tie{}LaserJet, and possibly other printers. See @file{README} for details.") (license (list license:expat ; icc2ps/*.[ch] license:gpl2+)))) ; everything else -(define-public escpr +(define-public epson-inkjet-printer-escpr (package - (name "escpr") + (name "epson-inkjet-printer-escpr") (version "1.7.8") ;; XXX: This currently works. But it will break as soon as a newer ;; version is available since the URLs for older versions are not @@ -806,6 +806,9 @@ language.") (home-page "http://download.ebz.epson.net/dsc/search/01/search/?OSC=LX") (license license:gpl2+))) +(define-public escpr + (deprecated-package "escpr" epson-inkjet-printer-escpr)) + (define-public splix ;; Last released in 2009 . ;; Last SVN commit was 2013 . diff --git a/gnu/services/cups.scm b/gnu/services/cups.scm index 7d2defacaa..6194fc37ad 100644 --- a/gnu/services/cups.scm +++ b/gnu/services/cups.scm @@ -482,7 +482,8 @@ programs.") (package cups) "The CUPS package.") (extensions - (package-list (list cups-filters escpr hplip-minimal foomatic-filters)) + (package-list (list cups-filters epson-inkjet-printer-escpr + foomatic-filters hplip-minimal)) "Drivers and other extensions to the CUPS package.") (files-configuration (files-configuration (files-configuration)) -- cgit 1.4.1