summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Luszczek <luszczek@icl.utk.edu>2021-11-30 17:09:00 -0500
committerGitHub <noreply@github.com>2021-11-30 23:09:00 +0100
commitd57bcc0b852e0c6c080a917ae462b5cf5e1d1cb0 (patch)
treed306c6190617cd940853dc047243ce447cc0862c
parentc96a6f990ee83d2115a6134327511004864ffdca (diff)
downloadspack-d57bcc0b852e0c6c080a917ae462b5cf5e1d1cb0.tar.gz
spack-d57bcc0b852e0c6c080a917ae462b5cf5e1d1cb0.tar.bz2
spack-d57bcc0b852e0c6c080a917ae462b5cf5e1d1cb0.tar.xz
spack-d57bcc0b852e0c6c080a917ae462b5cf5e1d1cb0.zip
cpio: reuse patch for %gcc10: for %clang as well (#27589)
and replace patch download with simple filter_file() to fix the duplicate definition. Co-authored-by: Bernhard Kaindl <43588962+bernhardkaindl@users.noreply.github.com>
-rw-r--r--var/spack/repos/builtin/packages/cpio/package.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/var/spack/repos/builtin/packages/cpio/package.py b/var/spack/repos/builtin/packages/cpio/package.py
index 90f195bc90..0134fb1b66 100644
--- a/var/spack/repos/builtin/packages/cpio/package.py
+++ b/var/spack/repos/builtin/packages/cpio/package.py
@@ -9,8 +9,8 @@ from spack import *
class Cpio(AutotoolsPackage, GNUMirrorPackage):
- """GNU cpio copies files into or out of a cpio or tar archive. The
- archive can be another file on the disk, a magnetic tape, or a pipe.
+ """GNU cpio copies files into or out of a cpio or tar archive and the file system.
+ The archive can be another file on the disk, a magnetic tape, or a pipe.
"""
homepage = "https://www.gnu.org/software/cpio/"
gnu_mirror_path = "cpio/cpio-2.13.tar.gz"
@@ -19,10 +19,12 @@ class Cpio(AutotoolsPackage, GNUMirrorPackage):
version('2.13', sha256='e87470d9c984317f658567c03bfefb6b0c829ff17dbf6b0de48d71a4c8f3db88')
- patch('https://src.fedoraproject.org/rpms/cpio/raw/dfe64c466d3ea2c8dfbd99700d9006f610064167/f/cpio-2.13-mutiple-definition.patch', sha256='d22633c368b8aedf4c08b23b6fbaa81a52404c8943ab04926404083ac10f1a4b', when='%gcc@10:')
-
build_directory = 'spack-build'
+ def patch(self):
+ """Fix mutiple definition of char *program_name for gcc@10: and clang"""
+ filter_file(r'char \*program_name;', '', 'src/global.c')
+
@classmethod
def determine_version(cls, exe):
output = Executable(exe)('--version', output=str, error=str)