From aba93a855d1e3046b3c4450fbe25767770d460c2 Mon Sep 17 00:00:00 2001 From: Grimmauld Date: Fri, 26 Sep 2025 12:37:48 +0200 Subject: [PATCH] fltk{,14}: expose xorg toggle --- pkgs/development/libraries/fltk/1.4.nix | 19 +++++++++++++------ pkgs/development/libraries/fltk/default.nix | 16 ++++++++++------ 2 files changed, 23 insertions(+), 12 deletions(-) diff --git a/pkgs/development/libraries/fltk/1.4.nix b/pkgs/development/libraries/fltk/1.4.nix index 35edd601aac3..8315d580a191 100644 --- a/pkgs/development/libraries/fltk/1.4.nix +++ b/pkgs/development/libraries/fltk/1.4.nix @@ -25,16 +25,21 @@ withCairo ? true, cairo, - withPango ? stdenv.hostPlatform.isLinux, + withPango ? withXorg, pango, withDocs ? true, doxygen, graphviz, + withXorg ? stdenv.hostPlatform.isLinux, + withExamples ? (stdenv.buildPlatform == stdenv.hostPlatform), }: +# pango support depends on Xft +assert withPango -> withXorg; + stdenv.mkDerivation (finalAttrs: { pname = "fltk"; version = "1.4.4"; @@ -83,6 +88,8 @@ stdenv.mkDerivation (finalAttrs: { ] ++ lib.optionals stdenv.hostPlatform.isLinux [ freetype + ] + ++ lib.optionals withXorg [ libX11 libXext libXinerama @@ -107,11 +114,11 @@ stdenv.mkDerivation (finalAttrs: { (lib.cmakeBool "FLTK_USE_SYSTEM_ZLIB" true) # X11 - (lib.cmakeBool "FLTK_USE_XINERAMA" stdenv.hostPlatform.isLinux) - (lib.cmakeBool "FLTK_USE_XFIXES" stdenv.hostPlatform.isLinux) - (lib.cmakeBool "FLTK_USE_XCURSOR" stdenv.hostPlatform.isLinux) - (lib.cmakeBool "FLTK_USE_XFT" stdenv.hostPlatform.isLinux) - (lib.cmakeBool "FLTK_USE_XRENDER" stdenv.hostPlatform.isLinux) + (lib.cmakeBool "FLTK_USE_XINERAMA" withXorg) + (lib.cmakeBool "FLTK_USE_XFIXES" withXorg) + (lib.cmakeBool "FLTK_USE_XCURSOR" withXorg) + (lib.cmakeBool "FLTK_USE_XFT" withXorg) + (lib.cmakeBool "FLTK_USE_XRENDER" withXorg) # GL (lib.cmakeBool "FLTK_BUILD_GL" withGL) diff --git a/pkgs/development/libraries/fltk/default.nix b/pkgs/development/libraries/fltk/default.nix index 9e4bf2d305cb..397ccb7cbeee 100644 --- a/pkgs/development/libraries/fltk/default.nix +++ b/pkgs/development/libraries/fltk/default.nix @@ -29,6 +29,8 @@ doxygen, graphviz, + withXorg ? stdenv.hostPlatform.isLinux, + withExamples ? (stdenv.buildPlatform == stdenv.hostPlatform), withShared ? true, }: @@ -85,6 +87,8 @@ stdenv.mkDerivation (finalAttrs: { ] ++ lib.optionals stdenv.hostPlatform.isLinux [ freetype + ] + ++ lib.optionals withXorg [ libX11 libXext libXinerama @@ -105,12 +109,12 @@ stdenv.mkDerivation (finalAttrs: { (lib.cmakeBool "OPTION_USE_SYSTEM_LIBPNG" true) # X11 - (lib.cmakeBool "OPTION_USE_XINERAMA" stdenv.hostPlatform.isLinux) - (lib.cmakeBool "OPTION_USE_XFIXES" stdenv.hostPlatform.isLinux) - (lib.cmakeBool "OPTION_USE_XCURSOR" stdenv.hostPlatform.isLinux) - (lib.cmakeBool "OPTION_USE_XFT" stdenv.hostPlatform.isLinux) - (lib.cmakeBool "OPTION_USE_XRENDER" stdenv.hostPlatform.isLinux) - (lib.cmakeBool "OPTION_USE_XDBE" stdenv.hostPlatform.isLinux) + (lib.cmakeBool "OPTION_USE_XINERAMA" withXorg) + (lib.cmakeBool "OPTION_USE_XFIXES" withXorg) + (lib.cmakeBool "OPTION_USE_XCURSOR" withXorg) + (lib.cmakeBool "OPTION_USE_XFT" withXorg) + (lib.cmakeBool "OPTION_USE_XRENDER" withXorg) + (lib.cmakeBool "OPTION_USE_XDBE" withXorg) # GL (lib.cmakeBool "OPTION_USE_GL" withGL)