diff options
author | Mark H Weaver <mhw@netris.org> | 2015-06-10 17:50:27 -0400 |
---|---|---|
committer | Mark H Weaver <mhw@netris.org> | 2015-06-10 17:50:27 -0400 |
commit | 14928016556300a6763334d4279c3d117902caaf (patch) | |
tree | d0dc262b14164b82f97dd6e896ca9e93a1fabeea /gnu/packages/fltk.scm | |
parent | 1511e0235525358abb52cf62abeb9457605b5093 (diff) | |
parent | 57cd353d87d6e9e6e882327be70b4d7b5ce863ba (diff) | |
download | guix-14928016556300a6763334d4279c3d117902caaf.tar.gz |
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/packages/fltk.scm')
-rw-r--r-- | gnu/packages/fltk.scm | 35 |
1 files changed, 29 insertions, 6 deletions
diff --git a/gnu/packages/fltk.scm b/gnu/packages/fltk.scm index 1ac1f2507e..7a41460325 100644 --- a/gnu/packages/fltk.scm +++ b/gnu/packages/fltk.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014 John Darrington <jmd@gnu.org> +;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -17,7 +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) @@ -35,11 +39,15 @@ "/fltk-" version "-source.tar.gz")) (sha256 (base32 - "15qd7lkz5d5ynz70xhxhigpz3wns39v9xcf7ggkl0792syc8sfgq")))) + "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 @@ -51,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 |