webkitgtk218x: make gtk2 optional

This commit is contained in:
Jan Tojnar 2017-10-26 23:52:37 +02:00
parent 0cc5034aa5
commit cfcb02214e
No known key found for this signature in database
GPG key ID: 7FAB2A15F7A607A4

View file

@ -1,13 +1,16 @@
{ stdenv, fetchurl, perl, python2, ruby, bison, gperf, cmake
, pkgconfig, gettext, gobjectIntrospection, libnotify, gnutls
, gtk2, gtk3, wayland, libwebp, enchant, xlibs, libxkbcommon, epoxy, at_spi2_core
, gtk3, wayland, libwebp, enchant, xlibs, libxkbcommon, epoxy, at_spi2_core
, libxml2, libsoup, libsecret, libxslt, harfbuzz, libpthreadstubs, pcre, nettle, libtasn1, p11_kit
, libidn, libedit, readline, mesa, libintlOrEmpty
, enableGeoLocation ? true, geoclue2, sqlite
, enableGtk2Plugins ? false, gtk2 ? null
, gst-plugins-base, gst-plugins-bad
}:
assert enableGeoLocation -> geoclue2 != null;
assert enableGtk2Plugins -> gtk2 != null;
assert stdenv.isDarwin -> !enableGtk2Plugins;
with stdenv.lib;
stdenv.mkDerivation rec {
@ -16,7 +19,7 @@ stdenv.mkDerivation rec {
meta = {
description = "Web content rendering engine, GTK+ port";
homepage = http://webkitgtk.org/;
homepage = https://webkitgtk.org/;
license = licenses.bsd2;
platforms = with platforms; linux ++ darwin;
hydraPlatforms = [];
@ -59,14 +62,13 @@ stdenv.mkDerivation rec {
"-DPORT=GTK"
"-DUSE_LIBHYPHEN=0"
]
++ optional (!enableGtk2Plugins) "-DENABLE_PLUGIN_PROCESS_GTK2=OFF"
++ optional stdenv.isLinux "-DENABLE_GLES2=ON"
++ optionals stdenv.isDarwin [
"-DUSE_SYSTEM_MALLOC=ON"
"-DUSE_ACCELERATE=0"
"-DENABLE_INTROSPECTION=ON"
"-DENABLE_MINIBROWSER=OFF"
"-DENABLE_PLUGIN_PROCESS_GTK2=OFF"
"-DENABLE_MINIBROWSER=OFF"
"-DENABLE_VIDEO=ON"
"-DENABLE_QUARTZ_TARGET=ON"
"-DENABLE_X11_TARGET=OFF"
@ -85,10 +87,11 @@ stdenv.mkDerivation rec {
];
buildInputs = libintlOrEmpty ++ [
gtk2 libwebp enchant libnotify gnutls pcre nettle libidn
libwebp enchant libnotify gnutls pcre nettle libidn
libxml2 libsecret libxslt harfbuzz libpthreadstubs libtasn1 p11_kit
sqlite gst-plugins-base gst-plugins-bad libxkbcommon epoxy at_spi2_core
] ++ optional enableGeoLocation geoclue2
++ optional enableGtk2Plugins gtk2
++ (with xlibs; [ libXdmcp libXt libXtst ])
++ optionals stdenv.isDarwin [ libedit readline mesa ]
++ optional stdenv.isLinux wayland;