]> git.pld-linux.org Git - packages/rpm.git/blame - rpm-mimetype.patch
- revert to python solution in %__spec_install_post_chrpath, readlink causes
[packages/rpm.git] / rpm-mimetype.patch
CommitLineData
835ea24d
MB
1--- rpm-4.4.9/lib/rpmfc.c 2008-05-06 16:27:09.000000000 +0200
2+++ rpm-4.4.9.new/lib/rpmfc.c 2008-05-06 16:33:48.000000000 +0200
3@@ -531,6 +531,8 @@
4 { "troff or preprocessor input", RPMFC_MANPAGE|RPMFC_INCLUDE },
5 { "GNU Info", RPMFC_MANPAGE|RPMFC_INCLUDE },
6
07050e78 7+ { "Desktop Entry", RPMFC_DESKTOP_FILE|RPMFC_INCLUDE },
835ea24d
MB
8+
9 { "perl script text", RPMFC_PERL|RPMFC_INCLUDE },
10 { "Perl5 module source text", RPMFC_PERL|RPMFC_MODULE|RPMFC_INCLUDE },
11
12@@ -872,6 +874,10 @@
13 xx = rpmfcHelper(fc, 'P', "java", fc->noautoprov, fc->noautoprov_c);
14 if (fc->findreq)
15 xx = rpmfcHelper(fc, 'R', "java", fc->noautoreq, fc->noautoreq_c);
16+ } else
17+ if (fc->fcolor->vals[fc->ix] & RPMFC_DESKTOP_FILE) {
18+ if (fc->findprov)
19+ xx = rpmfcHelper(fc, 'P', "mimetype", fc->noautoprov, fc->noautoprov_c);
20 }
21
22 return 0;
23@@ -984,7 +990,7 @@
24 /*@unchecked@*/
25 static struct rpmfcApplyTbl_s rpmfcApplyTable[] = {
26 { rpmfcELF, RPMFC_ELF },
27- { rpmfcSCRIPT, (RPMFC_SCRIPT|RPMFC_PERL|RPMFC_PYTHON|RPMFC_LIBTOOL|RPMFC_PKGCONFIG|RPMFC_BOURNE|RPMFC_JAVA|RPMFC_PHP) },
28+ { rpmfcSCRIPT, (RPMFC_SCRIPT|RPMFC_PERL|RPMFC_PYTHON|RPMFC_LIBTOOL|RPMFC_PKGCONFIG|RPMFC_BOURNE|RPMFC_JAVA|RPMFC_PHP|RPMFC_DESKTOP_FILE) },
29 { rpmfcMONO, RPMFC_MONO },
30 { NULL, 0 }
31 };
32@@ -1350,6 +1356,10 @@
33 else if (_suffix(s, ".php"))
34 ftype = "PHP script text";
35
36+ /* XXX all files with extension ".desktop" are desktop files for now. */
37+ else if (_suffix(s, ".desktop"))
38+ ftype = "Desktop Entry";
39+
40 /* XXX skip all files in /dev/ which are (or should be) %dev dummies. */
41 else if (slen >= fc->brlen+sizeof("/dev/") && !strncmp(s+fc->brlen, "/dev/", sizeof("/dev/")-1))
42 ftype = "";
835ea24d
MB
43--- rpm-4.4.9/lib/rpmfc.h 2008-05-06 16:27:09.000000000 +0200
44+++ rpm-4.4.9.new/lib/rpmfc.h 2008-05-06 16:28:44.000000000 +0200
45@@ -53,6 +53,7 @@
46 RPMFC_FONT = (1 << 21),
47 RPMFC_IMAGE = (1 << 22),
48 RPMFC_MANPAGE = (1 << 23),
49+ RPMFC_DESKTOP_FILE = (1 << 11),
50
51 RPMFC_PERL = (1 << 24),
52 RPMFC_JAVA = (1 << 25),
835ea24d
MB
53--- rpm-4.4.9/macros.in 2008-05-06 16:27:09.000000000 +0200
54+++ rpm-4.4.9.new/macros.in 2008-05-06 16:24:15.000000000 +0200
55@@ -1461,6 +1461,16 @@
56 #%__executable_requires %{_usrlibrpm}/executabledeps.sh --requires
57 #%__scriptlet_requires /bin/bash --rpm-requires
58
59+#------------------------------------------------------------------------
60+# mimetype(...) configuration.
61+#
62+# Path to script to autogenerate mimetype(foo) provides, based on MimeType
63+# key from desktop files.
64+#
65+# Note: Used if _use_internal_dependency_generator is non-zero. The
66+# helper is also used by %{_uselibrpm}/rpmdeps --provides
67+%__mimetype_provides %{_usrlibrpm}/mimetypedeps.sh --provides
68+
69 # PLD rpm macros
70 %_enable_debug_packages 1
71
This page took 0.086491 seconds and 4 git commands to generate.