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 #include +#include #include #include #include diff -ru apt-0.7.25.3/buildlib/libversion.mak apt-0.7.25.3+iPhone/buildlib/libversion.mak --- apt-0.7.25.3/buildlib/libversion.mak 2010-02-01 19:44:40.000000000 +0000 +++ apt-0.7.25.3+iPhone/buildlib/libversion.mak 2010-02-22 18:03:29.000000000 +0000 @@ -18,4 +18,4 @@ # want to drop this, but this a ABI break. # And we don't want to do this now. So we hardcode a value here, # and drop it later on (hopefully as fast as possible). -LIBEXT=-libc6.9-6 +LIBEXT= 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/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 $( /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 #include #include -#include +#include +#include #include #include #include @@ -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 #include #include -#include +#include /*}}}*/ // 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,5 @@ $(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 #include #include -#include +#include +#include #include #include