]> git.pld-linux.org Git - packages/rpm.git/blame - rpm-mono.patch
- mono deps
[packages/rpm.git] / rpm-mono.patch
CommitLineData
63b0a9d7 1diff -ruN rpm-4.4.2./build/rpmfc.c rpm-4.4.2/build/rpmfc.c
2--- rpm-4.4.2./build/rpmfc.c 2005-08-11 13:11:54.000000000 +0200
3+++ rpm-4.4.2/build/rpmfc.c 2005-08-11 15:33:47.000000000 +0200
4@@ -534,6 +534,9 @@
5 /* XXX "python 2.3 byte-compiled" */
6 { "python ", RPMFC_PYTHON|RPMFC_INCLUDE },
7
8+ /* .NET executables and libraries. file(1) cannot differ it from native win32 executables unfortunatelly */
9+ { "PE executable", 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@@ -827,6 +830,42 @@
15 }
16
17 /**
18+ * Extract .NET dependencies.
19+ * @param fc file classifier
20+ * @param findprov 1 to enable provides
21+ * @param findreq 1 to enable requires
22+ * @param noautoprov _noautoprov regexps
23+ * @param noautoprov_c # of _noautoprov regexps
24+ * @param noautoreq _noautoreq regexps
25+ * @param noautoreq_c # of _noautoreq regexps
26+ * @return 0 on success
27+ */
28+static int rpmfcMONO(rpmfc fc, int findprov, int findreq,
29+ regex_t *noautoprov, int noautoprov_c, regex_t *noautoreq, int noautoreq_c)
30+ /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
31+ /*@modifies fc, rpmGlobalMacroContext, fileSystem, internalState @*/
32+{
33+ const char * fn = fc->fn[fc->ix];
34+ FILE * fp;
35+ int xx;
36+
37+ fp = fopen(fn, "r");
38+ if (fp == NULL || ferror(fp)) {
39+ if (fp) (void) fclose(fp);
40+ return -1;
41+ }
42+
43+ (void) fclose(fp);
44+
45+ if (findprov)
46+ xx = rpmfcHelper(fc, 'P', "mono", noautoprov, noautoprov_c);
47+ if (findreq)
48+ xx = rpmfcHelper(fc, 'R', "mono", noautoreq, noautoreq_c);
49+
50+ return 0;
51+}
52+
53+/**
54 * Extract Elf dependencies.
55 * @param fc file classifier
56 * @param findprov 1 to enable provides
57@@ -1179,6 +1218,7 @@
58 { rpmfcSCRIPT, (RPMFC_SCRIPT|RPMFC_PERL) },
59 { rpmfcSCRIPT, (RPMFC_SCRIPT|RPMFC_PYTHON) },
60 { rpmfcSCRIPT, (RPMFC_SCRIPT|RPMFC_PHP) },
61+ { rpmfcMONO, RPMFC_MONO },
62 { NULL, 0 }
63 };
64
65diff -ruN rpm-4.4.2./build/rpmfc.h rpm-4.4.2/build/rpmfc.h
66--- rpm-4.4.2./build/rpmfc.h 2005-08-11 13:11:54.000000000 +0200
67+++ rpm-4.4.2/build/rpmfc.h 2005-08-11 14:10:33.000000000 +0200
68@@ -78,6 +78,7 @@
69 RPMFC_PYTHON = (1 << 26),
70 RPMFC_PHP = (1 << 27),
71 RPMFC_TCL = (1 << 28),
72+ RPMFC_MONO = (1 << 6),
73
74 RPMFC_WHITE = (1 << 29),
75 RPMFC_INCLUDE = (1 << 30),
76diff -ruN rpm-4.4.2./macros.in rpm-4.4.2/macros.in
77--- rpm-4.4.2./macros.in 2005-08-11 13:11:54.000000000 +0200
78+++ rpm-4.4.2/macros.in 2005-08-11 17:20:46.276790376 +0200
79@@ -443,6 +443,9 @@
80 %__python_provides @RPMCONFIGDIR@/pythondeps.sh --provides
81 %__python_requires @RPMCONFIGDIR@/pythondeps.sh --requires
82
83+%__mono_provides @RPMCONFIGDIR@/monodeps.sh --provides
84+%__mono_requires @RPMCONFIGDIR@/monodeps.sh --requires
85+
86 #
87 # fixowner, fixgroup, and fixperms are run at the end of hardcoded setup
88 # These macros are necessary only for legacy compatibility, and have moved
89diff -ruN rpm-4.4.2./configure.ac rpm-4.4.2/configure.ac
90--- rpm-4.4.2./configure.ac 2005-08-11 17:36:01.000000000 +0200
91+++ rpm-4.4.2/configure.ac 2005-08-11 18:11:15.449385328 +0200
92@@ -1355,7 +1355,7 @@
93 scripts/php.req scripts/php.prov
94 rpmio/Makefile rpmdb/Makefile lib/Makefile build/Makefile
95 scripts/Makefile scripts/brp-redhat
96- scripts/macros.perl scripts/macros.php scripts/macros.python
97+ scripts/macros.perl scripts/macros.php scripts/macros.python scripts/macros.mono
98 tools/Makefile
99 tests/Makefile tests/rpmrc tests/macros tests/hello-test/Makefile
100 misc/Makefile intl/Makefile po/Makefile.in
101diff -ruN rpm-4.4.2./scripts/macros.mono rpm-4.4.2/scripts/macros.mono
102--- rpm-4.4.2./scripts/macros.mono 1970-01-01 01:00:00.000000000 +0100
103+++ rpm-4.4.2/scripts/macros.mono 2005-08-11 18:14:44.387621888 +0200
104@@ -0,0 +1,6 @@
105+# Mono specific macro definitions.
106+# To make use of these macros insert the following line into your spec file:
107+# %include /usr/lib/rpm/macros.mono
108+
109+%define __find_requires /usr/bin/mono-find-requires
110+%define __find_provides /usr/bin/mono-find-provides
111diff -ruN rpm-4.4.2./scripts/macros.mono.in rpm-4.4.2/scripts/macros.mono.in
112--- rpm-4.4.2./scripts/macros.mono.in 1970-01-01 01:00:00.000000000 +0100
113+++ rpm-4.4.2/scripts/macros.mono.in 2005-08-11 18:15:49.420735352 +0200
114@@ -0,0 +1,6 @@
115+# Mono specific macro definitions.
116+# To make use of these macros insert the following line into your spec file:
117+# %include @RPMCONFIGDIR@/macros.mono
118+
119+%define __find_requires /usr/bin/mono-find-requires
120+%define __find_provides /usr/bin/mono-find-provides
121diff -ruN rpm-4.4.2./scripts/Makefile.am rpm-4.4.2/scripts/Makefile.am
122--- rpm-4.4.2./scripts/Makefile.am 2005-07-13 14:19:13.000000000 +0200
123+++ rpm-4.4.2/scripts/Makefile.am 2005-08-11 18:13:19.998450992 +0200
124@@ -16,7 +16,7 @@
125 rpm.daily rpm.log rpm.xinetd rpm2cpio.sh \
126 sql.prov sql.req tcl.req tgpg trpm u_pkg.sh \
127 vpkg-provides.sh vpkg-provides2.sh \
128- macros.perl* macros.python* \
129+ macros.perl* macros.python* macros.mono* \
130 macros.php* find-*.php find-php-*
131
132 installprefix = $(DESTDIR)
This page took 0.0508999999999999 seconds and 4 git commands to generate.