# GNU Guix --- Functional package management for GNU # Copyright © 2016 Eric Bavier # Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès # Copyright © 2013 Andreas Enge # Copyright © 2016 Taylan Ulrich Bayırlı/Kammer # Copyright © 2016, 2018 Mathieu Lirzin # Copyright © 2018, 2021 Julien Lepiller # # 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 . # If adding a language, update the following variables, and info_TEXINFOS. MANUAL_LANGUAGES = de es fr pt_BR ru zh_CN COOKBOOK_LANGUAGES = de fr ko sk # Arg1: A list of languages codes. # Arg2: The file name stem. lang_to_texinfo = $(foreach lang,$(1),%D%/$(2).$(lang).texi) # Automake does not understand GNU Make non-standard extensions, # unfortunately, so we cannot use the above patsubst-based function here. info_TEXINFOS = %D%/guix.texi \ %D%/guix.de.texi \ %D%/guix.es.texi \ %D%/guix.fr.texi \ %D%/guix.pt_BR.texi \ %D%/guix.ru.texi \ %D%/guix.zh_CN.texi \ %D%/guix-cookbook.texi \ %D%/guix-cookbook.de.texi \ %D%/guix-cookbook.fr.texi \ %D%/guix-cookbook.ko.texi \ %D%/guix-cookbook.sk.texi %C%_guix_TEXINFOS = \ %D%/contributing.texi \ %D%/fdl-1.3.texi DOT_FILES = \ %D%/images/bootstr
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013, 2018 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 (gnu packages gcal)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (guix build-system gnu)
  #:use-module (guix licenses))

(define-public gcal
  (package
    (name "gcal")
    (version "4.1")
    (source (origin
             (method url-fetch)
             (uri (string-append "mirror://gnu/gcal/gcal-"
                                 version ".tar.xz"))
             (sha256
              (base32
               "1av11zkfirbixn05hyq4xvilin0ncddfjqzc4zd9pviyp506rdci"))
             (modules '((guix build utils)))
             (snippet
              '(begin
                 ;; Adjust the bundled gnulib to work with glibc 2.28.  See e.g.
                 ;; "m4-gnulib-libio.patch".  This is a phase rather than patch
                 ;; or snippet to work around <https://bugs.gnu.org/32347>.
                 (substitute* (find-files "lib" "\\.c$")
                   (("#if defined _IO_ftrylockfile")
                    "#if defined _IO_EOF_SEEN"))
                 (substitute* "lib/stdio-impl.h"
                   (("^/\\* BSD stdio derived implementations")
                    (string-append "#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN\n"
                                   "# define _IO_IN_BACKUP 0x100\n"
                                   "#endif\n\n"
                                   "/* BSD stdio derived implementations")))
                 #t))))
    (build-system gnu-build-system)
    (home-page "https://www.gnu.org/software/gcal/")
    (synopsis "Calculating and printing a wide variety of calendars")
    (description
     "Gcal is a program to calculate and print calendars on the
command-line.  Calendars can be printed in 1-month, 3-month or whole-year
views.  In addition, eternal holiday lists can be generated for many
countries, which can be complemented by user-made lists of fixed dates to
make an agenda.  Gcal can also calculate astronomical data, such as the
phases of the moon, and supports alternative calendar formats: Julian,
Gregorian, Islamic, Chinese and more.")
    (license gpl3+)))
-Nheight=.1 -Nwidth=.1 .dot.png: $(AM_V_DOT)$(DOT) -Tpng $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"; \ mv "$(srcdir)/$@.tmp" "$(srcdir)/$@" .dot.pdf: $(AM_V_DOT)$(DOT) -Tpdf $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"; \ mv "$(srcdir)/$@.tmp" "$(srcdir)/$@" .dot.eps: $(AM_V_DOT)$(DOT) -Teps $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"; \ mv "$(srcdir)/$@.tmp" "$(srcdir)/$@" .png.eps: $(AM_V_GEN)convert "$<" "$@-tmp.eps"; \ mv "$@-tmp.eps" "$@" # We cannot add new dependencies to `%D%/guix.pdf' & co. (info "(automake) # Extending"). Using the `-local' rules is imperfect, because they may be # triggered after the main rule. Oh, well. pdf-local: $(DOT_FILES=%.dot=$(top_srcdir)/%.pdf) info-local: $(DOT_FILES=%.dot=$(top_srcdir)/%.png) ps-local: $(DOT_FILES=%.dot=$(top_srcdir)/%.eps) \ $(top_srcdir)/%D%/images/coreutils-size-map.eps dvi-local: ps-local ## ----------- ## ## Man pages. ## ## ----------- ## # The man pages are generated using GNU Help2man. In makefiles rules they # depend not on the binary, but on the source files. This usage allows a # manual page to be generated by the maintainer and included in the # distribution without requiring the end-user to have 'help2man' installed. # They are built in $(srcdir) like info manuals. sub_commands_mans = \ $(srcdir)/%D%/guix-archive.1 \ $(srcdir)/%D%/guix-build.1 \ $(srcdir)/%D%/guix-challenge.1 \ $(srcdir)/%D%/guix-container.1 \ $(srcdir)/%D%/guix-copy.1 \ $(srcdir)/%D%/guix-deploy.1 \ $(srcdir)/%D%/guix-describe.1 \ $(srcdir)/%D%/guix-download.1 \ $(srcdir)/%D%/guix-edit.1 \ $(srcdir)/%D%/guix-environment.1 \ $(srcdir)/%D%/guix-gc.1 \ $(srcdir)/%D%/guix-git.1 \ $(srcdir)/%D%/guix-graph.1 \ $(srcdir)/%D%/guix-hash.1 \ $(srcdir)/%D%/guix-home.1 \ $(srcdir)/%D%/guix-import.1 \ $(srcdir)/%D%/guix-lint.1 \ $(srcdir)/%D%/guix-offload.1 \ $(srcdir)/%D%/guix-pack.1 \ $(srcdir)/%D%/guix-package.1 \ $(srcdir)/%D%/guix-processes.1 \ $(srcdir)/%D%/guix-publish.1 \ $(srcdir)/%D%/guix-pull.1 \ $(srcdir)/%D%/guix-refresh.1 \ $(srcdir)/%D%/guix-repl.1 \ $(srcdir)/%D%/guix-shell.1 \ $(srcdir)/%D%/guix-size.1 \ $(srcdir)/%D%/guix-style.1 \ $(srcdir)/%D%/guix-system.1 \ $(srcdir)/%D%/guix-time-machine.1 \ $(srcdir)/%D%/guix-weather.1 # Assume that cross-compiled commands cannot be executed. if !CROSS_COMPILING dist_man1_MANS = \ $(srcdir)/%D%/guix.1 \ $(sub_commands_mans) endif gen_man = \ LANGUAGE= $(top_builddir)/pre-inst-env $(HELP2MAN) \ $(HELP2MANFLAGS) HELP2MANFLAGS = --source=GNU --info-page=$(PACKAGE_TARNAME) $(srcdir)/%D%/guix.1: scripts/guix.in $(sub_commands_mans) -$(AM_V_HELP2MAN)$(gen_man) --output="$@" `basename "$@" .1` # The 'case' ensures the man pages are only generated if the corresponding # source script (the first prerequisite) has been changed. The $(GOBJECTS) # prerequisite is solely meant to force these docs to be made only after all # Guile modules have been compiled. $(srcdir)/%D%/guix-%.1: guix/scripts/%.scm $(GOBJECTS) -@case '$?' in \ *$<*) $(AM_V_P) && set -x || echo " HELP2MAN $@"; \ $(gen_man) --output="$@" "guix $*";; \ *) : ;; \ esac if BUILD_DAEMON if !CROSS_COMPILING dist_man1_MANS += $(srcdir)/%D%/guix-daemon.1 $(srcdir)/%D%/guix-daemon.1: guix-daemon$(EXEEXT) -$(AM_V_HELP2MAN)$(gen_man) --output="$@" `basename "$@" .1` endif endif