From ef0adb9e944938e5f690edd5ffe189af04396d0e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jo=C3=A3o=20Magalh=C3=A3es?= <joamag@gmail.com>
Date: Sun, 26 Feb 2023 22:25:53 +0000
Subject: [PATCH] feat: conditional features for SDL2 for Linux This makes it
 possible to run Boytacean in Ubuntu using dynamic linking with the native SDL
 libraries.

---
 frontends/sdl/Cargo.toml | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/frontends/sdl/Cargo.toml b/frontends/sdl/Cargo.toml
index bf9b641b..870f8acb 100644
--- a/frontends/sdl/Cargo.toml
+++ b/frontends/sdl/Cargo.toml
@@ -11,8 +11,10 @@ edition = "2018"
 path = "../.."
 
 [dependencies.sdl2]
-version = "0.35"
-features = ["ttf", "image", "gfx", "mixer", "static-link", "use-vcpkg"]
+sdl2 = { version = "0.35", features = ["ttf", "image", "gfx", "mixer", "static-link", "use-vcpkg"] }
+
+[target.'cfg(linux)'.dependencies]
+sdl2 = { version = "0.35", features = ["ttf", "image", "gfx", "mixer", "bundled"] }
 
 # If the vcpkg version of SDL2 does not work (eg: display not found error)
 # then try dynamic linking SDL2 using the following features
-- 
GitLab