aboutsummaryrefslogtreecommitdiff
path: root/tests/sets.scm
blob: cdb7efe1725d65501825ba23e2ec95e37dc8edb0 (about) (plain)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (test-sets)
  #:use-module (guix sets)
  #:use-module (srfi srfi-1)
  #:use-module (srfi srfi-26)
  #:use-module (srfi srfi-64))


(test-begin "sets")

(test-assert "set-contains?"
  (let* ((lst (iota 123))
         (set (list->set lst)))
    (and (every (cut set-contains? set <>)
                lst)
         (not (set-contains? set -1)))))

(test-assert "set->list"
  (let* ((lst (iota 123))
         (set (list->set lst)))
    (lset= = lst (set->list set))))

(test-assert "set-union"
  (let* ((a  (list 'a))
         (b  (list 'b))
         (s1 (setq a))
         (s2 (setq b))
         (s3 (set-union s1 s2)))
    (and (set-contains? s3 a)
         (set-contains? s3 b))))

(test-end)
guix/tree/gnu/packages/fontutils.scm?id=cc51c03ff867d4633505354819c6d88af88bf919'>gnu/packages/fontutils.scm
@@ -10,6 +10,7 @@
;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2018, 2019 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2020 Roel Janssen <roel@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -774,3 +775,64 @@ tools or editing configuration files by hand.
While designed primarily with the GNOME Desktop Environment in mind, it should
work well with other GTK+ desktop environments.")
(license license:gpl3+)))
+
+(define-public fntsample
+ (package
+ (name "fntsample")
+ (version "5.3")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/eugmes/fntsample/archive/release/"
+ version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0awp4dh1g40ivzvm5xqlvcpcdw1vplrx3drjmbylr62y185vbs74"))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:tests? #f ; There are no tests.
+ #:configure-flags
+ (list (string-append
+ "-DUNICODE_BLOCKS=" (assoc-ref %build-inputs "unicode-blocks")))
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'install 'set-library-path
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (pdf-api2 (assoc-ref inputs "perl-pdf-api2"))
+ (intl (assoc-ref inputs "perl-libintl-perl"))
+ (perllib (string-append pdf-api2
+ "/lib/perl5/site_perl/"
+ ,(package-version perl)
+ ":" intl
+ "/lib/perl5/site_perl/"
+ ,(package-version perl))))
+ (wrap-program (string-append out "/bin/pdfoutline")
+ `("PERL5LIB" ":" prefix (,perllib)))
+ #t))))))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)
+ ("gettext" ,gettext-minimal)))
+ (inputs
+ `(("cairo" ,cairo)
+ ("fontconfig" ,fontconfig)
+ ("freetype" ,freetype)
+ ("glib" ,glib)
+ ("pango" ,pango)
+ ("perl-pdf-api2" ,perl-pdf-api2)
+ ("perl-libintl-perl" ,perl-libintl-perl)
+ ("unicode-blocks"
+ ,(origin
+ (method url-fetch)
+ (uri "https://unicode.org/Public/UNIDATA/Blocks.txt")
+ (file-name "unicode-blocks.txt")
+ (sha256
+ (base32
+ "1xs8fnhh48gs41wg004r7m4r2azh9khmyjjlnvyzy9c6zrd212x2"))))))
+ (home-page "https://github.com/eugmes/fntsample")
+ (synopsis "PDF and PostScript font samples generator")
+ (description "This package provides a tool that can be used to make font
+samples that show coverage of the font and are similar in appearance to
+Unicode Charts. It was developed for use with DejaVu Fonts project.")
+ (license license:gpl3+)))