From 89b94d968d9c66bfeb46f4f5b674bc7aea7e2b92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Lacroix?= Date: Wed, 6 Jan 2021 10:44:05 +0100 Subject: [PATCH] libtheora: fetch a patch instead of storing it in Spack (#20620) --- .../libtheora/dont_use_png_sizeof.patch | 19 ------------------- .../builtin/packages/libtheora/package.py | 4 +++- 2 files changed, 3 insertions(+), 20 deletions(-) delete mode 100644 var/spack/repos/builtin/packages/libtheora/dont_use_png_sizeof.patch 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 deleted file mode 100644 index f2aeae3e60..0000000000 --- a/var/spack/repos/builtin/packages/libtheora/dont_use_png_sizeof.patch +++ /dev/null @@ -1,19 +0,0 @@ -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 716df9dce9..5255a195cf 100644 --- a/var/spack/repos/builtin/packages/libtheora/package.py +++ b/var/spack/repos/builtin/packages/libtheora/package.py @@ -21,9 +21,11 @@ class Libtheora(AutotoolsPackage): depends_on('m4', type='build') depends_on('doxygen', type='build') depends_on('libogg') + depends_on('libpng') patch('exit-prior-to-running-configure.patch', when='@1.1.1') - patch('dont_use_png_sizeof.patch', when='@1.1.1') + patch('https://gitlab.xiph.org/xiph/theora/-/commit/7288b539c52e99168488dc3a343845c9365617c8.patch', + sha256='2e4f891f6880386d9391f3e4eaf4a23493de4eea532f9b5cb8a04b5f7cd09301', when='^libpng@1.6:') def autoreconf(self, spec, prefix): sh = which('sh')