diff --git a/0001-Remove-sub-classing-from-OO.o-mime-types.patch b/0001-Remove-sub-classing-from-OO.o-mime-types.patch new file mode 100644 index 0000000000000000000000000000000000000000..b46b0cd00cd82866559cee4ebd624d6f34b0937b --- /dev/null +++ b/0001-Remove-sub-classing-from-OO.o-mime-types.patch @@ -0,0 +1,265 @@ +From da0e63ccd86ead63e6b29828286897fb1236eb81 Mon Sep 17 00:00:00 2001 +From: Bastien Nocera +Date: Thu, 25 Aug 2011 10:54:47 +0100 +Subject: [PATCH] Remove sub-classing from OO.o mime-types + +https://bugs.freedesktop.org/show_bug.cgi?id=40354 +--- + data/freedesktop.org.xml.in | 31 ------------------------------- + 1 file changed, 31 deletions(-) + +diff --git a/data/freedesktop.org.xml.in b/data/freedesktop.org.xml.in +index 8020b13..00e8d90 100644 +--- a/data/freedesktop.org.xml.in ++++ b/data/freedesktop.org.xml.in +@@ -941,7 +941,6 @@ command to generate the output files. + + + LibreOffice Calc spreadsheet +- + + + +@@ -954,7 +953,6 @@ command to generate the output files. + + + LibreOffice Calc template +- + + + +@@ -967,7 +965,6 @@ command to generate the output files. + + + LibreOffice Draw drawing +- + + + +@@ -980,7 +977,6 @@ command to generate the output files. + + + LibreOffice Draw template +- + + + +@@ -993,7 +989,6 @@ command to generate the output files. + + + LibreOffice Impress presentation +- + + + +@@ -1006,7 +1001,6 @@ command to generate the output files. + + + LibreOffice Impress template +- + + + +@@ -1019,7 +1013,6 @@ command to generate the output files. + + + LibreOffice Math formula +- + + + +@@ -1032,7 +1025,6 @@ command to generate the output files. + + + LibreOffice Writer document +- + + + +@@ -1045,7 +1037,6 @@ command to generate the output files. + + + LibreOffice Writer global document +- + + + +@@ -1058,7 +1049,6 @@ command to generate the output files. + + + LibreOffice Writer template +- + + + +@@ -1073,7 +1063,6 @@ command to generate the output files. + ODT document + ODT + OpenDocument Text +- + + + +@@ -1088,7 +1077,6 @@ command to generate the output files. + ODT document (Flat XML) + FODT + OpenDocument Text (Flat XML) +- + + + +@@ -1096,7 +1084,6 @@ command to generate the output files. + ODT template + ODT + OpenDocument Text +- + + + +@@ -1111,7 +1098,6 @@ command to generate the output files. + OTH template + OTH + OpenDocument HTML +- + + + +@@ -1126,7 +1112,6 @@ command to generate the output files. + ODM document + ODM + OpenDocument Master +- + + + +@@ -1141,7 +1126,6 @@ command to generate the output files. + ODG drawing + ODG + OpenDocument Drawing +- + + + +@@ -1156,7 +1140,6 @@ command to generate the output files. + ODG drawing (Flat XML) + FODG + OpenDocument Drawing (Flat XML) +- + + + +@@ -1164,7 +1147,6 @@ command to generate the output files. + ODG template + ODG + OpenDocument Drawing +- + + + +@@ -1179,7 +1161,6 @@ command to generate the output files. + ODP presentation + ODP + OpenDocument Presentation +- + + + +@@ -1194,7 +1175,6 @@ command to generate the output files. + ODP presentation (Flat XML) + FODP + OpenDocument Presentation (Flat XML) +- + + + +@@ -1202,7 +1182,6 @@ command to generate the output files. + ODP template + ODP + OpenDocument Presentation +- + + + +@@ -1217,7 +1196,6 @@ command to generate the output files. + ODS spreadsheet + ODS + OpenDocument Spreadsheet +- + + + +@@ -1232,7 +1210,6 @@ command to generate the output files. + ODS spreadsheet (Flat XML) + FODS + OpenDocument Spreadsheet (Flat XML) +- + + + +@@ -1240,7 +1217,6 @@ command to generate the output files. + ODS template + ODS + OpenDocument Spreadsheet +- + + + +@@ -1255,7 +1231,6 @@ command to generate the output files. + ODC chart + ODC + OpenDocument Chart +- + + + +@@ -1270,7 +1245,6 @@ command to generate the output files. + ODC template + ODC + OpenDocument Chart +- + + + +@@ -1285,7 +1259,6 @@ command to generate the output files. + ODF formula + ODF + OpenDocument Formula +- + + + +@@ -1300,7 +1273,6 @@ command to generate the output files. + ODF template + ODF + OpenDocument Formula +- + + + +@@ -1315,7 +1287,6 @@ command to generate the output files. + ODB database + ODB + OpenDocument Database +- + + + +@@ -1331,7 +1302,6 @@ command to generate the output files. + ODI image + ODI + OpenDocument Image +- + + + +@@ -1344,7 +1314,6 @@ command to generate the output files. + + + OpenOffice.org extension +- + + + +-- +2.41.0 + diff --git a/0002-Fix-build-with-libxml2-2.12.0.patch b/0002-Fix-build-with-libxml2-2.12.0.patch new file mode 100644 index 0000000000000000000000000000000000000000..530805e810034a4f56075ce840959bb3b34cf0f7 --- /dev/null +++ b/0002-Fix-build-with-libxml2-2.12.0.patch @@ -0,0 +1,23 @@ +From c918fe77e255150938e83a6aec259f153d303573 Mon Sep 17 00:00:00 2001 +From: David Faure +Date: Sun, 19 Nov 2023 11:18:11 +0100 +Subject: [PATCH] Fix build with libxml2-2.12.0 and clang-17 + +Fixes #219 +--- + src/test-subclassing.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/test-subclassing.c b/src/test-subclassing.c +index dd099e44..0758164f 100644 +--- a/src/test-subclassing.c ++++ b/src/test-subclassing.c +@@ -1,4 +1,5 @@ + #include ++#include + #include + #include + +-- +GitLab + diff --git a/mimeapps.list b/mimeapps.list index 4a1f2bf3f2242e02831a4df1ec62140c479639c0..9d69ac8752b2d1e2f8495a1da2b01118aff1f9b6 100644 --- a/mimeapps.list +++ b/mimeapps.list @@ -59,8 +59,8 @@ application/x-catalog=gpk-install-catalog.desktop application/x-rpm=gpk-install-local-file.desktop text/csv=libreoffice-calc.desktop text/plain=org.gnome.gedit.desktop -text/html=firefox.desktop -application/xhtml+xml=firefox.desktop +text/html=org.mozilla.firefox.desktop +application/xhtml+xml=org.mozilla.firefox.desktop inode/directory=org.gnome.Nautilus.desktop x-content/blank-cd=brasero-nautilus.desktop x-content/blank-dvd=brasero-nautilus.desktop @@ -73,8 +73,8 @@ x-content/image-dcf=shotwell.desktop x-content/image-picturecd=shotwell.desktop # URI scheme handlers x-scheme-handler/mailto=evolution.desktop -x-scheme-handler/http=firefox.desktop -x-scheme-handler/https=firefox.desktop +x-scheme-handler/http=org.mozilla.firefox.desktop +x-scheme-handler/https=org.mozilla.firefox.desktop application/mxf=org.gnome.Totem.desktop; application/ogg=org.gnome.Rhythmbox3.desktop;rhythmbox.desktop;org.gnome.Totem.desktop; application/ram=org.gnome.Totem.desktop; diff --git a/shared-mime-info-2.1-CFLAGS.patch b/shared-mime-info-2.1-CFLAGS.patch new file mode 100644 index 0000000000000000000000000000000000000000..d11ab5a0868f0ac14b8d31f1bd4e9fc4cf220969 --- /dev/null +++ b/shared-mime-info-2.1-CFLAGS.patch @@ -0,0 +1,13 @@ +diff -up shared-mime-info-2.1/xdgmime/Makefile.CFLAGS shared-mime-info-2.1/xdgmime/Makefile +diff -up shared-mime-info-2.1/xdgmime/src/Makefile.CFLAGS shared-mime-info-2.1/xdgmime/src/Makefile +--- shared-mime-info-2.1/xdgmime/src/Makefile.CFLAGS 2020-12-30 03:24:55.000000000 -0600 ++++ shared-mime-info-2.1/xdgmime/src/Makefile 2022-02-02 09:37:38.529264264 -0600 +@@ -2,7 +2,7 @@ + .PHONY: all clean + + C_STD = -std=c99 -D_POSIX_C_SOURCE=200809L +-ALL_CFLAGS = $(C_STD) -c -g -DXDG_PREFIX=xdg_test -DHAVE_MMAP -Wall -Wmissing-prototypes -Wno-sign-compare $(CFLAGS) ++ALL_CFLAGS = $(C_STD) -c -g -DXDG_PREFIX=xdg_test -DHAVE_MMAP $(RPM_OPT_FLAGS) -Wall -Wmissing-prototypes -Wno-sign-compare $(CFLAGS) + + .c.o: + $(CC) $(ALL_CFLAGS) -o $@ $< diff --git a/shared-mime-info.spec b/shared-mime-info.spec index 936b8c4432af46455ad96949272b6c8416b6597c..56db24f4a7b9f954634d56a07a718d8e0af3175b 100644 --- a/shared-mime-info.spec +++ b/shared-mime-info.spec @@ -1,14 +1,18 @@ -%define anolis_release 1 +%define anolis_release 2 Summary: Shared MIME information database Name: shared-mime-info -Version: 2.3 +Version: 2.3 Release: %{anolis_release}%{?dist} License: GPLv2+ URL: http://freedesktop.org/Software/shared-mime-info -Source0: https://gitlab.freedesktop.org/xdg/shared-mime-info/-/archive/%{version}/shared-mime-info-%{version}.tar.bz2 +Source0: https://gitlab.freedesktop.org/xdg/shared-mime-info/-/archive/2.3/shared-mime-info-2.3.tar.bz2 +Source1: mimeapps.list +Source6: https://gitlab.freedesktop.org/xdg/xdgmime/-/archive/179296748e92bd91bf531656632a1056307fb7b7/xdgmime-179296748e92bd91bf531656632a1056307fb7b7.tar.bz2 +Source7: shared-mime-info-2.1-CFLAGS.patch -Source1: mimeapps.list +Patch1: 0002-Fix-build-with-libxml2-2.12.0.patch +Patch2: 0001-Remove-sub-classing-from-OO.o-mime-types.patch BuildRequires: gcc @@ -20,6 +24,7 @@ BuildRequires: itstool BuildRequires: make BuildRequires: meson BuildRequires: git-core +BuildRequires: gcc-c++ # Disable pkgconfig autodep %global __requires_exclude ^/usr/bin/pkg-config$ @@ -93,6 +98,8 @@ update-mime-database -n %{_datadir}/mime &> /dev/null ||: %doc README.md NEWS %changelog +* Fri Sep 12 2025 wenyuzifangtest001 - 2.3-2 +- Apply patch to fix build failures with libxml2-2.12.0 and Clang 17. * Tue Feb 18 2025 Chang Gao - 2.3-1 - Update to 2.3 diff --git a/xdgmime-179296748e92bd91bf531656632a1056307fb7b7.tar.bz2 b/xdgmime-179296748e92bd91bf531656632a1056307fb7b7.tar.bz2 new file mode 100644 index 0000000000000000000000000000000000000000..fe3f5792f145045953924148a5d3c66668ae9514 Binary files /dev/null and b/xdgmime-179296748e92bd91bf531656632a1056307fb7b7.tar.bz2 differ