Subject: [PATCH 32/34] gnu: shogun: Fix regex in FIND-FILES invocation.

From: Sarah Morgensen <[email-masked]>
Date: Sun, 1 Aug 2021 20:27:48 -0700

See <https://issues.guix.gnu.org/37150> for more information.

* gnu/packages/machine-learning.scm (shogun)[origin]<snippet>: Fix
regex.
---
 gnu/packages/machine-learning.scm | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index 02365a4d59..1263b0621c 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -454,12 +454,12 @@ optimizing, and searching weighted finite-state transducers (FSTs).")
            ;; Remove non-free sources and files referencing them
            (for-each delete-file
                      (find-files "src/shogun/classifier/svm/"
-                                 "SVMLight\\.(cpp|h)"))
+                                 "^SVMLight\\.(cpp|h)$"))
            (for-each delete-file
                      (find-files "examples/undocumented/libshogun/"
                                  (string-append
-                                  "(classifier_.*svmlight.*|"
-                                  "evaluation_cross_validation_locked_comparison).cpp")))
+                                  "^(classifier_.*svmlight.*|"
+                                  "evaluation_cross_validation_locked_comparison).cpp$")))
            ;; Remove non-free functions.
            (define (delete-ifdefs file)
              (with-atomic-file-replacement file
@@ -481,17 +481,17 @@ optimizing, and searching weighted finite-state transducers (FSTs).")
            (for-each delete-ifdefs
                      (append
                       (find-files "src/shogun/classifier/mkl"
-                                  "^MKLClassification\\.cpp")
+                                  "^MKLClassification\\.cpp$")
                       (find-files "src/shogun/classifier/svm"
-                                  "^SVMLightOneClass\\.(cpp|h)")
+                                  "^SVMLightOneClass\\.(cpp|h)$")
                       (find-files "src/shogun/multiclass"
-                                  "^ScatterSVM\\.(cpp|h)")
+                                  "^ScatterSVM\\.(cpp|h)$")
                       (find-files "src/shogun/kernel/"
-                                  "^(Kernel|CombinedKernel|ProductKernel)\\.(cpp|h)")
+                                  "^(Kernel|CombinedKernel|ProductKernel)\\.(cpp|h)$")
                       (find-files "src/shogun/regression/svr"
-                                  "^(MKLRegression|SVRLight)\\.(cpp|h)")
+                                  "^(MKLRegression|SVRLight)\\.(cpp|h)$")
                       (find-files "src/shogun/transfer/domain_adaptation"
-                                  "^DomainAdaptationSVM\\.(cpp|h)")))
+                                  "^DomainAdaptationSVM\\.(cpp|h)$")))
            #t))))
     (build-system cmake-build-system)
     (arguments
-- 
2.31.1