5 Commits 59b25133ef ... 1fb884c7b1

Author SHA1 Message Date
  Alex Kost 1fb884c7b1 packages/games: Update 'fheroes2' for the new home and version (0.8.4) 4 years ago
  Alex Kost c57e3db08e os: Do not build bootloader in any way 4 years ago
  Alex Kost 16dfa51151 os: Add "de_DE.utf8" locale 4 years ago
  Alex Kost c917a282e7 packages: Fix 'fheroes2' build 4 years ago
  Alex Kost 7421d0cc48 packages: Update 'font-symbola' to 13.00 4 years ago
3 changed files with 94 additions and 87 deletions
  1. 10 10
      modules/al/guix/packages/fonts.scm
  2. 58 68
      modules/al/guix/packages/games.scm
  3. 26 9
      system-config/os-main.scm

+ 10 - 10
modules/al/guix/packages/fonts.scm

@@ -1,6 +1,6 @@
 ;;; fonts.scm --- Font packages
 
-;; Copyright © 2014, 2015, 2017–2018 Alex Kost
+;; Copyright © 2014, 2015, 2017–2018, 2020 Alex Kost
 
 ;; Author: Alex Kost <alezost@gmail.com>
 ;; Created: 22 Oct 2014
@@ -43,13 +43,13 @@
 (define-public font-symbola
   (package
     (name "font-symbola")
-    (version "11.00")
+    (version "13.00")
     (source (origin
               (method url-fetch)
-              (uri "http://users.teilar.gr/~g1951d/Symbola.zip")
+              (uri "https://dn-works.com/wp-content/uploads/2020/UFAS-Fonts/Symbola.zip")
               (sha256
                (base32
-                "0zaj2bjhfj83z5ryvv7zis7zpzwgksvh1m7yfr3n2bw3a6fwx56m"))))
+                "101nk6aar67zlqqbzskggbiybjmq4p7d8jc0vnsi789bz67ls0fs"))))
     (build-system trivial-build-system)
     (arguments
      `(#:modules ((guix build utils))
@@ -59,16 +59,16 @@
 
          (let ((unzip    (string-append (assoc-ref %build-inputs "unzip")
                                         "/bin/unzip"))
-               (font-dir (string-append %output "/share/fonts/truetype"))
+               (font-dir (string-append %output "/share/fonts/opentype"))
                (doc-dir  (string-append %output "/share/doc/" ,name)))
            (system* unzip (assoc-ref %build-inputs "source"))
            (mkdir-p font-dir)
            (mkdir-p doc-dir)
-           (for-each (lambda (ttf)
-                       (copy-file ttf
+           (for-each (lambda (font)
+                       (copy-file font
                                   (string-append font-dir "/"
-                                                 (basename ttf))))
-                     (find-files "." "\\.ttf$"))
+                                                 (basename font))))
+                     (find-files "." "\\.otf$"))
            (for-each (lambda (doc)
                        (copy-file doc
                                   (string-append doc-dir "/"
@@ -77,7 +77,7 @@
     (native-inputs
      `(("source" ,source)
        ("unzip" ,unzip)))
-    (home-page "http://users.teilar.gr/~g1951d/")
+    (home-page "https://dn-works.com/ufas/")
     (synopsis "Font with many Unicode symbols")
     (description
      "Symbola is a TrueType font providing basic Latin, Greek, Cyrillic and many

+ 58 - 68
modules/al/guix/packages/games.scm

@@ -1,6 +1,6 @@
 ;;; games.scm --- Game packages
 
-;; Copyright © 2019 Alex Kost <alezost@gmail.com>
+;; Copyright © 2019–2021 Alex Kost <alezost@gmail.com>
 
 ;; This program is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
@@ -23,8 +23,9 @@
 
 (define-module (al guix packages games)
   #:use-module (guix packages)
-  #:use-module (guix svn-download)
+  #:use-module (guix git-download)
   #:use-module (guix build-system gnu)
+  #:use-module (guix utils)
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages pkg-config)
@@ -55,72 +56,61 @@
   ;;
   ;; Now you can start the game with "cd <dir>; ./fheroes2".
 
-  (let ((svn-revision 3279))    ; there are no releases
-    (package
-      (name "fheroes2")
-      (version (string-append "r" (number->string svn-revision)))
-      (source
-       (origin
-         (method svn-fetch)
-         (uri (svn-reference
-               (url "http://svn.code.sf.net/p/fheroes2/code/trunk")
-               (revision svn-revision)))
-         (file-name (string-append name "-" version "-checkout"))
-         (sha256
-          (base32
-           "0mq53a9algf8zrlfvaj9q99qwwx0fq4r687c3iqb3x74xhbzy8ws"))))
-      (build-system gnu-build-system)
-      (arguments
-       `(#:tests? #f
-         #:make-flags
-         (list
-          ;; Actually, setting WITH_AI here does not work because
-          ;; "empty" AI is hardcoded inside Makefile (fixed by
-          ;; 'patch-Makefile' phase).
-          "WITH_AI=simple"
-          ;; Unfortunately, I cannot use my CFLAGS because the
-          ;; hand-written Makefiles use this ^^^^ environment
-          ;; variable heavily (instead of leaving it for users).
-          ;;
-          ;; ,(cflags)
-          )
-         #:phases
-         (modify-phases %standard-phases
-           (add-after 'set-paths 'set-sdl-paths
-             (lambda* (#:key inputs #:allow-other-keys)
-               (setenv "CPATH"
-                       (string-append (assoc-ref inputs "sdl-union")
-                                      "/include/SDL:"
-                                      (getenv "CPATH")))
-               #t))
-           (add-after 'unpack 'enter-fheroes2-dir
-             (lambda _ (chdir "fheroes2") #t))
-           (add-after 'enter-fheroes2-dir 'patch-Makefile
-             (lambda _
-               (substitute* "Makefile"
-                 (("WITH_AI=empty") "WITH_AI=simple"))
-               #t))
-           (delete 'configure)  ; no "configure", just "Makefile"
-           (replace 'install ; no "install" target in the hand-written Makefile
-             (lambda* (#:key outputs #:allow-other-keys)
-               (let* ((out (assoc-ref outputs "out"))
-                      (bin (string-append out "/bin")))
-                 (install-file "src/dist/fheroes2" bin)
-                 #t))))))
-      (native-inputs
-       `(("pkg-config" ,pkg-config)
-         ("gettext" ,gettext-minimal)))
-      (inputs
-       `(("freetype" ,freetype)
-         ("sdl-union" ,(sdl-union (list sdl
-                                        sdl-image
-                                        sdl-mixer
-                                        sdl-net
-                                        sdl-ttf)))))
-      (home-page "http://sourceforge.net/projects/fheroes2")
-      (synopsis "Free Heroes2 Engine")
-      (description "@code{Free Heroes2} is an engine recreation of the
+  (package
+    (name "fheroes2")
+    (version "0.8.4")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/ihhub/fheroes2")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "0ynf6d6gz58qjhij08465kfy77cq44jy8sfak8s6qwyjbs89yan4"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f
+       #:make-flags
+       (list
+        "WITH_AI=simple"
+        ;; Unfortunately, I cannot use my CFLAGS because the
+        ;; hand-written Makefiles use this ^^^^ environment
+        ;; variable heavily (instead of leaving it for users).
+        ;;
+        ;; ,(cflags)
+        (string-append "CC=" ,(cc-for-target)))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'set-paths 'set-sdl-paths
+           (lambda* (#:key inputs #:allow-other-keys)
+             (setenv "CPATH"
+                     (string-append (assoc-ref inputs "sdl-union")
+                                    "/include/SDL:"
+                                    (or (getenv "CPATH") "")))
+             #t))
+         (delete 'configure)  ; no "configure", just "Makefile"
+         (replace 'install ; no "install" target in the hand-written Makefile
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (bin (string-append out "/bin")))
+               (install-file "src/dist/fheroes2" bin)
+               #t))))))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("gettext" ,gettext-minimal)))
+    (inputs
+     `(("freetype" ,freetype)
+       ("sdl-union" ,(sdl-union (list sdl
+                                      sdl-image
+                                      sdl-mixer
+                                      sdl-net
+                                      sdl-ttf)))))
+    (home-page "https://github.com/ihhub/fheroes2")
+    (synopsis "Free Heroes2 Engine")
+    (description "@code{Free Heroes2} is an engine recreation of the
 game @code{Heroes of Might and Magic II}.")
-      (license license:gpl2+))))
+    (license license:gpl2+)))
 
 ;;; games.scm ends here

+ 26 - 9
system-config/os-main.scm

@@ -36,6 +36,18 @@
     "wireless-tools"
     "zile"))
 
+(define fake-installer
+  #~(lambda _ #t))
+
+(define* (fake-configuration-file #:rest _)
+  (define builder
+    #~(call-with-output-file #$output
+        (lambda (port)
+          (format port "# This file is generated by my 'os-main.scm'."))))
+  (computed-file "fake.cfg" builder
+                 #:options '(#:local-build? #t
+                             #:substitutable? #f)))
+
 (define os
   (operating-system
     ;; (locale-libcs
@@ -49,21 +61,26 @@
     (locale-definitions
      (list (locale-definition (source "en_US")
                               (name   "en_US.utf8"))
+           (locale-definition (source "de_DE")
+                              (name   "de_DE.utf8"))
            (locale-definition (source "ru_RU")
                               (name   "ru_RU.utf8"))))
 
     (bootloader
-     ;; Since I always use "guix system build --no-bootloader", I don't want
-     ;; to build grub, but guix wants to build it anyway (it is done by
-     ;; 'perform-action' procedure in (guix scripts system) module).  So
-     ;; I simply replace the default 'grub' with my 'empty-package'.
+     ;; Since I always use "guix system build --no-bootloader", I don't
+     ;; want to build grub, its configuration file, etc. but guix wants
+     ;; to do it anyway (it is done by 'perform-action' procedure in
+     ;; (guix scripts system) module).  So here, I insist on avoiding
+     ;; any bootloader.
      (bootloader-configuration
       (bootloader (bootloader
-                   (inherit grub-bootloader)
-                   (name 'fake-grub)
-                   (package (my-package misc empty-package))))
-      (target "/dev/sda")
-      (theme (grub-theme))))
+                   (name 'fake-bootloader)
+                   (package (my-package misc empty-package))
+                   (installer fake-installer)
+                   (disk-image-installer fake-installer)
+                   (configuration-file "fake")
+                   (configuration-file-generator fake-configuration-file)))
+      (target "/dev/sda")))
 
     (kernel-arguments
      (list (string-append "modprobe.blacklist="