diff --git a/osinfo-db-tools.rb b/osinfo-db-tools.rb deleted file mode 100644 index 01f3789..0000000 --- a/osinfo-db-tools.rb +++ /dev/null @@ -1,30 +0,0 @@ -class OsinfoDbTools < Formula - desc "Tools for managing the libosinfo database files" - homepage "https://libosinfo.org" - url "https://releases.pagure.org/libosinfo/osinfo-db-tools-1.6.0.tar.gz" - sha256 "d0d5b1196d73a7abed051be48d0e5b4aa196aac4cdbf8ddf52f57c0c492b2574" - - depends_on "pkg-config" => :build - - depends_on "gettext" - depends_on "glib" - depends_on "json-glib" - depends_on "libarchive" # need >= 3.0.0 - depends_on "libsoup" - - def install - args = %W[ - --disable-dependency-tracking - --disable-silent-rules - --prefix=#{prefix} - --localstatedir=#{var} - --sysconfdir=#{etc} - ] - system "./configure", *args - system "make", "install" - end - - test do - system "#{bin}/osinfo-db-path" - end -end diff --git a/osinfo-db.rb b/osinfo-db.rb deleted file mode 100644 index 8a265fe..0000000 --- a/osinfo-db.rb +++ /dev/null @@ -1,19 +0,0 @@ -class OsinfoDb < Formula - desc "Libosinfo database files" - homepage "https://libosinfo.org/" - url "https://releases.pagure.org/libosinfo/osinfo-db-20191125.tar.xz" - sha256 "e8f4e8c3e3ee738191511a4549fc8e4895b501312f2a7d383d5bde72a76f5580" - - depends_on "osinfo-db-tools" => :build - - def install - system "osinfo-db-import", "--local", cached_download - - # Copy the archive into the prefix to avoid empty installation error - cp_r "./", prefix - end - - test do - system "osinfo-db-validate", "--local" - end -end diff --git a/virt-manager.rb b/virt-manager.rb deleted file mode 100644 index bf25378..0000000 --- a/virt-manager.rb +++ /dev/null @@ -1,110 +0,0 @@ -class VirtManager < Formula - include Language::Python::Virtualenv - - desc "App for managing virtual machines" - homepage "https://virt-manager.org/" - url "https://virt-manager.org/download/sources/virt-manager/virt-manager-2.2.1.tar.gz" - sha256 "cfd88d66e834513e067b4d3501217e21352fadb673103bacb9e646da9f029a1b" - revision 3 - - depends_on "intltool" => :build - depends_on "pkg-config" => :build - - depends_on "adwaita-icon-theme" - depends_on "gtk+3" - depends_on "gtk-vnc" - depends_on "gtksourceview4" - depends_on "hicolor-icon-theme" - depends_on "libosinfo" - depends_on "libvirt" - depends_on "libvirt-glib" - depends_on "libxml2" # need python3 bindings - depends_on "osinfo-db" - depends_on "py3cairo" - depends_on "pygobject3" - depends_on "python" - depends_on "spice-gtk" - depends_on "vte3" - - resource "libvirt-python" do - url "https://libvirt.org/sources/python/libvirt-python-6.10.0.tar.gz" - sha256 "47a8e90d9f49bc0296d2817f6009e18dbb69844ce10b81c2a2672bccd6f49fd5" - end - - resource "idna" do - url "https://pypi.io/packages/source/i/idna/idna-2.8.tar.gz" - sha256 "c357b3f628cf53ae2c4c05627ecc484553142ca23264e593d327bcde5e9c3407" - end - - resource "certifi" do - url "https://pypi.io/packages/source/c/certifi/certifi-2019.11.28.tar.gz" - sha256 "25b64c7da4cd7479594d035c08c2d809eb4aab3a26e5a990ea98cc450c320f1f" - end - - resource "chardet" do - url "https://pypi.io/packages/source/c/chardet/chardet-3.0.4.tar.gz" - sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae" - end - - resource "urllib3" do - url "https://pypi.io/packages/source/u/urllib3/urllib3-1.25.7.tar.gz" - sha256 "f3c5fd51747d450d4dcf6f923c81f78f811aab8205fda64b0aba34a4e48b0745" - end - - resource "requests" do - url "https://pypi.io/packages/source/r/requests/requests-2.22.0.tar.gz" - sha256 "11e007a8a2aa0323f5a921e9e6a2d7e4e67d9877e85773fba9ba6419025cbeb4" - end - - # virt-manager doesn't prompt for password on macOS unless --no-fork flag is provided - patch :DATA - - def install - venv = virtualenv_create(libexec, "python3") - venv.pip_install resources - - # virt-manager uses distutils, doesn't like --single-version-externally-managed - system "#{libexec}/bin/python", "setup.py", - "configure", - "--prefix=#{libexec}" - system "#{libexec}/bin/python", "setup.py", - "--no-user-cfg", - "--no-update-icon-cache", - "--no-compile-schemas", - "install" - - # install virt-manager commands with PATH set to Python virtualenv environment - bin.install Dir[libexec/"bin/virt-*"] - bin.env_script_all_files(libexec/"bin", :PATH => "#{libexec}/bin:$PATH") - - share.install Dir[libexec/"share/man"] - share.install Dir[libexec/"share/glib-2.0"] - share.install Dir[libexec/"share/icons"] - end - - def post_install - # manual schema compile step - system "#{Formula["glib"].opt_bin}/glib-compile-schemas", "#{HOMEBREW_PREFIX}/share/glib-2.0/schemas" - # manual icon cache update step - system "#{Formula["gtk+3"].opt_bin}/gtk3-update-icon-cache", "#{HOMEBREW_PREFIX}/share/icons/hicolor" - end - - test do - system "#{bin}/virt-manager", "--version" - end -end -__END__ -diff --git a/virt-manager b/virt-manager -index 15d5109..8ee305a 100755 ---- a/virt-manager -+++ b/virt-manager -@@ -151,7 +151,8 @@ def parse_commandline(): - help="Print debug output to stdout (implies --no-fork)", - default=False) - parser.add_argument("--no-fork", action="store_true", -- help="Don't fork into background on startup") -+ help="Don't fork into background on startup", -+ default=True) - - parser.add_argument("--show-domain-creator", action="store_true", - help="Show 'New VM' wizard") diff --git a/virt-viewer.rb b/virt-viewer.rb index a81ff1e..e0cfbf7 100644 --- a/virt-viewer.rb +++ b/virt-viewer.rb @@ -1,48 +1,101 @@ class VirtViewer < Formula desc "App for virtualized guest interaction" homepage "https://virt-manager.org/" - url "https://virt-manager.org/download/sources/virt-viewer/virt-viewer-8.0.tar.gz" - sha256 "dcf358ed5d7a4900215133135a6492c04311d84332816d930df9a89d6195b6ed" + url "https://virt-manager.org/download/sources/virt-viewer/virt-viewer-11.0.tar.xz" + sha256 "a43fa2325c4c1c77a5c8c98065ac30ef0511a21ac98e590f22340869bad9abd0" + revision 0 - depends_on "intltool" => :build - depends_on "libtool" => :build + depends_on "gettext" => :build + depends_on "meson" => :build + depends_on "ninja" => :build depends_on "pkg-config" => :build - depends_on "atk" - depends_on "cairo" - depends_on "gdk-pixbuf" - depends_on "gettext" + depends_on "desktop-file-utils" depends_on "glib" - depends_on "gtk+3" depends_on "gtk-vnc" - depends_on "hicolor-icon-theme" - depends_on "libvirt" + depends_on "gtk+3" depends_on "libvirt-glib" - depends_on "pango" depends_on "shared-mime-info" depends_on "spice-gtk" - depends_on "spice-protocol" + + patch :DATA def install - args = %W[ - --disable-silent-rules - --disable-update-mimedb - --with-gtk-vnc - --with-spice-gtk - --prefix=#{prefix} - ] - system "./configure", *args - system "make", "install" + system "meson", "setup", "builddir", *std_meson_args + system "ninja", "-C", "builddir", "install", "-v" end def post_install - # manual update of mime database - system "#{Formula["shared-mime-info"].opt_bin}/update-mime-database", "#{HOMEBREW_PREFIX}/share/mime" - # manual icon cache update step - system "#{Formula["gtk+3"].opt_bin}/gtk3-update-icon-cache", "#{HOMEBREW_PREFIX}/share/icons/hicolor" + system Formula["shared-mime-info"].opt_bin/"update-mime-database", HOMEBREW_PREFIX/"share/mime" + system Formula["gtk+3"].opt_bin/"gtk3-update-icon-cache", HOMEBREW_PREFIX/"share/icons/hicolor" + system Formula["desktop-file-utils"].opt_bin/"update-desktop-database", HOMEBREW_PREFIX/"share/applications" end test do - system "#{bin}/virt-viewer", "--version" + system bin/"virt-viewer", "--version" end end +__END__ +diff --git a/meson.build b/meson.build +index e5ed47b..26f386f 100644 +--- a/meson.build ++++ b/meson.build +@@ -539,30 +539,6 @@ i18n = import('i18n') + i18n_itsdir = join_paths(meson.source_root(), 'data', 'gettext') + top_include_dir = [include_directories('.')] + +-update_mime_database = find_program('update-mime-database', required: false) +-update_icon_cache = find_program('gtk-update-icon-cache', required: false) +-update_desktop_database = find_program('update-desktop-database', required: false) +- +-update_mime_database_path = '' +-if update_mime_database.found() +- update_mime_database_path = update_mime_database.path() +-endif +- +-update_icon_cache_path = '' +-if update_icon_cache.found() +- update_icon_cache_path = update_icon_cache.path() +-endif +- +-update_desktop_database_path = '' +-if update_desktop_database.found() +- update_desktop_database_path = update_desktop_database.path() +-endif +- +-meson.add_install_script('build-aux/post_install.py', +- update_mime_database_path, +- update_icon_cache_path, +- update_desktop_database_path) +- + subdir('icons') + subdir('src') + subdir('po') +diff --git a/data/meson.build b/data/meson.build +index d718491..4325108 100644 +--- a/data/meson.build ++++ b/data/meson.build +@@ -2,7 +2,6 @@ if host_machine.system() != 'windows' + desktop = 'remote-viewer.desktop' + + i18n.merge_file ( +- desktop, + type: 'desktop', + input: desktop + '.in', + output: desktop, +@@ -14,7 +13,6 @@ if host_machine.system() != 'windows' + mimetypes = 'virt-viewer-mime.xml' + + i18n.merge_file ( +- mimetypes, + type: 'xml', + input: mimetypes + '.in', + output: mimetypes, +@@ -27,7 +25,6 @@ if host_machine.system() != 'windows' + metainfo = 'remote-viewer.appdata.xml' + + i18n.merge_file ( +- metainfo, + type: 'xml', + input: metainfo + '.in', + output: metainfo,