From: Eric Bavier <ericbavier@openmailbox.org>
To: guix-devel@gnu.org
Subject: [PATCH] gnu: fltk: Use system zlib, libjpeg, and libpng.
Date: Mon, 18 May 2015 15:23:54 -0500 [thread overview]
Message-ID: <7e7d84f730df85450a5ee6307c7c73d9@openmailbox.org> (raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: 0001-gnu-fltk-Use-system-zlib-libjpeg-and-libpng.patch --]
[-- Type: text/x-diff; name=0001-gnu-fltk-Use-system-zlib-libjpeg-and-libpng.patch, Size: 2740 bytes --]
From 99a43bda21fd243b84b65c6877251f199bb7047b Mon Sep 17 00:00:00 2001
From: Eric Bavier <bavier@member.fsf.org>
Date: Mon, 18 May 2015 15:07:50 -0500
Subject: [PATCH] gnu: fltk: Use system zlib, libjpeg, and libpng.
* gnu/packages/fltk.scm (fltk)[inputs]: Add libjpeg, libpng, and zlib.
[arguments]: Add 'patch-config' phase.
---
gnu/packages/fltk.scm | 30 +++++++++++++++++++++++++-----
1 file changed, 25 insertions(+), 5 deletions(-)
diff --git a/gnu/packages/fltk.scm b/gnu/packages/fltk.scm
index cbd9d00..7a41460 100644
--- a/gnu/packages/fltk.scm
+++ b/gnu/packages/fltk.scm
@@ -18,8 +18,10 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages fltk)
- #:use-module (guix licenses)
+ #:use-module ((guix licenses) #:select (lgpl2.0))
#:use-module (gnu packages)
+ #:use-module (gnu packages compression)
+ #:use-module (gnu packages image)
#:use-module (gnu packages xorg)
#:use-module (gnu packages gl)
#:use-module (guix packages)
@@ -40,9 +42,12 @@
"15qd7lkz5d5ynz70xhxhigpz3wns39v9xcf7ggkl0792syc8sfgq"))
(patches (list (search-patch "fltk-shared-lib-defines.patch")))))
(build-system gnu-build-system)
- (inputs
- `(("libx11" ,libx11)
- ("mesa" ,mesa)))
+ (inputs
+ `(("libjpeg" ,libjpeg-8) ;jpeg_read_header argument error in libjpeg-9
+ ("libpng" ,libpng)
+ ("libx11" ,libx11)
+ ("mesa" ,mesa)
+ ("zlib" ,zlib)))
(arguments
`(#:tests? #f ;TODO: compile programs in "test" dir
#:configure-flags
@@ -54,7 +59,22 @@
(lambda _
(substitute* "makeinclude.in"
(("/bin/sh") (which "sh"))))
- %standard-phases)))
+ (alist-cons-after
+ 'install 'patch-config
+ ;; Provide -L flags for image libraries when querying fltk-config to
+ ;; avoid propagating inputs.
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (use-modules (srfi srfi-26))
+ (let* ((conf (string-append (assoc-ref outputs "out")
+ "/bin/fltk-config"))
+ (jpeg (assoc-ref inputs "libjpeg"))
+ (png (assoc-ref inputs "libpng"))
+ (zlib (assoc-ref inputs "zlib")))
+ (substitute* conf
+ (("-ljpeg") (string-append "-L" jpeg "/lib -ljpeg"))
+ (("-lpng") (string-append "-L" png "/lib -lpng"))
+ (("-lz") (string-append "-L" zlib "/lib -lz")))))
+ %standard-phases))))
(home-page "http://www.fltk.org")
(synopsis "3D C++ GUI library")
(description "FLTK is a C++ GUI toolkit providing modern GUI functionality
--
1.7.9.5
next reply other threads:[~2015-05-18 20:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-18 20:23 Eric Bavier [this message]
2015-05-19 14:50 ` [PATCH] gnu: fltk: Use system zlib, libjpeg, and libpng Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7e7d84f730df85450a5ee6307c7c73d9@openmailbox.org \
--to=ericbavier@openmailbox.org \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).