xorg-server: add variants dri and glx (#45787)
Co-authored-by: wdconinc <wdconinc@users.noreply.github.com>
This commit is contained in:
parent
cd682613cf
commit
20bf239a6a
@ -15,10 +15,16 @@ class XorgServer(AutotoolsPackage, XorgPackage):
|
|||||||
|
|
||||||
license("MIT")
|
license("MIT")
|
||||||
|
|
||||||
|
version(
|
||||||
|
"1.18.99.902", sha256="fe5a312f7bdc6762c97f01b7a1d3c7a8691997255be6fbf7598c180abf384ea3"
|
||||||
|
)
|
||||||
version(
|
version(
|
||||||
"1.18.99.901", sha256="c8425163b588de2ee7e5c8e65b0749f2710f55a7e02a8d1dc83b3630868ceb21"
|
"1.18.99.901", sha256="c8425163b588de2ee7e5c8e65b0749f2710f55a7e02a8d1dc83b3630868ceb21"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
variant("glx", default=True, description="Build GLX extension")
|
||||||
|
variant("dri", default=True, description="Build DRI, DRI2, DRI3 extensions")
|
||||||
|
|
||||||
# glibc stopped declaring major()/minor() macros in <sys/types.h>
|
# glibc stopped declaring major()/minor() macros in <sys/types.h>
|
||||||
# https://gitlab.freedesktop.org/xorg/xserver/-/commit/d732c36597fab2e9bc4f2aa72cf1110997697557
|
# https://gitlab.freedesktop.org/xorg/xserver/-/commit/d732c36597fab2e9bc4f2aa72cf1110997697557
|
||||||
patch("sysmacros.patch", when="@:1.18 ^glibc@2.25:")
|
patch("sysmacros.patch", when="@:1.18 ^glibc@2.25:")
|
||||||
@ -35,14 +41,17 @@ def patch(self):
|
|||||||
depends_on("pixman@0.27.2:")
|
depends_on("pixman@0.27.2:")
|
||||||
depends_on("font-util")
|
depends_on("font-util")
|
||||||
depends_on("libxshmfence@1.1:")
|
depends_on("libxshmfence@1.1:")
|
||||||
depends_on("libdrm@2.3.0:")
|
depends_on("libdrm@2.3.0:", when="+dri")
|
||||||
depends_on("libx11")
|
depends_on("libx11")
|
||||||
|
|
||||||
depends_on("gl")
|
depends_on("gl", when="+dri")
|
||||||
|
depends_on("gl", when="+glx")
|
||||||
|
|
||||||
depends_on("dri2proto@2.8:", type="build")
|
depends_on("xf86driproto@2.1.0:", type="build", when="+dri")
|
||||||
depends_on("dri3proto@1.0:", type="build")
|
depends_on("dri2proto@2.8:", type="build", when="+dri")
|
||||||
depends_on("glproto@1.4.17:", type="build")
|
depends_on("dri3proto@1.0:", type="build", when="+dri")
|
||||||
|
depends_on("glproto@1.4.17:", type="build", when="+dri")
|
||||||
|
depends_on("glproto@1.4.17:", type="build", when="+glx")
|
||||||
|
|
||||||
depends_on("flex", type="build")
|
depends_on("flex", type="build")
|
||||||
depends_on("bison", type="build")
|
depends_on("bison", type="build")
|
||||||
@ -66,8 +75,6 @@ def patch(self):
|
|||||||
depends_on("recordproto@1.13.99.1:", type="build")
|
depends_on("recordproto@1.13.99.1:", type="build")
|
||||||
depends_on("scrnsaverproto@1.1:", type="build")
|
depends_on("scrnsaverproto@1.1:", type="build")
|
||||||
depends_on("resourceproto@1.2.0:", type="build")
|
depends_on("resourceproto@1.2.0:", type="build")
|
||||||
depends_on("xf86driproto@2.1.0:", type="build")
|
|
||||||
depends_on("glproto@1.4.17:", type="build")
|
|
||||||
depends_on("presentproto@1.0:", type="build")
|
depends_on("presentproto@1.0:", type="build")
|
||||||
depends_on("xineramaproto", type="build")
|
depends_on("xineramaproto", type="build")
|
||||||
depends_on("libxkbfile")
|
depends_on("libxkbfile")
|
||||||
@ -76,6 +83,7 @@ def patch(self):
|
|||||||
depends_on("libxdamage")
|
depends_on("libxdamage")
|
||||||
depends_on("libxfixes")
|
depends_on("libxfixes")
|
||||||
depends_on("libepoxy")
|
depends_on("libepoxy")
|
||||||
|
depends_on("libpciaccess")
|
||||||
|
|
||||||
@when("@:1.19")
|
@when("@:1.19")
|
||||||
def setup_build_environment(self, env):
|
def setup_build_environment(self, env):
|
||||||
@ -89,16 +97,27 @@ def setup_build_environment(self, env):
|
|||||||
def configure_args(self):
|
def configure_args(self):
|
||||||
args = []
|
args = []
|
||||||
|
|
||||||
|
if self.spec.satisfies("+glx ^[virtuals=gl] osmesa"):
|
||||||
|
args.append("--enable-glx")
|
||||||
|
else:
|
||||||
|
args.append("--disable-glx")
|
||||||
|
|
||||||
|
if self.spec.satisfies("+dri"):
|
||||||
|
args.append("--disable-dri") # dri requires libdri, not libdrm
|
||||||
|
args.append("--enable-dri2")
|
||||||
|
args.append("--enable-dri3")
|
||||||
|
args.append("--enable-drm")
|
||||||
|
else:
|
||||||
|
args.append("--disable-dri")
|
||||||
|
args.append("--disable-dri2")
|
||||||
|
args.append("--disable-dri3")
|
||||||
|
args.append("--disable-drm")
|
||||||
|
|
||||||
if self.spec.satisfies("^[virtuals=gl] osmesa"):
|
if self.spec.satisfies("^[virtuals=gl] osmesa"):
|
||||||
args.append("--enable-glx")
|
args.append("--enable-glx")
|
||||||
else:
|
else:
|
||||||
args.append("--disable-glx")
|
args.append("--disable-glx")
|
||||||
|
|
||||||
args.extend(
|
args.extend(["--disable-glamor"]) # Glamor for Xorg requires gbm >= 10.2.0
|
||||||
[
|
|
||||||
"--disable-dri", # dri >= 7.8.0
|
|
||||||
"--disable-glamor", # Glamor for Xorg requires gbm >= 10.2.0
|
|
||||||
]
|
|
||||||
)
|
|
||||||
|
|
||||||
return args
|
return args
|
||||||
|
Loading…
Reference in New Issue
Block a user