fltk{,14}: expose xorg toggle

This commit is contained in:
Grimmauld
2025-09-26 15:39:07 +02:00
parent c1eb4243f5
commit aba93a855d
2 changed files with 23 additions and 12 deletions
+13 -6
View File
@@ -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)
+10 -6
View File
@@ -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)