* [PATCH 2/2] gnu: netpbm: Fix location of X color name database.
@ 2016-05-13 16:51 Federico Beffa
2016-05-13 17:10 ` Andreas Enge
0 siblings, 1 reply; 7+ messages in thread
From: Federico Beffa @ 2016-05-13 16:51 UTC (permalink / raw)
To: Guix-devel
[-- Attachment #1: Type: text/plain, Size: 79 bytes --]
This fixes some of the provided programs like, e.g. 'pamtogif'.
Regards,
Fede
[-- Attachment #2: 0002-gnu-netpbm-Fix-location-of-X-color-name-database.patch --]
[-- Type: text/x-patch, Size: 5660 bytes --]
From 3658a1edfdcd21a81ea14a9627c5e8bac50bc0f8 Mon Sep 17 00:00:00 2001
From: Federico Beffa <beffa@fbengineering.ch>
Date: Fri, 13 May 2016 15:32:49 +0200
Subject: [PATCH 2/2] gnu: netpbm: Fix location of X color name database.
* gnu/packages/netpbm.scm (netpbm)[inputs]: Add 'xorg-rgb'.
[arguments]: Use 'modify-phases' syntax. In the 'configure' phase, patch
'pm_config.in.h' with the full path to the 'rgb.txt' file.
---
gnu/packages/netpbm.scm | 92 ++++++++++++++++++++++++++-----------------------
1 file changed, 48 insertions(+), 44 deletions(-)
diff --git a/gnu/packages/netpbm.scm b/gnu/packages/netpbm.scm
index 475635e..d0955fe 100644
--- a/gnu/packages/netpbm.scm
+++ b/gnu/packages/netpbm.scm
@@ -27,6 +27,7 @@
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages xml)
+ #:use-module (gnu packages xorg)
#:use-module (guix build-system gnu)
#:use-module ((guix licenses) #:select (gpl2))
#:use-module (guix packages)
@@ -91,6 +92,7 @@
("libpng" ,libpng)
("libtiff" ,libtiff)
("libxml2" ,libxml2)
+ ("xorg-rgb" ,xorg-rgb)
("zlib" ,zlib)))
(native-inputs
`(("flex" ,flex)
@@ -99,50 +101,52 @@
("python" ,python-wrapper)))
(arguments
`(#:phases
- (alist-replace
- 'configure
- (lambda _
- (copy-file "config.mk.in" "config.mk")
- (chmod "config.mk" #o664)
- (let ((f (open-file "config.mk" "a")))
- (display "CC=gcc\n" f)
- (display "CFLAGS_SHLIB += -fPIC\n" f)
- (display "TIFFLIB = libtiff.so\n" f)
- (display "JPEGLIB = libjpeg.so\n" f)
- (display "ZLIB = libz.so\n" f)
- (display (string-append "LDFLAGS += -Wl,-rpath=" %output "/lib") f)
- (close-port f)))
- (alist-cons-before
- 'check 'setup-check
- (lambda _
- ;; install temporarily into /tmp/netpbm
- (system* "make" "package")
- ;; remove test requiring X
- (substitute* "test/all-in-place.test" (("pamx") ""))
- ;; do not worry about non-existing file
- (substitute* "test/all-in-place.test" (("^rm ") "rm -f "))
- ;; remove four tests that fail for unknown reasons
- (substitute* "test/Test-Order"
- (("all-in-place.test") "")
- (("pnmpsnr.test") "")
- (("pnmremap1.test") "")
- (("gif-roundtrip.test") "")))
- (alist-replace
- 'install
- (lambda* (#:key outputs make-flags #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
- (apply system* "make" "package"
- (string-append "pkgdir=" out) make-flags)
- ;; copy static library
- (copy-file (string-append out "/link/libnetpbm.a")
- (string-append out "/lib/libnetpbm.a"))
- ;; remove superfluous folders and files
- (system* "rm" "-r" (string-append out "/link"))
- (system* "rm" "-r" (string-append out "/misc"))
- (with-directory-excursion out
- (for-each delete-file
- '("config_template" "pkginfo" "README" "VERSION")))))
- %standard-phases)))))
+ (modify-phases %standard-phases
+ (replace 'configure
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (copy-file "config.mk.in" "config.mk")
+ (chmod "config.mk" #o664)
+ (let ((f (open-file "config.mk" "a")))
+ (display "CC=gcc\n" f)
+ (display "CFLAGS_SHLIB += -fPIC\n" f)
+ (display "TIFFLIB = libtiff.so\n" f)
+ (display "JPEGLIB = libjpeg.so\n" f)
+ (display "ZLIB = libz.so\n" f)
+ (display (string-append "LDFLAGS += -Wl,-rpath=" %output "/lib") f)
+ (close-port f))
+ (let ((rgb (string-append (assoc-ref inputs "xorg-rgb")
+ "/share/X11/rgb.txt")))
+ (substitute* "pm_config.in.h"
+ (("/usr/share/X11/rgb.txt") rgb)))))
+ (add-before 'check 'setup-check
+ (lambda _
+ ;; install temporarily into /tmp/netpbm
+ (system* "make" "package")
+ ;; remove test requiring X
+ (substitute* "test/all-in-place.test" (("pamx") ""))
+ ;; do not worry about non-existing file
+ (substitute* "test/all-in-place.test" (("^rm ") "rm -f "))
+ ;; remove four tests that fail for unknown reasons
+ (substitute* "test/Test-Order"
+ (("all-in-place.test") "")
+ (("pnmpsnr.test") "")
+ (("pnmremap1.test") "")
+ (("gif-roundtrip.test") ""))))
+ (replace 'install
+ (lambda* (#:key outputs make-flags #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (apply system* "make" "package"
+ (string-append "pkgdir=" out) make-flags)
+ ;; copy static library
+ (copy-file (string-append out "/link/libnetpbm.a")
+ (string-append out "/lib/libnetpbm.a"))
+ ;; remove superfluous folders and files
+ (system* "rm" "-r" (string-append out "/link"))
+ (system* "rm" "-r" (string-append out "/misc"))
+ (with-directory-excursion out
+ (for-each delete-file
+ '("config_template" "pkginfo" "README"
+ "VERSION")))))))))
(synopsis "Toolkit for manipulation of images")
(description
"Netpbm is a toolkit for the manipulation of graphic images, including
--
2.7.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] gnu: netpbm: Fix location of X color name database.
2016-05-13 16:51 [PATCH 2/2] gnu: netpbm: Fix location of X color name database Federico Beffa
@ 2016-05-13 17:10 ` Andreas Enge
2016-05-13 18:44 ` Federico Beffa
0 siblings, 1 reply; 7+ messages in thread
From: Andreas Enge @ 2016-05-13 17:10 UTC (permalink / raw)
To: Federico Beffa; +Cc: Guix-devel
Hello,
On Fri, May 13, 2016 at 06:51:27PM +0200, Federico Beffa wrote:
> This fixes some of the provided programs like, e.g. 'pamtogif'.
I think the common practice is to separate the switch to the %modify-phases
syntax and the real change into two commits; right now, the diff looks big,
but I imagine it must be rather trivial.
Thanks!
Andreas
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] gnu: netpbm: Fix location of X color name database.
2016-05-13 17:10 ` Andreas Enge
@ 2016-05-13 18:44 ` Federico Beffa
2016-05-14 16:25 ` Alex Kost
0 siblings, 1 reply; 7+ messages in thread
From: Federico Beffa @ 2016-05-13 18:44 UTC (permalink / raw)
To: Andreas Enge; +Cc: Guix-devel
[-- Attachment #1: Type: text/plain, Size: 462 bytes --]
On Fri, May 13, 2016 at 7:10 PM, Andreas Enge <andreas@enge.fr> wrote:
> Hello,
>
> On Fri, May 13, 2016 at 06:51:27PM +0200, Federico Beffa wrote:
>> This fixes some of the provided programs like, e.g. 'pamtogif'.
>
> I think the common practice is to separate the switch to the %modify-phases
> syntax and the real change into two commits; right now, the diff looks big,
> but I imagine it must be rather trivial.
Indeed the change is trivial.
Regards,
Fede
[-- Attachment #2: 0002-gnu-netpbm-Use-modify-phases-syntax.patch --]
[-- Type: text/x-patch, Size: 4758 bytes --]
From be37669b50c000ad45eb85075f32d4f23c26489d Mon Sep 17 00:00:00 2001
From: Federico Beffa <beffa@fbengineering.ch>
Date: Fri, 13 May 2016 15:32:49 +0200
Subject: [PATCH 2/3] gnu: netpbm: Use 'modify-phases' syntax.
* gnu/packages/netpbm.scm (netpbm)[arguments]: Do it.
---
gnu/packages/netpbm.scm | 86 ++++++++++++++++++++++++-------------------------
1 file changed, 42 insertions(+), 44 deletions(-)
diff --git a/gnu/packages/netpbm.scm b/gnu/packages/netpbm.scm
index 475635e..d7d8576 100644
--- a/gnu/packages/netpbm.scm
+++ b/gnu/packages/netpbm.scm
@@ -99,50 +99,48 @@
("python" ,python-wrapper)))
(arguments
`(#:phases
- (alist-replace
- 'configure
- (lambda _
- (copy-file "config.mk.in" "config.mk")
- (chmod "config.mk" #o664)
- (let ((f (open-file "config.mk" "a")))
- (display "CC=gcc\n" f)
- (display "CFLAGS_SHLIB += -fPIC\n" f)
- (display "TIFFLIB = libtiff.so\n" f)
- (display "JPEGLIB = libjpeg.so\n" f)
- (display "ZLIB = libz.so\n" f)
- (display (string-append "LDFLAGS += -Wl,-rpath=" %output "/lib") f)
- (close-port f)))
- (alist-cons-before
- 'check 'setup-check
- (lambda _
- ;; install temporarily into /tmp/netpbm
- (system* "make" "package")
- ;; remove test requiring X
- (substitute* "test/all-in-place.test" (("pamx") ""))
- ;; do not worry about non-existing file
- (substitute* "test/all-in-place.test" (("^rm ") "rm -f "))
- ;; remove four tests that fail for unknown reasons
- (substitute* "test/Test-Order"
- (("all-in-place.test") "")
- (("pnmpsnr.test") "")
- (("pnmremap1.test") "")
- (("gif-roundtrip.test") "")))
- (alist-replace
- 'install
- (lambda* (#:key outputs make-flags #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
- (apply system* "make" "package"
- (string-append "pkgdir=" out) make-flags)
- ;; copy static library
- (copy-file (string-append out "/link/libnetpbm.a")
- (string-append out "/lib/libnetpbm.a"))
- ;; remove superfluous folders and files
- (system* "rm" "-r" (string-append out "/link"))
- (system* "rm" "-r" (string-append out "/misc"))
- (with-directory-excursion out
- (for-each delete-file
- '("config_template" "pkginfo" "README" "VERSION")))))
- %standard-phases)))))
+ (modify-phases %standard-phases
+ (replace 'configure
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (copy-file "config.mk.in" "config.mk")
+ (chmod "config.mk" #o664)
+ (let ((f (open-file "config.mk" "a")))
+ (display "CC=gcc\n" f)
+ (display "CFLAGS_SHLIB += -fPIC\n" f)
+ (display "TIFFLIB = libtiff.so\n" f)
+ (display "JPEGLIB = libjpeg.so\n" f)
+ (display "ZLIB = libz.so\n" f)
+ (display (string-append "LDFLAGS += -Wl,-rpath=" %output "/lib") f)
+ (close-port f))))
+ (add-before 'check 'setup-check
+ (lambda _
+ ;; install temporarily into /tmp/netpbm
+ (system* "make" "package")
+ ;; remove test requiring X
+ (substitute* "test/all-in-place.test" (("pamx") ""))
+ ;; do not worry about non-existing file
+ (substitute* "test/all-in-place.test" (("^rm ") "rm -f "))
+ ;; remove four tests that fail for unknown reasons
+ (substitute* "test/Test-Order"
+ (("all-in-place.test") "")
+ (("pnmpsnr.test") "")
+ (("pnmremap1.test") "")
+ (("gif-roundtrip.test") ""))))
+ (replace 'install
+ (lambda* (#:key outputs make-flags #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (apply system* "make" "package"
+ (string-append "pkgdir=" out) make-flags)
+ ;; copy static library
+ (copy-file (string-append out "/link/libnetpbm.a")
+ (string-append out "/lib/libnetpbm.a"))
+ ;; remove superfluous folders and files
+ (system* "rm" "-r" (string-append out "/link"))
+ (system* "rm" "-r" (string-append out "/misc"))
+ (with-directory-excursion out
+ (for-each delete-file
+ '("config_template" "pkginfo" "README"
+ "VERSION")))))))))
(synopsis "Toolkit for manipulation of images")
(description
"Netpbm is a toolkit for the manipulation of graphic images, including
--
2.7.4
[-- Attachment #3: 0003-gnu-netpbm-Fix-location-of-X-color-name-database.patch --]
[-- Type: text/x-patch, Size: 1774 bytes --]
From 9fd8a154c3fc591b01e4fb2c7f67fbac4daea688 Mon Sep 17 00:00:00 2001
From: Federico Beffa <beffa@fbengineering.ch>
Date: Fri, 13 May 2016 20:39:20 +0200
Subject: [PATCH 3/3] gnu: netpbm: Fix location of X color name database.
* gnu/packages/netpbm.scm (netpbm)[inputs]: Add 'xorg-rgb'.
[arguments]: In the 'configure' phase, patch 'pm_config.in.h' with the full
path to the 'rgb.txt' file.
---
gnu/packages/netpbm.scm | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/netpbm.scm b/gnu/packages/netpbm.scm
index d7d8576..d0955fe 100644
--- a/gnu/packages/netpbm.scm
+++ b/gnu/packages/netpbm.scm
@@ -27,6 +27,7 @@
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages xml)
+ #:use-module (gnu packages xorg)
#:use-module (guix build-system gnu)
#:use-module ((guix licenses) #:select (gpl2))
#:use-module (guix packages)
@@ -91,6 +92,7 @@
("libpng" ,libpng)
("libtiff" ,libtiff)
("libxml2" ,libxml2)
+ ("xorg-rgb" ,xorg-rgb)
("zlib" ,zlib)))
(native-inputs
`(("flex" ,flex)
@@ -111,7 +113,11 @@
(display "JPEGLIB = libjpeg.so\n" f)
(display "ZLIB = libz.so\n" f)
(display (string-append "LDFLAGS += -Wl,-rpath=" %output "/lib") f)
- (close-port f))))
+ (close-port f))
+ (let ((rgb (string-append (assoc-ref inputs "xorg-rgb")
+ "/share/X11/rgb.txt")))
+ (substitute* "pm_config.in.h"
+ (("/usr/share/X11/rgb.txt") rgb)))))
(add-before 'check 'setup-check
(lambda _
;; install temporarily into /tmp/netpbm
--
2.7.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] gnu: netpbm: Fix location of X color name database.
2016-05-13 18:44 ` Federico Beffa
@ 2016-05-14 16:25 ` Alex Kost
2016-05-15 20:04 ` Ludovic Courtès
2016-05-16 12:33 ` Federico Beffa
0 siblings, 2 replies; 7+ messages in thread
From: Alex Kost @ 2016-05-14 16:25 UTC (permalink / raw)
To: Federico Beffa; +Cc: Guix-devel
Federico Beffa (2016-05-13 21:44 +0300) wrote:
> On Fri, May 13, 2016 at 7:10 PM, Andreas Enge <andreas@enge.fr> wrote:
>> Hello,
>>
>> On Fri, May 13, 2016 at 06:51:27PM +0200, Federico Beffa wrote:
>>> This fixes some of the provided programs like, e.g. 'pamtogif'.
>>
>> I think the common practice is to separate the switch to the %modify-phases
>> syntax and the real change into two commits; right now, the diff looks big,
>> but I imagine it must be rather trivial.
>
> Indeed the change is trivial.
>
> Regards,
> Fede
>
> From be37669b50c000ad45eb85075f32d4f23c26489d Mon Sep 17 00:00:00 2001
> From: Federico Beffa <beffa@fbengineering.ch>
> Date: Fri, 13 May 2016 15:32:49 +0200
> Subject: [PATCH 2/3] gnu: netpbm: Use 'modify-phases' syntax.
>
> * gnu/packages/netpbm.scm (netpbm)[arguments]: Do it.
> ---
> gnu/packages/netpbm.scm | 86 ++++++++++++++++++++++++-------------------------
> 1 file changed, 42 insertions(+), 44 deletions(-)
>
> diff --git a/gnu/packages/netpbm.scm b/gnu/packages/netpbm.scm
> index 475635e..d7d8576 100644
> --- a/gnu/packages/netpbm.scm
> +++ b/gnu/packages/netpbm.scm
> @@ -99,50 +99,48 @@
> ("python" ,python-wrapper)))
> (arguments
> `(#:phases
> - (alist-replace
> - 'configure
> - (lambda _
> - (copy-file "config.mk.in" "config.mk")
> - (chmod "config.mk" #o664)
> - (let ((f (open-file "config.mk" "a")))
> - (display "CC=gcc\n" f)
> - (display "CFLAGS_SHLIB += -fPIC\n" f)
> - (display "TIFFLIB = libtiff.so\n" f)
> - (display "JPEGLIB = libjpeg.so\n" f)
> - (display "ZLIB = libz.so\n" f)
> - (display (string-append "LDFLAGS += -Wl,-rpath=" %output "/lib") f)
> - (close-port f)))
> - (alist-cons-before
> - 'check 'setup-check
> - (lambda _
> - ;; install temporarily into /tmp/netpbm
> - (system* "make" "package")
> - ;; remove test requiring X
> - (substitute* "test/all-in-place.test" (("pamx") ""))
> - ;; do not worry about non-existing file
> - (substitute* "test/all-in-place.test" (("^rm ") "rm -f "))
> - ;; remove four tests that fail for unknown reasons
> - (substitute* "test/Test-Order"
> - (("all-in-place.test") "")
> - (("pnmpsnr.test") "")
> - (("pnmremap1.test") "")
> - (("gif-roundtrip.test") "")))
> - (alist-replace
> - 'install
> - (lambda* (#:key outputs make-flags #:allow-other-keys)
> - (let ((out (assoc-ref outputs "out")))
> - (apply system* "make" "package"
> - (string-append "pkgdir=" out) make-flags)
> - ;; copy static library
> - (copy-file (string-append out "/link/libnetpbm.a")
> - (string-append out "/lib/libnetpbm.a"))
> - ;; remove superfluous folders and files
> - (system* "rm" "-r" (string-append out "/link"))
> - (system* "rm" "-r" (string-append out "/misc"))
> - (with-directory-excursion out
> - (for-each delete-file
> - '("config_template" "pkginfo" "README" "VERSION")))))
> - %standard-phases)))))
> + (modify-phases %standard-phases
> + (replace 'configure
> + (lambda* (#:key inputs outputs #:allow-other-keys)
> + (copy-file "config.mk.in" "config.mk")
> + (chmod "config.mk" #o664)
> + (let ((f (open-file "config.mk" "a")))
> + (display "CC=gcc\n" f)
> + (display "CFLAGS_SHLIB += -fPIC\n" f)
> + (display "TIFFLIB = libtiff.so\n" f)
> + (display "JPEGLIB = libjpeg.so\n" f)
> + (display "ZLIB = libz.so\n" f)
> + (display (string-append "LDFLAGS += -Wl,-rpath=" %output "/lib") f)
> + (close-port f))))
> + (add-before 'check 'setup-check
> + (lambda _
> + ;; install temporarily into /tmp/netpbm
> + (system* "make" "package")
> + ;; remove test requiring X
> + (substitute* "test/all-in-place.test" (("pamx") ""))
> + ;; do not worry about non-existing file
> + (substitute* "test/all-in-place.test" (("^rm ") "rm -f "))
> + ;; remove four tests that fail for unknown reasons
> + (substitute* "test/Test-Order"
> + (("all-in-place.test") "")
> + (("pnmpsnr.test") "")
> + (("pnmremap1.test") "")
> + (("gif-roundtrip.test") ""))))
> + (replace 'install
> + (lambda* (#:key outputs make-flags #:allow-other-keys)
> + (let ((out (assoc-ref outputs "out")))
> + (apply system* "make" "package"
> + (string-append "pkgdir=" out) make-flags)
> + ;; copy static library
> + (copy-file (string-append out "/link/libnetpbm.a")
> + (string-append out "/lib/libnetpbm.a"))
> + ;; remove superfluous folders and files
> + (system* "rm" "-r" (string-append out "/link"))
> + (system* "rm" "-r" (string-append out "/misc"))
> + (with-directory-excursion out
> + (for-each delete-file
> + '("config_template" "pkginfo" "README"
> + "VERSION")))))))))
I think it would also be good to add #t to the end of all these phases
to make sure that when the phases succeed, they return non-false value.
--
Alex
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] gnu: netpbm: Fix location of X color name database.
2016-05-14 16:25 ` Alex Kost
@ 2016-05-15 20:04 ` Ludovic Courtès
2016-05-16 12:34 ` Federico Beffa
2016-05-16 12:33 ` Federico Beffa
1 sibling, 1 reply; 7+ messages in thread
From: Ludovic Courtès @ 2016-05-15 20:04 UTC (permalink / raw)
To: Alex Kost; +Cc: Guix-devel, Federico Beffa
Alex Kost <alezost@gmail.com> skribis:
> I think it would also be good to add #t to the end of all these phases
> to make sure that when the phases succeed, they return non-false value.
Agreed.
Federico: Please commit to ‘core-updates’, since many many things depend
on netpbm.
Thanks!
Ludo’.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] gnu: netpbm: Fix location of X color name database.
2016-05-14 16:25 ` Alex Kost
2016-05-15 20:04 ` Ludovic Courtès
@ 2016-05-16 12:33 ` Federico Beffa
1 sibling, 0 replies; 7+ messages in thread
From: Federico Beffa @ 2016-05-16 12:33 UTC (permalink / raw)
To: Alex Kost; +Cc: Guix-devel
On Sat, May 14, 2016 at 6:25 PM, Alex Kost <alezost@gmail.com> wrote:
> Federico Beffa (2016-05-13 21:44 +0300) wrote:
>
>> On Fri, May 13, 2016 at 7:10 PM, Andreas Enge <andreas@enge.fr> wrote:
>>> Hello,
>>>
>>> On Fri, May 13, 2016 at 06:51:27PM +0200, Federico Beffa wrote:
>>>> This fixes some of the provided programs like, e.g. 'pamtogif'.
>>>
>>> I think the common practice is to separate the switch to the %modify-phases
>>> syntax and the real change into two commits; right now, the diff looks big,
>>> but I imagine it must be rather trivial.
>>
>> Indeed the change is trivial.
>>
>> Regards,
>> Fede
>>
>> From be37669b50c000ad45eb85075f32d4f23c26489d Mon Sep 17 00:00:00 2001
>> From: Federico Beffa <beffa@fbengineering.ch>
>> Date: Fri, 13 May 2016 15:32:49 +0200
>> Subject: [PATCH 2/3] gnu: netpbm: Use 'modify-phases' syntax.
>>
>> * gnu/packages/netpbm.scm (netpbm)[arguments]: Do it.
>> ---
>> gnu/packages/netpbm.scm | 86 ++++++++++++++++++++++++-------------------------
>> 1 file changed, 42 insertions(+), 44 deletions(-)
>>
>> diff --git a/gnu/packages/netpbm.scm b/gnu/packages/netpbm.scm
>> index 475635e..d7d8576 100644
>> --- a/gnu/packages/netpbm.scm
>> +++ b/gnu/packages/netpbm.scm
>> @@ -99,50 +99,48 @@
>> ("python" ,python-wrapper)))
>> (arguments
>> `(#:phases
>> - (alist-replace
>> - 'configure
>> - (lambda _
>> - (copy-file "config.mk.in" "config.mk")
>> - (chmod "config.mk" #o664)
>> - (let ((f (open-file "config.mk" "a")))
>> - (display "CC=gcc\n" f)
>> - (display "CFLAGS_SHLIB += -fPIC\n" f)
>> - (display "TIFFLIB = libtiff.so\n" f)
>> - (display "JPEGLIB = libjpeg.so\n" f)
>> - (display "ZLIB = libz.so\n" f)
>> - (display (string-append "LDFLAGS += -Wl,-rpath=" %output "/lib") f)
>> - (close-port f)))
>> - (alist-cons-before
>> - 'check 'setup-check
>> - (lambda _
>> - ;; install temporarily into /tmp/netpbm
>> - (system* "make" "package")
>> - ;; remove test requiring X
>> - (substitute* "test/all-in-place.test" (("pamx") ""))
>> - ;; do not worry about non-existing file
>> - (substitute* "test/all-in-place.test" (("^rm ") "rm -f "))
>> - ;; remove four tests that fail for unknown reasons
>> - (substitute* "test/Test-Order"
>> - (("all-in-place.test") "")
>> - (("pnmpsnr.test") "")
>> - (("pnmremap1.test") "")
>> - (("gif-roundtrip.test") "")))
>> - (alist-replace
>> - 'install
>> - (lambda* (#:key outputs make-flags #:allow-other-keys)
>> - (let ((out (assoc-ref outputs "out")))
>> - (apply system* "make" "package"
>> - (string-append "pkgdir=" out) make-flags)
>> - ;; copy static library
>> - (copy-file (string-append out "/link/libnetpbm.a")
>> - (string-append out "/lib/libnetpbm.a"))
>> - ;; remove superfluous folders and files
>> - (system* "rm" "-r" (string-append out "/link"))
>> - (system* "rm" "-r" (string-append out "/misc"))
>> - (with-directory-excursion out
>> - (for-each delete-file
>> - '("config_template" "pkginfo" "README" "VERSION")))))
>> - %standard-phases)))))
>> + (modify-phases %standard-phases
>> + (replace 'configure
>> + (lambda* (#:key inputs outputs #:allow-other-keys)
>> + (copy-file "config.mk.in" "config.mk")
>> + (chmod "config.mk" #o664)
>> + (let ((f (open-file "config.mk" "a")))
>> + (display "CC=gcc\n" f)
>> + (display "CFLAGS_SHLIB += -fPIC\n" f)
>> + (display "TIFFLIB = libtiff.so\n" f)
>> + (display "JPEGLIB = libjpeg.so\n" f)
>> + (display "ZLIB = libz.so\n" f)
>> + (display (string-append "LDFLAGS += -Wl,-rpath=" %output "/lib") f)
>> + (close-port f))))
>> + (add-before 'check 'setup-check
>> + (lambda _
>> + ;; install temporarily into /tmp/netpbm
>> + (system* "make" "package")
>> + ;; remove test requiring X
>> + (substitute* "test/all-in-place.test" (("pamx") ""))
>> + ;; do not worry about non-existing file
>> + (substitute* "test/all-in-place.test" (("^rm ") "rm -f "))
>> + ;; remove four tests that fail for unknown reasons
>> + (substitute* "test/Test-Order"
>> + (("all-in-place.test") "")
>> + (("pnmpsnr.test") "")
>> + (("pnmremap1.test") "")
>> + (("gif-roundtrip.test") ""))))
>> + (replace 'install
>> + (lambda* (#:key outputs make-flags #:allow-other-keys)
>> + (let ((out (assoc-ref outputs "out")))
>> + (apply system* "make" "package"
>> + (string-append "pkgdir=" out) make-flags)
>> + ;; copy static library
>> + (copy-file (string-append out "/link/libnetpbm.a")
>> + (string-append out "/lib/libnetpbm.a"))
>> + ;; remove superfluous folders and files
>> + (system* "rm" "-r" (string-append out "/link"))
>> + (system* "rm" "-r" (string-append out "/misc"))
>> + (with-directory-excursion out
>> + (for-each delete-file
>> + '("config_template" "pkginfo" "README"
>> + "VERSION")))))))))
>
> I think it would also be good to add #t to the end of all these phases
> to make sure that when the phases succeed, they return non-false value.
I did it in a separate commit as Andreas asked to have a commit where
we only transition to the modify-phases syntax without modifications
(which is this one).
Regards,
Fede
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] gnu: netpbm: Fix location of X color name database.
2016-05-15 20:04 ` Ludovic Courtès
@ 2016-05-16 12:34 ` Federico Beffa
0 siblings, 0 replies; 7+ messages in thread
From: Federico Beffa @ 2016-05-16 12:34 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: Guix-devel, Alex Kost
On Sun, May 15, 2016 at 10:04 PM, Ludovic Courtès <ludo@gnu.org> wrote:
> Alex Kost <alezost@gmail.com> skribis:
>
>> I think it would also be good to add #t to the end of all these phases
>> to make sure that when the phases succeed, they return non-false value.
>
> Agreed.
>
> Federico: Please commit to ‘core-updates’, since many many things depend
> on netpbm.
I noticed ;-)
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-05-16 12:34 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-13 16:51 [PATCH 2/2] gnu: netpbm: Fix location of X color name database Federico Beffa
2016-05-13 17:10 ` Andreas Enge
2016-05-13 18:44 ` Federico Beffa
2016-05-14 16:25 ` Alex Kost
2016-05-15 20:04 ` Ludovic Courtès
2016-05-16 12:34 ` Federico Beffa
2016-05-16 12:33 ` Federico Beffa
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.