Regarding the phase 'remove-bogus-check removed by this patch, the applicable upstream code was removed in v1.4.7 by https://github.com/facebook/zstd/commit/b521183c74795bd9bdd9bdebe74af01cae4d3d43


From f8f6592c31359025d66b07ade2b101ab903097f8 Mon Sep 17 00:00:00 2001
From: Greg Hogan <code@greghogan.com>
Date: Fri, 8 Apr 2022 19:16:43 +0000
Subject: [PATCH 1/2] gnu: zstd: Update to 1.5.2.

* gnu/packages/compression.scm (zstd): Update to 1.5.2.
[arguments]: Remove obsolete phase.
---
 gnu/packages/compression.scm | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index ecb1e69328..256c358448 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -35,6 +35,7 @@
 ;;; Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com>
 ;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2021 Ahmad Jarara <git@ajarara.io>
+;;; Copyright © 2022 Greg Hogan <code@greghogan.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1576,28 +1577,21 @@ (define-public unshield
 (define-public zstd
   (package
     (name "zstd")
-    (version "1.5.0")
+    (version "1.5.2")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "https://github.com/facebook/zstd/releases/download/"
                            "v" version "/zstd-" version ".tar.gz"))
        (sha256
-        (base32 "150y541303vnvfhd8wkbih00lfvvm98rd12yijwlbkqzg3xgp52i"))))
+        (base32 "1l1zm1imcc2ixayykyh4y421shdj3pzp7g2xm2k2js8jmipxahkw"))))
     (build-system gnu-build-system)
-    (outputs '("out"                    ;1.2MiB executables and documentation
+    (outputs '("out"                    ;1.5MiB executables and documentation
                "lib"                    ;1.2MiB shared library and headers
                "static"))               ;1.2MiB static library
     (arguments
      `(#:phases
        (modify-phases %standard-phases
-         (add-after 'unpack 'remove-bogus-check
-           (lambda _
-             ;; lib/Makefile falsely claims that no .pc file can be created.
-             (substitute* "lib/Makefile"
-               (("error configured .*dir ")
-                "true "))
-             #t))
          (add-after 'unpack 'patch-command-file-names
            ;; Don't require hard requirements to be in $PATH.
            (lambda* (#:key outputs #:allow-other-keys)
--
2.35.1