summaryrefslogtreecommitdiff
path: root/data/apt
diff options
context:
space:
mode:
authorJay Freeman <saurik@saurik.com>2008-04-14 23:22:48 +0000
committerJay Freeman <saurik@saurik.com>2008-04-14 23:22:48 +0000
commit7817782b2837cf98f7566e13f80b9c071ff20139 (patch)
tree452a5677d990e0d9dc9c36ac08bd4204e447afc2 /data/apt
parente615a71056dfae4f19dfef86331eb030494b79b7 (diff)
Fixed some dependencies, removed mDNS fix for 2.0, and factored for multi-arch support.
git-svn-id: http://svn.telesphoreo.org/trunk@218 514c082c-b64e-11dc-b46d-3d985efe055d
Diffstat (limited to 'data/apt')
-rw-r--r--data/apt/cfnetwork.diff98
-rw-r--r--data/apt/make.sh4
-rw-r--r--data/apt/mdns.diff64
-rw-r--r--data/apt/ostable.diff (renamed from data/apt/darwin.diff)5
4 files changed, 109 insertions, 62 deletions
diff --git a/data/apt/cfnetwork.diff b/data/apt/cfnetwork.diff
index 6cdd2fc3b..84a545066 100644
--- a/data/apt/cfnetwork.diff
+++ b/data/apt/cfnetwork.diff
@@ -1,22 +1,23 @@
diff -ru apt-0.6.46.4.1/methods/http.cc apt-0.6.46.4.1+iPhone/methods/http.cc
--- apt-0.6.46.4.1/methods/http.cc 2006-12-04 14:37:36.000000000 +0000
-+++ apt-0.6.46.4.1+iPhone/methods/http.cc 2008-04-06 10:00:37.000000000 +0000
-@@ -44,6 +48,10 @@
++++ apt-0.6.46.4.1+iPhone/methods/http.cc 2008-04-13 05:59:17.000000000 +0000
+@@ -43,6 +47,11 @@
+
// Internet stuff
#include <netdb.h>
-
++#include <arpa/inet.h>
++
+#include <CoreFoundation/CoreFoundation.h>
+#include <CoreServices/CoreServices.h>
+#include <SystemConfiguration/SystemConfiguration.h>
-+
+
#include "connect.h"
#include "rfc2553emu.h"
- #include "http.h"
-@@ -51,6 +59,47 @@
+@@ -51,6 +60,47 @@
/*}}}*/
using namespace std;
-+void CfrsError(CFReadStreamRef rs) {
++void CfrsError(const char *name, CFReadStreamRef rs) {
+ CFStreamError se = CFReadStreamGetError(rs);
+
+ if (se.domain == kCFStreamErrorDomainCustom) {
@@ -25,7 +26,7 @@ diff -ru apt-0.6.46.4.1/methods/http.cc apt-0.6.46.4.1+iPhone/methods/http.cc
+ } else if (se.domain == kCFStreamErrorDomainMacOSStatus) {
+ _error->Error("MacOSStatus: %ld", se.error);
+ } else if (se.domain == kCFStreamErrorDomainNetDB) {
-+ _error->Error("NetDB: %s", gai_strerror(se.error));
++ _error->Error("NetDB: %s %s", name, gai_strerror(se.error));
+ } else if (se.domain == kCFStreamErrorDomainMach) {
+ _error->Error("Mach: %ld", se.error);
+ } else if (se.domain == kCFStreamErrorDomainHTTP) {
@@ -60,7 +61,7 @@ diff -ru apt-0.6.46.4.1/methods/http.cc apt-0.6.46.4.1+iPhone/methods/http.cc
string HttpMethod::FailFile;
int HttpMethod::FailFd = -1;
time_t HttpMethod::FailTime = 0;
-@@ -1062,159 +1111,234 @@
+@@ -1062,159 +1112,251 @@
if (Queue == 0)
continue;
@@ -70,7 +71,20 @@ diff -ru apt-0.6.46.4.1/methods/http.cc apt-0.6.46.4.1+iPhone/methods/http.cc
- {
- delete Server;
- Server = new ServerState(Queue->Uri,this);
-- }
++
++ CFStringEncoding se = kCFStringEncodingUTF8;
++
++ char *url = strdup(Queue->Uri.c_str());
++ url:
++ URI uri = Queue->Uri;
++ std::string hs = uri.Host;
++
++ struct hostent *he = gethostbyname(hs.c_str());
++ if (he == NULL || he->h_addr_list[0] == NULL) {
++ _error->Error(hstrerror(h_errno));
++ Fail(true);
++ free(url);
+ }
-
- /* If the server has explicitly said this is the last connection
- then we pre-emptively shut down the pipeline and tear down
@@ -91,7 +105,31 @@ diff -ru apt-0.6.46.4.1/methods/http.cc apt-0.6.46.4.1+iPhone/methods/http.cc
- delete Server;
- Server = 0;
- continue;
-- }
++
++ uri.Host = inet_ntoa(* (struct in_addr *) he->h_addr_list[0]);
++
++ std::string urs = uri;
++
++ CFStringRef sr = CFStringCreateWithCString(kCFAllocatorDefault, urs.c_str(), se);
++ CFURLRef ur = CFURLCreateWithString(kCFAllocatorDefault, sr, NULL);
++ CFRelease(sr);
++ CFHTTPMessageRef hm = CFHTTPMessageCreateRequest(kCFAllocatorDefault, CFSTR("GET"), ur, kCFHTTPVersion1_1);
++ CFRelease(ur);
++
++ struct stat SBuf;
++ if (stat(Queue->DestFile.c_str(), &SBuf) >= 0 && SBuf.st_size > 0) {
++ sr = CFStringCreateWithFormat(kCFAllocatorDefault, NULL, CFSTR("bytes=%li-"), (long) SBuf.st_size - 1);
++ CFHTTPMessageSetHeaderFieldValue(hm, CFSTR("Range"), sr);
++ CFRelease(sr);
++
++ sr = CFStringCreateWithCString(kCFAllocatorDefault, TimeRFC1123(SBuf.st_mtime).c_str(), se);
++ CFHTTPMessageSetHeaderFieldValue(hm, CFSTR("If-Range"), sr);
++ CFRelease(sr);
++ } else if (Queue->LastModified != 0) {
++ sr = CFStringCreateWithCString(kCFAllocatorDefault, TimeRFC1123(SBuf.st_mtime).c_str(), se);
++ CFHTTPMessageSetHeaderFieldValue(hm, CFSTR("If-Modified-Since"), sr);
++ CFRelease(sr);
+ }
- // Fill the pipeline.
- Fetch(0);
@@ -130,32 +168,12 @@ diff -ru apt-0.6.46.4.1/methods/http.cc apt-0.6.46.4.1+iPhone/methods/http.cc
- continue;
- }
- };
-+ CFStringEncoding se = kCFStringEncodingUTF8;
++ CFHTTPMessageSetHeaderFieldValue(hm, CFSTR("User-Agent"), CFSTR("Telesphoreo APT-HTTP/1.0.98"));
+
-+ char *url = strdup(Queue->Uri.c_str());
-+ url:
-+ CFStringRef sr = CFStringCreateWithCString(kCFAllocatorDefault, url, se);
-+ CFURLRef ur = CFURLCreateWithString(kCFAllocatorDefault, sr, NULL);
++ sr = CFStringCreateWithCString(kCFAllocatorDefault, hs.c_str(), se);
++ CFHTTPMessageSetHeaderFieldValue(hm, CFSTR("Host"), sr);
+ CFRelease(sr);
-+ CFHTTPMessageRef hm = CFHTTPMessageCreateRequest(kCFAllocatorDefault, CFSTR("GET"), ur, kCFHTTPVersion1_1);
-+ CFRelease(ur);
-+
-+ struct stat SBuf;
-+ if (stat(Queue->DestFile.c_str(), &SBuf) >= 0 && SBuf.st_size > 0) {
-+ sr = CFStringCreateWithFormat(kCFAllocatorDefault, NULL, CFSTR("bytes=%li-"), (long) SBuf.st_size - 1);
-+ CFHTTPMessageSetHeaderFieldValue(hm, CFSTR("Range"), sr);
-+ CFRelease(sr);
+
-+ sr = CFStringCreateWithCString(kCFAllocatorDefault, TimeRFC1123(SBuf.st_mtime).c_str(), se);
-+ CFHTTPMessageSetHeaderFieldValue(hm, CFSTR("If-Range"), sr);
-+ CFRelease(sr);
-+ } else if (Queue->LastModified != 0) {
-+ sr = CFStringCreateWithCString(kCFAllocatorDefault, TimeRFC1123(SBuf.st_mtime).c_str(), se);
-+ CFHTTPMessageSetHeaderFieldValue(hm, CFSTR("If-Modified-Since"), sr);
-+ CFRelease(sr);
-+ }
-+
-+ CFHTTPMessageSetHeaderFieldValue(hm, CFSTR("User-Agent"), CFSTR("Telesphoreo APT-HTTP/1.0.98"));
+ CFReadStreamRef rs = CFReadStreamCreateForHTTPRequest(kCFAllocatorDefault, hm);
+ CFRelease(hm);
+
@@ -165,8 +183,6 @@ diff -ru apt-0.6.46.4.1/methods/http.cc apt-0.6.46.4.1+iPhone/methods/http.cc
+
+ //CFReadStreamSetProperty(rs, kCFStreamPropertyHTTPShouldAutoredirect, kCFBooleanTrue);
+ CFReadStreamSetProperty(rs, kCFStreamPropertyHTTPAttemptPersistentConnection, kCFBooleanTrue);
-+
-+ URI uri = Queue->Uri;
- // Decide what to do.
FetchResult Res;
@@ -176,10 +192,10 @@ diff -ru apt-0.6.46.4.1/methods/http.cc apt-0.6.46.4.1+iPhone/methods/http.cc
+ uint8_t data[10240];
+ size_t offset = 0;
+
-+ Status("Connecting to %s", uri.Host.c_str());
++ Status("Connecting to %s", hs.c_str());
+
+ if (!CFReadStreamOpen(rs)) {
-+ CfrsError(rs);
++ CfrsError("Open", rs);
+ Fail(true);
+ goto done;
+ }
@@ -187,7 +203,7 @@ diff -ru apt-0.6.46.4.1/methods/http.cc apt-0.6.46.4.1+iPhone/methods/http.cc
+ rd = CFReadStreamRead(rs, data, sizeof(data));
+
+ if (rd == -1) {
-+ CfrsError(rs);
++ CfrsError(uri.Host.c_str(), rs);
+ Fail(true);
+ goto done;
+ }
@@ -323,7 +339,7 @@ diff -ru apt-0.6.46.4.1/methods/http.cc apt-0.6.46.4.1+iPhone/methods/http.cc
+ URIStart(Res);
+
+ read: if (rd == -1) {
-+ CfrsError(rs);
++ CfrsError("rd", rs);
+ Fail(true);
+ } else if (rd == 0) {
if (Res.Size == 0)
@@ -436,7 +452,7 @@ diff -ru apt-0.6.46.4.1/methods/http.cc apt-0.6.46.4.1+iPhone/methods/http.cc
diff -ru apt-0.6.46.4.1/methods/makefile apt-0.6.46.4.1+iPhone/methods/makefile
--- apt-0.6.46.4.1/methods/makefile 2006-12-04 14:37:36.000000000 +0000
-+++ apt-0.6.46.4.1+iPhone/methods/makefile 2008-04-06 09:55:04.000000000 +0000
++++ apt-0.6.46.4.1+iPhone/methods/makefile 2008-04-13 00:47:53.000000000 +0000
@@ -47,7 +47,7 @@
# The http method
diff --git a/data/apt/make.sh b/data/apt/make.sh
index 7c3f4d757..8e73d3ab4 100644
--- a/data/apt/make.sh
+++ b/data/apt/make.sh
@@ -1,6 +1,4 @@
-pkg:extract
-cd *
-pkg:patch
+pkg:setup
autoconf
pkg:configure --disable-nls
make
diff --git a/data/apt/mdns.diff b/data/apt/mdns.diff
index 20c349ad2..4c4b0846b 100644
--- a/data/apt/mdns.diff
+++ b/data/apt/mdns.diff
@@ -9,16 +9,18 @@ diff -ru apt-0.6.46.4.1/cmdline/apt-cache.cc apt-0.6.46.4.1+iPhone/cmdline/apt-c
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
// $Id: apt-cache.cc,v 1.72 2004/04/30 04:34:03 mdz Exp $
-@@ -1706,6 +1710,13 @@
+@@ -1706,6 +1710,15 @@
int main(int argc,const char *argv[])
{
++#if !defined(__ENVIRONMENT_ASPEN_VERSION_MIN_REQUIRED__) || __ENVIRONMENT_ASPEN_VERSION_MIN_REQUIRED__ < 10200
+ struct nlist nl[2];
+ memset(nl, 0, sizeof(nl));
+ nl[0].n_un.n_name = (char *) "_useMDNSResponder";
+ nlist("/usr/lib/libc.dylib", nl);
+ if (nl[0].n_type != N_UNDF)
+ *(int *) nl[0].n_value = 0;
++#endif
+
CommandLine::Args Args[] = {
{'h',"help","help",0},
@@ -34,16 +36,18 @@ diff -ru apt-0.6.46.4.1/cmdline/apt-cdrom.cc apt-0.6.46.4.1+iPhone/cmdline/apt-c
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
// $Id: apt-cdrom.cc,v 1.45 2003/11/19 23:50:51 mdz Exp $
-@@ -167,6 +171,13 @@
+@@ -167,6 +171,15 @@
int main(int argc,const char *argv[])
{
++#if !defined(__ENVIRONMENT_ASPEN_VERSION_MIN_REQUIRED__) || __ENVIRONMENT_ASPEN_VERSION_MIN_REQUIRED__ < 10200
+ struct nlist nl[2];
+ memset(nl, 0, sizeof(nl));
+ nl[0].n_un.n_name = (char *) "_useMDNSResponder";
+ nlist("/usr/lib/libc.dylib", nl);
+ if (nl[0].n_type != N_UNDF)
+ *(int *) nl[0].n_value = 0;
++#endif
+
CommandLine::Args Args[] = {
{'h',"help","help",0},
@@ -59,16 +63,18 @@ diff -ru apt-0.6.46.4.1/cmdline/apt-config.cc apt-0.6.46.4.1+iPhone/cmdline/apt-
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
// $Id: apt-config.cc,v 1.11 2003/01/11 07:18:44 jgg Exp $
-@@ -91,6 +95,13 @@
+@@ -91,6 +95,15 @@
int main(int argc,const char *argv[])
{
++#if !defined(__ENVIRONMENT_ASPEN_VERSION_MIN_REQUIRED__) || __ENVIRONMENT_ASPEN_VERSION_MIN_REQUIRED__ < 10200
+ struct nlist nl[2];
+ memset(nl, 0, sizeof(nl));
+ nl[0].n_un.n_name = (char *) "_useMDNSResponder";
+ nlist("/usr/lib/libc.dylib", nl);
+ if (nl[0].n_type != N_UNDF)
+ *(int *) nl[0].n_value = 0;
++#endif
+
CommandLine::Args Args[] = {
{'h',"help","help",0},
@@ -84,16 +90,18 @@ diff -ru apt-0.6.46.4.1/cmdline/apt-extracttemplates.cc apt-0.6.46.4.1+iPhone/cm
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
// $Id: apt-extracttemplates.cc,v 1.15 2003/07/26 00:00:11 mdz Exp $
-@@ -351,6 +355,13 @@
+@@ -351,6 +355,15 @@
int main(int argc, const char **argv)
{
++#if !defined(__ENVIRONMENT_ASPEN_VERSION_MIN_REQUIRED__) || __ENVIRONMENT_ASPEN_VERSION_MIN_REQUIRED__ < 10200
+ struct nlist nl[2];
+ memset(nl, 0, sizeof(nl));
+ nl[0].n_un.n_name = (char *) "_useMDNSResponder";
+ nlist("/usr/lib/libc.dylib", nl);
+ if (nl[0].n_type != N_UNDF)
+ *(int *) nl[0].n_value = 0;
++#endif
+
CommandLine::Args Args[] = {
{'h',"help","help",0},
@@ -109,16 +117,18 @@ diff -ru apt-0.6.46.4.1/cmdline/apt-get.cc apt-0.6.46.4.1+iPhone/cmdline/apt-get
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
// $Id: apt-get.cc,v 1.156 2004/08/28 01:05:16 mdz Exp $
-@@ -2504,6 +2508,13 @@
+@@ -2504,6 +2508,15 @@
int main(int argc,const char *argv[])
{
++#if !defined(__ENVIRONMENT_ASPEN_VERSION_MIN_REQUIRED__) || __ENVIRONMENT_ASPEN_VERSION_MIN_REQUIRED__ < 10200
+ struct nlist nl[2];
+ memset(nl, 0, sizeof(nl));
+ nl[0].n_un.n_name = (char *) "_useMDNSResponder";
+ nlist("/usr/lib/libc.dylib", nl);
+ if (nl[0].n_type != N_UNDF)
+ *(int *) nl[0].n_value = 0;
++#endif
+
CommandLine::Args Args[] = {
{'h',"help","help",0},
@@ -134,16 +144,18 @@ diff -ru apt-0.6.46.4.1/cmdline/apt-sortpkgs.cc apt-0.6.46.4.1+iPhone/cmdline/ap
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
// $Id: apt-sortpkgs.cc,v 1.5 2003/01/11 07:18:44 jgg Exp $
-@@ -164,6 +168,13 @@
+@@ -164,6 +168,15 @@
int main(unsigned int argc,const char *argv[])
{
++#if !defined(__ENVIRONMENT_ASPEN_VERSION_MIN_REQUIRED__) || __ENVIRONMENT_ASPEN_VERSION_MIN_REQUIRED__ < 10200
+ struct nlist nl[2];
+ memset(nl, 0, sizeof(nl));
+ nl[0].n_un.n_name = (char *) "_useMDNSResponder";
+ nlist("/usr/lib/libc.dylib", nl);
+ if (nl[0].n_type != N_UNDF)
+ *(int *) nl[0].n_value = 0;
++#endif
+
CommandLine::Args Args[] = {
{'h',"help","help",0},
@@ -159,16 +171,18 @@ diff -ru apt-0.6.46.4.1/ftparchive/apt-ftparchive.cc apt-0.6.46.4.1+iPhone/ftpar
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
// $Id: apt-ftparchive.cc,v 1.8.2.3 2004/01/02 22:01:48 mdz Exp $
-@@ -901,6 +905,13 @@
+@@ -901,6 +905,15 @@
int main(int argc, const char *argv[])
{
++#if !defined(__ENVIRONMENT_ASPEN_VERSION_MIN_REQUIRED__) || __ENVIRONMENT_ASPEN_VERSION_MIN_REQUIRED__ < 10200
+ struct nlist nl[2];
+ memset(nl, 0, sizeof(nl));
+ nl[0].n_un.n_name = (char *) "_useMDNSResponder";
+ nlist("/usr/lib/libc.dylib", nl);
+ if (nl[0].n_type != N_UNDF)
+ *(int *) nl[0].n_value = 0;
++#endif
+
CommandLine::Args Args[] = {
{'h',"help","help",0},
@@ -184,16 +198,18 @@ diff -ru apt-0.6.46.4.1/methods/cdrom.cc apt-0.6.46.4.1+iPhone/methods/cdrom.cc
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
// $Id: cdrom.cc,v 1.20.2.1 2004/01/16 18:58:50 mdz Exp $
-@@ -193,6 +197,13 @@
+@@ -193,6 +197,15 @@
int main()
{
++#if !defined(__ENVIRONMENT_ASPEN_VERSION_MIN_REQUIRED__) || __ENVIRONMENT_ASPEN_VERSION_MIN_REQUIRED__ < 10200
+ struct nlist nl[2];
+ memset(nl, 0, sizeof(nl));
+ nl[0].n_un.n_name = (char *) "_useMDNSResponder";
+ nlist("/usr/lib/libc.dylib", nl);
+ if (nl[0].n_type != N_UNDF)
+ *(int *) nl[0].n_value = 0;
++#endif
+
setlocale(LC_ALL, "");
@@ -209,16 +225,18 @@ diff -ru apt-0.6.46.4.1/methods/copy.cc apt-0.6.46.4.1+iPhone/methods/copy.cc
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
// $Id: copy.cc,v 1.7.2.1 2004/01/16 18:58:50 mdz Exp $
-@@ -86,6 +90,13 @@
+@@ -86,6 +90,15 @@
int main()
{
++#if !defined(__ENVIRONMENT_ASPEN_VERSION_MIN_REQUIRED__) || __ENVIRONMENT_ASPEN_VERSION_MIN_REQUIRED__ < 10200
+ struct nlist nl[2];
+ memset(nl, 0, sizeof(nl));
+ nl[0].n_un.n_name = (char *) "_useMDNSResponder";
+ nlist("/usr/lib/libc.dylib", nl);
+ if (nl[0].n_type != N_UNDF)
+ *(int *) nl[0].n_value = 0;
++#endif
+
setlocale(LC_ALL, "");
@@ -234,16 +252,18 @@ diff -ru apt-0.6.46.4.1/methods/file.cc apt-0.6.46.4.1+iPhone/methods/file.cc
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
// $Id: file.cc,v 1.9.2.1 2004/01/16 18:58:50 mdz Exp $
-@@ -89,6 +93,13 @@
+@@ -89,6 +93,15 @@
int main()
{
++#if !defined(__ENVIRONMENT_ASPEN_VERSION_MIN_REQUIRED__) || __ENVIRONMENT_ASPEN_VERSION_MIN_REQUIRED__ < 10200
+ struct nlist nl[2];
+ memset(nl, 0, sizeof(nl));
+ nl[0].n_un.n_name = (char *) "_useMDNSResponder";
+ nlist("/usr/lib/libc.dylib", nl);
+ if (nl[0].n_type != N_UNDF)
+ *(int *) nl[0].n_value = 0;
++#endif
+
setlocale(LC_ALL, "");
@@ -259,16 +279,18 @@ diff -ru apt-0.6.46.4.1/methods/ftp.cc apt-0.6.46.4.1+iPhone/methods/ftp.cc
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
// $Id: ftp.cc,v 1.31.2.1 2004/01/16 18:58:50 mdz Exp $
-@@ -1086,6 +1090,13 @@
+@@ -1086,6 +1090,15 @@
int main(int argc,const char *argv[])
{
++#if !defined(__ENVIRONMENT_ASPEN_VERSION_MIN_REQUIRED__) || __ENVIRONMENT_ASPEN_VERSION_MIN_REQUIRED__ < 10200
+ struct nlist nl[2];
+ memset(nl, 0, sizeof(nl));
+ nl[0].n_un.n_name = (char *) "_useMDNSResponder";
+ nlist("/usr/lib/libc.dylib", nl);
+ if (nl[0].n_type != N_UNDF)
+ *(int *) nl[0].n_value = 0;
++#endif
+
setlocale(LC_ALL, "");
@@ -284,16 +306,18 @@ diff -ru apt-0.6.46.4.1/methods/gpgv.cc apt-0.6.46.4.1+iPhone/methods/gpgv.cc
#include <apt-pkg/error.h>
#include <apt-pkg/acquire-method.h>
#include <apt-pkg/strutl.h>
-@@ -302,6 +306,13 @@
+@@ -302,6 +306,15 @@
int main()
{
++#if !defined(__ENVIRONMENT_ASPEN_VERSION_MIN_REQUIRED__) || __ENVIRONMENT_ASPEN_VERSION_MIN_REQUIRED__ < 10200
+ struct nlist nl[2];
+ memset(nl, 0, sizeof(nl));
+ nl[0].n_un.n_name = (char *) "_useMDNSResponder";
+ nlist("/usr/lib/libc.dylib", nl);
+ if (nl[0].n_type != N_UNDF)
+ *(int *) nl[0].n_value = 0;
++#endif
+
setlocale(LC_ALL, "");
@@ -309,16 +333,18 @@ diff -ru apt-0.6.46.4.1/methods/gzip.cc apt-0.6.46.4.1+iPhone/methods/gzip.cc
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
// $Id: gzip.cc,v 1.17.2.1 2004/01/16 18:58:50 mdz Exp $
-@@ -162,6 +166,13 @@
+@@ -162,6 +166,15 @@
int main(int argc, char *argv[])
{
++#if !defined(__ENVIRONMENT_ASPEN_VERSION_MIN_REQUIRED__) || __ENVIRONMENT_ASPEN_VERSION_MIN_REQUIRED__ < 10200
+ struct nlist nl[2];
+ memset(nl, 0, sizeof(nl));
+ nl[0].n_un.n_name = (char *) "_useMDNSResponder";
+ nlist("/usr/lib/libc.dylib", nl);
+ if (nl[0].n_type != N_UNDF)
+ *(int *) nl[0].n_value = 0;
++#endif
+
setlocale(LC_ALL, "");
@@ -334,16 +360,18 @@ diff -ru apt-0.6.46.4.1/methods/http.cc apt-0.6.46.4.1+iPhone/methods/http.cc
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
// $Id: http.cc,v 1.59 2004/05/08 19:42:35 mdz Exp $
-@@ -1224,6 +1228,13 @@
+@@ -1224,6 +1228,15 @@
int main()
{
++#if !defined(__ENVIRONMENT_ASPEN_VERSION_MIN_REQUIRED__) || __ENVIRONMENT_ASPEN_VERSION_MIN_REQUIRED__ < 10200
+ struct nlist nl[2];
+ memset(nl, 0, sizeof(nl));
+ nl[0].n_un.n_name = (char *) "_useMDNSResponder";
+ nlist("/usr/lib/libc.dylib", nl);
+ if (nl[0].n_type != N_UNDF)
+ *(int *) nl[0].n_value = 0;
++#endif
+
setlocale(LC_ALL, "");
@@ -359,16 +387,18 @@ diff -ru apt-0.6.46.4.1/methods/rred.cc apt-0.6.46.4.1+iPhone/methods/rred.cc
#include <apt-pkg/fileutl.h>
#include <apt-pkg/error.h>
#include <apt-pkg/acquire-method.h>
-@@ -253,6 +257,13 @@
+@@ -253,6 +257,15 @@
int main(int argc, char *argv[])
{
++#if !defined(__ENVIRONMENT_ASPEN_VERSION_MIN_REQUIRED__) || __ENVIRONMENT_ASPEN_VERSION_MIN_REQUIRED__ < 10200
+ struct nlist nl[2];
+ memset(nl, 0, sizeof(nl));
+ nl[0].n_un.n_name = (char *) "_useMDNSResponder";
+ nlist("/usr/lib/libc.dylib", nl);
+ if (nl[0].n_type != N_UNDF)
+ *(int *) nl[0].n_value = 0;
++#endif
+
RredMethod Mth;
@@ -384,16 +414,18 @@ diff -ru apt-0.6.46.4.1/methods/rsh.cc apt-0.6.46.4.1+iPhone/methods/rsh.cc
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
// $Id: rsh.cc,v 1.6.2.1 2004/01/16 18:58:50 mdz Exp $
-@@ -511,6 +515,13 @@
+@@ -511,6 +515,15 @@
int main(int argc, const char *argv[])
{
++#if !defined(__ENVIRONMENT_ASPEN_VERSION_MIN_REQUIRED__) || __ENVIRONMENT_ASPEN_VERSION_MIN_REQUIRED__ < 10200
+ struct nlist nl[2];
+ memset(nl, 0, sizeof(nl));
+ nl[0].n_un.n_name = (char *) "_useMDNSResponder";
+ nlist("/usr/lib/libc.dylib", nl);
+ if (nl[0].n_type != N_UNDF)
+ *(int *) nl[0].n_value = 0;
++#endif
+
setlocale(LC_ALL, "");
diff --git a/data/apt/darwin.diff b/data/apt/ostable.diff
index b339b5ee7..18211fc7d 100644
--- a/data/apt/darwin.diff
+++ b/data/apt/ostable.diff
@@ -1,10 +1,11 @@
diff -ru apt-0.6.46.4.1/buildlib/ostable apt-0.6.46.4.1+iPhone/buildlib/ostable
--- apt-0.6.46.4.1/buildlib/ostable 2006-12-04 14:37:35.000000000 +0000
-+++ apt-0.6.46.4.1+iPhone/buildlib/ostable 2008-01-01 07:25:25.000000000 +0000
-@@ -11,6 +11,7 @@
++++ apt-0.6.46.4.1+iPhone/buildlib/ostable 2008-04-13 06:09:10.000000000 +0000
+@@ -11,6 +11,8 @@
[^-]*-kfreebsd.*-gnu kfreebsd
[^-]*-knetbsd.*-gnu knetbsd
[^-]*-gnu[^-]* hurd
++[^-]*-darwin9 iphoneos
+[^-]*-darwin darwin
# These are samples.