aboutsummaryrefslogtreecommitdiff
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2020 Tobias Geerinckx-Rice <me@tobias.gr>
;;;
;;; 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 "b42009b3b9d4ca35bc703f5310eedc74f584be58")
        (revision "2"))
    (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
                  "1gmcjhmj62mfdscrsg2hv4j4j9v447y8zj3rbrm7mqn94cx73z1i"))
                (file-name (git-file-name name version))))
      (build-system gnu-build-system)
      (arguments
       `(#:modules ((ice-9 ftw)
                    (ice-9 regex)
                    (srfi srfi-26)
                    ,@%default-gnu-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 (list 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.26"
   "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-resize
  (make-stb-header-package
   "stb-image-resize" "0.96"
   "stb-image-resize is a library that supports scaling and translation of
images."))

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

(define-public stb-rect-pack
  (make-stb-header-package
   "stb-rect-pack" "1.00"
   "stb-rect-pack is a small rectangle packing library useful for, e.g., packing
rectangular textures into an atlas.  It does not do rotation."))

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

(define-public stb-truetype
  (make-stb-header-package
   "stb-truetype" "1.24"
   "stb-truetype is a library for parsing, decoding, and rasterizing
characters from TrueType fonts."))
f src/odf. [inputs]: Add python2-odfpy. Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org> Brendan Tildesley 2019-05-05gnu: calibre: Remove some comments....* gnu/packages/ebook.scm (calibre): There is no unrar in Guix currently, and pdftohtml is in poppler, so we can remove this comment. Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org> Brendan Tildesley 2019-05-05gnu: calibre: Enable tests....* gnu/packages/ebook.scm (calibre): Enable tests. Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org> Brendan Tildesley 2019-05-05gnu: calibre: Disable sqlite test....* gnu/packages/patches/calibre-remove-test-sqlite.patch: New file. * gnu/packages/ebook.scm (calibre)[source]: Use it. * gnu/local.mk (dist_patch_DATA): Add it. Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org> Brendan Tildesley 2019-05-05gnu: calibre: Disable Qt test....* gnu/packages/ebook.scm (calibre)[arguments]<#:phases>[configure]: Disable Qt test. Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org> Brendan Tildesley 2019-05-05gnu: calibre: Disable bs4 test....* gnu/packages/patches/calibre-remove-test-bs4.patch: New file. * gnu/packages/ebook.scm (calibre)[source]: Use it. * gnu/local.mk (dist_patch_DATA): Add it. Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org> Brendan Tildesley 2019-05-05gnu: calibre: Use "linux.py" to install desktop files....* gnu/packages/ebook.scm (calibre)[arguments]<#:phases>[configure]: Modify. [install-mimetypes]: Remove. Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org> Brendan Tildesley 2019-05-05gnu: calibre: Disable tests that require networking....* gnu/packages/ebook.scm (calibre)[arguments]<#:phases>[configure]: Modify. Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org> Brendan Tildesley 2019-05-05gnu: calibre: Remove unrar test....* gnu/packages/patches/calibre-remove-test-unrar.patch: New file. * gnu/packages/ebook.scm (calibre)[source]: Use it. * gnu/local.mk (dist_patch_DATA): Add it. Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org> Brendan Tildesley 2019-05-05gnu: calibre: Add python2-html2text as an input....* gnu/packages/ebook.scm (calibre)[inputs]: Add python2-html2text. Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org> Brendan Tildesley 2019-05-05gnu: calibre: Move font unbundling to after check phase....* gnu/packages/ebook.scm (calibre)[snippet]: Modify. [native-inputs]: Remove font-liberation. [inputs]: Add font-liberation. [arguments]<#:phases>[install-font-liberation]: Delete phase. [unbundle-font-liberation]: New phase. Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org> Brendan Tildesley 2019-05-05gnu: calibre: Add missing dependencies as indicated by tests....* gnu/packages/ebook.scm (calibre)[inputs]: Add python2-html5lib, python2-psutil. Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org> Brendan Tildesley 2019-05-05gnu: calibre: Build rapydscript....* gnu/packages/ebook.scm (calibre)[arguments]<#:phases>[build-extra]: Modify. Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org> Brendan Tildesley 2019-05-05gnu: calibre: Use system mathjax....* gnu/packages/ebook.scm (calibre)[arguments]<#:phases>[build-extra]: New phase. [inputs]: Add js-mathjax. Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org> Brendan Tildesley 2019-05-05gnu: calibre: Update to 3.41.3....* gnu/packages/ebook.scm (calibre): Update to 3.41.3. [inputs]: Replace python2-cssutils by python2-css-parser. [snippet]: Modify. * gnu/packages/patches/calibre-use-packaged-feedparser.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove patch. Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org> Brendan Tildesley 2019-01-23Merge branch 'master' into stagingRicardo Wurmus 2019-01-21gnu: calibre: Fix PDF to EPUB conversion....When trying to convert a PDF to EPUB, the following error occurs: File "/gnu/store/kz6bgqw9z7akj11zh20wkx14cgq0s3n2-calibre-3.35.0/lib/calibre/calibre/ebooks/pdf/pdftohtml.py", line 76, in pdftohtml _('Could not find pdftohtml, check it is in your PATH')) Hardcode pdftohtml binary path by patching pdftohtml.py. * gnu/packages/ebook.scm (calibre)[arguments]: Patch pdftohtml.py in 'configure phase to set hardcode pdftohtml binary path. Mathieu Othacehe 2019-01-20Merge branch 'master' into stagingLudovic Courtès 2019-01-16gnu: Move sqlite to separate module....* gnu/packages/databases.scm (sqlite, sqlite-3.26.0, sqlite-with-fts5, sqlite-with-column-metadata): Move variables from here... * gnu/packages/sqlite.scm: ...to this new module. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. * gnu/packages/apl.scm, gnu/packages/bittorrent.scm, gnu/packages/calendar.scm, gnu/packages/code.scm, gnu/packages/crypto.scm, gnu/packages/databases.scm, gnu/packages/dc.scm, gnu/packages/disk.scm, gnu/packages/ebook.scm, gnu/packages/education.scm, gnu/packages/emacs.scm, gnu/packages/emulators.scm, gnu/packages/file-systems.scm, gnu/packages/freedesktop.scm, gnu/packages/ftp.scm, gnu/packages/games.scm, gnu/packages/geo.scm, gnu/packages/gnome.scm, gnu/packages/gnunet.scm, gnu/packages/gnupg.scm, gnu/packages/gnuzilla.scm, gnu/packages/gps.scm, gnu/packages/guile.scm, gnu/packages/ibus.scm, gnu/packages/kerberos.scm, gnu/packages/kodi.scm, gnu/packages/lisp.scm, gnu/packages/mail.scm, gnu/packages/messaging.scm, gnu/packages/mpd.scm, gnu/packages/music.scm, gnu/packages/networking.scm, gnu/packages/nfs.scm, gnu/packages/ocaml.scm, gnu/packages/package-management.scm, gnu/packages/pdf.scm, gnu/packages/photo.scm, gnu/packages/php.scm, gnu/packages/python.scm, gnu/packages/qt.scm, gnu/packages/ruby.scm, gnu/packages/scheme.scm, gnu/packages/sync.scm, gnu/packages/syndication.scm, gnu/packages/version-control.scm, gnu/packages/video.scm, gnu/packages/web-browsers.scm, gnu/packages/webkit.scm: Adjust module references. Ricardo Wurmus 2019-01-15gnu: Separate Python core packages from the rest....* gnu/packages/python.scm: Move hundreds of package definitions from here... * gnu/packages/python-xyz.scm: ...to this new module. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. * gnu/packages/ada.scm, gnu/packages/admin.scm, gnu/packages/android.scm, gnu/packages/audio.scm, gnu/packages/backup.scm, gnu/packages/benchmark.scm, gnu/packages/bioinformatics.scm, gnu/packages/bittorrent.scm, gnu/packages/calendar.scm, gnu/packages/check.scm, gnu/packages/chemistry.scm, gnu/packages/cluster.scm, gnu/packages/compression.scm, gnu/packages/connman.scm, gnu/packages/crypto.scm, gnu/packages/cups.scm, gnu/packages/databases.scm, gnu/packages/dav.scm, gnu/packages/direct-connect.scm, gnu/packages/disk.scm, gnu/packages/django.scm, gnu/packages/dlang.scm, gnu/packages/docker.scm, gnu/packages/ebook.scm, gnu/packages/elf.scm, gnu/packages/emacs.scm, gnu/packages/emulators.scm, gnu/packages/engineering.scm, gnu/packages/enlightenment.scm, gnu/packages/finance.scm, gnu/packages/fltk.scm, gnu/packages/fontutils.scm, gnu/packages/freedesktop.scm, gnu/packages/game-development.scm, gnu/packages/games.scm, gnu/packages/geo.scm, gnu/packages/gl.scm, gnu/packages/glib.scm, gnu/packages/gnome.scm, gnu/packages/gnupg.scm, gnu/packages/gnuzilla.scm, gnu/packages/graph.scm, gnu/packages/graphics.scm, gnu/packages/graphviz.scm, gnu/packages/gtk.scm, gnu/packages/ham-radio.scm, gnu/packages/image-processing.scm, gnu/packages/image-viewers.scm, gnu/packages/image.scm, gnu/packages/irc.scm, gnu/packages/jrnl.scm, gnu/packages/julia.scm, gnu/packages/kde-frameworks.scm, gnu/packages/key-mon.scm, gnu/packages/libffi.scm, gnu/packages/libreoffice.scm, gnu/packages/libusb.scm, gnu/packages/lirc.scm, gnu/packages/logging.scm, gnu/packages/machine-learning.scm, gnu/packages/mail.scm, gnu/packages/mate.scm, gnu/packages/maths.scm, gnu/packages/medical.scm, gnu/packages/messaging.scm, gnu/packages/monitoring.scm, gnu/packages/mp3.scm, gnu/packages/mpd.scm, gnu/packages/music.scm, gnu/packages/networking.scm, gnu/packages/nutrition.scm, gnu/packages/openldap.scm, gnu/packages/openstack.scm, gnu/packages/package-management.scm, gnu/packages/password-utils.scm, gnu/packages/patchutils.scm, gnu/packages/pdf.scm, gnu/packages/photo.scm, gnu/packages/polkit.scm, gnu/packages/protobuf.scm, gnu/packages/python-crypto.scm, gnu/packages/python-web.scm, gnu/packages/qt.scm, gnu/packages/rdf.scm, gnu/packages/ruby.scm, gnu/packages/search.scm, gnu/packages/selinux.scm, gnu/packages/serialization.scm, gnu/packages/shells.scm, gnu/packages/simulation.scm, gnu/packages/ssh.scm, gnu/packages/statistics.scm, gnu/packages/storage.scm, gnu/packages/sync.scm, gnu/packages/terminals.scm, gnu/packages/textutils.scm, gnu/packages/time.scm, gnu/packages/tls.scm, gnu/packages/tor.scm, gnu/packages/tryton.scm, gnu/packages/version-control.scm, gnu/packages/video.scm, gnu/packages/virtualization.scm, gnu/packages/vpn.scm, gnu/packages/web-browsers.scm, gnu/packages/web.scm, gnu/packages/wicd.scm, gnu/packages/xdisorg.scm, gnu/packages/xorg.scm: Update module references. Ricardo Wurmus 2018-12-30gnu: fbreader: Install desktop file....* gnu/packages/ebook.scm (fbreader)[arguments]: Add phase to remove hardcoded paths for desktop dir. Efraim Flashner 2018-12-30gnu: fbreader: Use 'git-fetch'....* gnu/packages/ebook.scm (fbreader)[source]: Use 'git-fetch'. Efraim Flashner 2018-12-30gnu: fbreader: Fix building with newer curl....* gnu/packages/ebook.scm (fbreader)[source]: Add patch. * gnu/packages/patches/fbreader-curl-7.62.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. Efraim Flashner 2018-12-08gnu: calibre: Update to 3.35.0....* gnu/packages/ebooks.scm: (calibre): Update to 3.35.0. Signed-off-by: Andreas Enge <andreas@enge.fr> Brendan Tildesley