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.
 
 
 
 
 
 

379 lines
15 KiB

  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
  3. ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
  4. ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
  5. ;;;
  6. ;;; This file is part of GNU Guix.
  7. ;;;
  8. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  9. ;;; under the terms of the GNU General Public License as published by
  10. ;;; the Free Software Foundation; either version 3 of the License, or (at
  11. ;;; your option) any later version.
  12. ;;;
  13. ;;; GNU Guix is distributed in the hope that it will be useful, but
  14. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  15. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. ;;; GNU General Public License for more details.
  17. ;;;
  18. ;;; You should have received a copy of the GNU General Public License
  19. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  20. (define-module (gnu packages glib)
  21. #:use-module ((guix licenses)
  22. #:renamer (symbol-prefix-proc 'license:))
  23. #:use-module (guix packages)
  24. #:use-module (guix download)
  25. #:use-module (guix build-system gnu)
  26. #:use-module (gnu packages)
  27. #:use-module (gnu packages base)
  28. #:use-module (gnu packages bison)
  29. #:use-module (gnu packages compression)
  30. #:use-module (gnu packages flex)
  31. #:use-module ((gnu packages gettext)
  32. #:renamer (symbol-prefix-proc 'guix:))
  33. #:use-module (gnu packages gtk)
  34. #:use-module (gnu packages libffi)
  35. #:use-module (gnu packages perl)
  36. #:use-module (gnu packages pkg-config)
  37. #:use-module (gnu packages python)
  38. #:use-module (gnu packages xml)
  39. #:use-module (gnu packages bash)
  40. #:use-module (gnu packages file)
  41. #:use-module (gnu packages xorg)
  42. #:use-module (gnu packages m4)
  43. ;; Export variables up-front to allow circular dependency with the 'xorg'
  44. ;; module.
  45. #:export (dbus
  46. glib
  47. gobject-introspection
  48. dbus-glib
  49. intltool
  50. itstool
  51. libsigc++
  52. glibmm))
  53. (define dbus
  54. (package
  55. (name "dbus")
  56. (version "1.6.4")
  57. (source (origin
  58. (method url-fetch)
  59. (uri
  60. (string-append "http://dbus.freedesktop.org/releases/dbus/dbus-"
  61. version ".tar.gz"))
  62. (sha256
  63. (base32
  64. "1wacqyfkcpayg7f8rvx9awqg275n5pksxq5q7y21lxjx85x6pfjz"))
  65. (patches (list (search-patch "dbus-localstatedir.patch")))))
  66. (build-system gnu-build-system)
  67. (arguments
  68. '(#:configure-flags (list ;; Install the system bus socket under /var.
  69. "--localstatedir=/var"
  70. ;; XXX: Fix the following to allow system-wide
  71. ;; config.
  72. ;; "--sysconfdir=/etc"
  73. "--with-session-socket-dir=/tmp")))
  74. (inputs
  75. `(("expat" ,expat)
  76. ("pkg-config" ,pkg-config)
  77. ;; Add a dependency on libx11 so that 'dbus-launch' has support for
  78. ;; '--autolaunch'.
  79. ("libx11" ,libx11)))
  80. (home-page "http://dbus.freedesktop.org/")
  81. (synopsis "Message bus for inter-process communication (IPC)")
  82. (description
  83. "D-Bus is a message bus system, a simple way for applications to
  84. talk to one another. In addition to interprocess communication, D-Bus
  85. helps coordinate process lifecycle; it makes it simple and reliable to
  86. code a \"single instance\" application or daemon, and to launch
  87. applications and daemons on demand when their services are needed.
  88. D-Bus supplies both a system daemon (for events such as \"new hardware
  89. device added\" or \"printer queue changed\") and a
  90. per-user-login-session daemon (for general IPC needs among user
  91. applications). Also, the message bus is built on top of a general
  92. one-to-one message passing framework, which can be used by any two apps
  93. to communicate directly (without going through the message bus
  94. daemon). Currently the communicating applications are on one computer,
  95. or through unencrypted TCP/IP suitable for use behind a firewall with
  96. shared NFS home directories.")
  97. (license license:gpl2+))) ; or Academic Free License 2.1
  98. (define glib
  99. (package
  100. (name "glib")
  101. (version "2.38.0")
  102. (source (origin
  103. (method url-fetch)
  104. (uri (string-append "mirror://gnome/sources/"
  105. name "/" (string-take version 4) "/"
  106. name "-" version ".tar.xz"))
  107. (sha256
  108. (base32 "0cpzqadqk6z6bmb79p04pykxc8x57rvshh33414cnk41bvgaf4vm"))
  109. (patches (list (search-patch "glib-tests-homedir.patch")
  110. (search-patch "glib-tests-desktop.patch")
  111. (search-patch "glib-tests-prlimit.patch")
  112. (search-patch "glib-tests-newnet.patch")))))
  113. (build-system gnu-build-system)
  114. (outputs '("out" ; everything
  115. "doc")) ; 20 MiB of GTK-Doc reference
  116. (inputs
  117. `(("coreutils" ,coreutils)
  118. ("gettext" ,guix:gettext)
  119. ("libffi" ,libffi)
  120. ("pkg-config" ,pkg-config)
  121. ("python" ,python-wrapper)
  122. ("zlib" ,zlib)
  123. ("perl" ,perl) ; needed by GIO tests
  124. ("dbus" ,dbus) ; for GDBus tests
  125. ("bash" ,bash)
  126. ("tzdata" ,tzdata) ; for tests/gdatetime.c
  127. ))
  128. (arguments
  129. '(#:phases (alist-cons-before
  130. 'build 'pre-build
  131. (lambda* (#:key inputs outputs #:allow-other-keys)
  132. ;; For tests/gdatetime.c.
  133. (setenv "TZDIR"
  134. (string-append (assoc-ref inputs "tzdata")
  135. "/share/zoneinfo"))
  136. ;; Some tests want write access there.
  137. (setenv "XDG_CACHE_HOME" (getcwd))
  138. (substitute* '("glib/gspawn.c"
  139. "glib/tests/utils.c"
  140. "tests/spawn-test.c")
  141. (("/bin/sh")
  142. (string-append (assoc-ref inputs "bash") "/bin/sh"))))
  143. %standard-phases)
  144. ;; Note: `--docdir' and `--htmldir' are not honored, so work around it.
  145. #:configure-flags (list (string-append "--with-html-dir="
  146. (assoc-ref %outputs "doc")
  147. "/share/gtk-doc"))))
  148. (synopsis "Thread-safe general utility library; basis of GTK+ and GNOME")
  149. (description
  150. "GLib provides data structure handling for C, portability wrappers,
  151. and interfaces for such runtime functionality as an event loop, threads,
  152. dynamic loading, and an object system.")
  153. (home-page "http://developer.gnome.org/glib/")
  154. (license license:lgpl2.0+))) ; some files are under lgpl2.1+
  155. (define gobject-introspection
  156. (package
  157. (name "gobject-introspection")
  158. (version "1.38.0")
  159. (source (origin
  160. (method url-fetch)
  161. (uri (string-append "http://ftp.gnome.org/pub/GNOME/sources/"
  162. "gobject-introspection/"
  163. (substring version 0 (string-rindex version #\.))
  164. "/gobject-introspection-"
  165. version ".tar.xz"))
  166. (sha256
  167. (base32 "0wvxyvgajmms2bb6k3pf1rdpnd79xdxamykzvxzmcyn1ag9yax9m"))))
  168. (build-system gnu-build-system)
  169. (inputs
  170. `(("bison" ,bison)
  171. ("cairo" ,cairo)
  172. ("flex" ,flex)
  173. ("glib" ,glib)
  174. ("libffi" ,libffi)
  175. ("pkg-config" ,pkg-config)
  176. ("python-2" ,python-2)))
  177. (arguments
  178. `(#:phases
  179. (alist-replace
  180. 'configure
  181. (lambda* (#:key #:allow-other-keys #:rest args)
  182. (let ((configure (assoc-ref %standard-phases 'configure)))
  183. ;; giscanner/sourcescanner.py looks for 'CC', let's set it here.
  184. (setenv "CC" "gcc")
  185. (apply configure args)))
  186. %standard-phases)))
  187. (home-page "https://wiki.gnome.org/GObjectIntrospection")
  188. (synopsis "Generate interface introspection data for GObject libraries")
  189. (description
  190. "GObject introspection is a middleware layer between C libraries (using
  191. GObject) and language bindings. The C library can be scanned at compile time
  192. and generate a metadata file, in addition to the actual native C library. Then
  193. at runtime, language bindings can read this metadata and automatically provide
  194. bindings to call into the C library.")
  195. ; Some bits are distributed under the LGPL2+, others under the GPL2+
  196. (license license:gpl2+)))
  197. (define intltool
  198. (package
  199. (name "intltool")
  200. (version "0.50.2")
  201. (source (origin
  202. (method url-fetch)
  203. (uri (string-append "https://launchpad.net/intltool/trunk/"
  204. version "/+download/intltool-"
  205. version ".tar.gz"))
  206. (sha256
  207. (base32
  208. "01j4yd7i84n9nk4ccs6yifg84pp68nr9by57jdbhj7dpdxf5rwk7"))))
  209. (build-system gnu-build-system)
  210. (propagated-inputs
  211. `(;; Propagate gettext because users expect it to be there, and so does
  212. ;; the `intltool-update' script.
  213. ("gettext" ,guix:gettext)
  214. ;; `file' is used by `intltool-update' too.
  215. ("file" ,file)
  216. ("perl-xml-parser" ,perl-xml-parser)
  217. ("perl" ,perl)))
  218. (home-page "https://launchpad.net/intltool/+download")
  219. (synopsis "Tools to centralise translations of different file formats")
  220. (description
  221. "intltool is a set of tools to centralise translations of many different
  222. file formats using GNU gettext-compatible PO files.
  223. The intltool collection can be used to do these things:
  224. Extract translatable strings from various source files (.xml.in,
  225. glade, .desktop.in, .server.in, .oaf.in).
  226. Collect the extracted strings together with messages from traditional
  227. source files (.c, .h) in po/$(PACKAGE).pot.
  228. Merge back the translations from .po files into .xml, .desktop and
  229. oaf files. This merge step will happen at build resp. installation time.")
  230. (license license:gpl2+)))
  231. (define itstool
  232. (package
  233. (name "itstool")
  234. (version "1.2.0")
  235. (source (origin
  236. (method url-fetch)
  237. (uri (string-append "http://files.itstool.org/itstool/itstool-"
  238. version ".tar.bz2"))
  239. (sha256
  240. (base32
  241. "1akq75aflihm3y7js8biy7b5mw2g11vl8yq90gydnwlwp0zxdzj6"))))
  242. (build-system gnu-build-system)
  243. (propagated-inputs
  244. `(("libxml2" ,libxml2)
  245. ("python-2" ,python-2)))
  246. (home-page "http://www.itstool.org")
  247. (synopsis "Tool to translate XML documents with PO files")
  248. (description
  249. "ITS Tool allows you to translate your XML documents with PO files, using
  250. rules from the W3C Internationalization Tag Set (ITS) to determine what to
  251. translate and how to separate it into PO file messages.
  252. PO files are the standard translation format for GNU and other Unix-like
  253. systems. They present translatable information as discrete messages, allowing
  254. each message to be translated independently. In contrast to whole-page
  255. translation, translating with a message-based format like PO means you can
  256. easily track changes to the source document down to the paragraph. When new
  257. strings are added or existing strings are modified, you only need to update the
  258. corresponding messages.
  259. ITS Tool is designed to make XML documents translatable through PO files by
  260. applying standard ITS rules, as well as extension rules specific to ITS Tool.
  261. ITS also provides an industry standard way for authors to override translation
  262. information in their documents, such as whether a particular element should be
  263. translated.")
  264. (license license:gpl3+)))
  265. (define dbus-glib
  266. (package
  267. (name "dbus-glib")
  268. (version "0.100.2")
  269. (source (origin
  270. (method url-fetch)
  271. (uri
  272. (string-append "http://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-"
  273. version ".tar.gz"))
  274. (sha256
  275. (base32
  276. "1ibav91yg70f2l3l18cr0hf4mna1h9d4mrg0c60w4l8zjbd45fx5"))))
  277. (build-system gnu-build-system)
  278. (inputs
  279. `(("dbus" ,dbus)
  280. ("expat" ,expat)
  281. ("glib" ,glib)
  282. ("pkg-config" ,pkg-config)))
  283. (home-page "http://dbus.freedesktop.org/doc/dbus-glib/")
  284. (synopsis "D-Bus GLib bindings")
  285. (description
  286. "GLib bindings for D-Bus. The package is obsolete and superseded
  287. by GDBus included in Glib.")
  288. (license license:gpl2))) ; or Academic Free License 2.1
  289. (define libsigc++
  290. (package
  291. (name "libsigc++")
  292. (version "2.3.1")
  293. (source (origin
  294. (method url-fetch)
  295. (uri (string-append "mirror://gnome/sources/libsigc++/2.3/libsigc++-"
  296. version ".tar.xz"))
  297. (sha256
  298. (base32
  299. "14q3sq6d43f6wfcmwhw4v1aal4ba0h5x9v6wkxy2dnqznd95il37"))))
  300. (build-system gnu-build-system)
  301. (inputs `(("pkg-config" ,pkg-config)))
  302. (native-inputs `(("m4" ,m4)))
  303. (home-page "http://libsigc.sourceforge.net/")
  304. (synopsis "Type-safe callback system for standard C++")
  305. (description
  306. "libsigc++ implements a type-safe callback system for standard C++. It
  307. allows you to define signals and to connect those signals to any callback
  308. function, either global or a member function, regardless of whether it is
  309. static or virtual.
  310. It also contains adaptor classes for connection of dissimilar callbacks and
  311. has an ease of use unmatched by other C++ callback libraries.")
  312. (license license:lgpl2.1+)))
  313. (define glibmm
  314. (package
  315. (name "glibmm")
  316. (version "2.37.7")
  317. (source (origin
  318. (method url-fetch)
  319. (uri (string-append "mirror://gnome/sources/glibmm/2.37/glibmm-"
  320. version ".tar.xz"))
  321. (sha256
  322. (base32
  323. "0mms4yl5izsya1135772z4jkb184ss86x0wlg6dm7yvwxvb6bjlw"))))
  324. (build-system gnu-build-system)
  325. (arguments
  326. `(#:phases (alist-cons-before
  327. 'build 'pre-build
  328. (lambda _
  329. ;; This test uses /etc/fstab as an example file to read
  330. ;; from; choose a better example.
  331. (substitute* "tests/giomm_simple/main.cc"
  332. (("/etc/fstab")
  333. (string-append (getcwd)
  334. "/tests/giomm_simple/main.cc")))
  335. ;; This test does a DNS lookup, and then expects to be able
  336. ;; to open a TLS session; just skip it.
  337. (substitute* "tests/giomm_tls_client/main.cc"
  338. (("Gio::init.*$")
  339. "return 77;\n")))
  340. %standard-phases)))
  341. (inputs `(("pkg-config" ,pkg-config)))
  342. (propagated-inputs
  343. `(("libsigc++" ,libsigc++)
  344. ("glib" ,glib)))
  345. (home-page "http://gtkmm.org/")
  346. (synopsis "C++ interface to the GLib library")
  347. (description
  348. "glibmm provides a C++ programming interface to the part of GLib that are
  349. useful for C++.")
  350. (license license:lgpl2.1+)))