<pre style='margin:0'>
Christopher Nielsen (mascguy) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/76feeed12d8d08319c82eaf36dab9fa7512fc9a3">https://github.com/macports/macports-ports/commit/76feeed12d8d08319c82eaf36dab9fa7512fc9a3</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new 76feeed12d8 shared-mime-info: make update-mime-database a stub, using touch
</span>76feeed12d8 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 76feeed12d8d08319c82eaf36dab9fa7512fc9a3
</span>Author: Christopher Nielsen <mascguy@github.com>
AuthorDate: Fri Jul 28 08:12:19 2023 -0400
<span style='display:block; white-space:pre;color:#404040;'> shared-mime-info: make update-mime-database a stub, using touch
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> - Allows ports to use update-mime-database, without interfering with daemon
</span><span style='display:block; white-space:pre;color:#404040;'> - Real updater script now named update-mime-database-real
</span><span style='display:block; white-space:pre;color:#404040;'> Closes: https://trac.macports.org/ticket/45396
</span>---
devel/shared-mime-info/Portfile | 28 +++++++++++++++++-----
.../org.macports.shared-mime-info-updater.plist | 2 +-
devel/shared-mime-info/files/postinstall | 2 +-
devel/shared-mime-info/files/update-mime-database | 5 ++++
4 files changed, 29 insertions(+), 8 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/devel/shared-mime-info/Portfile b/devel/shared-mime-info/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 4cfd17949b0..ed7530a33ef 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/devel/shared-mime-info/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/devel/shared-mime-info/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -6,13 +6,13 @@ PortGroup meson 1.0
</span>
gitlab.instance https://gitlab.freedesktop.org
gitlab.setup xdg shared-mime-info 2.2
<span style='display:block; white-space:pre;background:#ffe0e0;'>-revision 4
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 5
</span>
checksums rmd160 c8efc1e91c23b82c37d9f78f6d9b1ffbf7be8a11 \
sha256 418c480019d9865f67f922dfb88de00e9f38bf971205d55cdffab50432919e61 \
size 6428871
<span style='display:block; white-space:pre;background:#ffe0e0;'>-maintainers nomaintainer
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+maintainers {mascguy @mascguy} openmaintainer
</span> categories devel
license GPL-2+
description Database of common types.
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -36,6 +36,9 @@ depends_lib-append \
</span> path:lib/pkgconfig/glib-2.0.pc:glib2 \
port:libxml2
<span style='display:block; white-space:pre;background:#e0ffe0;'>+set script_orig update-mime-database
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set script_real update-mime-database-real
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> set startupitem_file \
org.macports.shared-mime-info-updater.plist
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -57,10 +60,22 @@ post-extract {
</span> # ${destroot}${prefix}/share/mime/packages
# }
<span style='display:block; white-space:pre;background:#e0ffe0;'>+post-destroot {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set bin_dir ${destroot}${prefix}/bin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Rename real updater script, to avoid inadvertent use
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ move ${bin_dir}/${script_orig} ${bin_dir}/${script_real}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Copy in stub script, which initiates update by touching mime area
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ copy ${filespath}/${script_orig} ${bin_dir}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s|@PREFIX@|${prefix}|g" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${bin_dir}/${script_orig}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> post-activate {
if {${os.platform} ne "darwin"} {
ui_msg "Updating MIME database..."
<span style='display:block; white-space:pre;background:#ffe0e0;'>- system "env XDG_DATA_DIRS=${prefix}/share ${prefix}/bin/update-mime-database -V ${prefix}/share/mime"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ system "env XDG_DATA_DIRS=${prefix}/share ${prefix}/bin/${script_real} -V ${prefix}/share/mime"
</span> }
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -79,7 +94,8 @@ startupitem.name ${name}-updater
</span> startupitem.type launchd
pre-pkg {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- xinstall -m 0755 ${filespath}/postinstall ${package.scripts}/
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- reinplace -locale C "s|@PREFIX@|${prefix}|g" ${package.scripts}/postinstall
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- long_description-append Install prefix: ${prefix}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall -m 0755 ${filespath}/postinstall ${package.scripts}/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace -locale C "s|@PREFIX@|${prefix}|g" ${package.scripts}/postinstall
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ long_description-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "Install prefix: ${prefix}"
</span> }
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/devel/shared-mime-info/files/org.macports.shared-mime-info-updater.plist b/devel/shared-mime-info/files/org.macports.shared-mime-info-updater.plist
</span><span style='display:block; white-space:pre;color:#808080;'>index 9984e37dc22..bb9b28c7c74 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/devel/shared-mime-info/files/org.macports.shared-mime-info-updater.plist
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/devel/shared-mime-info/files/org.macports.shared-mime-info-updater.plist
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -11,7 +11,7 @@
</span> </dict>
<key>ProgramArguments</key>
<array>
<span style='display:block; white-space:pre;background:#ffe0e0;'>- <string>@PREFIX@/bin/update-mime-database</string>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <string>@PREFIX@/bin/update-mime-database-real</string>
</span> <string>-V</string>
<string>@PREFIX@/share/mime</string>
</array>
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/devel/shared-mime-info/files/postinstall b/devel/shared-mime-info/files/postinstall
</span><span style='display:block; white-space:pre;color:#808080;'>index f23da338592..f737d3d0d5f 100755
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/devel/shared-mime-info/files/postinstall
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/devel/shared-mime-info/files/postinstall
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -3,4 +3,4 @@
</span> # shared-mime-info installer support, postinstall script
# runs as root after installer successfully copies payload to destination
<span style='display:block; white-space:pre;background:#ffe0e0;'>-env XDG_DATA_DIRS=@PREFIX@/share @PREFIX@/bin/update-mime-database -V @PREFIX@/share/mime
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+env XDG_DATA_DIRS=@PREFIX@/share @PREFIX@/bin/update-mime-database-real -V @PREFIX@/share/mime
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/devel/shared-mime-info/files/update-mime-database b/devel/shared-mime-info/files/update-mime-database
</span>new file mode 100755
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..ca21cc606bf
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/devel/shared-mime-info/files/update-mime-database
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#!/bin/sh
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# stub script, which initiates update
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+touch @PREFIX@/share/mime/packages
</span></pre><pre style='margin:0'>
</pre>