| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 |
|
| 25 | (define-module (gnu packages fltk)
|
| 26 | #:use-module (gnu packages)
|
| 27 | #:use-module (gnu packages autotools)
|
| 28 | #:use-module (gnu packages build-tools)
|
| 29 | #:use-module (gnu packages compression)
|
| 30 | #:use-module (gnu packages image)
|
| 31 | #:use-module (gnu packages xorg)
|
| 32 | #:use-module (gnu packages gl)
|
| 33 | #:use-module (gnu packages gtk) |
| 34 | #:use-module (gnu packages pkg-config)
|
| 35 | #:use-module (gnu packages python)
|
| 36 | #:use-module (gnu packages python-xyz)
|
| 37 | #:use-module (guix download)
|
| 38 | #:use-module (guix gexp)
|
| 39 | #:use-module ((guix licenses) #:prefix license:)
|
| 40 | #:use-module (guix packages)
|
| 41 | #:use-module (guix git-download)
|
| 42 | #:use-module (guix build-system gnu)
|
| 43 | #:use-module (guix build-system waf)
|
| 44 | #:use-module (srfi srfi-1))
|
| 45 |
|
| 46 | (define-public fltk-1.3
|
| 47 | (package
|
| 48 | (name "fltk")
|
| 49 | (version "1.3.11")
|
| 50 | (source
|
| 51 | (origin
|
| 52 | (method git-fetch)
|
| 53 | (uri (git-reference
|
| 54 | (url "https://github.com/fltk/fltk")
|
| 55 | (commit (string-append "release-" version))))
|
| 56 | (file-name (git-file-name name version))
|
| 57 | (sha256
|
| 58 | (base32 "0pnifyhhvcqfjd6iaa4m14kvfyqhjjdw0aqbcizcdhhqrl6q4pjg"))))
|
| 59 | (build-system gnu-build-system)
|
| 60 | (arguments
|
| 61 | (list
|
| 62 | #:tests? #f |
| 63 | #:configure-flags
|
| 64 | #~(list "--enable-shared"
|
| 65 | (string-append "DSOFLAGS=-Wl,-rpath=" %output "/lib"))
|
| 66 | #:phases
|
| 67 | #~(modify-phases %standard-phases
|
| 68 | (add-before 'configure 'patch-makeinclude
|
| 69 | (lambda _
|
| 70 | (substitute* "makeinclude.in"
|
| 71 | (("/bin/sh")
|
| 72 | (which "sh")))))
|
| 73 | (add-after 'install 'patch-config
|
| 74 | |
| 75 | |
| 76 | (lambda* (#:key inputs #:allow-other-keys)
|
| 77 | (let ((conf (string-append #$output "/bin/fltk-config"))
|
| 78 | (libjpeg-so (search-input-file inputs "lib/libjpeg.so"))
|
| 79 | (libpng-so (search-input-file inputs "lib/libpng.so"))
|
| 80 | (libz-so (search-input-file inputs "lib/libz.so")))
|
| 81 | (substitute* conf
|
| 82 | (("-ljpeg")
|
| 83 | (string-append "-L" (dirname libjpeg-so) " -ljpeg"))
|
| 84 | (("-lpng")
|
| 85 | (string-append "-L" (dirname libpng-so) " -lpng"))
|
| 86 | (("-lz")
|
| 87 | (string-append "-L" (dirname libz-so) " -lz")))))))))
|
| 88 | (native-inputs (list autoconf automake pkg-config))
|
| 89 | (inputs
|
| 90 | (list libjpeg-turbo
|
| 91 | libpng
|
| 92 | libx11
|
| 93 | libxft
|
| 94 | mesa
|
| 95 | zlib))
|
| 96 | (home-page "https://www.fltk.org")
|
| 97 | (synopsis "3D C++ GUI library")
|
| 98 | (description
|
| 99 | "FLTK is a C++ GUI toolkit providing modern GUI functionality without the
|
| 100 | bloat. It supports 3D graphics via OpenGL and its built-in GLUT emulation.
|
| 101 | FLTK is designed to be small and modular enough to be statically linked, but
|
| 102 | works fine as a shared library. FLTK also includes an excellent UI builder
|
| 103 | called FLUID that can be used to create applications in minutes.")
|
| 104 | (license license:lgpl2.0))) |
| 105 |
|
| 106 | (define-public fltk
|
| 107 | (package
|
| 108 | (inherit fltk-1.3)
|
| 109 | (version "1.4.5")
|
| 110 | (source (origin
|
| 111 | (method git-fetch)
|
| 112 | (uri (git-reference
|
| 113 | (url "https://github.com/fltk/fltk")
|
| 114 | (commit (string-append "release-" version))))
|
| 115 | (sha256
|
| 116 | (base32 "19bl0ryarg31wkhw01ryilp9iwwh6vwnsq9mnzmarzm0dkwhjc7c"))))))
|
| 117 |
|
| 118 |
|
| 119 | (define-public ntk
|
| 120 | (package
|
| 121 | (name "ntk")
|
| 122 | (version "1.3.1000")
|
| 123 | (source (origin
|
| 124 | (method git-fetch)
|
| 125 | (uri (git-reference
|
| 126 | (url "git://git.tuxfamily.org/gitroot/non/fltk.git")
|
| 127 | (commit (string-append "v" version))))
|
| 128 | (sha256
|
| 129 | (base32
|
| 130 | "0j38mhnfqy6swcrnc5zxcwlqi8b1pgklyghxk6qs1lf4japv2zc0"))
|
| 131 | (file-name (git-file-name name version))))
|
| 132 | (build-system waf-build-system)
|
| 133 | (arguments
|
| 134 | `(#:tests? #f |
| 135 | #:configure-flags '("--enable-gl")
|
| 136 | #:phases
|
| 137 | (modify-phases %standard-phases
|
| 138 | (add-before 'configure 'setup-waf
|
| 139 | (lambda* (#:key inputs #:allow-other-keys)
|
| 140 | (let ((waf (assoc-ref inputs "waf")))
|
| 141 | (delete-file "waf")
|
| 142 | (copy-file (string-append waf "/bin/waf") "waf"))
|
| 143 | #t))
|
| 144 | (add-before 'configure 'set-ldflags
|
| 145 | (lambda* (#:key outputs #:allow-other-keys)
|
| 146 | (setenv "LDFLAGS"
|
| 147 | (string-append "-Wl,-rpath="
|
| 148 | (assoc-ref outputs "out") "/lib"))
|
| 149 | #t)))))
|
| 150 | (inputs
|
| 151 | `(("libjpeg" ,libjpeg-turbo)
|
| 152 | ("glu" ,glu)
|
| 153 | ("waf" ,waf)))
|
| 154 | |
| 155 | |
| 156 | (propagated-inputs
|
| 157 | (list cairo libxft libx11))
|
| 158 | (native-inputs
|
| 159 | (list pkg-config))
|
| 160 | (home-page "https://non.tuxfamily.org/ntk/")
|
| 161 | (synopsis "Fork of FLTK with graphics rendering via Cairo")
|
| 162 | (description "The Non Tool Kit (NTK) is a fork of the Fast Light ToolKit
|
| 163 | library, adding improved graphics rendering via Cairo, a streamlined and
|
| 164 | enhanced widget set, and other features designed to improve the appearance and
|
| 165 | performance of the Non applications.")
|
| 166 | (license license:lgpl2.0+))) |