summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/pixman/package.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/pixman/package.py b/var/spack/repos/builtin/packages/pixman/package.py
index e64568f595..adabe3afb3 100644
--- a/var/spack/repos/builtin/packages/pixman/package.py
+++ b/var/spack/repos/builtin/packages/pixman/package.py
@@ -31,6 +31,11 @@ class Pixman(AutotoolsPackage):
depends_on("bison@3:", type="build")
depends_on("libpng")
+ variant("shared", default=True, description="Build shared library")
+ variant("pic", default=False, description="Enable position-independent code")
+
+ conflicts("+shared ~pic")
+
# As discussed here:
# https://bugs.freedesktop.org/show_bug.cgi?id=104886
# __builtin_shuffle was removed in clang 5.0.
@@ -60,7 +65,9 @@ class Pixman(AutotoolsPackage):
@property
def libs(self):
- return find_libraries("libpixman-1", self.prefix, shared=True, recursive=True)
+ return find_libraries(
+ "libpixman-1", self.prefix, shared=self.spec.satisfies("+shared"), recursive=True
+ )
def configure_args(self):
args = ["--enable-libpng", "--disable-gtk"]
@@ -78,4 +85,7 @@ class Pixman(AutotoolsPackage):
if self.spec.satisfies("%fj"):
args.append("--disable-arm-a64-neon")
+ args.extend(self.enable_or_disable("shared"))
+ args.extend(self.with_or_without("pic"))
+
return args