fxt: add static variant (#32794)

This commit is contained in:
Lucas Nesi 2022-09-29 11:46:05 +02:00 committed by GitHub
parent 9515998deb
commit b37a1ec12b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -32,6 +32,8 @@ class Fxt(AutotoolsPackage):
description="Increase the value of FXT_MAX_PARAMS (to allow longer task names).", description="Increase the value of FXT_MAX_PARAMS (to allow longer task names).",
) )
variant("static", default=False, description="Compile as a static library")
depends_on("gawk", type="build") depends_on("gawk", type="build")
depends_on("autoconf", type="build") depends_on("autoconf", type="build")
depends_on("automake", type="build") depends_on("automake", type="build")
@ -56,6 +58,13 @@ def autoreconf(self, spec, prefix):
FxT Cannot configure." FxT Cannot configure."
) )
def configure_args(self):
spec = self.spec
config_args = []
if spec.satisfies("+static"):
config_args.extend(["--enable-static=yes", "--enable-shared=no"])
return config_args
def flag_handler(self, name, flags): def flag_handler(self, name, flags):
if name == "cflags": if name == "cflags":
flags.append(self.compiler.cc_pic_flag) flags.append(self.compiler.cc_pic_flag)