From 46595ddc094d59add5a20ed8280e4937e5b5dc26 Mon Sep 17 00:00:00 2001 From: "W. Michael Petullo" Date: Tue, 20 Jun 2023 08:53:34 -0500 Subject: [PATCH] shared-mime-info: update to 2.2 Signed-off-by: W. Michael Petullo (cherry picked from commit 4f608bb99852c96772dee55f0cb2ddbc17f2fd76) --- utils/shared-mime-info/Makefile | 6 +- .../patches/001-no-xmllint.patch | 11 +++ .../001-shared-mime-info-2.1-fix-build.patch | 75 ------------------- .../002-shared-mime-info-2.1-no-xmlto.patch | 33 -------- 4 files changed, 15 insertions(+), 110 deletions(-) create mode 100644 utils/shared-mime-info/patches/001-no-xmllint.patch delete mode 100644 utils/shared-mime-info/patches/001-shared-mime-info-2.1-fix-build.patch delete mode 100644 utils/shared-mime-info/patches/002-shared-mime-info-2.1-no-xmlto.patch diff --git a/utils/shared-mime-info/Makefile b/utils/shared-mime-info/Makefile index 9199625113..b1b7a8a918 100644 --- a/utils/shared-mime-info/Makefile +++ b/utils/shared-mime-info/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=shared-mime-info -PKG_VERSION:=2.1 +PKG_VERSION:=2.2 PKG_RELEASE:=2 PKG_MAINTAINER:=W. Michael Petullo @@ -16,7 +16,9 @@ PKG_LICENSE_FILES:=COPYING PKG_SOURCE:=shared-mime-info-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://gitlab.freedesktop.org/xdg/$(PKG_NAME)/-/archive/$(PKG_VERSION) -PKG_HASH:=37df6475da31a8b5fc63a54ba0770a3eefa0a708b778cb6366dccee96393cb60 +PKG_HASH:=418c480019d9865f67f922dfb88de00e9f38bf971205d55cdffab50432919e61 + +PKG_BUILD_DEPENDS:=gettext-full/host include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/nls.mk diff --git a/utils/shared-mime-info/patches/001-no-xmllint.patch b/utils/shared-mime-info/patches/001-no-xmllint.patch new file mode 100644 index 0000000000..f5200bab8a --- /dev/null +++ b/utils/shared-mime-info/patches/001-no-xmllint.patch @@ -0,0 +1,11 @@ +--- a/meson.build ++++ b/meson.build +@@ -20,7 +20,7 @@ config.set_quoted('VERSION', meson.proje + ############################################################################### + # Find tools + +-xmllint = find_program('xmllint') ++xmllint = find_program('xmllint', required: false) + xmlto = find_program('xmlto', required: false) + + ############################################################################### diff --git a/utils/shared-mime-info/patches/001-shared-mime-info-2.1-fix-build.patch b/utils/shared-mime-info/patches/001-shared-mime-info-2.1-fix-build.patch deleted file mode 100644 index 38479a3a5e..0000000000 --- a/utils/shared-mime-info/patches/001-shared-mime-info-2.1-fix-build.patch +++ /dev/null @@ -1,75 +0,0 @@ -From 5a406b06792e26a83c7346b3c2443c0bd8d4cdb2 Mon Sep 17 00:00:00 2001 -From: Eli Schwartz -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 - ---- 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', - ) ---- a/meson.build -+++ b/meson.build -@@ -20,7 +20,6 @@ config.set_quoted('VERSION', meson.proje - ############################################################################### - # Find tools - --itstool = find_program('itstool') - xmllint = find_program('xmllint') - xmlto = find_program('xmlto') - diff --git a/utils/shared-mime-info/patches/002-shared-mime-info-2.1-no-xmlto.patch b/utils/shared-mime-info/patches/002-shared-mime-info-2.1-no-xmlto.patch deleted file mode 100644 index 59e6f037ab..0000000000 --- a/utils/shared-mime-info/patches/002-shared-mime-info-2.1-no-xmlto.patch +++ /dev/null @@ -1,33 +0,0 @@ ---- a/data/meson.build -+++ b/data/meson.build -@@ -15,15 +15,3 @@ install_data( - [ 'its/shared-mime-info.loc', 'its/shared-mime-info.its', ], - install_dir : get_option('datadir') / 'gettext/its' - ) -- --custom_target('shared-mime-info-spec-html', -- input : 'shared-mime-info-spec.xml', -- output: 'shared-mime-info-spec-html', -- command: [ -- xmlto, -- '-o', '@OUTPUT@', -- 'html-nochunks', -- '@INPUT@', -- ], -- build_by_default: true, --) ---- a/meson.build -+++ b/meson.build -@@ -18,12 +18,6 @@ config.set_quoted('PACKAGE', meson.proje - config.set_quoted('VERSION', meson.project_version()) - - ############################################################################### --# Find tools -- --xmllint = find_program('xmllint') --xmlto = find_program('xmlto') -- --############################################################################### - # Find xdgmime - - xdgmime = get_option('xdgmime-path') / 'src' -- 2.30.2