Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libglvnd: Set the default datadir appropriately for the system #23500

Merged
merged 1 commit into from
Apr 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions recipes/libglvnd/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import os
import textwrap

required_conan_version = ">=1.50.0"
required_conan_version = ">=1.64.0 <2 || >=2.2.0"

class LibGlvndConan(ConanFile):
name = "libglvnd"
Expand Down Expand Up @@ -59,7 +59,7 @@ def validate(self):
raise ConanInvalidConfiguration(f"{self.name} is only compatible with Linux and FreeBSD")

def build_requirements(self):
self.tool_requires("meson/1.3.2")
self.tool_requires("meson/1.4.0")
if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str):
self.tool_requires("pkgconf/2.1.0")

Expand Down Expand Up @@ -87,6 +87,10 @@ def generate(self):
tc.project_options["headers"] = self.options.headers
tc.project_options["entrypoint-patching"] = "enabled" if self.options.entrypoint_patching else "disabled"
tc.project_options["libdir"] = "lib"
# Configure the data directory so that it defaults to the correct location for ICD discovery on the local system.
tc.project_options["datadir"] = os.path.join("usr", "share") if self.settings.os == "Linux" else os.path.join("usr", "local", "share")
if self.settings.os == "FreeBSD":
tc.project_options["sysconfdir"] = os.path.join("usr", "local", "etc")
tc.generate()

def build(self):
Expand Down
Loading