unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Tobias Geerinckx-Rice via Bug reports for GNU Guix <bug-guix@gnu.org>
To: 73435@debbugs.gnu.org
Cc: "Adam Faiz" <adam.faiz@disroot.org>,
	"Liliana Marie Prikler" <liliana.prikler@gmail.com>,
	宋文武 <iyzsong@envs.net>
Subject: bug#73435: [PATCH v2] gnu: gzdoom: Delete files that might prevent commercial distribution.
Date: Sun, 22 Sep 2024 02:00:01 +0200	[thread overview]
Message-ID: <82144a28256c392b568b57644c331a4ad7d7dd50.1726963201.git.me@tobias.gr> (raw)
In-Reply-To: <y13i27td.fsf@gnu-plus-liberated-linux>

* gnu/packages/games.scm (gzdoom)[source]: Delete files in the snippet.

Change-Id: I601bb251e9b690e375f707786bb5789a6a664b92
---
 gnu/packages/games.scm | 38 +++++++++++++++++++++++++++++++++++++-
 gnu/packages/vim.scm   |  4 ++--
 2 files changed, 39 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 8aa828a8a4..0c695f5dca 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -8065,9 +8065,45 @@ (define-public gzdoom
         (base32 "0i4hyg72z84fc6ca2ic9q82q5cbgrbd7bynl3kpkypxvyasq08wz"))
        (patches (search-patches "gzdoom-search-in-installed-share.patch"
                                 "gzdoom-find-system-libgme.patch"))
-       (modules '((guix build utils)))
+       (modules '((guix build utils)
+                  (ice-9 regex)))
        (snippet
         '(begin
+           ;; Remove files which mustn't be commercially redistributed.  See
+           ;; <https://zdoom.org/wiki/License#Commercial_use>, the ‘Contribution
+           ;; Guidelines’ at <https://github.com/ZDoom>, and Guix issue #73435.
+           (for-each
+            (lambda (directory)
+              (delete-file-recursively directory)
+              (substitute* "CMakeLists.txt"
+                (((string-append "add_subdirectory\\([[:blank:]]*"
+                                 directory
+                                 "[[:blank:]]*\\)"))
+                 "")))
+            '( ;; "wadsrc_extra"        ;game_support.pk3
+              "wadsrc_bm"))             ;brightmaps.pk3
+
+           ;; Removing game_support.pk3 entirely would break Freedoom & remove
+           ;; users' ability to play commercial games, despite owning (only) the
+           ;; non-functional data.  That can't be right.  Out of an abundance of
+           ;; caution, remove anything from the PK3 that could conceivably be
+           ;; derived from copyrightable data that's not freely redistributable.
+           (display "Keeping only the following game_support.pk3 files:\n")
+           (let* ((regexps (list "/font\\.inf$"
+                                 "/harmony/.*\\.(txt|zs)$"
+                                 "/(iwadinfo|mapinfo|sprofs)\\.txt$"
+                                 "\\.z$"))
+                  (regexp* (format #f "(~{~a~^|~})" regexps))
+                  (regexp  (make-regexp regexp* regexp/icase)))
+             (define (keep-file? file stat)
+               (let ((keep? (regexp-exec regexp file)))
+                 (when keep?
+                   (format #t "  ~a~%" file))
+                 keep?))
+
+             (for-each delete-file (find-files "wadsrc_extra/static"
+                                               (negate keep-file?))))
+
            ;; Remove some bundled libraries.  XXX There are more, but removing
            ;; them would require, at least, patching the build system.
            (with-directory-excursion "libraries"
diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm
index 786a85ab58..136ed5f0c9 100644
--- a/gnu/packages/vim.scm
+++ b/gnu/packages/vim.scm
@@ -86,7 +86,7 @@ (define-module (gnu packages vim)
 (define-public vim
   (package
     (name "vim")
-    (version "9.1.0146")
+    (version "9.1.0737")
     (source (origin
              (method git-fetch)
              (uri (git-reference
@@ -95,7 +95,7 @@ (define-public vim
              (file-name (git-file-name name version))
              (sha256
               (base32
-               "05lz8ai39p9ypk22n7qc7g21868m08pl12sn4028jshx5nxwy2zn"))))
+               "1777vbr43prh9pqhz1lr5b1nym61iyy66yzxbhwichd3spnlrblk"))))
     (build-system gnu-build-system)
     (arguments
      `(#:test-target "test"

base-commit: 2da3c37e7d732f6d2744f70be9fd98858a433b5e
prerequisite-patch-id: 3aa23428693688751bb14a2fbe464f5693ae13d7
prerequisite-patch-id: 3f0ca744a21be95e47c8c9105dfe1e7fd0dc59c7
-- 
2.46.0





  parent reply	other threads:[~2024-09-24 22:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-23  6:38 bug#73435: gzdoom package probably depends on non-free files forbidding commercial distribution Mamao--- via Bug reports for GNU Guix
2024-09-22  0:00 ` bug#73435: [PATCH] gnu: gzdoom: Delete files that prohibit commercial redistribution Tobias Geerinckx-Rice via Bug reports for GNU Guix
2024-09-23 17:05   ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
2024-09-22  0:00 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix [this message]
2024-09-23  9:15 ` bug#73435: gzdoom package probably depends on non-free files forbidding commercial distribution Tobias Geerinckx-Rice via Bug reports for GNU Guix
2024-09-23  9:18   ` Mamao--- via Bug reports for GNU Guix

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=82144a28256c392b568b57644c331a4ad7d7dd50.1726963201.git.me@tobias.gr \
    --to=bug-guix@gnu.org \
    --cc=73435@debbugs.gnu.org \
    --cc=adam.faiz@disroot.org \
    --cc=iyzsong@envs.net \
    --cc=liliana.prikler@gmail.com \
    --cc=me@tobias.gr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).