diff mbox

[1/3] gnu: cups-filters: Look for test page in own output dir.

Message ID 20161010133001.10573-1-wingo@igalia.com
State New
Headers show

Commit Message

Andy Wingo Oct. 10, 2016, 1:29 p.m. UTC
* gnu/packages/cups.scm (cups-filters): Update to look for the test page
  template in the cups-filter output dir, as cups and cups-filter do not
  share an output dir.
---
 gnu/packages/cups.scm | 28 +++++++++++++++++-----------
 1 file changed, 17 insertions(+), 11 deletions(-)

Comments

Ludovic Courtès Oct. 10, 2016, 9:50 p.m. UTC | #1
Andy Wingo <wingo@igalia.com> skribis:

> * gnu/packages/cups.scm (cups-filters): Update to look for the test page
>   template in the cups-filter output dir, as cups and cups-filter do not
>   share an output dir.

I’ve applied this one on core-updates as
085cca5bc1d8ca6b3d7d01e4a5c4f0f3886e7fbc.

> +                  (substitute* '("configure.ac" "configure")
> +                    (("\\{CUPS_DATADIR\\}/data")
> +                     "{PREFIX}/share/cups/data"))))))

I changed it to only patch ‘configure’, not ‘configure.ac’, as you
suggested on IRC this morning.  I also changed “PREFIX” to “prefix” so
that it would do what we intended (I checked by running “strings
bannertopdf | grep /data” that we got the right file name.)

Thanks!

Ludo’.
diff mbox

Patch

diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm
index e51dcb5..3ce1157 100644
--- a/gnu/packages/cups.scm
+++ b/gnu/packages/cups.scm
@@ -56,17 +56,23 @@ 
               (snippet
                ;; install backends, banners and filters to cups-filters output
                ;; directory, not the cups server directory
-               '(substitute* "Makefile.in"
-                  (("CUPS_DATADIR = @CUPS_DATADIR@")
-                   "CUPS_DATADIR = $(PREFIX)/share/cups")
-                  (("pkgcupsserverrootdir = \\$\\(CUPS_SERVERROOT\\)")
-                   "pkgcupsserverrootdir = $(PREFIX)")
-                  ;; Choose standard directories notably so that binaries are
-                  ;; stripped.
-                  (("pkgbackenddir = \\$\\(CUPS_SERVERBIN\\)/backend")
-                   "pkgbackenddir = $(PREFIX)/lib/cups/backend")
-                  (("pkgfilterdir = \\$\\(CUPS_SERVERBIN\\)/filter")
-                   "pkgfilterdir = $(PREFIX)/lib/cups/filter")))))
+               '(begin
+                  (substitute* "Makefile.in"
+                    (("CUPS_DATADIR = @CUPS_DATADIR@")
+                     "CUPS_DATADIR = $(PREFIX)/share/cups")
+                    (("pkgcupsserverrootdir = \\$\\(CUPS_SERVERROOT\\)")
+                     "pkgcupsserverrootdir = $(PREFIX)")
+                    ;; Choose standard directories notably so that binaries are
+                    ;; stripped.
+                    (("pkgbackenddir = \\$\\(CUPS_SERVERBIN\\)/backend")
+                     "pkgbackenddir = $(PREFIX)/lib/cups/backend")
+                    (("pkgfilterdir = \\$\\(CUPS_SERVERBIN\\)/filter")
+                     "pkgfilterdir = $(PREFIX)/lib/cups/filter"))
+                  ;; Find bannertopdf data in our output directory, not CUPS's
+                  ;; prefix.
+                  (substitute* '("configure.ac" "configure")
+                    (("\\{CUPS_DATADIR\\}/data")
+                     "{PREFIX}/share/cups/data"))))))
     (build-system gnu-build-system)
     (arguments
      `(#:make-flags (list (string-append "PREFIX=" %output))