1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106
|
# Copyright (C) 2025 Ruby-GNOME Project Team
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
module Helper
module_function
ALL_PACKAGES = [
"adwaita",
"atk",
"cairo-gobject",
"clutter",
"clutter-gdk",
"clutter-gstreamer",
"clutter-gtk",
"gdk3",
"gdk4",
"gdk_pixbuf2",
"gegl",
"gio2",
"glib2",
"gnumeric",
"gobject-introspection",
"goffice",
"graphene1",
"gsf",
"gsk4",
"gstreamer",
"gtk3",
"gtk4",
"gtksourceview3",
"gtksourceview4",
"gtksourceview5",
"gvlc",
"libhandy",
"libsecret",
"pango",
"poppler",
"rsvg2",
"vte3",
"vte4",
"webkit-gtk",
"webkit2-gtk",
"wnck3",
]
PRIOR_PACKAGES = [
"glib2",
"cairo-gobject",
"gobject-introspection",
"gio2",
"gdk_pixbuf2",
"pango",
"atk",
"gdk3",
"gtk3",
"graphene1",
"gdk4",
"gsk4",
"gtk4",
"gstreamer",
"clutter",
"clutter-gdk",
"gsf",
"goffice",
]
def all_packages
ALL_PACKAGES.reject do |package|
ENV["RUBY_GNOME_#{package.upcase.gsub("-", "_")}_ENABLE"] == "no"
end
end
def all_test_packages
all_packages.reject do |package|
ENV["RUBY_GNOME_#{package.upcase.gsub("-", "_")}_TEST_ENABLE"] == "no"
end
end
def prior_packages
PRIOR_PACKAGES
end
def sort_packages(packages)
packages.sort_by do |package|
PRIOR_PACKAGES.index(package) ||
(PRIOR_PACKAGES.size + packages.index(package))
end
end
def sorted_all_packages
sort_packages(all_packages)
end
end
|