|
Panu Matilainen |
c14960 |
diff --git a/build/rpmfc.c b/build/rpmfc.c
|
|
Panu Matilainen |
c14960 |
index 1bb1c3b..4e57869 100644
|
|
Panu Matilainen |
c14960 |
--- a/build/rpmfc.c
|
|
Panu Matilainen |
c14960 |
+++ b/build/rpmfc.c
|
|
Panu Matilainen |
c14960 |
@@ -484,6 +484,7 @@ static const struct rpmfcTokens_s const rpmfcTokens[] = {
|
|
Panu Matilainen |
b60210 |
{ "RPM v4", RPMFC_ARCHIVE|RPMFC_INCLUDE },
|
|
Panu Matilainen |
b60210 |
|
|
Panu Matilainen |
b60210 |
{ " image", RPMFC_IMAGE|RPMFC_INCLUDE },
|
|
Panu Matilainen |
b60210 |
+ { " font metrics", RPMFC_WHITE|RPMFC_INCLUDE },
|
|
Panu Matilainen |
b60210 |
{ " font", RPMFC_FONT|RPMFC_INCLUDE },
|
|
Panu Matilainen |
b60210 |
{ " Font", RPMFC_FONT|RPMFC_INCLUDE },
|
|
Panu Matilainen |
b60210 |
|
|
Panu Matilainen |
c14960 |
@@ -496,19 +497,14 @@ static const struct rpmfcTokens_s const rpmfcTokens[] = {
|
|
Panu Matilainen |
c14960 |
{ "SGML", RPMFC_WHITE|RPMFC_INCLUDE },
|
|
Panu Matilainen |
c14960 |
{ "XML", RPMFC_WHITE|RPMFC_INCLUDE },
|
|
Panu Matilainen |
c14960 |
|
|
Panu Matilainen |
c14960 |
- { " program text", RPMFC_WHITE|RPMFC_INCLUDE },
|
|
Panu Matilainen |
c14960 |
{ " source", RPMFC_WHITE|RPMFC_INCLUDE },
|
|
Panu Matilainen |
c14960 |
{ "GLS_BINARY_LSB_FIRST", RPMFC_WHITE|RPMFC_INCLUDE },
|
|
Panu Matilainen |
c14960 |
{ " DB ", RPMFC_WHITE|RPMFC_INCLUDE },
|
|
Panu Matilainen |
c14960 |
|
|
Panu Matilainen |
c14960 |
- { "ASCII English text", RPMFC_WHITE|RPMFC_INCLUDE },
|
|
Panu Matilainen |
c14960 |
- { "ASCII text", RPMFC_WHITE|RPMFC_INCLUDE },
|
|
Panu Matilainen |
c14960 |
- { "ISO-8859 text", RPMFC_WHITE|RPMFC_INCLUDE },
|
|
Panu Matilainen |
c14960 |
-
|
|
Panu Matilainen |
c14960 |
{ "symbolic link to", RPMFC_SYMLINK|RPMFC_INCLUDE },
|
|
Panu Matilainen |
c14960 |
{ "socket", RPMFC_DEVICE },
|
|
Panu Matilainen |
c14960 |
{ "special", RPMFC_DEVICE },
|
|
Panu Matilainen |
c14960 |
- { " text", RPMFC_TEXT },
|
|
Panu Matilainen |
c14960 |
+ { " text", RPMFC_TEXT|RPMFC_INCLUDE },
|
|
Panu Matilainen |
c14960 |
|
|
Panu Matilainen |
c14960 |
{ "ASCII", RPMFC_WHITE },
|
|
Panu Matilainen |
c14960 |
{ "ISO-8859", RPMFC_WHITE },
|
|
Panu Matilainen |
c14960 |
@@ -1184,6 +1180,31 @@ exit:
|
|
Panu Matilainen |
b60210 |
#endif
|
|
Panu Matilainen |
b60210 |
}
|
|
Panu Matilainen |
b60210 |
|
|
Panu Matilainen |
b60210 |
+static int rpmfcMISC(rpmfc fc)
|
|
Panu Matilainen |
b60210 |
+{
|
|
Panu Matilainen |
b60210 |
+ struct stat st;
|
|
Panu Matilainen |
b60210 |
+ int rc = -1;
|
|
Panu Matilainen |
b60210 |
+ const char *what = NULL;
|
|
Panu Matilainen |
b60210 |
+ const char * fn = fc->fn[fc->ix];
|
|
Panu Matilainen |
b60210 |
+ /* this part is enumerated, compare equality not bit flags */
|
|
Panu Matilainen |
b60210 |
+ int ftype = fc->fcolor->vals[fc->ix] & 0x000F0000;
|
|
Panu Matilainen |
b60210 |
+
|
|
Panu Matilainen |
b60210 |
+ if (ftype == RPMFC_FONT) {
|
|
Panu Matilainen |
b60210 |
+ what = "fontconfig";
|
|
Panu Matilainen |
b60210 |
+ } else if (ftype == RPMFC_TEXT && rpmFileHasSuffix(fn, ".desktop")) {
|
|
Panu Matilainen |
b60210 |
+ what = "desktop";
|
|
Panu Matilainen |
b60210 |
+ }
|
|
Panu Matilainen |
b60210 |
+
|
|
Panu Matilainen |
b60210 |
+ if (what == NULL || stat(fn, &st) < 0 || !S_ISREG(st.st_mode)) {
|
|
Panu Matilainen |
b60210 |
+ goto exit;
|
|
Panu Matilainen |
b60210 |
+ }
|
|
Panu Matilainen |
b60210 |
+
|
|
Panu Matilainen |
b60210 |
+ (void) rpmfcHelper(fc, 'P', what);
|
|
Panu Matilainen |
b60210 |
+ rc = 0;
|
|
Panu Matilainen |
b60210 |
+
|
|
Panu Matilainen |
b60210 |
+exit:
|
|
Panu Matilainen |
b60210 |
+ return rc;
|
|
Panu Matilainen |
b60210 |
+}
|
|
Panu Matilainen |
b60210 |
typedef const struct rpmfcApplyTbl_s {
|
|
Panu Matilainen |
b60210 |
int (*func) (rpmfc fc);
|
|
Panu Matilainen |
b60210 |
int colormask;
|
|
Panu Matilainen |
c14960 |
@@ -1196,6 +1217,7 @@ static const struct rpmfcApplyTbl_s const rpmfcApplyTable[] = {
|
|
Panu Matilainen |
b60210 |
{ rpmfcSCRIPT, (RPMFC_SCRIPT|RPMFC_BOURNE|
|
|
Panu Matilainen |
b60210 |
RPMFC_PERL|RPMFC_PYTHON|RPMFC_MONO|
|
|
Panu Matilainen |
b60210 |
RPMFC_PKGCONFIG|RPMFC_LIBTOOL) },
|
|
Panu Matilainen |
b60210 |
+ { rpmfcMISC, RPMFC_FONT|RPMFC_TEXT },
|
|
Panu Matilainen |
b60210 |
{ rpmfcSYMLINK, RPMFC_SYMLINK },
|
|
Panu Matilainen |
b60210 |
{ NULL, 0 }
|
|
Panu Matilainen |
b60210 |
};
|
|
Panu Matilainen |
c14960 |
@@ -1315,7 +1337,7 @@ rpmRC rpmfcClassify(rpmfc fc, ARGV_t argv, rpm_mode_t * fmode)
|
|
Panu Matilainen |
b60210 |
size_t slen;
|
|
Panu Matilainen |
b60210 |
int fcolor;
|
|
Panu Matilainen |
b60210 |
int xx;
|
|
Panu Matilainen |
b60210 |
- int msflags = MAGIC_CHECK; /* XXX MAGIC_COMPRESS flag? */
|
|
Panu Matilainen |
c14960 |
+ int msflags = MAGIC_CHECK | MAGIC_COMPRESS | MAGIC_NO_CHECK_TOKENS;
|
|
Panu Matilainen |
b60210 |
magic_t ms = NULL;
|
|
Panu Matilainen |
b60210 |
|
|
Panu Matilainen |
b60210 |
if (fc == NULL || argv == NULL)
|
|
Panu Matilainen |
c14960 |
diff --git a/macros.in b/macros.in
|
|
Panu Matilainen |
c14960 |
index c187f62..945e89b 100644
|
|
Panu Matilainen |
c14960 |
--- a/macros.in
|
|
Panu Matilainen |
c14960 |
+++ b/macros.in
|
|
Panu Matilainen |
c14960 |
@@ -489,6 +489,9 @@ print (t)\
|
|
Panu Matilainen |
b60210 |
%__pkgconfig_provides %{_rpmconfigdir}/pkgconfigdeps.sh --provides
|
|
Panu Matilainen |
b60210 |
%__pkgconfig_requires %{_rpmconfigdir}/pkgconfigdeps.sh --requires
|
|
Panu Matilainen |
b60210 |
|
|
Panu Matilainen |
b60210 |
+%__fontconfig_provides %{_rpmconfigdir}/fontconfig.prov
|
|
Panu Matilainen |
b60210 |
+%__desktop_provides %{_rpmconfigdir}/desktop-file.prov
|
|
Panu Matilainen |
b60210 |
+
|
|
Panu Matilainen |
b60210 |
#==============================================================================
|
|
Panu Matilainen |
b60210 |
# ---- Database configuration macros.
|
|
Panu Matilainen |
b60210 |
# Macros used to configure Berkley db parameters.
|