rpm/rpm-4.6.0-extra-provides.patch
Panu Matilainen cef0937683 - update to 4.6.0 final
- revert libmagic looking into compressed files for now, breaks ooffice
    build
2009-02-06 13:55:13 +00:00

84 lines
2.8 KiB
Diff

diff -up rpm-4.6.0-rc4/build/rpmfc.c.extra-prov rpm-4.6.0-rc4/build/rpmfc.c
--- rpm-4.6.0-rc4/build/rpmfc.c.extra-prov 2009-02-04 15:18:05.000000000 +0200
+++ rpm-4.6.0-rc4/build/rpmfc.c 2009-02-04 15:20:46.000000000 +0200
@@ -485,6 +485,7 @@ static const struct rpmfcTokens_s const
{ "RPM v4", RPMFC_ARCHIVE|RPMFC_INCLUDE },
{ " image", RPMFC_IMAGE|RPMFC_INCLUDE },
+ { " font metrics", RPMFC_WHITE|RPMFC_INCLUDE },
{ " font", RPMFC_FONT|RPMFC_INCLUDE },
{ " Font", RPMFC_FONT|RPMFC_INCLUDE },
@@ -1189,6 +1190,31 @@ exit:
#endif
}
+static int rpmfcMISC(rpmfc fc)
+{
+ struct stat st;
+ int rc = -1;
+ const char *what = NULL;
+ const char * fn = fc->fn[fc->ix];
+ /* this part is enumerated, compare equality not bit flags */
+ int ftype = fc->fcolor->vals[fc->ix] & 0x000F0000;
+
+ if (ftype == RPMFC_FONT) {
+ what = "fontconfig";
+ } else if (ftype == RPMFC_TEXT && rpmFileHasSuffix(fn, ".desktop")) {
+ what = "desktop";
+ }
+
+ if (what == NULL || stat(fn, &st) < 0 || !S_ISREG(st.st_mode)) {
+ goto exit;
+ }
+
+ (void) rpmfcHelper(fc, 'P', what);
+ rc = 0;
+
+exit:
+ return rc;
+}
typedef const struct rpmfcApplyTbl_s {
int (*func) (rpmfc fc);
int colormask;
@@ -1198,12 +1224,11 @@ typedef const struct rpmfcApplyTbl_s {
*/
static const struct rpmfcApplyTbl_s const rpmfcApplyTable[] = {
{ rpmfcELF, RPMFC_ELF },
- { rpmfcSCRIPT, (RPMFC_SCRIPT|RPMFC_PERL) },
- { rpmfcSCRIPT, (RPMFC_SCRIPT|RPMFC_PYTHON) },
- { rpmfcSCRIPT, (RPMFC_SCRIPT|RPMFC_PKGCONFIG) },
- { rpmfcSCRIPT, (RPMFC_SCRIPT|RPMFC_LIBTOOL) },
- { rpmfcSCRIPT, RPMFC_MONO },
- { rpmfcSYMLINK, RPMFC_SYMLINK },
+ { rpmfcSCRIPT, (RPMFC_SCRIPT|RPMFC_BOURNE|
+ RPMFC_PERL|RPMFC_PYTHON|RPMFC_MONO|
+ RPMFC_PKGCONFIG|RPMFC_LIBTOOL) },
+ { rpmfcMISC, RPMFC_FONT|RPMFC_TEXT },
+ { rpmfcSYMLINK, RPMFC_SYMLINK },
{ NULL, 0 }
};
@@ -1322,7 +1347,7 @@ rpmRC rpmfcClassify(rpmfc fc, ARGV_t arg
size_t slen;
int fcolor;
int xx;
- int msflags = MAGIC_CHECK; /* XXX MAGIC_COMPRESS flag? */
+ int msflags = MAGIC_CHECK; /* add MAGIC_COMPRESS eventually */
magic_t ms = NULL;
if (fc == NULL || argv == NULL)
diff -up rpm-4.6.0-rc4/macros.in.extra-prov rpm-4.6.0-rc4/macros.in
--- rpm-4.6.0-rc4/macros.in.extra-prov 2009-02-04 15:18:05.000000000 +0200
+++ rpm-4.6.0-rc4/macros.in 2009-02-04 15:18:05.000000000 +0200
@@ -463,6 +463,9 @@ print (t)\
%__pkgconfig_provides @RPMCONFIGDIR@/pkgconfigdeps.sh --provides
%__pkgconfig_requires @RPMCONFIGDIR@/pkgconfigdeps.sh --requires
+%__fontconfig_provides /usr/lib/rpm/fontconfig.prov
+%__desktop_provides /usr/lib/rpm/desktop-file.prov
+
#==============================================================================
# ---- Database configuration macros.
# Macros used to configure Berkley db parameters.