summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2020-01-04 22:48:45 -0600
committerGitHub <noreply@github.com>2020-01-04 22:48:45 -0600
commitf0532e27dafb80aa7cb489aceeaf520e92434721 (patch)
tree8f8704d76973b1f8a4a4c8b4ef9879f3e53b3b19 /var
parent8c8f3f228cb62c88d8e13f45be1ff5e60b3979d5 (diff)
downloadspack-f0532e27dafb80aa7cb489aceeaf520e92434721.tar.gz
spack-f0532e27dafb80aa7cb489aceeaf520e92434721.tar.bz2
spack-f0532e27dafb80aa7cb489aceeaf520e92434721.tar.xz
spack-f0532e27dafb80aa7cb489aceeaf520e92434721.zip
libwebp: CMakePackage -> AutotoolsPackage (#14384)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/libwebp/package.py56
1 files changed, 49 insertions, 7 deletions
diff --git a/var/spack/repos/builtin/packages/libwebp/package.py b/var/spack/repos/builtin/packages/libwebp/package.py
index 5819844b40..9c5f56a804 100644
--- a/var/spack/repos/builtin/packages/libwebp/package.py
+++ b/var/spack/repos/builtin/packages/libwebp/package.py
@@ -6,14 +6,56 @@
from spack import *
-class Libwebp(CMakePackage):
- """
- WebP is a modern image format that provides superior lossless and lossy
+class Libwebp(AutotoolsPackage):
+ """WebP is a modern image format that provides superior lossless and lossy
compression for images on the web. Using WebP, webmasters and web
- developers can create smaller, richer images that make the web faster.
- """
+ developers can create smaller, richer images that make the web faster."""
homepage = "https://developers.google.com/speed/webp/"
- url = "https://github.com/webmproject/libwebp/archive/v1.0.3.tar.gz"
+ url = "https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.0.3.tar.gz"
- version('1.0.3', sha256='082d114bcb18a0e2aafc3148d43367c39304f86bf18ba0b2e766447e111a4a91')
+ version('1.0.3', sha256='082d114bcb18a0e2aafc3148d43367c39304f86bf18ba0b2e766447e111a4a91')
+
+ variant('libwebpmux', default=False, description='Build libwebpmux')
+ variant('libwebpdemux', default=False, description='Build libwebpdemux')
+ variant('libwebpdecoder', default=False, description='Build libwebpdecoder')
+ variant('libwebpextras', default=False, description='Build libwebpextras')
+
+ depends_on('automake', type='build')
+ depends_on('autoconf', type='build')
+ depends_on('libtool', type='build')
+ depends_on('m4', type='build')
+
+ def configure_args(self):
+ # TODO: add variants and dependencies for these
+ args = [
+ '--disable-gl',
+ '--disable-sdl',
+ '--disable-png',
+ '--disable-jpeg',
+ '--disable-tiff',
+ '--disable-gif',
+ '--disable-wic',
+ ]
+
+ if '+libwebpmux' in self.spec:
+ args.append('--enable-libwebpmux')
+ else:
+ args.append('--disable-libwebpmux')
+
+ if '+libwebpdemux' in self.spec:
+ args.append('--enable-libwebpdemux')
+ else:
+ args.append('--disable-libwebpdemux')
+
+ if '+libwebpdecoder' in self.spec:
+ args.append('--enable-libwebpdecoder')
+ else:
+ args.append('--disable-libwebpdecoder')
+
+ if '+libwebpextras' in self.spec:
+ args.append('--enable-libwebpextras')
+ else:
+ args.append('--disable-libwebpextras')
+
+ return args