aboutsummaryrefslogtreecommitdiff
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
;;; Copyright © 2022 Marius Bakke <marius@gnu.org>
;;; Copyright © 2023 Janneke Nieuwenhuizen <janneke@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 (gnu packages libbsd)
  #:use-module (guix build-system gnu)
  #:use-module (guix download)
  #:use-module (guix licenses)
  #:use-module (guix packages)
  #:use-module (guix gexp)
  #:use-module (guix utils)
  #:use-module (gnu packages crypto))

(define-public libbsd
  (package
    (name "libbsd")
    (version "0.11.7")
    (source (origin
              (method url-fetch)
              (uri (string-append "https://libbsd.freedesktop.org/releases/"
                                  "libbsd-" version ".tar.xz"))
              (sha256
               (base32
                "0q82iaynmal3dn132jgjq21p27x3zn8zks88cg02bgzbb5h1ialv"))))
    (build-system gnu-build-system)
    (arguments
     (list #:configure-flags #~'("--disable-static")
           #:phases #~(modify-phases %standard-phases
                        (add-after 'install 'embed-absolute-libmd-references
                          (lambda* (#:key inputs #:allow-other-keys)
                            (let ((libmd (search-input-file inputs
                                                            "lib/libmd.so")))
                              ;; Add absolute references to libmd so it
                              ;; does not need to be propagated.
                              (with-directory-excursion #$output
                                (substitute* "lib/libbsd.so"
                                  (("^GROUP")
                                   (string-append "SEARCH_DIR("
                                                  (dirname libmd)
                                                  ")\nGROUP")))
                                (substitute* (find-files "lib/pkgconfig"
                                                         "\\.pc$")
                                  (("-lmd")
                                   (string-append "-L" (dirname libmd)
                                                  " -lmd")))))))
                        (add-before 'check 'disable-pwcache-test
                          (lambda _
                            ;; This test expects the presence of a root
                            ;; user and group, which do not exist in the
                            ;; build container.
                            (substitute* "test/Makefile"
                              (("pwcache\\$\\(EXEEXT\\) ")
                               ""))))
                        #$@(if (system-hurd?)
                               #~((add-after 'unpack 'skip-tests
                                  (lambda _
                                    (substitute* "test/explicit_bzero.c"
                                      (("(^| )main *\\(.*" all)
                                       (string-append all
                                                      "{\n  exit (77);//"))))))
                               #~()))))
    (inputs
     (list libmd))
    (synopsis "Utility functions from BSD systems")
    (description "This library provides useful functions commonly found on BSD
systems, and lacking on others like GNU systems, thus making it easier to port
projects with strong BSD origins, without needing to embed the same code over
and over again on each project.")
    (home-page "https://libbsd.freedesktop.org/wiki/")
    ;; This package is a collection of third-party functions that were
    ;; originally released under various non-copyleft licenses.
    (license (list bsd-2 bsd-3 bsd-4 expat isc public-domain
                   (non-copyleft "file://COPYING"
                                 "See COPYING in the distribution.")))))
d>Paul van der Walt 2015-09-04gnu: Add python2-notmuch....* gnu/packages/mail.scm (python2-notmuch): New variable. Ludovic Courtès 2015-08-16gnu: notmuch: Update to 0.20.2....* gnu/packages/mail.scm (notmuch): Update to 0.20.2. Add python-sphinx native input. Rewrite phases using 'modify-phases' syntax. David Thompson 2015-08-16gnu: offlineimap: Update to 6.5.7....* gnu/packages/mail.scm (offlineimap): Update to 6.5.7. David Thompson 2015-07-05gnu: Move content of openssl module into tls module....* gnu/packages/openssl.scm (openssl, perl-net-ssleay): Move to... * gnu/packages/tls.scm: ...here. * gnu/packages/openssl.scm: Delete file. * gnu-system.am (GNU_SYSTEM_MODULES): Unregister deleted file. * gnu/packages/{admin.scm, bittorrent.scm, certs.scm, ci.scm, cyrus-sasl.scm, databases.scm, dns.scm, ebook.scm, enlightenment.scm, gnunet.scm, libreoffice.scm, links.scm, mail.scm, messaging.scm, networking.scm, ntp.scm, openldap.scm, package-management.scm, pdf.scm, python.scm, qt.scm, rdesktop.scm, rdf.scm, ruby.scm, ssh.scm, synergy.scm, tor.scm, version-control.scm, video.scm, vpn.scm, w3m.scm, web.scm, weechat.scm, xiph.scm}: Adapt module import. Andreas Enge 2015-07-05gnu: Rename module gnutls to tls....* gnu/packages/gnutls.scm: Rename to... * gnu/packages/tls.scm: ... this. Change module name accordingly. * gnu/packages/{admin.scm, cups.scm, curl.scm, dc.scm, dns.scm, emacs.scm, ftp.scm, gnome.scm, gnunet.scm, gnupg.scm, gsasl.scm, lynx.scm, mail.scm, messaging.scm, package-management.scm, shishi.scm, task-management.scm, version-control.scm, video.scm, vpn.scm, webkit.scm, weechat.scm, wget.scm, wine.scm, xml.scm}: Adapt module import to new name. * gnu-system.am (GNU_SYSTEM_MODULES): Rename gnutls module to tls. Andreas Enge 2015-07-03gnu: mutt: Don't retain reference to GCC....* gnu/packages/patches/mutt-store-references.patch: New file. * gnu/packages/mail.scm (mutt)[source]: Use it. * gnu-system.am (dist_patch_DATA): Add it. Ludovic Courtès 2015-05-23gnu: dbus-glib: Propagate inputs dbus and glib....* gnu/packages/glib.scm (dbus-glib): Propagate inputs dbus and glib. * gnu/packages/audio.scm (patchage), gnu/packages/gnuzilla.scm (icecat), gnu/packages/python.scm (python-dbus): Drop inputs dbus and glib. * gnu/packages/gnome.scm (colord, gconf, gnome-vfs, upower), gnu/packages/mail.scm (claws-mail), gnu/packages/messaging.scm (hexchat), gnu/packages/wicd.scm (wicd): Drop input dbus. Andreas Enge 2015-05-03gnu: Add dovecot....* gnu/packages/mail.scm (dovecot): New variable. Mark H Weaver 2015-04-23gnu: notmuch: Update to 0.19; add man pages and bash completion....* gnu/packages/mail.scm (notmuch)[source]: Update to 0.19. [arguments]: In 'configure' phase, set CC environment variable. Arrange to use rst2man.py instead of rst2man. [native-inputs]: Add python-2, python2-docutils, and bash-completion. Mark H Weaver 2015-04-19gnu: Add Email-Sender....* gnu/packages/mail.scm (perl-email-sender): New variable. Eric Bavier 2015-04-19gnu: Add Email-Abstract....* gnu/packages/mail.scm (perl-email-abstract): New variable. Eric Bavier 2015-04-19gnu: Add Email-MIME....* gnu/packages/mail.scm (perl-email-mime): New variable. Eric Bavier 2015-04-19gnu: Add Email-Simple....* gnu/packages/mail.scm (perl-email-simple): New variable. Eric Bavier 2015-04-19gnu: Add Email-Date-Format....* gnu/packages/mail.scm (perl-email-date-format): New variable. Eric Bavier 2015-04-19gnu: Add Email-MIME-Encodings....* gnu/packages/mail.scm (perl-email-mime-encodings): New variable. Eric Bavier 2015-04-19gnu: Add Email-MIME-ContentType....* gnu/packages/mail.scm (perl-email-mime-contenttype): New variable. Eric Bavier 2015-04-19gnu: Add Email-MessageID....* gnu/packages/mail.scm (perl-email-messageid): New variable. Eric Bavier 2015-04-19gnu: Add Email-Address....* gnu/packages/mail.scm (perl-email-address): New variable. Eric Bavier 2015-04-16gnu: mu: Update to 0.9.12....* gnu/packages/mail.scm (mu): Update to version 0.9.12. Paul van der Walt 2015-03-19gnu: Use emacs-no-x when we just want to byte-compile code....* gnu/packages/code.scm (cflow)[native-inputs]: Change EMACS to EMACS-NO-X. * gnu/packages/databases.scm (recutils): Likewise. * gnu/packages/emacs.scm (geiser, paredit, magit, emacs-w3m, emacs-wget, emms, bbdb): Likewise. * gnu/packages/idutils.scm (idutils): Likewise. * gnu/packages/mail.scm (mu): Likewise. * gnu/packages/package-management.scm (guix-0.8.1): Likewise. * gnu/packages/scheme.scm (bigloo): Likewise. * gnu/packages/version-control.scm (vc-dwim): Likewise. Ludovic Courtès 2015-03-19gnu: msmtp: Use mirror:// URI....* gnu/packages/mail.scm (msmtp): Use a mirror:// URI for the source. Taylan Ulrich Bayırlı/Kammer 2015-03-19gnu: claws-mail: Use mirror:// URI....* gnu/packages/mail.scm (claws-mail): Use a mirror:// URI for the source. Taylan Ulrich Bayırlı/Kammer 2015-03-14gnu: Update packages to use 'non-copyleft' instead of 'bsd-style'....* gnu/packages/avr.scm, gnu/packages/compression.scm, gnu/packages/curl.scm, gnu/packages/cyrus-sasl.scm, gnu/packages/databases.scm, gnu/packages/firmware.scm, gnu/packages/flex.scm, gnu/packages/fontutils.scm, gnu/packages/gd.scm, gnu/packages/ghostscript.scm, gnu/packages/gnunet.scm, gnu/packages/graphics.scm, gnu/packages/hugs.scm, gnu/packages/image.scm, gnu/packages/linux.scm, gnu/packages/mail.scm, gnu/packages/maths.scm, gnu/packages/mit-krb5.scm, gnu/packages/python.scm, gnu/packages/rdf.scm, gnu/packages/ssh.scm, gnu/packages/tcl.scm, gnu/packages/xdisorg.scm, gnu/packages/xiph.scm, gnu/packages/yasm.scm, gnu/packages/zip.scm: Use 'non-copyleft' instead of 'bsd-style'. Ludovic Courtès