forked from mirrors/nixpkgs
fontforge: introduce withGUI option
It was unintuitive that the withGTK option controlled whether a fontforge GUI was enabled at all, since fontforge supports multiple GUIs (a GTK one and an X11 one -- confusingly the X11 one still requires GTK). With the new withGUI option, it is possible to build the X11 GUI by setting withGTK to false and withGUI to true. I haven't added an attribute for this configuration because I expect it to be pretty obsure -- my rationale for adding this option was code clarity rather than utility.
This commit is contained in:
parent
e9848d11ad
commit
8a74399de3
|
@ -4,11 +4,14 @@
|
|||
, readline, woff2, zeromq, libuninameslist
|
||||
, withSpiro ? false, libspiro
|
||||
, withGTK ? false, gtk3
|
||||
, withGUI ? withGTK
|
||||
, withPython ? true
|
||||
, withExtras ? true
|
||||
, Carbon ? null, Cocoa ? null
|
||||
}:
|
||||
|
||||
assert withGTK -> withGUI;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "fontforge";
|
||||
version = "20200314";
|
||||
|
@ -36,12 +39,13 @@ stdenv.mkDerivation rec {
|
|||
python freetype zlib glib libungif libpng libjpeg libtiff libxml2
|
||||
]
|
||||
++ lib.optionals withSpiro [libspiro]
|
||||
++ lib.optionals withGTK [ gtk3 cairo pango ]
|
||||
++ lib.optionals withGUI [ gtk3 cairo pango ]
|
||||
++ lib.optionals stdenv.isDarwin [ Carbon Cocoa ];
|
||||
|
||||
cmakeFlags = [ "-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON" ]
|
||||
++ lib.optional (!withSpiro) "-DENABLE_LIBSPIRO=OFF"
|
||||
++ lib.optional (!withGTK) "-DENABLE_GUI=OFF"
|
||||
++ lib.optional (!withGUI) "-DENABLE_GUI=OFF"
|
||||
++ lib.optional (!withGTK) "-DENABLE_X11=ON"
|
||||
++ lib.optional withExtras "-DENABLE_FONTFORGE_EXTRAS=ON";
|
||||
|
||||
# work-around: git isn't really used, but configuration fails without it
|
||||
|
|
Loading…
Reference in a new issue