summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authort-nojiri <68096132+t-nojiri@users.noreply.github.com>2020-10-01 00:59:40 +0900
committerGitHub <noreply@github.com>2020-09-30 17:59:40 +0200
commit70a3626af7382a3daccde0efc73cf42c51e463cd (patch)
tree8afbd67d2f4abcd4b95a2d8fcf961a8603565ad5
parentc23d79c6d25b656f3ed8fdf74c45ab8f8e161487 (diff)
downloadspack-70a3626af7382a3daccde0efc73cf42c51e463cd.tar.gz
spack-70a3626af7382a3daccde0efc73cf42c51e463cd.tar.bz2
spack-70a3626af7382a3daccde0efc73cf42c51e463cd.tar.xz
spack-70a3626af7382a3daccde0efc73cf42c51e463cd.zip
optipng: allow build on aarch64 (#19039)
Added a patch to allow building on aarch64
-rw-r--r--var/spack/repos/builtin/packages/optipng/for_aarch64.patch11
-rw-r--r--var/spack/repos/builtin/packages/optipng/package.py2
2 files changed, 13 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/optipng/for_aarch64.patch b/var/spack/repos/builtin/packages/optipng/for_aarch64.patch
new file mode 100644
index 0000000000..b58cd4f185
--- /dev/null
+++ b/var/spack/repos/builtin/packages/optipng/for_aarch64.patch
@@ -0,0 +1,11 @@
+--- spack-src/configure.bak 2017-12-27 20:57:00.000000000 +0900
++++ spack-src/configure 2020-09-28 17:04:51.030223443 +0900
+@@ -193,7 +193,7 @@
+ if test "$gccish" -ne 0
+ then
+ CC="${CC-$cc}"
+- CFLAGS="${CFLAGS--O2 -Wall -Wextra}"
++ CFLAGS="${CFLAGS--O2 -Wall -Wextra -DPNG_ARM_NEON_OPT=0}"
+ else
+ CC="${CC-cc}"
+ CFLAGS="${CFLAGS--O}"
diff --git a/var/spack/repos/builtin/packages/optipng/package.py b/var/spack/repos/builtin/packages/optipng/package.py
index a94379f174..76e3b31834 100644
--- a/var/spack/repos/builtin/packages/optipng/package.py
+++ b/var/spack/repos/builtin/packages/optipng/package.py
@@ -18,3 +18,5 @@ class Optipng(AutotoolsPackage, SourceforgePackage):
sourceforge_mirror_path = "optipng/optipng-0.7.7.tar.gz"
version('0.7.7', sha256='4f32f233cef870b3f95d3ad6428bfe4224ef34908f1b42b0badf858216654452')
+ # See https://github.com/imagemin/optipng-bin/issues/97
+ patch('for_aarch64.patch', when='target=aarch64:')