]> git.pld-linux.org Git - packages/rpm.git/blob - rpm-mono.patch
- updated for 4.4.3
[packages/rpm.git] / rpm-mono.patch
1 --- rpm-4.4.3/build/rpmfc.c.orig        2005-11-19 01:11:00.884392480 +0100
2 +++ rpm-4.4.3/build/rpmfc.c     2005-11-19 01:13:08.489993480 +0100
3 @@ -539,6 +539,9 @@
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 +
10    { "current ar archive",      RPMFC_STATIC|RPMFC_LIBRARY|RPMFC_ARCHIVE|RPMFC_INCLUDE },
11  
12    { "Zip archive data",                RPMFC_COMPRESSED|RPMFC_ARCHIVE|RPMFC_INCLUDE },
13 @@ -900,6 +903,35 @@
14  }
15  
16  /**
17 + * Extract .NET dependencies.
18 + * @param fc           file classifier
19 + * @return             0 on success
20 + */
21 +static int rpmfcMONO(rpmfc fc)
22 +       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
23 +       /*@modifies fc, rpmGlobalMacroContext, fileSystem, internalState @*/
24 +{
25 +    const char * fn = fc->fn[fc->ix];
26 +    FILE * fp;
27 +    int xx;
28 +
29 +    fp = fopen(fn, "r");
30 +    if (fp == NULL || ferror(fp)) {
31 +       if (fp) (void) fclose(fp);
32 +       return -1;
33 +    }
34 +
35 +    (void) fclose(fp);
36 +
37 +    if (fc->findprov)
38 +       xx = rpmfcHelper(fc, 'P', "mono", fc->noautoprov, fc->noautoprov_c);
39 +    if (fc->findreq)
40 +       xx = rpmfcHelper(fc, 'R', "mono", fc->noautoreq, fc->noautoreq_c);
41 +
42 +    return 0;
43 +}
44 +
45 +/**
46   * Extract Elf dependencies.
47   * @param fc           file classifier
48   * @return             0 on success
49 @@ -931,6 +963,7 @@
50  static struct rpmfcApplyTbl_s rpmfcApplyTable[] = {
51      { rpmfcELF,                RPMFC_ELF },
52      { rpmfcSCRIPT,     (RPMFC_SCRIPT|RPMFC_PERL|RPMFC_PYTHON|RPMFC_LIBTOOL|RPMFC_PKGCONFIG|RPMFC_BOURNE|RPMFC_JAVA|RPMFC_PHP) },
53 +    { rpmfcMONO,       RPMFC_MONO },
54      { NULL, 0 }
55  };
56  
57 diff -ruN rpm-4.4.2./build/rpmfc.h rpm-4.4.2/build/rpmfc.h
58 --- rpm-4.4.2./build/rpmfc.h    2005-08-11 13:11:54.000000000 +0200
59 +++ rpm-4.4.2/build/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       @RPMCONFIGDIR@/monodeps.sh --provides
76 +%__mono_requires       @RPMCONFIGDIR@/monodeps.sh --requires
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
81 diff -ruN rpm-4.4.2./configure.ac rpm-4.4.2/configure.ac
82 --- rpm-4.4.2./configure.ac     2005-08-11 17:36:01.000000000 +0200
83 +++ rpm-4.4.2/configure.ac      2005-08-11 18:11:15.449385328 +0200
84 @@ -1355,7 +1355,7 @@
85         scripts/php.req scripts/php.prov
86         rpmio/Makefile rpmdb/Makefile lib/Makefile build/Makefile
87         scripts/Makefile scripts/brp-redhat
88 -       scripts/macros.perl scripts/macros.php scripts/macros.python
89 +       scripts/macros.perl scripts/macros.php scripts/macros.python scripts/macros.mono
90         tools/Makefile
91         tests/Makefile tests/rpmrc tests/macros tests/hello-test/Makefile
92         misc/Makefile intl/Makefile po/Makefile.in
93 diff -ruN rpm-4.4.2./scripts/macros.mono rpm-4.4.2/scripts/macros.mono
94 --- rpm-4.4.2./scripts/macros.mono      1970-01-01 01:00:00.000000000 +0100
95 +++ rpm-4.4.2/scripts/macros.mono       2005-08-11 18:14:44.387621888 +0200
96 @@ -0,0 +1,6 @@
97 +# Mono specific macro definitions.
98 +# To make use of these macros insert the following line into your spec file:
99 +# %include /usr/lib/rpm/macros.mono
100 +
101 +%define                __find_requires /usr/bin/mono-find-requires
102 +%define                __find_provides /usr/bin/mono-find-provides
103 diff -ruN rpm-4.4.2./scripts/macros.mono.in rpm-4.4.2/scripts/macros.mono.in
104 --- rpm-4.4.2./scripts/macros.mono.in   1970-01-01 01:00:00.000000000 +0100
105 +++ rpm-4.4.2/scripts/macros.mono.in    2005-08-11 18:15:49.420735352 +0200
106 @@ -0,0 +1,6 @@
107 +# Mono specific macro definitions.
108 +# To make use of these macros insert the following line into your spec file:
109 +# %include @RPMCONFIGDIR@/macros.mono
110 +
111 +%define                __find_requires /usr/bin/mono-find-requires
112 +%define                __find_provides /usr/bin/mono-find-provides
113 diff -ruN rpm-4.4.2./scripts/Makefile.am rpm-4.4.2/scripts/Makefile.am
114 --- rpm-4.4.2./scripts/Makefile.am      2005-07-13 14:19:13.000000000 +0200
115 +++ rpm-4.4.2/scripts/Makefile.am       2005-08-11 18:13:19.998450992 +0200
116 @@ -16,7 +16,7 @@
117         rpm.daily rpm.log rpm.xinetd rpm2cpio.sh \
118         sql.prov sql.req tcl.req tgpg trpm u_pkg.sh \
119         vpkg-provides.sh vpkg-provides2.sh \
120 -       macros.perl* macros.python* \
121 +       macros.perl* macros.python* macros.mono* \
122         macros.php* find-*.php find-php-*
123  
124  installprefix = $(DESTDIR)
This page took 0.040683 seconds and 4 git commands to generate.