Files
chromebrew/packages/geany.rb
Satadru Pramanik, DO, MPH, MEng 5621163c84 Refactor ruby gems in packages, crew cleanup of debugging, install.sh refactor for gems (#10294)
* Some ruby gem updates and cleanup

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* bump version

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* move gem installs to core install

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* add webkitgtk_6 binaries for x86_64, add librsvg binaries

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Add rebuilt librsvg binary for x86_64.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* rename gem function internals to make more sense

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* adjust webkitgtk_6 deps

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* update ruby gem packages, add a ruby gem package update script to tools

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* suggested changes

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* rebuild parted

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* add parted binaries

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* suggested changes

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* refactor ruby buildsystem

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* add libsdl2, freerdp binaries

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* sync crew function to lib/fixup

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* shellcheck fix

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Add const for CREW_UPDATE_CHECK_INTERVAL

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Move time_difference into function for neatness.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* suggested changes from @uberhacker

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* @Zopolis4 suggested change: Use git last update time

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Add .blank? usage to downloader to avoid undefined method `empty?' for nil (NoMethodError)

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

---------

Signed-off-by: Satadru Pramanik <satadru@gmail.com>
2024-08-13 11:25:39 -05:00

81 lines
2.4 KiB
Ruby

require 'package'
class Geany < Package
description 'Geany is a small and lightweight Integrated Development Environment.'
homepage 'https://www.geany.org/'
version '2.0.0'
license 'GPL-2+ HPND'
compatibility 'x86_64 aarch64 armv7l'
source_url 'https://github.com/geany/geany.git'
git_hashtag version
binary_compression 'tar.zst'
binary_sha256({
aarch64: '8be66872a26db0399da46595609f6bda991a7b9a4594413685a5f82916435b75',
armv7l: '8be66872a26db0399da46595609f6bda991a7b9a4594413685a5f82916435b75',
x86_64: '58b0273c68e563ace1099b64f143e0b7029d6930ab84819ea18e01902ad8f1f8'
})
depends_on 'at_spi2_core' # R
depends_on 'cairo' # R
depends_on 'gcc_lib' # R
depends_on 'gdk_pixbuf' # R
depends_on 'glibc' # R
depends_on 'glib' # R
depends_on 'gtk3' # R
depends_on 'harfbuzz' # R
depends_on 'pango' # R
depends_on 'vte' # L
depends_on 'xdg_base' # L
@xdg_config_home = ENV.fetch('XDG_CONFIG_HOME', nil)
@xdg_config_home = "#{CREW_PREFIX}/.config" if @xdg_config_home.to_s.empty?
def self.build
system "mold -run meson setup \
#{CREW_MESON_OPTIONS} \
-Dapi-docs=disabled \
-Dgtkdoc=true \
-Dhtml-docs=disabled \
-Dpdf-docs=disabled \
-Dplugins=true \
-Dpython-command=command=$(which python3) \
-Dsocket=true \
-Dvte=true \
builddir"
system 'meson configure --no-pager builddir'
system "#{CREW_NINJA} -C builddir"
end
def self.check
# Fails on armv7l
# Bail out! dbind-FATAL-WARNING: Couldn't connect to accessibility bus: Failed to connect to socket /var/run/chrome/at-spi/buscheekon_10.0: No such file or directory
system "#{CREW_NINJA} -C builddir test || true"
end
def self.install
system "DESTDIR=#{CREW_DEST_DIR} #{CREW_NINJA} -C builddir install"
end
def self.postinstall
# This is needed to avoid "Error loading theme icon 'geany-build' for stock" messages.
system "gtk-update-icon-cache #{CREW_PREFIX}/share/icons/hicolor -f"
end
def self.postremove
config_dirs = ["#{HOME}/.config/geany", "#{@xdg_config_home}/geany"]
config_dirs.each do |config_dir|
next unless Dir.exist? config_dir
print "\nWould you like to remove #{config_dir}? [y/N] "
case $stdin.gets.chomp.downcase
when 'y', 'yes'
FileUtils.rm_rf config_dir
puts "#{config_dir} removed.".lightred
else
puts "#{config_dir} saved.".lightgreen
end
end
end
end