From 698c323abdf1566dfd4fd59fa59d4c87293488db Mon Sep 17 00:00:00 2001
From: Rafael Bento <rafael.bento@tuta.com>
Date: Jan 08 2024 03:00:04 +0000
Subject: [gnome-boxes]: update to 45.0


---

diff --git a/libre/gnome-boxes/PKGBUILD b/libre/gnome-boxes/PKGBUILD
index 3babec5..0435888 100644
--- a/libre/gnome-boxes/PKGBUILD
+++ b/libre/gnome-boxes/PKGBUILD
@@ -4,15 +4,16 @@
 # Contributor: Isaac David <isacdaavid@at@isacdaavid@dot@info>
 # Contributor: Daniel Milewski <niitotantei@gmail.com>
 # Contributor: André Silva <emulatorman@hyperbola.info>
+# Contributor: Rafael Bento <rafael.bento@tuta.com>
 
 # Parabola changes and rationale:
 # - Remove download links of nonfree OS
-# - Replace Windows with Parabola in documention
+# - Remove Windows in documention
 
 pkgname=gnome-boxes
-pkgver=3.34.3
-pkgrel=2
-pkgrel+=.par1
+pkgver=45.0
+pkgrel=1
+pkgrel+=.parabola1
 pkgdesc="Simple GNOME application to access remote or virtual systems"
 pkgdesc+=", without suggestions (and logos) of nonfree operating systems"
 arch=('x86_64')
@@ -22,44 +23,33 @@ license=('LGPL')
 conflicts=(${pkgname}-libre)
 replaces=(${pkgname}-libre)
 groups=('gnome')
-depends=('cdrtools' 'gtk-vnc' 'libarchive' 'libgudev' 'libosinfo' 'libsecret'
-         'libvirt-glib' 'mtools' 'qemu' 'spice-gtk' 'tracker' 'webkit2gtk' 'freerdp')
-makedepends=('git' 'gobject-introspection' 'yelp-tools' 'meson' 'spice-protocol' 'vala')
-_commit=c3bce5984eb53cc883850969f3e4a3e8e2cc6d44  # tags/v3.34.3^0
-source=("git+https://gitlab.gnome.org/GNOME/gnome-boxes.git#commit=$_commit"
-        "git+https://gitlab.gnome.org/GNOME/gtk-frdp.git"
-        "git+https://gitlab.gnome.org/felipeborges/libovf-glib.git")
-source+=(hide_download_button.patch)
-sha256sums=('SKIP'
-            'SKIP'
-            'SKIP')
-sha256sums+=('0539b344dc0bc8424539f747ed9c638ea414fe96153b803dae50bf5bf2d5aae5')
-
-pkgver() {
-  cd $pkgname
-  git describe --tags | sed 's/^v//;s/-/+/g'
-}
+depends=('cairo' 'cdrtools' 'dconf' 'edk2-ovmf' 'gdk-pixbuf2' 'glib2' 'gtk3'
+	 'hicolor-icon-theme' 'libarchive' 'libgudev' 'libhandy' 'libosinfo'
+	 'libsecret' 'libsoup3' 'libusb' 'libvirt-glib' 'libxml2' 'mtools'
+	 'qemu-desktop' 'spice-gtk' 'tracker3' 'webkit2gtk-4.1' 'xdg-user-dirs')
+makedepends=('appstream-glib' 'git' 'gobject-introspection' 'meson'
+	     'spice-protocol' 'vala' 'yelp-tools')
+source=(https://download.gnome.org/sources/$pkgname/${pkgver%%.*}/$pkgname-$pkgver.tar.xz
+        hide_download_button.patch
+        remove_windows_from_help_pages.patch)
+sha256sums=('cc63080eefa147a8472ab1a5ff087b97a27ab723a4ee005ed41e8c9dd7798e41'
+	    '6f64198c6f36cfc2fffa4c539d04dfb52f7ccdf8a4894ced57d37d0cb6eb5177'
+	    'd238685c2fb3e7226adf62fc2a9fd2ea0c647c24f3409806e571d9aabe66db84')
 
 prepare() {
-  cd $pkgname
-
-  git submodule init
-  git config --local submodule.subprojects/gtk-frdp.url "$srcdir/gtk-frdp"
-  git config --local submodule.subprojects/libovf-glib.url "$srcdir/libovf-glib"
-  git submodule update
+  cd "${srcdir}"/${pkgname}-${pkgver}
 
   # remove recommended downloads of nonfree OS
-  sed -i /os_id/d ./data/recommended-downloads.xml
+  sed -i '/<list>/,/<\/list>/{//!d}' ./data/recommended-downloads.xml
   # Make download button invisible
   patch -Np1 -i ../hide_download_button.patch
-  # I'd rather not use Windows as example in user docs
-  find ./help/ -type f \( -name '*.po' -o -name '*.page' \) -exec \
-       sed -Ei 's/(Microsoft )?Windows(™)?/Parabola/' {} +
+  # Remove Windows citation and specific instructions in user docs
+  patch -Np1 -i ../remove_windows_from_help_pages.patch
 }
 
 build() {
-  arch-meson $pkgname build
-  ninja -C build
+  arch-meson $pkgname-$pkgver build
+  meson compile -C build
 }
 
 check() {
@@ -67,5 +57,5 @@ check() {
 }
 
 package() {
-  DESTDIR="$pkgdir" meson install -C build
+  meson install -C build --destdir "$pkgdir"
 }
diff --git a/libre/gnome-boxes/hide_download_button.patch b/libre/gnome-boxes/hide_download_button.patch
index 1b6d353..5e54ba5 100644
--- a/libre/gnome-boxes/hide_download_button.patch
+++ b/libre/gnome-boxes/hide_download_button.patch
@@ -1,13 +1,12 @@
-diff --git a/data/ui/wizard-source.ui b/data/ui/wizard-source.ui
-index 94c8a802..a5bfb774 100644
---- a/data/ui/wizard-source.ui
-+++ b/data/ui/wizard-source.ui
-@@ -60,7 +60,7 @@
-
-             <child>
-               <object class="GtkButton" id="download_an_os_button">
--                <property name="visible">True</property>
-+                <property name="visible">False</property>
-                 <signal name="clicked" handler="on_download_an_os_button_clicked"/>
-                 <style>
-                   <class name="boxes-menu-row"/>
+diff --unified --recursive --text package.orig/data/ui/collection-toolbar.ui package.new/data/ui/collection-toolbar.ui
+--- package.orig/data/ui/collection-toolbar.ui	2023-09-18 11:15:06.000000000 -0300
++++ package.new/data/ui/collection-toolbar.ui	2023-12-29 03:10:49.460920731 -0300
+@@ -232,7 +232,7 @@
+ 
+         <child>
+           <object class="HdyActionRow">
+-            <property name="visible">True</property>
++            <property name="visible">False</property>
+             <property name="activatable">True</property>
+             <property name="icon-name">folder-download-symbolic</property>
+             <property name="title" translatable="yes">Download OS</property>
diff --git a/libre/gnome-boxes/remove_windows_from_help_pages.patch b/libre/gnome-boxes/remove_windows_from_help_pages.patch
new file mode 100644
index 0000000..8fe8e0c
--- /dev/null
+++ b/libre/gnome-boxes/remove_windows_from_help_pages.patch
@@ -0,0 +1,44 @@
+diff --unified --recursive --text package.orig/help/C/install-guest-agent.page package.new/help/C/install-guest-agent.page
+--- package.orig/help/C/install-guest-agent.page	2023-09-18 11:15:06.000000000 -0300
++++ package.new/help/C/install-guest-agent.page	2024-01-02 00:27:02.036857899 -0300
+@@ -27,12 +27,6 @@
+ 
+   <p>Guest tools are a collection of drivers and utilities that improve the usability of your virtual machine. It provides improved input performance, automatic screen resolution adjustment, shared clipboard, and file transfer.</p>
+ 
+-  <section id="installing-on-windows">
+-    <title>Installing on Windows virtual machines</title>
+-
+-    <p>Visit <link href="https://win.gnomeboxes.org">win.gnomeboxes.org</link> in your Windows virtual machine to download and install the <app>spice-guest-tools</app> application, which provides the guest integration for GNOME Boxes.</p>
+-  </section>
+-
+   <section id="installing-on-linux">
+     <title>Installing on Linux virtual machines</title>
+ 
+Only in package.new/help/C: install-guest-agent.page~
+diff --unified --recursive --text package.orig/help/C/snapshot-rename.page package.new/help/C/snapshot-rename.page
+--- package.orig/help/C/snapshot-rename.page	2023-09-18 11:15:06.000000000 -0300
++++ package.new/help/C/snapshot-rename.page	2024-01-02 00:34:30.723524470 -0300
+@@ -28,7 +28,7 @@
+   <p>You may want to change the name to something more meaningful, such as:</p>
+ 
+     <p><file>Fedora_22_with_jhbuild</file> or
+-    <file>Windows 7 plus GTK+ 3.6.4</file>.</p>
++    <file>Parabola plus GTK+ 3.6.4</file>.</p>
+ 
+   <steps>
+     <item><p>Right-click on the box in the collection view and select
+Only in package.new/help/C: snapshot-rename.page~
+diff --unified --recursive --text package.orig/help/C/why-do-i-need-virtual-machine.page package.new/help/C/why-do-i-need-virtual-machine.page
+--- package.orig/help/C/why-do-i-need-virtual-machine.page	2023-09-18 11:15:06.000000000 -0300
++++ package.new/help/C/why-do-i-need-virtual-machine.page	2024-01-02 00:24:44.543524631 -0300
+@@ -27,8 +27,7 @@
+   <title>Why do I need a virtual machine?</title>
+ 
+   <p>A virtual machine can be useful when you need to run applications that will
+-  only run on another operating system, on Microsoft Windows™ for instance. A
+-  virtual machine can also be used during software development, to test in a
+-  pristine environment.</p>
++  only run on another operating system. A virtual machine can also be used
++  during software development, to test in a pristine environment.</p>
+ 
+ </page>

