summaryrefslogtreecommitdiff
path: root/data/apt/port.diff
blob: 46584b41ab67edc6550c3f59b328dcc162692dec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
diff -ru apt-0.6.46.4.1/apt-inst/deb/dpkgdb.cc apt-0.6.46.4.1+iPhone/apt-inst/deb/dpkgdb.cc
--- apt-0.6.46.4.1/apt-inst/deb/dpkgdb.cc	2006-12-04 14:37:34.000000000 +0000
+++ apt-0.6.46.4.1+iPhone/apt-inst/deb/dpkgdb.cc	2007-12-31 01:46:53.000000000 +0000
@@ -26,6 +26,7 @@
 
 #include <stdio.h>
 #include <errno.h>
+#include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/mman.h>
 #include <fcntl.h>
diff -ru apt-0.6.46.4.1/buildlib/environment.mak.in apt-0.6.46.4.1+iPhone/buildlib/environment.mak.in
--- apt-0.6.46.4.1/buildlib/environment.mak.in	2006-12-04 14:37:35.000000000 +0000
+++ apt-0.6.46.4.1+iPhone/buildlib/environment.mak.in	2007-12-29 10:58:41.000000000 +0000
@@ -62,11 +62,11 @@
 
 # Shared library things
 HOST_OS = @host_os@
-ifneq ($(words $(filter linux-gnu gnu% %gnu,$(HOST_OS))),0)
-   SONAME_MAGIC=-Wl,-soname -Wl,
+#ifneq ($(words $(filter linux-gnu gnu% %gnu,$(HOST_OS))),0)
+   SONAME_MAGIC=
    LFLAGS_SO=
-else
+#else
    # Do not know how to create shared libraries here.
-   ONLYSTATICLIBS = yes
-endif
+#   ONLYSTATICLIBS = yes
+#endif
 	
diff -r -u apt-0.6.46.4/apt-inst/makefile apt-0.6.46.4.1+iPhone/apt-inst/makefile
--- apt-0.6.46.4/apt-inst/makefile	2006-12-04 14:37:34.000000000 +0000
+++ apt-0.6.46.4.1+iPhone/apt-inst/makefile	2007-12-25 06:42:18.000000000 +0000
@@ -11,7 +11,8 @@
 
 # The library name
 LIBRARY=apt-inst
-LIBEXT=$(GLIBC_VER)$(LIBSTDCPP_VER)
+LIBEXT=
+#$(GLIBC_VER)$(LIBSTDCPP_VER)
 MAJOR=1.1
 MINOR=0
 SLIBS=$(PTHREADLIB) -lapt-pkg
diff -r -u apt-0.6.46.4/apt-pkg/deb/dpkgpm.cc apt-0.6.46.4.1+iPhone/apt-pkg/deb/dpkgpm.cc
--- apt-0.6.46.4/apt-pkg/deb/dpkgpm.cc	2006-12-04 16:33:53.000000000 +0000
+++ apt-0.6.46.4.1+iPhone/apt-pkg/deb/dpkgpm.cc	2007-12-24 11:22:47.000000000 +0000
@@ -511,6 +511,8 @@
       clog << flush;
       cerr << flush;
 
+      typedef void (*sighandler_t)(int);
+
       /* Mask off sig int/quit. We do this because dpkg also does when 
          it forks scripts. What happens is that when you hit ctrl-c it sends
 	 it to all processes in the group. Since dpkg ignores the signal 
diff -r -u apt-0.6.46.4/apt-pkg/init.cc apt-0.6.46.4.1+iPhone/apt-pkg/init.cc
--- apt-0.6.46.4/apt-pkg/init.cc	2006-12-04 14:37:34.000000000 +0000
+++ apt-0.6.46.4.1+iPhone/apt-pkg/init.cc	2007-12-25 05:36:40.000000000 +0000
@@ -95,14 +95,6 @@
    if (Cnf.FindB("Debug::pkgInitConfig",false) == true)
       Cnf.Dump();
    
-#ifdef APT_DOMAIN
-   if (Cnf.Exists("Dir::Locale"))
-   {  
-      bindtextdomain(APT_DOMAIN,Cnf.FindDir("Dir::Locale").c_str());
-      bindtextdomain(textdomain(0),Cnf.FindDir("Dir::Locale").c_str());
-   }
-#endif
-   
    return true;
 }
 									/*}}}*/
diff -r -u apt-0.6.46.4/apt-pkg/makefile apt-0.6.46.4.1+iPhone/apt-pkg/makefile
--- apt-0.6.46.4/apt-pkg/makefile	2006-12-04 14:37:34.000000000 +0000
+++ apt-0.6.46.4.1+iPhone/apt-pkg/makefile	2007-12-25 06:42:27.000000000 +0000
@@ -12,7 +12,8 @@
 # The library name, don't forget to update init.h and the copy in 
 # methods/makefile - FIXME
 LIBRARY=apt-pkg
-LIBEXT=$(GLIBC_VER)$(LIBSTDCPP_VER)
+LIBEXT=
+#$(GLIBC_VER)$(LIBSTDCPP_VER)
 MAJOR=3.11
 MINOR=0
 SLIBS=$(PTHREADLIB) $(INTLLIBS)
diff -r -u apt-0.6.46.4/buildlib/podomain.mak apt-0.6.46.4.1+iPhone/buildlib/podomain.mak
--- apt-0.6.46.4/buildlib/podomain.mak	2006-12-04 14:37:35.000000000 +0000
+++ apt-0.6.46.4.1+iPhone/buildlib/podomain.mak	2007-12-25 06:41:16.000000000 +0000
@@ -14,7 +14,8 @@
 $(PO_DOMAINS)/$(MY_DOMAIN)/$(LOCAL).$(TYPE)list: SRC := $(addprefix $(SUBDIR)/,$(SOURCE))
 $(PO_DOMAINS)/$(MY_DOMAIN)/$(LOCAL).$(TYPE)list: makefile
 	(echo $(SRC) | xargs -n1 echo) > $@
-binary program clean: $(PO_DOMAINS)/$(MY_DOMAIN)/$(LOCAL).$(TYPE)list
+binary program clean:
+#$(PO_DOMAINS)/$(MY_DOMAIN)/$(LOCAL).$(TYPE)list
 
 veryclean: veryclean/$(LOCAL)
 veryclean/po/$(LOCAL): LIST := $(PO_DOMAINS)/$(MY_DOMAIN)/$(LOCAL).$(TYPE)list
diff -r -u apt-0.6.46.4/buildlib/program.mak apt-0.6.46.4.1+iPhone/buildlib/program.mak
--- apt-0.6.46.4/buildlib/program.mak	2006-12-04 14:37:35.000000000 +0000
+++ apt-0.6.46.4.1+iPhone/buildlib/program.mak	2007-12-25 05:26:04.000000000 +0000
@@ -44,6 +44,7 @@
 # The binary build rule
 $($(LOCAL)-BIN): $($(LOCAL)-OBJS) $($(LOCAL)-MKS)
 	echo Building program $@
+	echo $(CXX) $(CXXFLAGS) $(LDFLAGS) $(LFLAGS) -o $@ $(filter %.o,$^) $($(@F)-SLIBS) $(LEFLAGS)
 	$(CXX) $(CXXFLAGS) $(LDFLAGS) $(LFLAGS) -o $@ $(filter %.o,$^) $($(@F)-SLIBS) $(LEFLAGS)
 
 # Compilation rules
diff -r -u apt-0.6.46.4/cmdline/apt-cache.cc apt-0.6.46.4.1+iPhone/cmdline/apt-cache.cc
--- apt-0.6.46.4/cmdline/apt-cache.cc	2006-12-04 14:37:35.000000000 +0000
+++ apt-0.6.46.4.1+iPhone/cmdline/apt-cache.cc	2007-12-25 03:50:15.000000000 +0000
@@ -1748,7 +1752,7 @@
 
    // Set up gettext support
    setlocale(LC_ALL,"");
-   textdomain(PACKAGE);
+   //textdomain(PACKAGE);
 
    // Parse the command line and initialize the package library
    CommandLine CmdL(Args,_config);
diff -r -u apt-0.6.46.4/cmdline/apt-cdrom.cc apt-0.6.46.4.1+iPhone/cmdline/apt-cdrom.cc
--- apt-0.6.46.4/cmdline/apt-cdrom.cc	2006-12-04 14:37:35.000000000 +0000
+++ apt-0.6.46.4.1+iPhone/cmdline/apt-cdrom.cc	2007-12-25 03:50:24.000000000 +0000
@@ -188,7 +192,7 @@
 
    // Set up gettext support
    setlocale(LC_ALL,"");
-   textdomain(PACKAGE);
+   //textdomain(PACKAGE);
 
    // Parse the command line and initialize the package library
    CommandLine CmdL(Args,_config);
diff -r -u apt-0.6.46.4/cmdline/apt-config.cc apt-0.6.46.4.1+iPhone/cmdline/apt-config.cc
--- apt-0.6.46.4/cmdline/apt-config.cc	2006-12-04 14:37:35.000000000 +0000
+++ apt-0.6.46.4.1+iPhone/cmdline/apt-config.cc	2007-12-25 03:50:35.000000000 +0000
@@ -103,7 +107,7 @@
 
    // Set up gettext support
    setlocale(LC_ALL,"");
-   textdomain(PACKAGE);
+   //textdomain(PACKAGE);
 
    // Parse the command line and initialize the package library
    CommandLine CmdL(Args,_config);
diff -r -u apt-0.6.46.4/cmdline/apt-extracttemplates.cc apt-0.6.46.4.1+iPhone/cmdline/apt-extracttemplates.cc
--- apt-0.6.46.4/cmdline/apt-extracttemplates.cc	2006-12-04 14:37:35.000000000 +0000
+++ apt-0.6.46.4.1+iPhone/cmdline/apt-extracttemplates.cc	2007-12-25 03:50:39.000000000 +0000
@@ -361,7 +365,7 @@
 
 	// Set up gettext support
 	setlocale(LC_ALL,"");
-	textdomain(PACKAGE);
+	//textdomain(PACKAGE);
 
 	// Parse the command line and initialize the package library
 	CommandLine CmdL(Args,_config);
diff -r -u apt-0.6.46.4/cmdline/apt-get.cc apt-0.6.46.4.1+iPhone/cmdline/apt-get.cc
--- apt-0.6.46.4/cmdline/apt-get.cc	2006-12-04 14:37:35.000000000 +0000
+++ apt-0.6.46.4.1+iPhone/cmdline/apt-get.cc	2007-12-26 09:03:07.000000000 +0000
@@ -62,12 +62,13 @@
 #include <sys/wait.h>
 									/*}}}*/
 
+#define _trace() printf("_trace(%s:%d)\n", __FILE__, __LINE__)
+
 using namespace std;
 
 ostream c0out(0);
 ostream c1out(0);
 ostream c2out(0);
-ofstream devnull("/dev/null");
 unsigned int ScreenWidth = 80 - 1; /* - 1 for the cursor */
 
 // class CacheFile - Cover class for some dependency cache functions	/*{{{*/
@@ -2560,7 +2565,7 @@
 
    // Set up gettext support
    setlocale(LC_ALL,"");
-   textdomain(PACKAGE);
+   //textdomain(PACKAGE);
 
    // Parse the command line and initialize the package library
    CommandLine CmdL(Args,_config);
@@ -2588,6 +2593,9 @@
    if (!isatty(STDOUT_FILENO) && _config->FindI("quiet",0) < 1)
       _config->Set("quiet","1");
 
+   ofstream devnull;
+   devnull.open("/dev/null");
+
    // Setup the output streams
    c0out.rdbuf(cout.rdbuf());
    c1out.rdbuf(cout.rdbuf());
diff -r -u apt-0.6.46.4/cmdline/apt-sortpkgs.cc apt-0.6.46.4.1+iPhone/cmdline/apt-sortpkgs.cc
--- apt-0.6.46.4/cmdline/apt-sortpkgs.cc	2006-12-04 14:37:35.000000000 +0000
+++ apt-0.6.46.4.1+iPhone/cmdline/apt-sortpkgs.cc	2007-12-25 03:50:52.000000000 +0000
@@ -174,7 +178,7 @@
 
    // Set up gettext support
    setlocale(LC_ALL,"");
-   textdomain(PACKAGE);
+   //textdomain(PACKAGE);
 
    // Parse the command line and initialize the package library
    CommandLine CmdL(Args,_config);
diff -r -u apt-0.6.46.4/ftparchive/cachedb.cc apt-0.6.46.4.1+iPhone/ftparchive/cachedb.cc
--- apt-0.6.46.4/ftparchive/cachedb.cc	2006-12-04 14:37:36.000000000 +0000
+++ apt-0.6.46.4.1+iPhone/ftparchive/cachedb.cc	2007-12-24 11:27:03.000000000 +0000
@@ -319,6 +319,14 @@
    } 
 }
 
+void *memrchr(void *data, char value, int size) {
+    char *cdata = (char *) data;
+    for (int i = 0; i != size; ++i)
+        if (cdata[size - i - 1] == value)
+            return cdata + size - i - 1;
+    return NULL;
+}
+
 // CacheDB::GetMD5 - Get the MD5 hash					/*{{{*/
 // ---------------------------------------------------------------------
 /* */
diff -r -u apt-0.6.46.4/ftparchive/contents.cc apt-0.6.46.4.1+iPhone/ftparchive/contents.cc
--- apt-0.6.46.4/ftparchive/contents.cc	2006-12-04 14:37:36.000000000 +0000
+++ apt-0.6.46.4.1+iPhone/ftparchive/contents.cc	2007-12-24 11:27:23.000000000 +0000
@@ -41,7 +41,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <malloc.h>    
+#include <memory.h>    
 									/*}}}*/
 
 // GenContents::~GenContents - Free allocated memory			/*{{{*/
diff -r -u apt-0.6.46.4/Makefile apt-0.6.46.4.1+iPhone/Makefile
--- apt-0.6.46.4/Makefile	2006-12-04 14:37:34.000000000 +0000
+++ apt-0.6.46.4.1+iPhone/Makefile	2007-12-25 05:49:13.000000000 +0000
@@ -18,7 +18,6 @@
 	$(MAKE) -C ftparchive $@
 	$(MAKE) -C dselect $@
 	$(MAKE) -C doc $@
-	$(MAKE) -C po $@
 
 # Some very common aliases
 .PHONY: maintainer-clean dist-clean distclean pristine sanity