From f1d0ec7fc15eb62e296c22f9ee5e201e1b1125d5 Mon Sep 17 00:00:00 2001 From: Tomoyasu Nojiri <68096132+t-nojiri@users.noreply.github.com> Date: Sat, 26 Dec 2020 07:41:52 +0900 Subject: molden: Fix for aarch64 (#20549) --- var/spack/repos/builtin/packages/molden/for_aarch64.patch | 8 ++++++++ var/spack/repos/builtin/packages/molden/package.py | 7 +++++++ 2 files changed, 15 insertions(+) create mode 100644 var/spack/repos/builtin/packages/molden/for_aarch64.patch (limited to 'var') diff --git a/var/spack/repos/builtin/packages/molden/for_aarch64.patch b/var/spack/repos/builtin/packages/molden/for_aarch64.patch new file mode 100644 index 0000000000..8b2c6a8911 --- /dev/null +++ b/var/spack/repos/builtin/packages/molden/for_aarch64.patch @@ -0,0 +1,8 @@ +--- spack-src/src/xwin.c.bak 2020-09-18 19:13:33.000000000 +0900 ++++ spack-src/src/xwin.c 2020-12-23 16:06:13.764560722 +0900 +@@ -1,4 +1,4 @@ +-#ifndef DARWIN ++#if 0 + __asm__(".symver memcpy,memcpy@GLIBC_2.2.5"); + __asm__(".symver memmove,memmove@GLIBC_2.2.5"); + __asm__(".symver log,log@GLIBC_2.2.5"); diff --git a/var/spack/repos/builtin/packages/molden/package.py b/var/spack/repos/builtin/packages/molden/package.py index e70bcb5632..a1c55de402 100644 --- a/var/spack/repos/builtin/packages/molden/package.py +++ b/var/spack/repos/builtin/packages/molden/package.py @@ -24,6 +24,9 @@ class Molden(MakefilePackage): depends_on('makedepend', type='build') parallel = False # building in parallel is broken + build_targets = ['clean', 'all'] + + patch('for_aarch64.patch', when='target=aarch64:') def edit(self, spec, prefix): makefile = FileFilter('makefile') @@ -53,5 +56,9 @@ class Molden(MakefilePackage): makefile.filter(r'CFLAGS = (.*)', r'CFLAGS = {0} \1'.format(cflags)) makefile.filter(r'FFLAGS = (.*)', r'FFLAGS = {0} \1'.format(fflags)) + if spec.target.family == 'aarch64': + makefile.filter(r'AFLAG=*', r'AFLAG=') + makefile.filter(r'rm -f src/', r'rm -f ') + def install(self, spec, prefix): install_tree('bin', prefix.bin) -- cgit v1.2.3-70-g09d2