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
|
diff -ru apt-0.7.20.2/apt-inst/deb/dpkgdb.cc apt-0.7.20.2+iPhone/apt-inst/deb/dpkgdb.cc
--- apt-0.7.20.2/apt-inst/deb/dpkgdb.cc 2009-02-07 15:09:35.000000000 +0000
+++ apt-0.7.20.2+iPhone/apt-inst/deb/dpkgdb.cc 2009-04-14 16:10:02.000000000 +0000
@@ -22,6 +22,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.7.20.2/apt-inst/makefile apt-0.7.20.2+iPhone/apt-inst/makefile
--- apt-0.7.20.2/apt-inst/makefile 2009-02-07 15:09:35.000000000 +0000
+++ apt-0.7.20.2+iPhone/apt-inst/makefile 2009-04-14 16:10:02.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 -ru apt-0.7.20.2/apt-pkg/deb/dpkgpm.cc apt-0.7.20.2+iPhone/apt-pkg/deb/dpkgpm.cc
--- apt-0.7.20.2/apt-pkg/deb/dpkgpm.cc 2009-02-07 15:09:35.000000000 +0000
+++ apt-0.7.20.2+iPhone/apt-pkg/deb/dpkgpm.cc 2009-04-14 16:10:02.000000000 +0000
@@ -766,6 +766,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 -ru apt-0.7.20.2/apt-pkg/makefile apt-0.7.20.2+iPhone/apt-pkg/makefile
--- apt-0.7.20.2/apt-pkg/makefile 2009-02-07 15:09:35.000000000 +0000
+++ apt-0.7.20.2+iPhone/apt-pkg/makefile 2009-04-14 16:16:15.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=4.6
MINOR=0
SLIBS=$(PTHREADLIB) $(INTLLIBS) -lutil
diff -ru apt-0.7.20.2/buildlib/environment.mak.in apt-0.7.20.2+iPhone/buildlib/environment.mak.in
--- apt-0.7.20.2/buildlib/environment.mak.in 2009-02-07 15:09:35.000000000 +0000
+++ apt-0.7.20.2+iPhone/buildlib/environment.mak.in 2009-04-14 16:11:50.000000000 +0000
@@ -67,8 +67,14 @@
ifneq ($(words $(filter gnu% linux-gnu% kfreebsd-gnu% %-gnu,$(HOST_OS))),0)
SONAME_MAGIC=-Wl,-soname -Wl,
LFLAGS_SO=
+ SOEXT=so
+else
+ifneq ($(words $(filter darwin%,$(HOST_OS))),0)
+ SONAME_MAGIC=-Wl,-dylib_install_name,
+ LFLAGS_SO=
+ SOEXT=dylib
else
# Do not know how to create shared libraries here.
ONLYSTATICLIBS = yes
endif
-
+endif
diff -ru apt-0.7.20.2/buildlib/library.mak apt-0.7.20.2+iPhone/buildlib/library.mak
--- apt-0.7.20.2/buildlib/library.mak 2009-02-07 15:09:35.000000000 +0000
+++ apt-0.7.20.2+iPhone/buildlib/library.mak 2009-04-14 16:14:05.000000000 +0000
@@ -16,11 +16,11 @@
# See defaults.mak for information about LOCAL
# Some local definitions
-LOCAL := lib$(LIBRARY)$(LIBEXT).so.$(MAJOR).$(MINOR)
+LOCAL := lib$(LIBRARY)$(LIBEXT).$(SOEXT).$(MAJOR).$(MINOR)
$(LOCAL)-OBJS := $(addprefix $(OBJ)/,$(addsuffix .opic,$(notdir $(basename $(SOURCE)))))
$(LOCAL)-DEP := $(addprefix $(DEP)/,$(addsuffix .opic.d,$(notdir $(basename $(SOURCE)))))
$(LOCAL)-HEADERS := $(addprefix $(INCLUDE)/,$(HEADERS))
-$(LOCAL)-SONAME := lib$(LIBRARY)$(LIBEXT).so.$(MAJOR)
+$(LOCAL)-SONAME := lib$(LIBRARY)$(LIBEXT).$(SOEXT).$(MAJOR)
$(LOCAL)-SLIBS := $(SLIBS)
$(LOCAL)-LIBRARY := $(LIBRARY)
@@ -29,7 +29,7 @@
# Install the command hooks
headers: $($(LOCAL)-HEADERS)
-library: $(LIB)/lib$(LIBRARY).so $(LIB)/lib$(LIBRARY)$(LIBEXT).so.$(MAJOR)
+library: $(LIB)/lib$(LIBRARY).$(SOEXT) $(LIB)/lib$(LIBRARY)$(LIBEXT).$(SOEXT).$(MAJOR)
clean: clean/$(LOCAL)
veryclean: veryclean/$(LOCAL)
@@ -41,21 +41,21 @@
clean/$(LOCAL):
-rm -f $($(@F)-OBJS) $($(@F)-DEP)
veryclean/$(LOCAL): clean/$(LOCAL)
- -rm -f $($(@F)-HEADERS) $(LIB)/lib$($(@F)-LIBRARY)*.so*
+ -rm -f $($(@F)-HEADERS) $(LIB)/lib$($(@F)-LIBRARY)*.$(SOEXT)*
# Build rules for the two symlinks
-.PHONY: $(LIB)/lib$(LIBRARY)$(LIBEXT).so.$(MAJOR) $(LIB)/lib$(LIBRARY).so
-$(LIB)/lib$(LIBRARY)$(LIBEXT).so.$(MAJOR): $(LIB)/lib$(LIBRARY)$(LIBEXT).so.$(MAJOR).$(MINOR)
+.PHONY: $(LIB)/lib$(LIBRARY)$(LIBEXT).$(SOEXT).$(MAJOR) $(LIB)/lib$(LIBRARY).$(SOEXT)
+$(LIB)/lib$(LIBRARY)$(LIBEXT).$(SOEXT).$(MAJOR): $(LIB)/lib$(LIBRARY)$(LIBEXT).$(SOEXT).$(MAJOR).$(MINOR)
ln -sf $(<F) $@
-$(LIB)/lib$(LIBRARY).so: $(LIB)/lib$(LIBRARY)$(LIBEXT).so.$(MAJOR).$(MINOR)
+$(LIB)/lib$(LIBRARY).$(SOEXT): $(LIB)/lib$(LIBRARY)$(LIBEXT).$(SOEXT).$(MAJOR).$(MINOR)
ln -sf $(<F) $@
# The binary build rule
-$(LIB)/lib$(LIBRARY)$(LIBEXT).so.$(MAJOR).$(MINOR): $($(LOCAL)-HEADERS) $($(LOCAL)-OBJS)
- -rm -f $(LIB)/lib$($(@F)-LIBRARY)*.so* 2> /dev/null
+$(LIB)/lib$(LIBRARY)$(LIBEXT).$(SOEXT).$(MAJOR).$(MINOR): $($(LOCAL)-HEADERS) $($(LOCAL)-OBJS)
+ -rm -f $(LIB)/lib$($(@F)-LIBRARY)*.$(SOEXT)* 2> /dev/null
echo Building shared library $@
$(CXX) $(CXXFLAGS) $(LDFLAGS) $(PICFLAGS) $(LFLAGS) $(LFLAGS_SO)\
- -o $@ $(SONAME_MAGIC)$($(@F)-SONAME) -shared \
+ -o $@ $(SONAME_MAGIC)$(patsubst $(LIB)/%,/usr/lib/%,$@) -dynamiclib \
$(filter %.opic,$^) \
$($(@F)-SLIBS)
diff -ru apt-0.7.20.2/buildlib/podomain.mak apt-0.7.20.2+iPhone/buildlib/podomain.mak
--- apt-0.7.20.2/buildlib/podomain.mak 2009-02-07 15:09:35.000000000 +0000
+++ apt-0.7.20.2+iPhone/buildlib/podomain.mak 2009-04-14 16:10:02.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 -ru apt-0.7.20.2/buildlib/program.mak apt-0.7.20.2+iPhone/buildlib/program.mak
--- apt-0.7.20.2/buildlib/program.mak 2009-02-07 15:09:35.000000000 +0000
+++ apt-0.7.20.2+iPhone/buildlib/program.mak 2009-04-14 16:10:02.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 -ru apt-0.7.20.2/cmdline/apt-get.cc apt-0.7.20.2+iPhone/cmdline/apt-get.cc
--- apt-0.7.20.2/cmdline/apt-get.cc 2009-02-07 15:09:35.000000000 +0000
+++ apt-0.7.20.2+iPhone/cmdline/apt-get.cc 2009-04-15 19:38:48.000000000 +0000
@@ -53,7 +53,8 @@
#include <termios.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
-#include <sys/statfs.h>
+#include <sys/param.h>
+#include <sys/mount.h>
#include <sys/statvfs.h>
#include <signal.h>
#include <unistd.h>
@@ -66,12 +66,13 @@
#define RAMFS_MAGIC 0x858458f6
+#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 /*{{{*/
@@ -2786,6 +2787,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 -ru apt-0.7.20.2/ftparchive/contents.cc apt-0.7.20.2+iPhone/ftparchive/contents.cc
--- apt-0.7.20.2/ftparchive/contents.cc 2009-02-07 15:09:35.000000000 +0000
+++ apt-0.7.20.2+iPhone/ftparchive/contents.cc 2009-04-14 16:10:02.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 -ru apt-0.7.20.2/Makefile apt-0.7.20.2+iPhone/Makefile
--- apt-0.7.20.2/Makefile 2009-02-07 15:09:35.000000000 +0000
+++ apt-0.7.20.2+iPhone/Makefile 2009-04-14 16:10:02.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
diff -ru apt-0.7.20.2/configure.in apt-0.7.20.2+iPhone/configure.in
--- apt-0.7.20.2/configure.in 2009-02-07 15:10:44.000000000 +0000
+++ apt-0.7.20.2+iPhone/configure.in 2009-04-15 18:58:36.000000000 +0000
@@ -88,7 +88,7 @@
dnl First check against the full canonical canoncial-system-type in $target
dnl and if that fails, just look for the cpu
AC_MSG_CHECKING(debian architecture)
-archset="`dpkg-architecture -qDEB_HOST_ARCH`"
+archset="`cd "$DPKG_ARCH"; PERL5LIB=$(pwd) ./dpkg-architecture -qDEB_HOST_ARCH -t$host`"
if test "x$archset" = "x"; then
AC_MSG_ERROR([failed: use --host= or output from dpkg-architecture])
fi
diff -ru apt-0.7.20.2/apt-pkg/deb/dpkgpm.cc apt-0.7.20.2+iPhone/apt-pkg/deb/dpkgpm.cc
--- apt-0.7.20.2/apt-pkg/deb/dpkgpm.cc 2009-02-07 15:09:35.000000000 +0000
+++ apt-0.7.20.2+iPhone/apt-pkg/deb/dpkgpm.cc 2009-04-15 19:25:41.000000000 +0000
@@ -33,7 +33,8 @@
#include <termios.h>
#include <unistd.h>
#include <sys/ioctl.h>
-#include <pty.h>
+#include <sys/stat.h>
+#include <util.h>
#include <config.h>
#include <apti18n.h>
|