aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/stb.scm
blob: 9cb2ae10b68d842382757ab11fd5c036566ac968 (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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com>
;;;
;;; 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 (gnu packages stb)
  #:use-module (guix packages)
  #:use-module (guix git-download)
  #:use-module (guix build-system gnu)
  #:use-module (guix build-system trivial)
  #:use-module ((guix licenses) #:select (expat public-domain)))

(define stb
  ;; stb is a collection of libraries developed within the same repository.
  ;; When updating this, remember to change versions below as appropriate.
  (let ((commit "2c2908f50515dcd939f24be261c3ccbcd277bb49")
        (revision "1"))
    (package
      (name "stb")
      (home-page "https://github.com/nothings/stb")
      (version (git-version "0.0" revision commit))
      (source (origin
                (method git-fetch)
                (uri (git-reference
                      (url home-page)
                      (commit commit)))
                (sha256
                 (base32
                  "1z753rscqc4clp0rd57bw68i60kz694y1z52bwv6slzmkgds1cki"))
                (file-name (git-file-name name version))))
      (build-system gnu-build-system)
      (arguments
       `(#:modules ((ice-9 ftw)
                    (ice-9 regex)
                    (srfi srfi-26)
                    ,@%gnu-build-system-modules)
         #:phases (modify-phases %standard-phases
                    (delete 'configure)
                    (delete 'build)
                    (replace 'check
                      (lambda _
                        (invoke "make" "-C" "tests" "CC=gcc")))
                    (replace 'install
                      (lambda* (#:key outputs #:allow-other-keys)
                        (let ((out (assoc-ref outputs "out"))
                              (files (make-regexp "\\.(c|h|md)$")))
                          (for-each (lambda (file)
                                      (install-file file out))
                                    (scandir "." (cut regexp-exec files <>)))
                          #t))))))
      (synopsis "Single file libraries for C/C++")
      (description
       "This package contains a variety of small independent libraries for
the C programming language.")
      ;; The user can choose either license.
      (license (list expat public-domain)))))

(define (make-stb-header-package name version description)
  (package
    (inherit stb)
    (name name)
    (version version)
    (source #f)
    (inputs `(("stb" ,stb)))
    (build-system trivial-build-system)
    (arguments
     `(#:modules ((guix build utils))
       #:builder (begin
                   (use-modules (guix build utils))
                   (let ((stb (assoc-ref %build-inputs "stb"))
                         (lib (string-join (string-split ,name #\-) "_"))
                         (out (assoc-ref %outputs "out")))
                     (install-file (string-append stb "/" lib ".h")
                                   (string-append out "/include"))
                     #t))))
    (description description)))

;; TODO: These descriptions are not translatable!  They should be
;; converted to macros as outlined in <https://bugs.gnu.org/32155>.
(define-public stb-image
  (make-stb-header-package
   "stb-image" "2.22"
   "stb-image is a small and self-contained library for image loading or
decoding from file or memory.  A variety of formats are supported."))

(define-public stb-image-write
  (make-stb-header-package
   "stb-image-write" "1.13"
   "stb-image-write is a small library for writing image files to the
C@tie{}@code{stdio} interface."))

(define-public stb-sprintf
  (make-stb-header-package
   "stb-sprintf" "1.06"
   "stb-sprintf implements fast @code{sprintf}, @code{snprintf} for C/C++."))

(define-public stb-truetype
  (make-stb-header-package
   "stb-truetype" "1.22"
   "stb-truetype is a library for parsing, decoding, and rasterizing
characters from TrueType fonts."))
ol): Likewise. * gnu/packages/gnuzilla.scm (conkeror): Likewise. * gnu/packages/guile-xyz.scm (mcron2): Likewise. * gnu/packages/image.scm (pngcrunch): Likewise. * gnu/packages/linux.scm (eudev-with-hwdb): Likewise. * gnu/packages/maths.scm (qtoctave): Likewise. * gnu/packages/package-management.scm (guile2.0-guix): Likewise. * gnu/packages/php.scm (php-with-bcmath): Likewise. * gnu/packages/python-xyz.scm (python-kivy-next, python2-kivy-next): Likewise. * gnu/packages/video.scm (livestreamer): Likewise. * gnu/packages/virtualization.scm (lookingglass): Likewise. * gnu/packages/vulkan.scm (vulkan-icd-loader): Likewise. * gnu/packages/syndication.scm (newsbeuter): Likewise. (newsboat)[description]: Remove historical footnote. Tobias Geerinckx-Rice 2020-03-10gnu: icecat: Update to 68.6.0-guix0-preview1 [security fixes]....Includes fixes for CVE-2019-20503, CVE-2020-6805, CVE-2020-6806, CVE-2020-6807, CVE-2020-6811, CVE-2020-6812, and CVE-2020-6814. * gnu/packages/gnuzilla.scm (%icecat-version, %icecat-build-id): Update. (icecat-source): Update gnuzilla commit, base version, and hashes. * gnu/packages/patches/icecat-makeicecat.patch: Adapt to new version. Mark H Weaver 2020-03-01gnu: mozjs@17, mozjs@24: Fix build....* gnu/packages/gnuzilla.scm (mozjs): Add ‘-fpermissive’ to CXXFLAGS. Signed-off-by: Tobias Geerinckx-Rice <me@tobias.gr> Damien Cassou 2020-02-26gnu: icecat: Remove about:buildconfig store references....* gnu/packages/gnuzilla.scm (icecat)[arguments]: New ‘neutralise-store-references’ phase. Co-authored-by: Tobias Geerinckx-Rice <me@tobias.gr> Jakub Kądziołka 2020-02-11gnu: icecat: Update to 68.5.0-guix0-preview1....* gnu/packages/gnuzilla.scm (%icecat-version, %icecat-build-id): Update. (icecat-source): Update gnuzilla commit, base version, and hashes. * gnu/packages/patches/icecat-makeicecat.patch: Adapt to new version. Mark H Weaver 2020-01-18gnu: Add firefox-decrypt....* gnu/packages/gnuzilla.scm (firefox-decrypt): New variable. Oleg Pykhalov 2020-01-16gnu: icecat: Fix support for ffmpeg codecs....Fixes <https://bugs.gnu.org/38045>. Thanks to Jakub Kądziołka <kuba@kadziolka.net> and Amin Bandali <bandali@gnu.org> for their helpful observations and suggestions. This is a followup to commit 8e5567195f5d29301d571612085b5afdb460619d. * gnu/packages/gnuzilla.scm (icecat)[inputs]: Add shared-mime-info. [arguments]: Add elf and binary I/O modules to #:modules. Add code to the 'fix-ffmpeg-runtime-linker' phase that sets the sandbox read-path whitelist to include libavcodec's RUNPATH, as well as shared-mime-info. Mark H Weaver 2020-01-09gnu: icecat: Update to 68.4.1-guix0-preview1 [fixes CVE-2019-17026]....* gnu/packages/gnuzilla.scm (%icecat-version, %icecat-build-id): Update. (icecat-source): Update hash of upstream firefox source tarball, 'upstream-icecat-base-version', and commit and hash of gnuzilla checkout. * gnu/packages/patches/icecat-makeicecat.patch: Adapt to upstream changes. Mark H Weaver 2020-01-07gnu: icecat: Update to 68.4.0-guix0-preview1 [security fixes]....Includes fixes for CVE-2019-17015, CVE-2019-17016, CVE-2019-17017, CVE-2019-17021, CVE-2019-17022, and CVE-2019-17024. * gnu/packages/gnuzilla.scm (%icecat-version, %icecat-build-id): Update. (icecat-source): Update hash of upstream firefox source tarball, 'upstream-icecat-base-version', and commit and hash of gnuzilla checkout. * gnu/packages/patches/icecat-makeicecat.patch: Adapt to upstream changes. Mark H Weaver 2020-01-02gnu: rust-cbindgen: Move to rust-apps.scm...* gnu/packages/rust-cbindgen.scm (rust-cbindgen): Move to ... * gnu/packages/rust-apps.scm: ... here. * gnu/local.mk (GNU_SYSTEM_MODULES): Remove it. Efraim Flashner 2019-12-23gnu: icecat: Fix linking with ffmpeg....* gnu/packages/gnuzilla.scm (icecat)[arguments]: Add 'fix-ffmpeg-runtime-linker' phase. Co-authored-by: Mark H Weaver <mhw@netris.org>. Julien Lepiller 2019-12-04Merge branch 'staging'Marius Bakke 2019-12-04gnu: icecat: Update to 68.3.0-guix0-preview1 [security fixes]....Includes fixes for CVE-2019-11745, CVE-2019-17005, CVE-2019-17008, CVE-2019-17009, CVE-2019-17010, CVE-2019-17011, and CVE-2019-17012. * gnu/packages/patches/icecat-gnuzilla-fixes.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. * gnu/packages/gnuzilla.scm (%icecat-version, %icecat-build-id): Update. (icecat-source): Update hash for the firefox source tarball. Update to the latest from gnuzilla.git. Don't apply icecat-gnuzilla-fixes.patch. Remove determinism fix in makeicecat that is now upstream. Tweak a status message. (icecat)[arguments]: Add "--with-unsigned-addon-scopes=app" configure flag. * gnu/packages/patches/icecat-makeicecat.patch: Adapt. Mark H Weaver 2019-11-15Merge branch 'master' into stagingMarius Bakke