Commit c2b88554 authored by supechicken666's avatar supechicken666 Committed by GitHub

Gnome games collection (#5335)

* Add files via upload

* Update qqwing.rb

* Update gnome_mines.rb

* Update gnome_klotski.rb

* Update clutter_gtk.rb

* Update gnome_nibbles.rb

* Update libgnome_games_support.rb

* Update gsound.rb

* Update gnome_sudoku.rb
Co-authored-by: default avatarsupechicken <73414985+supechicken@users.noreply.github.com>
parent 9f63e360
require 'package'
class Clutter_gtk < Package
description 'The Clutter Gtk package is a library providing facilities to integrate Clutter into GTK+ applications.'
homepage 'https://wiki.gnome.org/Projects/Clutter'
compatibility 'all'
@_app = name.tr('_', '-')
@_fullver = '1.8.4'
@_mainver = @_fullver.rpartition('.')[0]
@_url = "https://download.gnome.org/sources/#{@_app}/#{@_mainver}/#{@_app}-#{@_fullver}"
version @_fullver
source_url "#{@_url}.tar.xz"
source_sha256 `curl -Ls #{@_url}.sha256sum | tail -n1 | cut -d ' ' -f1`.chomp
depends_on 'gtk3'
depends_on 'libgee'
depends_on 'clutter'
def self.build
system "meson #{CREW_MESON_LTO_OPTIONS} builddir"
system 'meson configure builddir'
system 'ninja -C builddir'
end
def self.install
system "DESTDIR=#{CREW_DEST_DIR} ninja -C builddir install"
end
end
require 'package'
class Gnome_klotski < Package
description 'A puzzle game for GNOME.'
homepage 'https://wiki.gnome.org/Apps/Klotski'
compatibility 'all'
@_app = name.tr('_', '-')
@_fullver = '3.38.2'
@_mainver = @_fullver.rpartition('.')[0]
@_url = "https://download.gnome.org/sources/#{@_app}/#{@_mainver}/#{@_app}-#{@_fullver}"
version @_fullver
source_url "#{@_url}.tar.xz"
source_sha256 `curl -Ls #{@_url}.sha256sum | tail -n1 | cut -d ' ' -f1`.chomp
depends_on 'clutter_gtk'
depends_on 'gsound'
depends_on 'librsvg'
depends_on 'libgnome_games_support'
def self.build
system "meson #{CREW_MESON_LTO_OPTIONS} builddir"
system 'meson configure builddir'
system 'ninja -C builddir'
end
def self.install
system "DESTDIR=#{CREW_DEST_DIR} ninja -C builddir install"
@_wrapper = <<~EOF
#!/bin/sh
WAYLAND_DISPLAY=wayland-0
GDK_BACKEND=wayland
CLUTTER_BACKEND=wayland
exec #{@_app}.elf "$@"
EOF
File.write(@_app, @_wrapper)
FileUtils.mv "#{CREW_DEST_PREFIX}/bin/#{@_app}", "#{CREW_DEST_PREFIX}/bin/#{@_app}.elf"
FileUtils.install @_app, "#{CREW_DEST_PREFIX}/bin/#{@_app}", mode: 0755
end
def self.postinstall
system 'gdk-pixbuf-query-loaders --update-cache'
system "glib-compile-schemas #{CREW_PREFIX}/share/glib-2.0/schemas"
end
end
require 'package'
class Gnome_mines < Package
description 'GNOME Mines (formerly known as Gnomine) is minesweeper clone for GNOME'
homepage 'https://wiki.gnome.org/Apps/Mines'
compatibility 'all'
@_app = name.tr('_', '-')
@_fullver = '3.36.1'
@_mainver = @_fullver.rpartition('.')[0]
@_url = "https://download.gnome.org/sources/#{@_app}/#{@_mainver}/#{@_app}-#{@_fullver}"
version @_fullver
source_url "#{@_url}.tar.xz"
source_sha256 `curl -Ls #{@_url}.sha256sum | tail -n1 | cut -d ' ' -f1`.chomp
depends_on 'clutter_gtk'
depends_on 'gsound'
depends_on 'librsvg'
depends_on 'libgnome_games_support'
def self.build
system "env CFLAGS='-fuse-ld=lld' CXXFLAGS='-fuse-ld=lld' \
meson #{CREW_MESON_LTO_OPTIONS} builddir"
system 'meson configure builddir'
system 'ninja -C builddir'
end
def self.install
system "DESTDIR=#{CREW_DEST_DIR} ninja -C builddir install"
@_wrapper = <<~EOF
#!/bin/sh
WAYLAND_DISPLAY=wayland-0
GDK_BACKEND=wayland
CLUTTER_BACKEND=wayland
exec #{@_app}.elf "$@"
EOF
File.write(@_app, @_wrapper)
FileUtils.mv "#{CREW_DEST_PREFIX}/bin/#{@_app}", "#{CREW_DEST_PREFIX}/bin/#{@_app}.elf"
FileUtils.install @_app, "#{CREW_DEST_PREFIX}/bin/#{@_app}", mode: 0755
end
def self.postinstall
system 'gdk-pixbuf-query-loaders --update-cache'
system "glib-compile-schemas #{CREW_PREFIX}/share/glib-2.0/schemas"
end
end
require 'package'
class Gnome_nibbles < Package
description 'snake game, up to four players'
homepage 'https://wiki.gnome.org/Apps/Nibbles'
compatibility 'all'
@_app = name.tr('_', '-')
@_fullver = '3.38.2'
@_mainver = @_fullver.rpartition('.')[0]
@_url = "https://download.gnome.org/sources/#{@_app}/#{@_mainver}/#{@_app}-#{@_fullver}"
version @_fullver
source_url "#{@_url}.tar.xz"
source_sha256 `curl -Ls #{@_url}.sha256sum | tail -n1 | cut -d ' ' -f1`.chomp
depends_on 'clutter_gtk'
depends_on 'gsound'
depends_on 'librsvg'
depends_on 'libgnome_games_support'
def self.build
system "meson #{CREW_MESON_LTO_OPTIONS} builddir"
system 'meson configure builddir'
system 'ninja -C builddir'
end
def self.install
system "DESTDIR=#{CREW_DEST_DIR} ninja -C builddir install"
@_wrapper = <<~EOF
#!/bin/sh
WAYLAND_DISPLAY=wayland-0
GDK_BACKEND=wayland
CLUTTER_BACKEND=wayland
exec #{@_app}.elf "$@"
EOF
File.write(@_app, @_wrapper)
FileUtils.mv "#{CREW_DEST_PREFIX}/bin/#{@_app}", "#{CREW_DEST_PREFIX}/bin/#{@_app}.elf"
FileUtils.install @_app, "#{CREW_DEST_PREFIX}/bin/#{@_app}", mode: 0755
end
def self.postinstall
system 'gdk-pixbuf-query-loaders --update-cache'
system "glib-compile-schemas #{CREW_PREFIX}/share/glib-2.0/schemas"
end
end
require 'package'
class Gnome_sudoku < Package
description 'Sudoku puzzle game for GNOME'
homepage 'https://wiki.gnome.org/Apps/Sudoku'
compatibility 'all'
@_app = name.tr('_', '-')
@_fullver = '3.38.0'
@_mainver = @_fullver.rpartition('.')[0]
@_url = "https://download.gnome.org/sources/#{@_app}/#{@_mainver}/#{@_app}-#{@_fullver}"
version @_fullver
source_url "#{@_url}.tar.xz"
source_sha256 `curl -Ls #{@_url}.sha256sum | tail -n1 | cut -d ' ' -f1`.chomp
depends_on 'clutter_gtk'
depends_on 'gsound'
depends_on 'librsvg'
depends_on 'qqwing'
def self.build
system "meson #{CREW_MESON_LTO_OPTIONS} builddir"
system 'meson configure builddir'
system 'ninja -C builddir'
end
def self.install
system "DESTDIR=#{CREW_DEST_DIR} ninja -C builddir install"
# comment due to the display bug in wayland mode, may fixed in next build
#
#@_wrapper = <<~EOF
# #!/bin/sh
# WAYLAND_DISPLAY=wayland-0
# GDK_BACKEND=wayland
# CLUTTER_BACKEND=wayland
# exec #{@_app}.elf "$@"
#EOF
#File.write(@_app, @_wrapper)
#FileUtils.mv "#{CREW_DEST_PREFIX}/bin/#{@_app}", "#{CREW_DEST_PREFIX}/bin/#{@_app}.elf"
#FileUtils.install @_app, "#{CREW_DEST_PREFIX}/bin/#{@_app}", mode: 0755
end
def self.postinstall
system 'gdk-pixbuf-query-loaders --update-cache'
system "glib-compile-schemas #{CREW_PREFIX}/share/glib-2.0/schemas"
end
end
require 'package'
class Gsound < Package
description 'GSound is a small library for playing system sounds.'
homepage 'https://wiki.gnome.org/Projects/GSound'
compatibility 'all'
@_app = name.tr('_', '-')
@_fullver = '1.0.2'
@_mainver = @_fullver.rpartition('.')[0]
@_url = "https://download.gnome.org/sources/#{@_app}/#{@_mainver}/#{@_app}-#{@_fullver}"
version @_fullver
source_url "#{@_url}.tar.xz"
source_sha256 `curl -Ls #{@_url}.sha256sum | tail -n1 | cut -d ' ' -f1`.chomp
depends_on 'gobject_introspection'
depends_on 'libcanberra'
def self.build
system './autogen.sh' if File.exist?('autogen.sh')
system "env CFLAGS='-flto=auto' CXXFLAGS='-flto=auto' LDFLAGS='-flto=auto' \
./configure #{CREW_OPTIONS}"
system 'make'
end
def self.install
system 'make', "DESTDIR=#{CREW_DEST_DIR}", 'install'
end
def self.check
system "make", "check"
end
end
require 'package'
class Libgnome_games_support < Package
description 'libgnome-games-support is a small library intended for internal use by GNOME Games.'
homepage 'https://gitlab.gnome.org/GNOME/libgnome-games-support'
compatibility 'all'
@_app = name.tr('_', '-')
@_fullver = '1.8.0'
@_mainver = @_fullver.rpartition('.')[0]
@_url = "https://download.gnome.org/sources/#{@_app}/#{@_mainver}/#{@_app}-#{@_fullver}"
version @_fullver
source_url "#{@_url}.tar.xz"
source_sha256 `curl -Ls #{@_url}.sha256sum | tail -n1 | cut -d ' ' -f1`.chomp
depends_on 'gtk3'
depends_on 'libgee'
depends_on 'clutter'
def self.build
system "meson #{CREW_MESON_LTO_OPTIONS} builddir"
system 'meson configure builddir'
system 'ninja -C builddir'
end
def self.install
system "DESTDIR=#{CREW_DEST_DIR} ninja -C builddir install"
end
end
require 'package'
class Qqwing < Package
description 'QQwing is a Sudoku puzzle generator and solver.'
homepage 'https://qqwing.com/'
version '1.3.4'
compatibility 'all'
source_url 'https://qqwing.com/qqwing-1.3.4.tar.gz'
source_sha256 '1753736c31feea0085f5cfac33143743204f8a7e66b81ccd17e249ecafba802f'
def self.build
system "env CFLAGS='-flto=auto' CXXFLAGS='-flto=auto' LDFLAGS='-flto=auto' \
./configure #{CREW_OPTIONS}"
system 'make'
end
def self.install
system 'make', "DESTDIR=#{CREW_DEST_DIR}", 'install'
end
def self.check
system "make", "check"
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