Commit a6d09ca7 authored by satmandu's avatar satmandu Committed by GitHub

Add gtk4 (#4767)

parent d7c2afe3
require 'package'
class Gtk4 < Package
description 'GTK+ is a multi-platform toolkit for creating graphical user interfaces.'
homepage 'https://developer.gnome.org/gtk4/'
version '4.0'
compatibility 'all'
source_url 'https://download.gnome.org/sources/gtk/4.0/gtk-4.0.0.tar.xz'
source_sha256 'd46cf5b127ea27dd9e5d2ff6ed500cb4067eeb2cb1cd2c313ccde8013b0b9bf9'
depends_on 'cups'
depends_on 'at_spi2_atk'
depends_on 'gnome_icon_theme'
depends_on 'gobject_introspection'
depends_on 'gdk_pixbuf'
depends_on 'graphene'
depends_on 'hicolor_icon_theme'
depends_on 'iso_codes'
depends_on 'json_glib'
depends_on 'libepoxy'
depends_on 'libxkbcommon'
depends_on 'llvm' => :build
depends_on 'shared_mime_info'
depends_on 'six' => :build
depends_on 'xdg_base'
depends_on 'pygments' => :build
def self.build
ENV['CFLAGS'] = "-fuse-ld=lld"
ENV['CXXFLAGS'] = "-fuse-ld=lld"
system "meson #{CREW_MESON_OPTIONS} \
-Dbroadway-backend=true \
-Ddemos=false\
-Dbuild-examples=false \
-Dbuild-tests=false \
-Dgraphene:default_library=both \
-Dlibsass:default_library=both \
-Dmutest:default_library=both \
-Dsassc:default_library=both \
build"
system "meson configure build"
system 'ninja -C build'
end
def self.install
system "DESTDIR=#{CREW_DEST_DIR} ninja -C build install"
end
def self.postinstall
# generate schemas
system "glib-compile-schemas #{CREW_PREFIX}/share/glib-2.0/schemas"
# update mime database
system "update-mime-database #{CREW_PREFIX}/share/mime"
puts
puts "To add basic settings, execute the following:".lightblue
puts "mkdir #{HOME}/.config/gtk-4.0".lightblue
puts "cat << 'EOF' > #{HOME}/.config/gtk-4.0/settings.ini
[Settings]
gtk-application-prefer-dark-theme = false
gtk-icon-theme-name = hicolor
gtk-fallback-icon-theme = gnome
gtk-font-name = Arial 10
EOF".lightblue
puts
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment