diff options
author | Howard Pritchard <howardp@lanl.gov> | 2020-12-04 02:12:44 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-04 10:12:44 +0100 |
commit | 61f0f840d4c04113169de817a23ad60fb7c0dd40 (patch) | |
tree | 6860f56f3d6aafebd8269afdd22a02a0c8501ffe | |
parent | 9afaaa3c25fc14afede2c818e78bcf7bcaac7ff3 (diff) | |
download | spack-61f0f840d4c04113169de817a23ad60fb7c0dd40.tar.gz spack-61f0f840d4c04113169de817a23ad60fb7c0dd40.tar.bz2 spack-61f0f840d4c04113169de817a23ad60fb7c0dd40.tar.xz spack-61f0f840d4c04113169de817a23ad60fb7c0dd40.zip |
libtheora: patch for png_sizeof issue (#20240)
See
https://gitlab.freedesktop.org/gstreamer/cerbero/blob/master/recipes/libtheora/0004-examples-Don-t-use-png_sizeof.patch
Signed-off-by: Howard Pritchard <howardp@lanl.gov>
-rw-r--r-- | var/spack/repos/builtin/packages/libtheora/dont_use_png_sizeof.patch | 19 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/libtheora/package.py | 1 |
2 files changed, 20 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/libtheora/dont_use_png_sizeof.patch b/var/spack/repos/builtin/packages/libtheora/dont_use_png_sizeof.patch new file mode 100644 index 0000000000..f2aeae3e60 --- /dev/null +++ b/var/spack/repos/builtin/packages/libtheora/dont_use_png_sizeof.patch @@ -0,0 +1,19 @@ +diff --git a/examples/png2theora.c b/examples/png2theora.c +index 71a0d0f..ed24c2a 100644 +--- a/examples/png2theora.c ++++ b/examples/png2theora.c +@@ -462,9 +462,9 @@ png_read(const char *pathname, unsigned int *w, unsigned int *h, unsigned char * + png_set_strip_alpha(png_ptr); + + row_data = (png_bytep)png_malloc(png_ptr, +- 3*height*width*png_sizeof(*row_data)); ++ 3*height*width*sizeof(*row_data)); + row_pointers = (png_bytep *)png_malloc(png_ptr, +- height*png_sizeof(*row_pointers)); ++ height*sizeof(*row_pointers)); + for(y = 0; y < height; y++) { + row_pointers[y] = row_data + y*(3*width); + } +-- +2.7.4 + diff --git a/var/spack/repos/builtin/packages/libtheora/package.py b/var/spack/repos/builtin/packages/libtheora/package.py index 874bc43f5b..c61cb80929 100644 --- a/var/spack/repos/builtin/packages/libtheora/package.py +++ b/var/spack/repos/builtin/packages/libtheora/package.py @@ -23,6 +23,7 @@ class Libtheora(AutotoolsPackage): depends_on('libogg') patch('exit-prior-to-running-configure.patch', when='@1.1.1') + patch('dont_use_png_sizeof.patch', when='@1.1.1') def autoreconf(self, spec, prefix): sh = which('sh') |