You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

495 lines
18 KiB

  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
  3. ;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
  4. ;;;
  5. ;;; This file is part of GNU Guix.
  6. ;;;
  7. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  8. ;;; under the terms of the GNU General Public License as published by
  9. ;;; the Free Software Foundation; either version 3 of the License, or (at
  10. ;;; your option) any later version.
  11. ;;;
  12. ;;; GNU Guix is distributed in the hope that it will be useful, but
  13. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  14. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. ;;; GNU General Public License for more details.
  16. ;;;
  17. ;;; You should have received a copy of the GNU General Public License
  18. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  19. (define-module (gnu packages gtk)
  20. #:use-module ((guix licenses)
  21. #:renamer (symbol-prefix-proc 'license:))
  22. #:use-module (guix packages)
  23. #:use-module (guix download)
  24. #:use-module (guix build-system gnu)
  25. #:use-module (gnu packages compression)
  26. #:use-module (gnu packages fontutils)
  27. #:use-module (gnu packages ghostscript)
  28. #:use-module (gnu packages glib)
  29. #:use-module (gnu packages icu4c)
  30. #:use-module (gnu packages libjpeg)
  31. #:use-module (gnu packages libpng)
  32. #:use-module (gnu packages libtiff)
  33. #:use-module (gnu packages pdf)
  34. #:use-module (gnu packages perl)
  35. #:use-module (gnu packages pkg-config)
  36. #:use-module (gnu packages python)
  37. #:use-module (gnu packages guile)
  38. #:use-module (gnu packages xml)
  39. #:use-module (gnu packages xorg))
  40. (define-public atk
  41. (package
  42. (name "atk")
  43. (version "2.10.0")
  44. (source (origin
  45. (method url-fetch)
  46. (uri (string-append "mirror://gnome/sources/" name "/"
  47. (string-take version 4) "/" name "-"
  48. version ".tar.xz"))
  49. (sha256
  50. (base32
  51. "1c2hbg66wfvibsz2ia0ri48yr62751fn950i97c53j3b0fjifsb3"))))
  52. (build-system gnu-build-system)
  53. (inputs `(("glib" ,glib)
  54. ("pkg-config" ,pkg-config)))
  55. (synopsis "GNOME accessibility toolkit")
  56. (description
  57. "ATK provides the set of accessibility interfaces that are implemented
  58. by other toolkits and applications. Using the ATK interfaces, accessibility
  59. tools have full access to view and control running applications.")
  60. (license license:lgpl2.0+)
  61. (home-page "https://developer.gnome.org/atk/")))
  62. (define-public cairo
  63. (package
  64. (name "cairo")
  65. (version "1.12.16")
  66. (source (origin
  67. (method url-fetch)
  68. (uri (string-append "http://cairographics.org/releases/cairo-"
  69. version ".tar.xz"))
  70. (sha256
  71. (base32
  72. "0inqwsylqkrzcjivdirkjx5nhdgxbdc62fq284c3xppinfg9a195"))))
  73. (build-system gnu-build-system)
  74. (propagated-inputs
  75. `(("fontconfig" ,fontconfig)
  76. ("freetype" ,freetype)
  77. ("glib" ,glib)
  78. ("libpng" ,libpng)
  79. ("libx11" ,libx11)
  80. ("libxext" ,libxext)
  81. ("libxrender" ,libxrender)
  82. ("pixman" ,pixman)))
  83. (inputs
  84. `(("ghostscript" ,ghostscript)
  85. ("libspectre" ,libspectre)
  86. ("pkg-config" ,pkg-config)
  87. ("poppler" ,poppler)
  88. ("python" ,python-wrapper)
  89. ("xextproto" ,xextproto)
  90. ("zlib" ,zlib)))
  91. (arguments
  92. `(#:tests? #f)) ; see http://lists.gnu.org/archive/html/bug-guix/2013-06/msg00085.html
  93. (synopsis "2D graphics library")
  94. (description
  95. "Cairo is a 2D graphics library with support for multiple output devices.
  96. Currently supported output targets include the X Window System (via both
  97. Xlib and XCB), Quartz, Win32, image buffers, PostScript, PDF, and SVG file
  98. output. Experimental backends include OpenGL, BeOS, OS/2, and DirectFB.
  99. Cairo is designed to produce consistent output on all output media while
  100. taking advantage of display hardware acceleration when available
  101. eg. through the X Render Extension).
  102. The cairo API provides operations similar to the drawing operators of
  103. PostScript and PDF. Operations in cairo including stroking and filling cubic
  104. Bézier splines, transforming and compositing translucent images, and
  105. antialiased text rendering. All drawing operations can be transformed by any
  106. affine transformation (scale, rotation, shear, etc.)")
  107. (license license:lgpl2.1) ; or Mozilla Public License 1.1
  108. (home-page "http://cairographics.org/")))
  109. (define-public harfbuzz
  110. (package
  111. (name "harfbuzz")
  112. (version "0.9.22")
  113. (source (origin
  114. (method url-fetch)
  115. (uri (string-append "http://www.freedesktop.org/software/harfbuzz/release/harfbuzz-"
  116. version ".tar.bz2"))
  117. (sha256
  118. (base32
  119. "1nkimwadri6v2kzrmz8y0crmy59gw0kg4i4f6cc786bngs0815lq"))))
  120. (build-system gnu-build-system)
  121. (inputs
  122. `(("cairo" ,cairo)
  123. ("icu4c" ,icu4c)
  124. ("pkg-config" ,pkg-config)
  125. ("python" ,python-wrapper)))
  126. (synopsis "opentype text shaping engine")
  127. (description
  128. "HarfBuzz is an OpenType text shaping engine.")
  129. (license (license:x11-style "file://COPYING"
  130. "See 'COPYING' in the distribution."))
  131. (home-page "http://www.freedesktop.org/wiki/Software/HarfBuzz/")))
  132. (define-public pango
  133. (package
  134. (name "pango")
  135. (version "1.34.1")
  136. (source (origin
  137. (method url-fetch)
  138. (uri (string-append "mirror://gnome/sources/pango/1.34/pango-"
  139. version ".tar.xz"))
  140. (sha256
  141. (base32
  142. "0k7662qix7zzh7mf6ikdj594n8jpbfm25z8swz64zbm86kgk1shs"))))
  143. (build-system gnu-build-system)
  144. (propagated-inputs
  145. `(("cairo" ,cairo)
  146. ("harfbuzz" ,harfbuzz)))
  147. (inputs
  148. `(("pkg-config" ,pkg-config)
  149. ("zlib" ,zlib)))
  150. (synopsis "GNOME text and font handling library")
  151. (description
  152. "Pango is the core text and font handling library used in GNOME
  153. applications. It has extensive support for the different writing systems
  154. used throughout the world.")
  155. (license license:lgpl2.0+)
  156. (home-page "https://developer.gnome.org/pango/")))
  157. (define-public gdk-pixbuf
  158. (package
  159. (name "gdk-pixbuf")
  160. (version "2.28.2")
  161. (source (origin
  162. (method url-fetch)
  163. (uri (string-append "mirror://gnome/sources/gdk-pixbuf/2.28/gdk-pixbuf-"
  164. version ".tar.xz"))
  165. (sha256
  166. (base32
  167. "05s6ksvy1yan6h6zny9n3bmvygcnzma6ljl6i0z9cci2xg116c8q"))))
  168. (build-system gnu-build-system)
  169. (inputs
  170. `(("glib" ,glib)
  171. ("libjpeg" ,libjpeg)
  172. ("libpng" ,libpng)
  173. ("libtiff" ,libtiff)
  174. ("pkg-config" ,pkg-config)))
  175. (synopsis "GNOME image loading and manipulation library")
  176. (description
  177. "GdkPixbuf is a library for image loading and manipulation developed
  178. in the GNOME project.")
  179. (license license:lgpl2.0+)
  180. (home-page "https://developer.gnome.org/gdk-pixbuf/")))
  181. (define-public at-spi2-core
  182. (package
  183. (name "at-spi2-core")
  184. (version "2.10.0")
  185. (source (origin
  186. (method url-fetch)
  187. (uri (string-append "mirror://gnome/sources/" name "/"
  188. (string-take version 4) "/" name "-"
  189. version ".tar.xz"))
  190. (sha256
  191. (base32
  192. "1ns44yibdgcwzwri7sr075hfs5rh5lgxkh71247a0822az3mahcn"))))
  193. (build-system gnu-build-system)
  194. (inputs `(("dbus" ,dbus)
  195. ("glib" ,glib)
  196. ("intltool" ,intltool)
  197. ("libxi" ,libxi)
  198. ("libxtst" ,libxtst)
  199. ("pkg-config" ,pkg-config)))
  200. (arguments
  201. `(#:tests? #f)) ; FIXME: dbind/dbtest fails; one should disable tests in
  202. ; a more fine-grained way.
  203. (synopsis "Assistive Technology Service Provider Interface, core components")
  204. (description
  205. "The Assistive Technology Service Provider Interface, core components,
  206. is part of the GNOME accessibility project.")
  207. (license license:lgpl2.0+)
  208. (home-page "https://projects.gnome.org/accessibility/")))
  209. (define-public at-spi2-atk
  210. (package
  211. (name "at-spi2-atk")
  212. (version "2.10.0")
  213. (source (origin
  214. (method url-fetch)
  215. (uri (string-append "mirror://gnome/sources/" name "/"
  216. (string-take version 4) "/" name "-"
  217. version ".tar.xz"))
  218. (sha256
  219. (base32
  220. "150sqc21difazqd53llwfdaqnwfy73bic9hia41xpfy9kcpzz9yy"))))
  221. (build-system gnu-build-system)
  222. (inputs `(("atk" ,atk)
  223. ("at-spi2-core" ,at-spi2-core)
  224. ("dbus" ,dbus)
  225. ("glib" ,glib)
  226. ("pkg-config" ,pkg-config)))
  227. (arguments
  228. `(#:tests? #f)) ; FIXME: droute/droute-test fails; one should disable
  229. ; tests in a more fine-grained way.
  230. (synopsis "Assistive Technology Service Provider Interface, ATK bindings")
  231. (description
  232. "The Assistive Technology Service Provider Interface
  233. is part of the GNOME accessibility project.")
  234. (license license:lgpl2.0+)
  235. (home-page "https://projects.gnome.org/accessibility/")))
  236. (define-public gtk+-2
  237. (package
  238. (name "gtk+")
  239. (version "2.24.21")
  240. (source (origin
  241. (method url-fetch)
  242. (uri (string-append "mirror://gnome/sources/" name "/"
  243. (string-take version 4) "/" name "-"
  244. version ".tar.xz"))
  245. (sha256
  246. (base32
  247. "1qyw73pr9ryqhir2h1kbx3vm70km4dg2fxrgkrdlpv0rvlb94bih"))))
  248. (build-system gnu-build-system)
  249. (propagated-inputs
  250. `(("atk" ,atk)
  251. ("gdk-pixbuf" ,gdk-pixbuf)
  252. ("pango" ,pango)))
  253. (inputs
  254. `(("perl" ,perl)
  255. ("pkg-config" ,pkg-config)
  256. ("python-wrapper" ,python-wrapper)))
  257. (arguments
  258. `(#:phases
  259. (alist-replace
  260. 'configure
  261. (lambda* (#:key #:allow-other-keys #:rest args)
  262. (let ((configure (assoc-ref %standard-phases 'configure)))
  263. ;; FIXME: re-enable tests requiring an X server
  264. (substitute* "gtk/Makefile.in"
  265. (("SUBDIRS = theme-bits . tests") "SUBDIRS = theme-bits ."))
  266. (apply configure args)))
  267. %standard-phases)))
  268. (synopsis "Cross-platform toolkit for creating graphical user interfaces")
  269. (description
  270. "GTK+, or the GIMP Toolkit, is a multi-platform toolkit for creating
  271. graphical user interfaces. Offering a complete set of widgets, GTK+ is
  272. suitable for projects ranging from small one-off tools to complete
  273. application suites.")
  274. (license license:lgpl2.0+)
  275. (home-page "http://www.gtk.org/")))
  276. (define-public gtk+
  277. (package (inherit gtk+-2)
  278. (version "3.10.1")
  279. (source (origin
  280. (method url-fetch)
  281. (uri (string-append "mirror://gnome/sources/gtk+/"
  282. (string-take version 4) "/gtk+-"
  283. version ".tar.xz"))
  284. (sha256
  285. (base32
  286. "1f3a7r3z7i9xh5imlfpfcgyydzkj2fnd0v6ylvqxij0yzfbnhbn1"))))
  287. (propagated-inputs
  288. `(("at-spi2-atk" ,at-spi2-atk)
  289. ("atk" ,atk)
  290. ("gdk-pixbuf" ,gdk-pixbuf)
  291. ("libxi" ,libxi)
  292. ("libxinerama" ,libxinerama)
  293. ("pango" ,pango)))
  294. (inputs
  295. `(("libxml2" ,libxml2)
  296. ("perl" ,perl)
  297. ("pkg-config" ,pkg-config)
  298. ("python-wrapper" ,python-wrapper)
  299. ("xorg-server" ,xorg-server)))
  300. (arguments
  301. `(#:phases
  302. (alist-replace
  303. 'configure
  304. (lambda* (#:key #:allow-other-keys #:rest args)
  305. (let ((configure (assoc-ref %standard-phases 'configure)))
  306. ;; Disable most tests, failing in the chroot with the message:
  307. ;; D-Bus library appears to be incorrectly set up; failed to read
  308. ;; machine uuid: Failed to open "/etc/machine-id": No such file or
  309. ;; directory.
  310. ;; See the manual page for dbus-uuidgen to correct this issue.
  311. (substitute* "testsuite/Makefile.in"
  312. (("SUBDIRS = gdk gtk a11y css reftests") "SUBDIRS = gdk"))
  313. (apply configure args)))
  314. %standard-phases)))))
  315. ;;;
  316. ;;; Guile bindings.
  317. ;;;
  318. (define-public guile-cairo
  319. (package
  320. (name "guile-cairo")
  321. (version "1.4.1")
  322. (source (origin
  323. (method url-fetch)
  324. (uri (string-append
  325. "http://download.gna.org/guile-cairo/guile-cairo-"
  326. version
  327. ".tar.gz"))
  328. (sha256
  329. (base32
  330. "1f5nd9n46n6cwfl1byjml02q3y2hgn7nkx98km1czgwarxl7ws3x"))))
  331. (build-system gnu-build-system)
  332. (arguments
  333. '(#:phases (alist-cons-before
  334. 'configure 'set-module-directory
  335. (lambda* (#:key outputs #:allow-other-keys)
  336. ;; Install modules under $out/share/guile/site/2.0.
  337. (let ((out (assoc-ref outputs "out")))
  338. (substitute* "Makefile.in"
  339. (("scmdir = ([[:graph:]]+).*" _ value)
  340. (string-append "scmdir = " value "/2.0\n")))
  341. (substitute* "cairo/Makefile.in"
  342. (("moduledir = ([[:graph:]]+).*" _ value)
  343. (string-append "moduledir = "
  344. "$(prefix)/share/guile/site/2.0/cairo\n'")))))
  345. (alist-cons-after
  346. 'install 'install-missing-file
  347. (lambda* (#:key outputs #:allow-other-keys)
  348. ;; By default 'vector-types.scm' is not installed, so do
  349. ;; it here.
  350. (let ((out (assoc-ref outputs "out")))
  351. (copy-file "cairo/vector-types.scm"
  352. (string-append out "/share/guile/site/2.0"
  353. "/cairo/vector-types.scm"))))
  354. %standard-phases))))
  355. (inputs
  356. `(("guile-lib" ,guile-lib)
  357. ("expat" ,expat)
  358. ("cairo" ,cairo)
  359. ("pkg-config" ,pkg-config)
  360. ("guile" ,guile-2.0)))
  361. (home-page "http://www.nongnu.org/guile-cairo/")
  362. (synopsis "Cairo bindings for GNU Guile")
  363. (description
  364. "Guile-Cairo wraps the Cairo graphics library for Guile Scheme.
  365. Guile-Cairo is complete, wrapping almost all of the Cairo API. It is API
  366. stable, providing a firm base on which to do graphics work. Finally, and
  367. importantly, it is pleasant to use. You get a powerful and well-maintained
  368. graphics library with all of the benefits of Scheme: memory management,
  369. exceptions, macros, and a dynamic programming environment.")
  370. (license license:lgpl3+)))
  371. ;;;
  372. ;;; C++ bindings.
  373. ;;;
  374. (define-public cairomm
  375. (package
  376. (name "cairomm")
  377. (version "1.10.0")
  378. (source (origin
  379. (method url-fetch)
  380. (uri (string-append "http://cairographics.org/releases/cairomm-"
  381. version ".tar.gz"))
  382. (sha256
  383. (base32
  384. "13rrp96px95m6xnvmsaqb0wcqsnizg3bz334k0yhlyxf7v29d386"))))
  385. (build-system gnu-build-system)
  386. (arguments
  387. ;; The examples lack -lcairo.
  388. '(#:make-flags '("LDFLAGS=-lcairo")))
  389. (inputs `(("pkg-config" ,pkg-config)))
  390. (propagated-inputs
  391. `(("libsigc++" ,libsigc++)
  392. ("freetype" ,freetype)
  393. ("fontconfig" ,fontconfig)
  394. ("cairo" ,cairo)))
  395. (home-page "http://cairographics.org/")
  396. (synopsis "C++ bindings to the Cairo 2D graphics library")
  397. (description
  398. "Cairomm provides a C++ programming interface to the Cairo 2D graphics
  399. library.")
  400. (license license:lgpl2.0+)))
  401. (define-public pangomm
  402. (package
  403. (name "pangomm")
  404. (version "2.34.0")
  405. (source (origin
  406. (method url-fetch)
  407. (uri (string-append "mirror://gnome/sources/pangomm/2.34/pangomm-"
  408. version ".tar.xz"))
  409. (sha256
  410. (base32
  411. "0hcyvv7c5zmivprdam6cp111i6hn2y5jsxzk00m6j9pncbzvp0hf"))))
  412. (build-system gnu-build-system)
  413. (inputs `(("pkg-config" ,pkg-config)))
  414. (propagated-inputs
  415. `(("cairo" ,cairo)
  416. ("cairomm" ,cairomm)
  417. ("glibmm" ,glibmm)
  418. ("pango" ,pango)))
  419. (home-page "http://www.pango.org/")
  420. (synopsis "C++ interface to the Pango text rendering library")
  421. (description
  422. "Pangomm provides a C++ programming interface to the Pango text rendering
  423. library.")
  424. (license license:lgpl2.1+)))
  425. (define-public atkmm
  426. (package
  427. (name "atkmm")
  428. (version "2.22.7")
  429. (source (origin
  430. (method url-fetch)
  431. (uri (string-append "mirror://gnome/sources/atkmm/2.22/atkmm-"
  432. version ".tar.xz"))
  433. (sha256
  434. (base32
  435. "06zrf2ymml2dzp53sss0d4ch4dk9v09jm8rglnrmwk4v81mq9gxz"))))
  436. (build-system gnu-build-system)
  437. (inputs `(("pkg-config" ,pkg-config)))
  438. (propagated-inputs
  439. `(("glibmm" ,glibmm) ("atk" ,atk)))
  440. (home-page "http://www.gtkmm.org")
  441. (synopsis "C++ interface to the ATK accessibility library")
  442. (description
  443. "ATKmm provides a C++ programming interface to the ATK accessibility
  444. toolkit.")
  445. (license license:lgpl2.1+)))
  446. (define-public gtkmm
  447. (package
  448. (name "gtkmm")
  449. (version "3.9.16")
  450. (source (origin
  451. (method url-fetch)
  452. (uri (string-append "mirror://gnome/sources/gtkmm/3.9/gtkmm-"
  453. version ".tar.xz"))
  454. (sha256
  455. (base32
  456. "0yf8wwv4w02p70nrxsbs0nhm0w4gkn2wggdjygd8vif062anf1rs"))))
  457. (build-system gnu-build-system)
  458. (inputs `(("pkg-config" ,pkg-config)))
  459. (propagated-inputs
  460. `(("pangomm" ,pangomm)
  461. ("cairomm" ,cairomm)
  462. ("atkmm" ,atkmm)
  463. ("gtk+" ,gtk+)
  464. ("glibmm" ,glibmm)))
  465. (home-page "http://gtkmm.org/")
  466. (synopsis
  467. "C++ interface to the GTK+ graphical user interface library")
  468. (description
  469. "gtkmm is the official C++ interface for the popular GUI library GTK+.
  470. Highlights include typesafe callbacks, and a comprehensive set of widgets that
  471. are easily extensible via inheritance. You can create user interfaces either
  472. in code or with the Glade User Interface designer, using libglademm. There's
  473. extensive documentation, including API reference and a tutorial.")
  474. (license license:lgpl2.1+)))