]> git.pld-linux.org Git - packages/rpm.git/blame - rpm-mimetype.patch
- release 40 (by relup.sh)
[packages/rpm.git] / rpm-mimetype.patch
CommitLineData
f02308f2
MB
1diff -urN rpm-5.1.4/lib/rpmfc.c rpm-5.1.4.new/lib/rpmfc.c
2--- rpm-5.1.4/lib/rpmfc.c 2008-07-29 19:36:38.000000000 +0200
3+++ rpm-5.1.4.new/lib/rpmfc.c 2008-07-29 19:43:42.000000000 +0200
4@@ -527,6 +527,8 @@
835ea24d
MB
5 { "troff or preprocessor input", RPMFC_MANPAGE|RPMFC_INCLUDE },
6 { "GNU Info", RPMFC_MANPAGE|RPMFC_INCLUDE },
7
07050e78 8+ { "Desktop Entry", RPMFC_DESKTOP_FILE|RPMFC_INCLUDE },
835ea24d
MB
9+
10 { "perl script text", RPMFC_PERL|RPMFC_INCLUDE },
11 { "Perl5 module source text", RPMFC_PERL|RPMFC_MODULE|RPMFC_INCLUDE },
12
c50e9031
JR
13@@ -875,6 +877,9 @@
14 if (fc->fcolor->vals[fc->ix] & RPMFC_JAVA) {
15 xx = rpmfcHelper(fc, 'P', "java");
16 xx = rpmfcHelper(fc, 'R', "java");
835ea24d
MB
17+ } else
18+ if (fc->fcolor->vals[fc->ix] & RPMFC_DESKTOP_FILE) {
c50e9031 19+ xx = rpmfcHelper(fc, 'P', "mimetype");
835ea24d
MB
20 }
21
c50e9031 22 /*@-observertrans@*/
f02308f2 23@@ -957,7 +963,7 @@
835ea24d
MB
24 /*@unchecked@*/
25 static struct rpmfcApplyTbl_s rpmfcApplyTable[] = {
26 { rpmfcELF, RPMFC_ELF },
c50e9031
JR
27- { rpmfcSCRIPT, (RPMFC_SCRIPT|RPMFC_FONT|RPMFC_HASKELL|RPMFC_PERL|RPMFC_PYTHON|RPMFC_LIBTOOL|RPMFC_PKGCONFIG|RPMFC_BOURNE|RPMFC_JAVA|RPMFC_PHP|RPMFC_MONO|RPMFC_TYPELIB) },
28+ { rpmfcSCRIPT, (RPMFC_SCRIPT|RPMFC_FONT|RPMFC_HASKELL|RPMFC_PERL|RPMFC_PYTHON|RPMFC_LIBTOOL|RPMFC_PKGCONFIG|RPMFC_BOURNE|RPMFC_JAVA|RPMFC_PHP|RPMFC_MONO|RPMFC_TYPELIB|RPMFC_DESKTOP_FILE) },
29 #if defined(RPM_VENDOR_MANDRIVA)
30 { rpmfcSYMLINK, RPMFC_SYMLINK },
31 #endif
f02308f2 32@@ -1311,6 +1317,9 @@
835ea24d
MB
33 else if (_suffix(s, ".php"))
34 ftype = "PHP script text";
35
835ea24d
MB
36+ else if (_suffix(s, ".desktop"))
37+ ftype = "Desktop Entry";
38+
c50e9031
JR
39 /* XXX files with extension ".typelib" are GNOME typelib for now. */
40 else if (_suffix(s, ".typelib"))
41 ftype = "G-IR binary database";
f02308f2
MB
42diff -urN rpm-5.1.4/lib/rpmfc.h rpm-5.1.4.new/lib/rpmfc.h
43--- rpm-5.1.4/lib/rpmfc.h 2008-07-29 19:36:38.000000000 +0200
44+++ rpm-5.1.4.new/lib/rpmfc.h 2008-07-29 19:44:27.000000000 +0200
c50e9031 45@@ -28,7 +28,7 @@
f02308f2
MB
46 #define RPMFC_ELF (RPMFC_ELF32|RPMFC_ELF64|RPMFC_ELFMIPSN32)
47 /* (1 << 3) leaks into package headers, reserved */
835ea24d 48
c50e9031
JR
49- /* bit 4 unused */
50+ RPMFC_DESKTOP_FILE = (1 << 4),
51 RPMFC_TYPELIB = (1 << 5),
52 RPMFC_HASKELL = (1 << 6),
53 RPMFC_RUBY = (1 << 7),
54diff -urN rpm-5.1.4/macros/macros.in rpm-5.1.4.new/macros/macros.in
55--- rpm-5.1.4/macros/macros.in 2008-07-29 19:36:38.000000000 +0200
56+++ rpm-5.1.4.new/macros/macros.in 2008-07-29 19:45:45.000000000 +0200
f02308f2 57@@ -1617,6 +1617,16 @@
c50e9031 58 #}1}%{rpm_license_check}
835ea24d 59
f02308f2 60 #------------------------------------------------------------------------
835ea24d
MB
61+# mimetype(...) configuration.
62+#
63+# Path to script to autogenerate mimetype(foo) provides, based on MimeType
64+# key from desktop files.
65+#
66+# Note: Used if _use_internal_dependency_generator is non-zero. The
67+# helper is also used by %{_uselibrpm}/rpmdeps --provides
68+%__mimetype_provides %{_usrlibrpm}/mimetypedeps.sh --provides
69+
f02308f2
MB
70+#------------------------------------------------------------------------
71 # executable(...) configuration.
72 #
73 # Path to scripts to autogenerate executable(foo) script dependencies,
This page took 0.047751 seconds and 4 git commands to generate.