GTK3 support

This commit is contained in:
2026-03-24 09:32:54 +01:00
parent f20c47f7e5
commit 87da005a9b
3 changed files with 21 additions and 15 deletions
+12 -6
View File
@@ -2,7 +2,7 @@
, fetchurl
, lsb-release
, pkg-config
, gtk2
, gtk3
, im
, libGLU
, ftgl
@@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
];
buildInputs = [
gtk2
gtk3
libGLU
ftgl
lua51Packages.lua
@@ -34,14 +34,20 @@ stdenv.mkDerivation rec {
propagatedBuildInputs = [
im
];
# The PDF support relies on a proprietary paid-for library.
postPatch = ''
patchShebangs .
sed -i 's/\bcdpdf\b//g' src/Makefile
sed -i 's/\bcdluapdf5\b//g' src/Makefile
'';
makeFlags = [ "NO_DEPEND=Yes" "USE_PKGCONFIG=Yes" ];
makeFlags = [
"NO_DEPEND=Yes"
"USE_PKGCONFIG=Yes"
"USE_GTK3=Yes"
"GTK_DEFAULT=Yes"
];
NIX_CFLAGS_COMPILE = ''
-Wno-implicit-function-declaration
-Wno-incompatible-pointer-types
@@ -58,7 +64,7 @@ Description: A vector graphics toolkit with device independent output
Version: ${version}
Libs: -L${placeholder "out"}/lib -lcd
Cflags: -I${placeholder "out"}/include
Requires: im gtk+-2.0 glu ftgl
Requires: im gtk+-3.0 glu ftgl
'';
installPhase = ''
-1
View File
@@ -46,7 +46,6 @@ Requires: fftw3 libpng zlib
'';
postPatch = ''
patchShebangs .
sed -i '1i#include <unistd.h>' src/libjasper2/base/jas_stream.c
'';
+9 -8
View File
@@ -3,7 +3,9 @@
, fetchurl
, lsb-release
, pkg-config
, gtk2
, gtk3
, webkitgtk_4_1
, libsoup_3
, im
, libGLU
, ftgl
@@ -27,7 +29,9 @@ stdenv.mkDerivation rec {
buildInputs = [
ftgl
gtk2
gtk3
webkitgtk_4_1
libsoup_3
libGLU
lua51Packages.lua
];
@@ -38,24 +42,21 @@ stdenv.mkDerivation rec {
];
postPatch = ''
patchShebangs .
sed -i 's/\biupweb\b//g' Makefile
sed -i 's/\biupvled\b//g' Makefile
sed -i 's/\biupluaweb\b//g' srclua5/Makefile
substituteInPlace srclua5/config.mak \
--replace-fail "NO_LUALINK = Yes" "NO_LUALINK ="
# Since IUP doesn't provide it, supply pkg-config file.
'';
makeFlags = [
"NO_DEPEND=Yes"
"USE_PKGCONFIG=Yes"
"USE_GTK2=Yes"
"USE_GTK3=Yes"
"GTK_DEFAULT=Yes"
"LUA_SFX="
"CD_LIB=${cd}/lib"
"IM_LIB=${im}/lib"
"LUA_LIB=${lua51Packages.lua}/lib"
@@ -78,7 +79,7 @@ Description: A portable toolkit for building graphical user interfaces
Version: ${version}
Libs: -L${placeholder "out"}/lib -liup
Cflags: -I${placeholder "out"}/include
Requires: cd im gtk+-2.0 glu ftgl
Requires: cd im gtk+-3.0 glu ftgl
'';
installPhase = ''