Commit 715e1707 authored by Satadru Pramanik's avatar Satadru Pramanik

gtk3 & gtk4 update

parent eaec04fa
...@@ -3,23 +3,25 @@ require 'package' ...@@ -3,23 +3,25 @@ require 'package'
class Gtk3 < Package class Gtk3 < Package
description 'GTK+ is a multi-platform toolkit for creating graphical user interfaces.' description 'GTK+ is a multi-platform toolkit for creating graphical user interfaces.'
homepage 'https://developer.gnome.org/gtk3/3.0/' homepage 'https://developer.gnome.org/gtk3/3.0/'
@_ver = '3.24.26' @_ver = '3.24.27'
@_ver_prelastdot = @_ver.rpartition('.')[0]
version @_ver version @_ver
compatibility 'all' compatibility 'all'
source_url "https://download.gnome.org/sources/gtk+/3.24/gtk+-#{@_ver}.tar.xz" source_url "https://gitlab.gnome.org/GNOME/gtk/-/archive/#{@_ver}/gtk-#{@_ver}.tar.bz2"
source_sha256 '2cc1b2dc5cad15d25b6abd115c55ffd8331e8d4677745dd3ce6db725b4fff1e9' # source_url "https://download.gnome.org/sources/gtk/#{@_ver_prelastdot}/gtk-#{@_ver}.tar.xz"
source_sha256 'dbc3b14ae0d8e44bc8caeac91d62b4d2403a881d837cb4e9bcfb8d138712c3a3'
binary_url({ binary_url({
aarch64: 'https://dl.bintray.com/chromebrew/chromebrew/gtk3-3.24.26-chromeos-armv7l.tar.xz', aarch64: 'https://dl.bintray.com/chromebrew/chromebrew/gtk3-3.24.27-chromeos-armv7l.tar.xz',
armv7l: 'https://dl.bintray.com/chromebrew/chromebrew/gtk3-3.24.26-chromeos-armv7l.tar.xz', armv7l: 'https://dl.bintray.com/chromebrew/chromebrew/gtk3-3.24.27-chromeos-armv7l.tar.xz',
i686: 'https://dl.bintray.com/chromebrew/chromebrew/gtk3-3.24.26-chromeos-i686.tar.xz', i686: 'https://dl.bintray.com/chromebrew/chromebrew/gtk3-3.24.27-chromeos-i686.tar.xz',
x86_64: 'https://dl.bintray.com/chromebrew/chromebrew/gtk3-3.24.26-chromeos-x86_64.tar.xz' x86_64: 'https://dl.bintray.com/chromebrew/chromebrew/gtk3-3.24.27-chromeos-x86_64.tar.xz'
}) })
binary_sha256({ binary_sha256({
aarch64: 'f53f6e97f2929af71f497f14869d83ce20f62469aa387d460b43c94105ecd0d1', aarch64: '840b06f1ccf18e6b85e7944e1af74e9a08385053a46f0277c8f395fa02c20f2a',
armv7l: 'f53f6e97f2929af71f497f14869d83ce20f62469aa387d460b43c94105ecd0d1', armv7l: '840b06f1ccf18e6b85e7944e1af74e9a08385053a46f0277c8f395fa02c20f2a',
i686: '9402509ba5d7af3da372b804e28f9c8213768e3bc3a16f811162dd278e0900d4', i686: 'f07416c233166be3cf0777be1745d61ed6f3574137a7918c300779acc39593d8',
x86_64: '0e594d1b3661938b5d586670588ffd0b3a6327e697fc01a68e77d101192d9962' x86_64: 'bdd162ae2fd29f1500e2dd6a7ed7378023b2e20d3af73c42c3017ef10f4d905f'
}) })
depends_on 'cups' depends_on 'cups'
...@@ -49,20 +51,13 @@ class Gtk3 < Package ...@@ -49,20 +51,13 @@ class Gtk3 < Package
builddir" builddir"
system 'meson configure builddir' system 'meson configure builddir'
system 'ninja -C builddir' system 'ninja -C builddir'
@file = <<~GTK3_CONFIG_HEREDOC
[Settings]
gtk-application-prefer-dark-theme = false
gtk-icon-theme-name = hicolor
gtk-fallback-icon-theme = gnome
gtk-font-name = Arial 10
GTK3_CONFIG_HEREDOC
end end
def self.install def self.install
system "DESTDIR=#{CREW_DEST_DIR} ninja -C builddir install" system "DESTDIR=#{CREW_DEST_DIR} ninja -C builddir install"
system "sed -i 's,null,,g' #{CREW_DEST_LIB_PREFIX}/pkgconfig/gtk*.pc" system "sed -i 's,null,,g' #{CREW_DEST_LIB_PREFIX}/pkgconfig/gtk*.pc"
FileUtils.mkdir_p("#{CREW_DEST_HOME}/.config/gtk-3.0") FileUtils.mkdir_p("#{CREW_DEST_HOME}/.config/gtk-3.0")
File.write("#{CREW_DEST_HOME}/.config/gtk-3.0/settings.ini", @file) File.write("#{CREW_DEST_HOME}/.config/gtk-3.0/settings.ini", @gtk3settings)
end end
def self.postinstall def self.postinstall
...@@ -70,5 +65,19 @@ class Gtk3 < Package ...@@ -70,5 +65,19 @@ class Gtk3 < Package
system "glib-compile-schemas #{CREW_PREFIX}/share/glib-2.0/schemas" system "glib-compile-schemas #{CREW_PREFIX}/share/glib-2.0/schemas"
# update mime database # update mime database
system "update-mime-database #{CREW_PREFIX}/share/mime" system "update-mime-database #{CREW_PREFIX}/share/mime"
@xdg_config_home = ENV['XDG_CONFIG_HOME']
@gtk3settings = <<~GTK3_CONFIG_HEREDOC
[Settings]
gtk-application-prefer-dark-theme = false
gtk-icon-theme-name = hicolor
gtk-fallback-icon-theme = gnome
gtk-font-name = Arial 10
GTK3_CONFIG_HEREDOC
unless File.exist?("#{@xdg_config_home}/gtk-3.0/settings.ini")
puts
puts 'Adding basic gtk4 settings to XDG_CONFIG_HOME/gtk-3.0/settings.ini'.lightblue
FileUtils.mkdir_p "#{@xdg_config_home}/gtk-3.0"
File.write("#{@xdg_config_home}/gtk-3.0/settings.ini", @gtk3settings)
end
end end
end end
...@@ -3,22 +3,25 @@ require 'package' ...@@ -3,22 +3,25 @@ require 'package'
class Gtk4 < Package class Gtk4 < Package
description 'GTK+ is a multi-platform toolkit for creating graphical user interfaces.' description 'GTK+ is a multi-platform toolkit for creating graphical user interfaces.'
homepage 'https://developer.gnome.org/gtk4/' homepage 'https://developer.gnome.org/gtk4/'
version '4.1.1' @_ver = '4.1.2'
@_ver_prelastdot = @_ver.rpartition('.')[0]
version @_ver
compatibility 'all' compatibility 'all'
source_url 'https://download.gnome.org/sources/gtk/4.1/gtk-4.1.1.tar.xz' source_url "https://gitlab.gnome.org/GNOME/gtk/-/archive/#{@_ver}/gtk-#{@_ver}.tar.bz2"
source_sha256 'f7e1789f6c637b091cffb17de08bd9c3986543282eecdff0750dd04f1673b737' # source_url "https://download.gnome.org/sources/gtk/#{@_ver_prelastdot}/gtk-#{@_ver}.tar.xz"
source_sha256 '64b042592ba48c63535a47ed087d161290620e1de9e577ff89ea3afabf1a4edb'
binary_url({ binary_url({
aarch64: 'https://dl.bintray.com/chromebrew/chromebrew/gtk4-4.1.1-chromeos-armv7l.tar.xz', aarch64: 'https://dl.bintray.com/chromebrew/chromebrew/gtk4-4.1.2-chromeos-armv7l.tar.xz',
armv7l: 'https://dl.bintray.com/chromebrew/chromebrew/gtk4-4.1.1-chromeos-armv7l.tar.xz', armv7l: 'https://dl.bintray.com/chromebrew/chromebrew/gtk4-4.1.2-chromeos-armv7l.tar.xz',
i686: 'https://dl.bintray.com/chromebrew/chromebrew/gtk4-4.1.1-chromeos-i686.tar.xz', i686: 'https://dl.bintray.com/chromebrew/chromebrew/gtk4-4.1.2-chromeos-i686.tar.xz',
x86_64: 'https://dl.bintray.com/chromebrew/chromebrew/gtk4-4.1.1-chromeos-x86_64.tar.xz' x86_64: 'https://dl.bintray.com/chromebrew/chromebrew/gtk4-4.1.2-chromeos-x86_64.tar.xz'
}) })
binary_sha256({ binary_sha256({
aarch64: 'dcce3aeb6954b2010a867f2bf84b11995d6d0433a1ece96313ee36d27af4819c', aarch64: 'f04e726a8c2a71d04c1a274a67b0727aa6ae318b40d9325f20546ca29064e37e',
armv7l: 'dcce3aeb6954b2010a867f2bf84b11995d6d0433a1ece96313ee36d27af4819c', armv7l: 'f04e726a8c2a71d04c1a274a67b0727aa6ae318b40d9325f20546ca29064e37e',
i686: '182fa221219f0a2b25b5ebe902e86dde0ed09e3e741bb1e52acdd120e8bcb308', i686: '690f527ac11a4af784b299159350323e726a5be18b3443fabdfc41f83dcd10a4',
x86_64: '81fbb2bd61ff6c1f0729f686e9c1a21f39c24bfaf8d2bd0a92adb929e3f32475' x86_64: '3d715f42be186839b936929deaec180a3bf13f3fb2f7e89dc21421d6b19988fa'
}) })
depends_on 'cups' depends_on 'cups'
...@@ -70,16 +73,18 @@ class Gtk4 < Package ...@@ -70,16 +73,18 @@ class Gtk4 < Package
system "glib-compile-schemas #{CREW_PREFIX}/share/glib-2.0/schemas" system "glib-compile-schemas #{CREW_PREFIX}/share/glib-2.0/schemas"
# update mime database # update mime database
system "update-mime-database #{CREW_PREFIX}/share/mime" system "update-mime-database #{CREW_PREFIX}/share/mime"
unless File.exist?("#{HOME}/.config/gtk-4.0/settings.ini") @xdg_config_home = ENV['XDG_CONFIG_HOME']
@gtk4settings = <<~GTK4_CONFIG_HEREDOC
[Settings]
gtk-icon-theme-name = Adwaita
gtk-theme-name = Adwaita
gtk-font-name = Arimo 10
GTK4_CONFIG_HEREDOC
unless File.exist?("#{@xdg_config_home}/gtk-4.0/settings.ini")
puts puts
puts 'Adding basic gtk4 settings to ~/.config/gtk-4.0/settings.ini'.lightblue puts 'Adding basic gtk4 settings to XDG_CONFIG_HOME/gtk-4.0/settings.ini'.lightblue
FileUtils.mkdir_p "#{HOME}/.config/gtk-4.0" FileUtils.mkdir_p "#{@xdg_config_home}/gtk-4.0"
system "cat << 'EOF' > #{HOME}/.config/gtk-4.0/settings.ini File.write("#{@xdg_config_home}/gtk-4.0/settings.ini", @gtk4settings)
[Settings]
gtk-icon-theme-name = Adwaita
gtk-theme-name = Adwaita
gtk-font-name = Arimo 10
EOF"
end end
end end
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