freetype: add pic and shared variants (#37898)
This commit is contained in:
parent
d1bfcfafe3
commit
b3268c2703
@ -44,6 +44,11 @@ class Freetype(AutotoolsPackage, CMakePackage):
|
|||||||
"support __builtin_shuffle)",
|
"support __builtin_shuffle)",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
variant("shared", default=True, description="Build shared libraries")
|
||||||
|
variant("pic", default=True, description="Enable position-independent code (PIC)")
|
||||||
|
|
||||||
|
requires("+pic", when="+shared build_system=autotools")
|
||||||
|
|
||||||
patch("windows.patch", when="@2.9.1")
|
patch("windows.patch", when="@2.9.1")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@ -64,6 +69,8 @@ def configure_args(self):
|
|||||||
]
|
]
|
||||||
if self.spec.satisfies("@2.9.1:"):
|
if self.spec.satisfies("@2.9.1:"):
|
||||||
args.append("--enable-freetype-config")
|
args.append("--enable-freetype-config")
|
||||||
|
args.extend(self.enable_or_disable("shared"))
|
||||||
|
args.extend(self.with_or_without("pic"))
|
||||||
return args
|
return args
|
||||||
|
|
||||||
|
|
||||||
@ -75,4 +82,6 @@ def cmake_args(self):
|
|||||||
self.define("FT_DISABLE_HARFBUZZ", True),
|
self.define("FT_DISABLE_HARFBUZZ", True),
|
||||||
self.define("FT_REQUIRE_PNG", True),
|
self.define("FT_REQUIRE_PNG", True),
|
||||||
self.define("FT_REQUIRE_BZIP2", True),
|
self.define("FT_REQUIRE_BZIP2", True),
|
||||||
|
self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
|
||||||
|
self.define_from_variant("CMAKE_POSITION_INDEPENDENT_CODE", "pic"),
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user