]> git.pld-linux.org Git - packages/rpm.git/blob - rpm-mono.patch
537903125f70bd528aee3217697e6701f7cbaecc
[packages/rpm.git] / rpm-mono.patch
1 --- rpm-4.4.8/lib/rpmfc.c.orig  2005-11-19 01:11:00.884392480 +0100
2 +++ rpm-4.4.8/lib/rpmfc.c       2005-11-19 01:13:08.489993480 +0100
3 @@ -539,6 +539,10 @@
4  
5    { "Java ",                   RPMFC_JAVA|RPMFC_INCLUDE },
6  
7 +  /* .NET executables and libraries. file(1) cannot differ it from native win32 executables unfortunatelly */
8 +  { "PE executable",           RPMFC_MONO|RPMFC_INCLUDE },
9 +  { "executable PE",           RPMFC_MONO|RPMFC_INCLUDE },
10 +
11    { "current ar archive",      RPMFC_STATIC|RPMFC_LIBRARY|RPMFC_ARCHIVE|RPMFC_INCLUDE },
12  
13    { "Zip archive data",                RPMFC_COMPRESSED|RPMFC_ARCHIVE|RPMFC_INCLUDE },
14 @@ -900,6 +904,35 @@
15  }
16  
17  /**
18 + * Extract .NET dependencies.
19 + * @param fc           file classifier
20 + * @return             0 on success
21 + */
22 +static int rpmfcMONO(rpmfc fc)
23 +       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
24 +       /*@modifies fc, rpmGlobalMacroContext, fileSystem, internalState @*/
25 +{
26 +    const char * fn = fc->fn[fc->ix];
27 +    FILE * fp;
28 +    int xx;
29 +
30 +    fp = fopen(fn, "r");
31 +    if (fp == NULL || ferror(fp)) {
32 +       if (fp) (void) fclose(fp);
33 +       return -1;
34 +    }
35 +
36 +    (void) fclose(fp);
37 +
38 +    if (fc->findprov)
39 +       xx = rpmfcHelper(fc, 'P', "mono", fc->noautoprov, fc->noautoprov_c);
40 +    if (fc->findreq)
41 +       xx = rpmfcHelper(fc, 'R', "mono", fc->noautoreq, fc->noautoreq_c);
42 +
43 +    return 0;
44 +}
45 +
46 +/**
47   * Extract Elf dependencies.
48   * @param fc           file classifier
49   * @return             0 on success
50 @@ -931,6 +963,7 @@
51  static struct rpmfcApplyTbl_s rpmfcApplyTable[] = {
52      { rpmfcELF,                RPMFC_ELF },
53      { rpmfcSCRIPT,     (RPMFC_SCRIPT|RPMFC_PERL|RPMFC_PYTHON|RPMFC_LIBTOOL|RPMFC_PKGCONFIG|RPMFC_BOURNE|RPMFC_JAVA|RPMFC_PHP) },
54 +    { rpmfcMONO,       RPMFC_MONO },
55      { NULL, 0 }
56  };
57  
58 --- rpm-4.4.8./lib/rpmfc.h      2005-08-11 13:11:54.000000000 +0200
59 +++ rpm-4.4.8/lib/rpmfc.h       2005-08-11 14:10:33.000000000 +0200
60 @@ -78,6 +78,7 @@
61      RPMFC_PYTHON               = (1 << 26),
62      RPMFC_PHP                  = (1 << 27),
63      RPMFC_TCL                  = (1 << 28),
64 +    RPMFC_MONO                 = (1 <<  6),
65  
66      RPMFC_WHITE                        = (1 << 29),
67      RPMFC_INCLUDE              = (1 << 30),
68 diff -ruN rpm-4.4.2./macros.in rpm-4.4.2/macros.in
69 --- rpm-4.4.2./macros.in        2005-08-11 13:11:54.000000000 +0200
70 +++ rpm-4.4.2/macros.in 2005-08-11 17:20:46.276790376 +0200
71 @@ -443,6 +443,9 @@
72  %__python_provides     @RPMCONFIGDIR@/pythondeps.sh --provides
73  %__python_requires     @RPMCONFIGDIR@/pythondeps.sh --requires
74  
75 +%__mono_provides       %{nil}
76 +%__mono_requires       %{nil}
77 +
78  #
79  # fixowner, fixgroup, and fixperms are run at the end of hardcoded setup
80  # These macros are necessary only for legacy compatibility, and have moved
This page took 0.05623 seconds and 2 git commands to generate.