]> git.pld-linux.org Git - packages/rpm.git/blob - rpm-mimetype.patch
- rel 51; fix -Werror=trampolines option
[packages/rpm.git] / rpm-mimetype.patch
1 diff -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 @@
5    { "troff or preprocessor input",     RPMFC_MANPAGE|RPMFC_INCLUDE },
6    { "GNU Info",                        RPMFC_MANPAGE|RPMFC_INCLUDE },
7  
8 +  { "Desktop Entry",           RPMFC_DESKTOP_FILE|RPMFC_INCLUDE },
9 +
10    { "perl script text",                RPMFC_PERL|RPMFC_INCLUDE },
11    { "Perl5 module source text", RPMFC_PERL|RPMFC_MODULE|RPMFC_INCLUDE },
12  
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");
17 +    } else
18 +    if (fc->fcolor->vals[fc->ix] & RPMFC_DESKTOP_FILE) {
19 +       xx = rpmfcHelper(fc, 'P', "mimetype");
20      }
21  
22  /*@-observertrans@*/
23 @@ -957,7 +963,7 @@
24  /*@unchecked@*/
25  static struct rpmfcApplyTbl_s rpmfcApplyTable[] = {
26      { rpmfcELF,                RPMFC_ELF },
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
32 @@ -1311,6 +1317,9 @@
33             else if (_suffix(s, ".php"))
34                 ftype = "PHP script text";
35  
36 +           else if (_suffix(s, ".desktop"))
37 +               ftype = "Desktop Entry";
38 +
39             /* XXX files with extension ".typelib" are GNOME typelib for now. */
40             else if (_suffix(s, ".typelib"))
41                 ftype = "G-IR binary database";
42 diff -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
45 @@ -28,7 +28,7 @@
46  #define        RPMFC_ELF       (RPMFC_ELF32|RPMFC_ELF64|RPMFC_ELFMIPSN32)
47         /* (1 << 3) leaks into package headers, reserved */
48  
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),
54 diff -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
57 @@ -1617,6 +1617,16 @@
58  #}1}%{rpm_license_check}
59  
60  #------------------------------------------------------------------------
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 +
70 +#------------------------------------------------------------------------
71  # executable(...) configuration.
72  #
73  # Path to scripts to autogenerate executable(foo) script dependencies,
This page took 0.026798 seconds and 3 git commands to generate.