* [gentoo-commits] repo/gentoo:master commit in: x11-misc/shared-mime-info/files/, x11-misc/shared-mime-info/
@ 2020-06-15 20:06 Lars Wendler
0 siblings, 0 replies; 4+ messages in thread
From: Lars Wendler @ 2020-06-15 20:06 UTC (permalink / raw
To: gentoo-commits
commit: 1e87a64d415f618ab7773bf251f4a96a2932be8c
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 15 20:05:59 2020 +0000
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Mon Jun 15 20:06:19 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1e87a64d
x11-misc/shared-mime-info: Use upstream patch for previous fix
Closes: https://bugs.gentoo.org/728404
Package-Manager: Portage-2.3.101, Repoman-2.3.22
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
...ared-mime-info-2.0-pkgconfig_install_path.patch | 22 ++++++++++++++++++++++
.../shared-mime-info-2.0-r2.ebuild | 9 ++++-----
2 files changed, 26 insertions(+), 5 deletions(-)
diff --git a/x11-misc/shared-mime-info/files/shared-mime-info-2.0-pkgconfig_install_path.patch b/x11-misc/shared-mime-info/files/shared-mime-info-2.0-pkgconfig_install_path.patch
new file mode 100644
index 00000000000..e694928728f
--- /dev/null
+++ b/x11-misc/shared-mime-info/files/shared-mime-info-2.0-pkgconfig_install_path.patch
@@ -0,0 +1,22 @@
+From 6bf9e4ff0fb7eff11a02bd937045bf5dc291841a Mon Sep 17 00:00:00 2001
+From: Bastien Nocera <hadess@hadess.net>
+Date: Wed, 6 May 2020 16:48:47 +0200
+Subject: [PATCH] data: Fix pkg-config installation path
+
+---
+ data/meson.build | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/data/meson.build b/data/meson.build
+index 25ce031..e22b544 100644
+--- a/data/meson.build
++++ b/data/meson.build
+@@ -38,4 +38,5 @@ pkgconfig.generate(
+ name: 'shared-mime-info',
+ description: 'Freedesktop common MIME database',
+ version: meson.project_version(),
++ install_dir: get_option('datadir') / 'pkgconfig'
+ )
+--
+2.26.2
+
diff --git a/x11-misc/shared-mime-info/shared-mime-info-2.0-r2.ebuild b/x11-misc/shared-mime-info/shared-mime-info-2.0-r2.ebuild
index b21ac610129..dc5eca64624 100644
--- a/x11-misc/shared-mime-info/shared-mime-info-2.0-r2.ebuild
+++ b/x11-misc/shared-mime-info/shared-mime-info-2.0-r2.ebuild
@@ -31,6 +31,10 @@ DEPEND="${RDEPEND}"
DOCS=( HACKING.md NEWS README.md )
+PATCHES=(
+ "${FILESDIR}/${P}-pkgconfig_install_path.patch" #728404
+)
+
src_install() {
meson_src_install
@@ -39,11 +43,6 @@ src_install() {
echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share\"" > "${T}"/50mimeinfo || die
doenvd "${T}"/50mimeinfo
fi
-
- # Move pkgconfig file to /usr/share/pkgconfig #728404
- dodir /usr/share/pkgconfig
- mv "${ED}"/usr/{$(get_libdir),share}/pkgconfig/${PN}.pc || die
- rm "${ED}"/usr/$(get_libdir) -r || die
}
pkg_postinst() {
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: x11-misc/shared-mime-info/files/, x11-misc/shared-mime-info/
@ 2021-11-21 23:39 Mike Gilbert
0 siblings, 0 replies; 4+ messages in thread
From: Mike Gilbert @ 2021-11-21 23:39 UTC (permalink / raw
To: gentoo-commits
commit: 40fb79f4c69cdc4331ba21d12b65d70c8175b7e8
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 21 23:36:15 2021 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sun Nov 21 23:38:58 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=40fb79f4
x11-misc/shared-mime-info: avoid calling broken translation script
Closes: https://bugs.gentoo.org/824142
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
.../files/shared-mime-info-2.1-itstool.patch | 82 ++++++++++++++++++++++
.../shared-mime-info/shared-mime-info-2.1.ebuild | 5 +-
2 files changed, 86 insertions(+), 1 deletion(-)
diff --git a/x11-misc/shared-mime-info/files/shared-mime-info-2.1-itstool.patch b/x11-misc/shared-mime-info/files/shared-mime-info-2.1-itstool.patch
new file mode 100644
index 000000000000..dedeb61e29cf
--- /dev/null
+++ b/x11-misc/shared-mime-info/files/shared-mime-info-2.1-itstool.patch
@@ -0,0 +1,82 @@
+From 5a406b06792e26a83c7346b3c2443c0bd8d4cdb2 Mon Sep 17 00:00:00 2001
+From: Eli Schwartz <eschwartz@archlinux.org>
+Date: Mon, 8 Nov 2021 18:22:47 -0500
+Subject: [PATCH] migrate from custom itstool to builtin msgfmt for creating
+ translated XML
+
+gettext upstream has supported this for a very long time (since 0.19.7
+via commit b3c2a5a242c36fbbaa0c5b17f975d6c638598a23, released in 2015),
+and itstool is (mostly) a legacy of the time before gettext had proper
+support for these sorts of use cases.
+
+This is similar to the state of intltool, which is described at
+https://wiki.gnome.org/MigratingFromIntltoolToGettext
+
+During the port from autotools to meson, the legacy use of itstool was
+faithfully translated to meson in the only way possible: by jumping
+through hoops to run ninja inside ninja in order to generate the .mo
+files for itstool, because meson's i18n module used a flawed design and
+there was no "real" target to create those files, only a .PHONY
+run_target which other rules cannot depend on.
+
+Although meson 0.60.0 added support for real targets for the built .mo
+files, this changed the rules for output filenames, breaking the script.
+
+But msgfmt does not care, and anyways comes with builtin meson functions
+for convenient use with XML files. So let's take this opportunity to
+drop legacy dependencies and use the modern, builtin tooling, which
+fixes this bug as a side effect.
+
+Fixes #170
+---
+ .gitlab-ci.yml | 2 --
+ README.md | 2 +-
+ data/freedesktop_generate.sh | 12 ------------
+ data/meson.build | 16 +++++-----------
+ meson.build | 1 -
+ 5 files changed, 6 insertions(+), 27 deletions(-)
+ delete mode 100755 data/freedesktop_generate.sh
+
+diff --git a/data/meson.build b/data/meson.build
+index 24361c9..09ed7a9 100644
+--- a/data/meson.build
++++ b/data/meson.build
+@@ -1,18 +1,12 @@
+
+ install_man('update-mime-database.1')
+
+-freedesktop_org_xml = custom_target('freedesktop.org.xml',
+- input : files(
+- 'freedesktop.org.xml.in',
+- 'its/shared-mime-info.its',
+- 'its/shared-mime-info.loc',
+- ),
++freedesktop_org_xml = i18n.merge_file(
++ input: 'freedesktop.org.xml.in',
+ output: 'freedesktop.org.xml',
+- command: [
+- find_program('freedesktop_generate.sh'),
+- meson.source_root(),
+- meson.build_root()
+- ],
++ data_dirs: '.',
++ po_dir: '../po',
++ type: 'xml',
+ install: true,
+ install_dir: get_option('datadir') / 'mime' / 'packages',
+ )
+diff --git a/meson.build b/meson.build
+index 0d08c8a..60f17ae 100644
+--- a/meson.build
++++ b/meson.build
+@@ -20,7 +20,6 @@
+ ###############################################################################
+ # Find tools
+
+-itstool = find_program('itstool')
+ xmllint = find_program('xmllint')
+ xmlto = find_program('xmlto')
+
+--
+GitLab
+
diff --git a/x11-misc/shared-mime-info/shared-mime-info-2.1.ebuild b/x11-misc/shared-mime-info/shared-mime-info-2.1.ebuild
index 440f28e1465b..0957f1fa1a14 100644
--- a/x11-misc/shared-mime-info/shared-mime-info-2.1.ebuild
+++ b/x11-misc/shared-mime-info/shared-mime-info-2.1.ebuild
@@ -20,7 +20,6 @@ RESTRICT="test"
BDEPEND="
app-text/docbook-xml-dtd:4.1.2
app-text/xmlto
- dev-util/itstool
sys-devel/gettext
virtual/pkgconfig
"
@@ -32,6 +31,10 @@ DEPEND="${RDEPEND}"
DOCS=( HACKING.md NEWS README.md )
+PATCHES=(
+ "${FILESDIR}/shared-mime-info-2.1-itstool.patch"
+)
+
src_install() {
meson_src_install
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: x11-misc/shared-mime-info/files/, x11-misc/shared-mime-info/
@ 2023-10-19 13:12 Sam James
0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2023-10-19 13:12 UTC (permalink / raw
To: gentoo-commits
commit: 9f3fff4dda5c7de17663db95721cebad15402a7c
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 19 13:12:12 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Oct 19 13:12:12 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9f3fff4d
x11-misc/shared-mime-info: backport Clang fixes
Closes: https://bugs.gentoo.org/915859
Signed-off-by: Sam James <sam <AT> gentoo.org>
...shared-mime-info-2.3-clang-string-literal.patch | 38 +++
.../shared-mime-info-2.3-fsync-detection.patch | 55 ++++
.../files/shared-mime-info-2.3-wformat.patch | 282 +++++++++++++++++++++
.../shared-mime-info-2.3-r1.ebuild | 100 ++++++++
4 files changed, 475 insertions(+)
diff --git a/x11-misc/shared-mime-info/files/shared-mime-info-2.3-clang-string-literal.patch b/x11-misc/shared-mime-info/files/shared-mime-info-2.3-clang-string-literal.patch
new file mode 100644
index 000000000000..fe868ad709f6
--- /dev/null
+++ b/x11-misc/shared-mime-info/files/shared-mime-info-2.3-clang-string-literal.patch
@@ -0,0 +1,38 @@
+https://bugs.gentoo.org/915859
+https://gitlab.freedesktop.org/xdg/shared-mime-info/-/commit/12a3a6b1141c704fc594379af1808bb9008d588c
+
+From 12a3a6b1141c704fc594379af1808bb9008d588c Mon Sep 17 00:00:00 2001
+From: Tobias Mayer <tobim@fastmail.fm>
+Date: Sun, 8 Oct 2023 00:11:49 +0200
+Subject: [PATCH] Fix string literal concatenation
+
+Clang is not able to disambiguate between multiple string literatals
+and C++11 user defined literals. Spaces help.
+---
+ src/update-mime-database.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/update-mime-database.cpp b/src/update-mime-database.cpp
+index 733ba063..29d82a9d 100644
+--- a/src/update-mime-database.cpp
++++ b/src/update-mime-database.cpp
+@@ -2158,7 +2158,7 @@ static void check_in_path_xdg_data(const char *mime_path)
+
+ env = getenv("XDG_DATA_DIRS");
+ if (!env)
+- env = "/usr/local/share/"PATH_SEPARATOR"/usr/share/";
++ env = "/usr/local/share/" PATH_SEPARATOR "/usr/share/";
+ dirs = g_strsplit(env, PATH_SEPARATOR, 0);
+ g_return_if_fail(dirs != NULL);
+ for (n = 0; dirs[n]; n++)
+@@ -2170,7 +2170,7 @@ static void check_in_path_xdg_data(const char *mime_path)
+ dirs[n] = g_build_filename(g_get_home_dir(), ".local",
+ "share", NULL);
+ n++;
+-
++
+ for (i = 0; i < n; i++)
+ {
+ if (stat(dirs[i], &dir_info) == 0 &&
+--
+GitLab
diff --git a/x11-misc/shared-mime-info/files/shared-mime-info-2.3-fsync-detection.patch b/x11-misc/shared-mime-info/files/shared-mime-info-2.3-fsync-detection.patch
new file mode 100644
index 000000000000..abf766c07f84
--- /dev/null
+++ b/x11-misc/shared-mime-info/files/shared-mime-info-2.3-fsync-detection.patch
@@ -0,0 +1,55 @@
+https://gitlab.freedesktop.org/xdg/shared-mime-info/-/commit/7499ac1a85b2487b94e315e6b55c34bcf220295f
+
+From 7499ac1a85b2487b94e315e6b55c34bcf220295f Mon Sep 17 00:00:00 2001
+From: Tobias Mayer <tobim@fastmail.fm>
+Date: Sat, 7 Oct 2023 23:45:47 +0200
+Subject: [PATCH] Fix false positive fdatasync detection on darwin
+
+The `has_function` feature in meson uses different detection methods
+depending on the contents of the `prefix` kwarg [1]:
+
+ * if it contains `#include` directives it will copy the prefix into
+ the test code and check if it compiles
+ * if it doesn't contain an include or isn't specified, `has_function`
+ will forward declare the function and test for it's existence by
+ trying to link it to the default libraries
+
+The latter approach wrongly succeeds for `fdatasync` on darwin because
+the linker binds the function to a system call of the same name. Note
+that this result really is wrong because that system call has not
+the expected semantics of `fdatasync`.
+
+By adding an include for `unistd.h` we can get meson to use the
+first approach and the detection fails.
+
+Note that this has gone unnoticed so far because only recent versions
+of clang (the default compiler on darwin) started to treat implicit
+function declarations as an error.
+
+[1] https://github.com/mesonbuild/meson/blob/583d2815d1a130227f0f4db47e4ab2e80ebb6a61/mesonbuild/compilers/mixins/clike.py#L839-L846
+
+Fixes #211
+---
+ meson.build | 7 +------
+ 1 file changed, 1 insertion(+), 6 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 1780c443..7998a51b 100644
+--- a/meson.build
++++ b/meson.build
+@@ -49,12 +49,7 @@ endif
+ ###############################################################################
+ # Dependencies
+
+-check_functions = [
+- 'fdatasync',
+-]
+-foreach function : check_functions
+- config.set('HAVE_'+function.to_upper(), cc.has_function(function))
+-endforeach
++config.set('HAVE_FDATASYNC', cc.has_function('fdatasync', prefix: '#include <unistd.h>'))
+
+
+ if get_option('build-translations')
+--
+GitLab
diff --git a/x11-misc/shared-mime-info/files/shared-mime-info-2.3-wformat.patch b/x11-misc/shared-mime-info/files/shared-mime-info-2.3-wformat.patch
new file mode 100644
index 000000000000..18470b3ced24
--- /dev/null
+++ b/x11-misc/shared-mime-info/files/shared-mime-info-2.3-wformat.patch
@@ -0,0 +1,282 @@
+https://gitlab.freedesktop.org/xdg/shared-mime-info/-/commit/157c16b09f54741aefbc4be6a3507455f0378389
+
+From 157c16b09f54741aefbc4be6a3507455f0378389 Mon Sep 17 00:00:00 2001
+From: Biswapriyo Nath <nathbappai@gmail.com>
+Date: Sun, 8 Oct 2023 13:26:43 +0000
+Subject: [PATCH] Fix missing sentinel warning with clang
+
+This fixes the compiler warnings similar as following.
+
+../src/update-mime-database.cpp:393:50: warning: missing sentinel in function call [-Wsentinel]
+ 393 | g_strconcat(namespaceURI, " ", localName, NULL),
+ | ^
+ | , nullptr
+---
+ src/update-mime-database.cpp | 58 ++++++++++++++++++------------------
+ 1 file changed, 29 insertions(+), 29 deletions(-)
+
+diff --git a/src/update-mime-database.cpp b/src/update-mime-database.cpp
+index 29d82a9d..7838a0eb 100644
+--- a/src/update-mime-database.cpp
++++ b/src/update-mime-database.cpp
+@@ -390,7 +390,7 @@ static void add_namespace(Type *type, const char *namespaceURI,
+ }
+
+ g_hash_table_insert(namespace_hash,
+- g_strconcat(namespaceURI, " ", localName, NULL),
++ g_strconcat(namespaceURI, " ", localName, nullptr),
+ type);
+ }
+
+@@ -1023,7 +1023,7 @@ static void write_out_type(gpointer key, gpointer value, gpointer data)
+ char *lower;
+
+ lower = g_ascii_strdown(type->media, -1);
+- media = g_strconcat(mime_dir, "/", lower, NULL);
++ media = g_strconcat(mime_dir, "/", lower, nullptr);
+ g_free(lower);
+ #ifdef _WIN32
+ fs::create_directory(media);
+@@ -1032,7 +1032,7 @@ static void write_out_type(gpointer key, gpointer value, gpointer data)
+ #endif
+
+ lower = g_ascii_strdown(type->subtype, -1);
+- filename = g_strconcat(media, "/", lower, ".xml.new", NULL);
++ filename = g_strconcat(media, "/", lower, ".xml.new", nullptr);
+ g_free(lower);
+ g_free(media);
+ media = NULL;
+@@ -1622,7 +1622,7 @@ static Magic *magic_new(xmlNode *node, Type *type, GError **error)
+ magic_free(magic);
+ magic = NULL;
+ (*error)->message = g_strconcat(
+- _("Error in <match> element: "), old, NULL);
++ _("Error in <match> element: "), old, nullptr);
+ g_free(old);
+ } else if (magic->matches == NULL) {
+ magic_free(magic);
+@@ -1843,7 +1843,7 @@ static TreeMagic *tree_magic_new(xmlNode *node, Type *type, GError **error)
+ tree_magic_free(magic);
+ magic = NULL;
+ (*error)->message = g_strconcat(
+- _("Error in <treematch> element: "), old, NULL);
++ _("Error in <treematch> element: "), old, nullptr);
+ g_free(old);
+ }
+ }
+@@ -1960,7 +1960,7 @@ static void delete_old_types(const gchar *mime_dir)
+
+ for (i = 0; i < G_N_ELEMENTS(media_types); i++)
+ {
+- const fs::path media_dir = g_strconcat(mime_dir, "/", media_types[i], NULL);
++ const fs::path media_dir = g_strconcat(mime_dir, "/", media_types[i], nullptr);
+
+ if (!fs::is_directory(fs::status(media_dir)))
+ continue;
+@@ -1973,13 +1973,13 @@ static void delete_old_types(const gchar *mime_dir)
+ continue;
+
+ char *type_name = g_strconcat(media_types[i], "/",
+- dir_entry.path().filename().string().c_str(), NULL);
++ dir_entry.path().filename().string().c_str(), nullptr);
+ type_name[strlen(type_name) - 4] = '\0';
+ if (!g_hash_table_lookup(types, type_name))
+ {
+ char *path;
+ path = g_strconcat(mime_dir, "/",
+- type_name, ".xml", NULL);
++ type_name, ".xml", nullptr);
+ #if 0
+ g_warning("Removing old info for type %s",
+ path);
+@@ -2002,7 +2002,7 @@ static void add_ns(gpointer key, gpointer value, gpointer data)
+ Type *type = (Type *) value;
+
+ g_ptr_array_add(lines, g_strconcat(ns, " ", type->media,
+- "/", type->subtype, "\n", NULL));
++ "/", type->subtype, "\n", nullptr));
+ }
+
+ /* Write all the collected namespace rules to 'XMLnamespaces' */
+@@ -2038,7 +2038,7 @@ static void write_subclass(gpointer key, gpointer value, gpointer data)
+
+ for (l = list; l; l = l->next)
+ {
+- line = g_strconcat (static_cast<const gchar *>(key), " ", l->data, "\n", NULL);
++ line = g_strconcat (static_cast<const gchar *>(key), " ", l->data, "\n", nullptr);
+ fwrite(line, 1, strlen(line), stream);
+ g_free (line);
+ }
+@@ -2061,7 +2061,7 @@ static void add_alias(gpointer key, gpointer value, gpointer data)
+
+ g_ptr_array_add(lines, g_strconcat(alias, " ", type->media,
+ "/", type->subtype, "\n",
+- NULL));
++ nullptr));
+ }
+
+ /* Write all the collected aliases */
+@@ -2092,7 +2092,7 @@ static void add_type(gpointer key, gpointer value, gpointer data)
+ {
+ GPtrArray *lines = (GPtrArray *) data;
+
+- g_ptr_array_add(lines, g_strconcat((char *)key, "\n", NULL));
++ g_ptr_array_add(lines, g_strconcat((char *)key, "\n", nullptr));
+ }
+
+ /* Write all the collected types */
+@@ -2127,7 +2127,7 @@ static void write_one_icon(gpointer key, gpointer value, gpointer data)
+ FILE *stream = (FILE *)data;
+ char *line;
+
+- line = g_strconcat (mimetype, ":", iconname, "\n", NULL);
++ line = g_strconcat (mimetype, ":", iconname, "\n", nullptr);
+ fwrite(line, 1, strlen(line), stream);
+ g_free (line);
+ }
+@@ -2168,7 +2168,7 @@ static void check_in_path_xdg_data(const char *mime_path)
+ dirs[n] = g_strdup(env);
+ else
+ dirs[n] = g_build_filename(g_get_home_dir(), ".local",
+- "share", NULL);
++ "share", nullptr);
+ n++;
+
+ for (i = 0; i < n; i++)
+@@ -3588,7 +3588,7 @@ newest_mtime(const char *packagedir)
+ while ((name = g_dir_read_name(dir))) {
+ char *path;
+
+- path = g_build_filename(packagedir, name, NULL);
++ path = g_build_filename(packagedir, name, nullptr);
+ retval = g_stat(path, &statbuf);
+ g_free(path);
+ if (retval < 0)
+@@ -3609,7 +3609,7 @@ is_cache_up_to_date (const char *mimedir, const char *packagedir)
+ char *mimeversion;
+ int retval;
+
+- mimeversion = g_build_filename(mimedir, "/version", NULL);
++ mimeversion = g_build_filename(mimedir, "/version", nullptr);
+ retval = g_stat(mimeversion, &version_stat);
+ g_free(mimeversion);
+ if (retval < 0)
+@@ -3694,7 +3694,7 @@ int main(int argc, char **argv)
+ }
+ }
+
+- package_dir = g_strconcat(mime_dir, "/packages", NULL);
++ package_dir = g_strconcat(mime_dir, "/packages", nullptr);
+
+ if (!fs::exists(mime_dir) && !fs::is_directory(fs::status(mime_dir)))
+ {
+@@ -3747,7 +3747,7 @@ int main(int argc, char **argv)
+
+ g_hash_table_foreach(globs_hash, collect_glob2, &glob_list);
+ glob_list = g_list_sort(glob_list, (GCompareFunc)compare_glob_by_weight);
+- globs_path = g_strconcat(mime_dir, "/globs.new", NULL);
++ globs_path = g_strconcat(mime_dir, "/globs.new", nullptr);
+ globs = fopen_gerror(globs_path, error);
+ if (!globs)
+ goto out;
+@@ -3761,7 +3761,7 @@ int main(int argc, char **argv)
+ goto out;
+ g_free(globs_path);
+
+- globs_path = g_strconcat(mime_dir, "/globs2.new", NULL);
++ globs_path = g_strconcat(mime_dir, "/globs2.new", nullptr);
+ globs = fopen_gerror(globs_path, error);
+ if (!globs)
+ goto out;
+@@ -3782,7 +3782,7 @@ int main(int argc, char **argv)
+ FILE *stream;
+ char *magic_path;
+ int i;
+- magic_path = g_strconcat(mime_dir, "/magic.new", NULL);
++ magic_path = g_strconcat(mime_dir, "/magic.new", nullptr);
+ stream = fopen_gerror(magic_path, error);
+ if (!stream)
+ goto out;
+@@ -3807,7 +3807,7 @@ int main(int argc, char **argv)
+ FILE *stream;
+ char *ns_path;
+
+- ns_path = g_strconcat(mime_dir, "/XMLnamespaces.new", NULL);
++ ns_path = g_strconcat(mime_dir, "/XMLnamespaces.new", nullptr);
+ stream = fopen_gerror(ns_path, error);
+ if (!stream)
+ goto out;
+@@ -3823,7 +3823,7 @@ int main(int argc, char **argv)
+ FILE *stream;
+ char *path;
+
+- path = g_strconcat(mime_dir, "/subclasses.new", NULL);
++ path = g_strconcat(mime_dir, "/subclasses.new", nullptr);
+ stream = fopen_gerror(path, error);
+ if (!stream)
+ goto out;
+@@ -3839,7 +3839,7 @@ int main(int argc, char **argv)
+ FILE *stream;
+ char *path;
+
+- path = g_strconcat(mime_dir, "/aliases.new", NULL);
++ path = g_strconcat(mime_dir, "/aliases.new", nullptr);
+ stream = fopen_gerror(path, error);
+ if (!stream)
+ goto out;
+@@ -3855,7 +3855,7 @@ int main(int argc, char **argv)
+ FILE *stream;
+ char *path;
+
+- path = g_strconcat(mime_dir, "/types.new", NULL);
++ path = g_strconcat(mime_dir, "/types.new", nullptr);
+ stream = fopen_gerror(path, error);
+ if (!stream)
+ goto out;
+@@ -3871,7 +3871,7 @@ int main(int argc, char **argv)
+ FILE *stream;
+ char *icon_path;
+
+- icon_path = g_strconcat(mime_dir, "/generic-icons.new", NULL);
++ icon_path = g_strconcat(mime_dir, "/generic-icons.new", nullptr);
+ stream = fopen_gerror(icon_path, error);
+ if (!stream)
+ goto out;
+@@ -3887,7 +3887,7 @@ int main(int argc, char **argv)
+ FILE *stream;
+ char *icon_path;
+
+- icon_path = g_strconcat(mime_dir, "/icons.new", NULL);
++ icon_path = g_strconcat(mime_dir, "/icons.new", nullptr);
+ stream = fopen_gerror(icon_path, error);
+ if (!stream)
+ goto out;
+@@ -3903,7 +3903,7 @@ int main(int argc, char **argv)
+ FILE *stream;
+ char *path;
+ int i;
+- path = g_strconcat(mime_dir, "/treemagic.new", NULL);
++ path = g_strconcat(mime_dir, "/treemagic.new", nullptr);
+ stream = fopen_gerror(path, error);
+ if (!stream)
+ goto out;
+@@ -3928,7 +3928,7 @@ int main(int argc, char **argv)
+ FILE *stream;
+ char *path;
+
+- path = g_strconcat(mime_dir, "/mime.cache.new", NULL);
++ path = g_strconcat(mime_dir, "/mime.cache.new", nullptr);
+ stream = fopen_gerror(path, error);
+ if (!stream)
+ goto out;
+@@ -3944,7 +3944,7 @@ int main(int argc, char **argv)
+ FILE *stream;
+ char *path;
+
+- path = g_strconcat(mime_dir, "/version.new", NULL);
++ path = g_strconcat(mime_dir, "/version.new", nullptr);
+ stream = fopen_gerror(path, error);
+ if (!stream)
+ goto out;
+--
+GitLab
diff --git a/x11-misc/shared-mime-info/shared-mime-info-2.3-r1.ebuild b/x11-misc/shared-mime-info/shared-mime-info-2.3-r1.ebuild
new file mode 100644
index 000000000000..e63535b1ac2d
--- /dev/null
+++ b/x11-misc/shared-mime-info/shared-mime-info-2.3-r1.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit meson xdg-utils
+
+# xdgmime is used for tests but doesn't make releases nowadays; do what
+# Fedora does and use a snapshot so we can run the test suite.
+MY_XDGMIME_COMMIT="179296748e92bd91bf531656632a1056307fb7b7"
+DESCRIPTION="The Shared MIME-info Database specification"
+HOMEPAGE="https://gitlab.freedesktop.org/xdg/shared-mime-info"
+SRC_URI="https://gitlab.freedesktop.org/xdg/shared-mime-info/-/archive/${PV}/${P}.tar.bz2"
+SRC_URI+=" test? ( https://gitlab.freedesktop.org/xdg/xdgmime/-/archive/${MY_XDGMIME_COMMIT}/xdgmime-${MY_XDGMIME_COMMIT}.tar.bz2 )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+BDEPEND="
+ app-text/docbook-xml-dtd:4.1.2
+ app-text/xmlto
+ sys-devel/gettext
+ virtual/pkgconfig
+"
+RDEPEND="
+ dev-libs/glib:2
+ dev-libs/libxml2
+"
+DEPEND="${RDEPEND}"
+
+DOCS=( HACKING.md NEWS README.md )
+
+PATCHES=(
+ "${FILESDIR}"/${P}-clang-string-literal.patch
+ "${FILESDIR}"/${P}-fsync-detection.patch
+ "${FILESDIR}"/${P}-wformat.patch
+)
+
+src_prepare() {
+ default
+
+ if use test ; then
+ # Drop empty dir (it's a submodule in upstream git repo)
+ rm -r "${S}"/xdgmime || die
+ # Lead Meson to our snapshot
+ mkdir "${WORKDIR}"/xdgmime_build || die
+ ln -s "${WORKDIR}"/xdgmime_build xdgmime || die
+ # Don't break parallel make
+ #sed -i -e 's:make:$(MAKE):' xdgmime/Makefile || die
+ fi
+}
+
+src_configure() {
+ # We have to trick Meson into thinking it's there now so that
+ # we can run meson then emake to build xdgmime later, rather than
+ # building before running meson which would mean doing something
+ # unexpected in src_configure.
+ if use test ; then
+ # Paths from https://gitlab.freedesktop.org/xdg/shared-mime-info/-/blob/master/meson.build#L29
+ mkdir xdgmime/src || die
+ touch xdgmime/src/{print,test}-mime{,-data} || die
+ chmod +x xdgmime/src/{print,test}-mime{,-data} || die
+
+ BUILD_DIR="${WORKDIR}"/xdgmime_build EMESON_SOURCE="${WORKDIR}"/xdgmime-${MY_XDGMIME_COMMIT} meson_src_configure
+ fi
+
+ local emesonargs=(
+ -Dbuild-tools=true
+ -Dupdate-mimedb=false
+ $(meson_use test build-tests)
+ )
+
+ meson_src_configure
+}
+
+src_compile() {
+ if use test ; then
+ meson_src_compile -C "${WORKDIR}"/xdgmime_build
+ fi
+
+ meson_src_compile
+}
+
+src_install() {
+ meson_src_install
+
+ # in prefix, install an env.d entry such that prefix patch is used/added
+ if use prefix; then
+ echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share\"" > "${T}"/50mimeinfo || die
+ doenvd "${T}"/50mimeinfo
+ fi
+}
+
+pkg_postinst() {
+ use prefix && export XDG_DATA_DIRS="${EPREFIX}"/usr/share
+ xdg_mimeinfo_database_update
+}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: x11-misc/shared-mime-info/files/, x11-misc/shared-mime-info/
@ 2024-02-06 3:31 Sam James
0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2024-02-06 3:31 UTC (permalink / raw
To: gentoo-commits
commit: 195e216792faf46cb927875cef75ad6870ac4baa
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 6 03:30:46 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Feb 6 03:30:54 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=195e2167
x11-misc/shared-mime-info: fix build w/ libxml2-2.12
Closes: https://bugs.gentoo.org/917561
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../files/shared-mime-info-2.4-libxml2.12.patch | 20 ++++++++++++++++++++
...nfo-2.4.ebuild => shared-mime-info-2.4-r1.ebuild} | 6 +++++-
2 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/x11-misc/shared-mime-info/files/shared-mime-info-2.4-libxml2.12.patch b/x11-misc/shared-mime-info/files/shared-mime-info-2.4-libxml2.12.patch
new file mode 100644
index 000000000000..22d2349053f5
--- /dev/null
+++ b/x11-misc/shared-mime-info/files/shared-mime-info-2.4-libxml2.12.patch
@@ -0,0 +1,20 @@
+https://bugs.gentoo.org/917561
+https://gitlab.freedesktop.org/xdg/shared-mime-info/-/issues/219
+https://gitlab.freedesktop.org/xdg/shared-mime-info/-/commit/c918fe77e255150938e83a6aec259f153d303573
+
+From c918fe77e255150938e83a6aec259f153d303573 Mon Sep 17 00:00:00 2001
+From: David Faure <faure@kde.org>
+Date: Sun, 19 Nov 2023 11:18:11 +0100
+Subject: [PATCH] Fix build with libxml2-2.12.0 and clang-17
+
+Fixes #219
+--- a/src/test-subclassing.c
++++ b/src/test-subclassing.c
+@@ -1,4 +1,5 @@
+ #include <libxml/tree.h>
++#include <libxml/parser.h>
+ #include <stdio.h>
+ #include <string.h>
+
+--
+GitLab
diff --git a/x11-misc/shared-mime-info/shared-mime-info-2.4.ebuild b/x11-misc/shared-mime-info/shared-mime-info-2.4-r1.ebuild
similarity index 96%
rename from x11-misc/shared-mime-info/shared-mime-info-2.4.ebuild
rename to x11-misc/shared-mime-info/shared-mime-info-2.4-r1.ebuild
index 82a520646c8e..75a1866ef66f 100644
--- a/x11-misc/shared-mime-info/shared-mime-info-2.4.ebuild
+++ b/x11-misc/shared-mime-info/shared-mime-info-2.4-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -33,6 +33,10 @@ DEPEND="${RDEPEND}"
DOCS=( HACKING.md NEWS README.md )
+PATCHES=(
+ "${FILESDIR}"/${P}-libxml2.12.patch
+)
+
src_prepare() {
default
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-02-06 3:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-21 23:39 [gentoo-commits] repo/gentoo:master commit in: x11-misc/shared-mime-info/files/, x11-misc/shared-mime-info/ Mike Gilbert
-- strict thread matches above, loose matches on Subject: below --
2024-02-06 3:31 Sam James
2023-10-19 13:12 Sam James
2020-06-15 20:06 Lars Wendler
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox