gnu: rct: Add missing headers, enable RTTI.
[jackhill/guix/guix.git] / gnu / packages / cpp.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2017 Ethan R. Jones <doubleplusgood23@gmail.com>
3 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
4 ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
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
21 (define-module (gnu packages cpp)
22 #:use-module ((guix licenses) #:prefix license:)
23 #:use-module (guix packages)
24 #:use-module (guix download)
25 #:use-module (guix git-download)
26 #:use-module (guix build-system cmake)
27 #:use-module (guix build-system gnu)
28 #:use-module (gnu packages)
29 #:use-module (gnu packages autotools)
30 #:use-module (gnu packages check)
31 #:use-module (gnu packages compression)
32 #:use-module (gnu packages pkg-config)
33 #:use-module (gnu packages tls))
34
35 (define-public libzen
36 (package
37 (name "libzen")
38 (version "0.4.37")
39 (source (origin
40 (method url-fetch)
41 (uri (string-append "https://mediaarea.net/download/source/"
42 name "/" version "/"
43 name "_" version ".tar.bz2"))
44 (sha256
45 (base32
46 "1hcsrmn85b0xp0mp33aazk7g071q1v3f163nnhv8b0mv9c4bgsfn"))))
47 (native-inputs
48 `(("autoconf" ,autoconf)
49 ("automake" ,automake)
50 ("libtool" ,libtool)))
51 (build-system gnu-build-system)
52 (arguments
53 '(#:phases
54 ;; build scripts not in root of archive
55 (modify-phases %standard-phases
56 (add-after 'unpack 'pre-configure
57 (lambda _
58 (chdir "Project/GNU/Library")))
59 (add-after 'pre-configure 'autogen
60 (lambda _
61 (zero? (system* "sh" "autogen.sh")))))))
62 (home-page "https://github.com/MediaArea/ZenLib")
63 (synopsis "C++ utility library")
64 (description "ZenLib is a C++ utility library. It includes classes for handling
65 strings, configuration, bit streams, threading, translation, and cross-platform
66 operating system functions.")
67 (license license:zlib)))
68
69 (define-public rct
70 (let* ((commit "b3e6f41d9844ef64420e628e0c65ed98278a843a")
71 (revision "2")
72 (version (git-version "0.0.0" revision commit)))
73 (package
74 (name "rct")
75 (version version)
76 (home-page "https://github.com/Andersbakken/rct")
77 (source (origin
78 (method git-fetch)
79 (uri (git-reference
80 (url home-page)
81 (commit commit)))
82 (sha256
83 (base32
84 "1m2931jacka27ghnpgf1z1plkkr64z0pga4r4zdrfpp2d7xnrdvb"))
85 (patches (search-patches "rct-add-missing-headers.patch"))
86 (file-name (git-file-name name version))))
87 (build-system cmake-build-system)
88 (arguments
89 '(#:configure-flags
90 '("-DWITH_TESTS=ON" ; To run the test suite
91 "-DRCT_RTTI_ENABLED=ON")))
92 (native-inputs
93 `(("cppunit" ,cppunit)
94 ("pkg-config" ,pkg-config)))
95 (inputs
96 `(("openssl" ,openssl)
97 ("zlib" ,zlib)))
98 (synopsis "C++ library providing Qt-like APIs on top of the STL")
99 (description "Rct is a set of C++ tools that provide nicer (more Qt-like)
100 APIs on top of Standard Template Library (@dfn{STL}) classes.")
101 (license (list license:expat ; cJSON
102 license:bsd-4))))) ; everything else (LICENSE.txt)