Update of /cvsroot/fink/experimental/dmacks/finkinfo
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3908

Added Files:
        apt.info apt.patch 
Log Message:
Implements apt-get --allow-broken (based on apt-0.5.4-37).


--- NEW FILE: apt.patch ---
diff -ruN apt-0.5.4/apt-inst/makefile apt-0.5.4-patched/apt-inst/makefile
--- apt-0.5.4/apt-inst/makefile Mon Feb 26 23:16:05 2001
+++ apt-0.5.4-patched/apt-inst/makefile Sun Nov  9 14:02:47 2003
@@ -10,6 +10,7 @@
 include ../buildlib/defaults.mak
 
 # The library name
+LDFLAGS += -L../apt-pkg -lapt-pkg
 LIBRARY=apt-inst
 LIBEXT=$(GLIBC_VER)$(LIBSTDCPP_VER)
 MAJOR=1.0
diff -ruN apt-0.5.4/apt-pkg/contrib/mmap.cc apt-0.5.4-patched/apt-pkg/contrib/mmap.cc
--- apt-0.5.4/apt-pkg/contrib/mmap.cc   Sun May 27 01:19:30 2001
+++ apt-0.5.4-patched/apt-pkg/contrib/mmap.cc   Sun Nov  9 14:02:47 2003
@@ -41,7 +41,7 @@
 // ---------------------------------------------------------------------
 /* */
 MMap::MMap(FileFd &F,unsigned long Flags) : Flags(Flags), iSize(0),
-                     Base(0)
+                     Base(0), iFd(0)
 {
    if ((Flags & NoImmMap) != NoImmMap)
       Map(F);
@@ -51,7 +51,7 @@
 // ---------------------------------------------------------------------
 /* */
 MMap::MMap(unsigned long Flags) : Flags(Flags), iSize(0),
-                     Base(0)
+                     Base(0), iFd(0)
 {
 }
                                                                        /*}}}*/
@@ -68,6 +68,7 @@
 /* */
 bool MMap::Map(FileFd &Fd)
 {
+   iFd = &Fd;
    iSize = Fd.Size();
    
    // Set the permissions.
@@ -81,10 +82,19 @@
    if (iSize == 0)
       return _error->Error(_("Can't mmap an empty file"));
    
+#ifndef EMULATE_MMAP
    // Map it.
    Base = mmap(0,iSize,Prot,Map,Fd.Fd(),0);
    if (Base == (void *)-1)
       return _error->Errno("mmap",_("Couldn't make mmap of %lu bytes"),iSize);
+#else
+   Base = new unsigned char[iSize];
+   if (Base == NULL)
+      return _error->Errno("mmap",_("Couldn't allocate %lu bytes to emulate 
mmap"),iSize);
+
+   Fd.Seek(0);
+   Fd.Read(Base, iSize, true);
+#endif
 
    return true;
 }
@@ -100,8 +110,16 @@
    if (DoSync == true)
       Sync();
    
+#ifndef EMULATE_MMAP   
    if (munmap((char *)Base,iSize) != 0)
       _error->Warning("Unable to munmap");
+#else
+   if ((Flags & ReadOnly) != ReadOnly && iFd != 0) {
+      iFd->Seek(0);
+      iFd->Write(Base, iSize);
+   }
+   delete [] (unsigned char *)Base;
+#endif
    
    iSize = 0;
    Base = 0;
@@ -117,11 +135,13 @@
    if ((Flags & UnMapped) == UnMapped)
       return true;
    
+#ifndef EMULATE_MMAP
 #ifdef _POSIX_SYNCHRONIZED_IO   
    if ((Flags & ReadOnly) != ReadOnly)
       if (msync((char *)Base,iSize,MS_SYNC) != 0)
         return _error->Errno("msync","Unable to write mmap");
 #endif   
+#endif
    return true;
 }
                                                                        /*}}}*/
@@ -133,11 +153,13 @@
    if ((Flags & UnMapped) == UnMapped)
       return true;
    
+#ifndef EMULATE_MMAP
 #ifdef _POSIX_SYNCHRONIZED_IO
    unsigned long PSize = sysconf(_SC_PAGESIZE);
    if ((Flags & ReadOnly) != ReadOnly)
       if (msync((char *)Base+(int)(Start/PSize)*PSize,Stop - Start,MS_SYNC) != 0)
         return _error->Errno("msync","Unable to write mmap");
+#endif   
 #endif   
    return true;
 }
diff -ruN apt-0.5.4/apt-pkg/contrib/mmap.h apt-0.5.4-patched/apt-pkg/contrib/mmap.h
--- apt-0.5.4/apt-pkg/contrib/mmap.h    Mon May 14 01:16:43 2001
+++ apt-0.5.4-patched/apt-pkg/contrib/mmap.h    Sun Nov  9 14:02:47 2003
@@ -46,6 +46,7 @@
    unsigned long Flags;
    unsigned long iSize;
    void *Base;
+   FileFd *iFd;
 
    bool Map(FileFd &Fd);
    bool Close(bool DoSync = true);
diff -ruN apt-0.5.4/apt-pkg/deb/debindexfile.cc 
apt-0.5.4-patched/apt-pkg/deb/debindexfile.cc
--- apt-0.5.4/apt-pkg/deb/debindexfile.cc       Sun Apr 29 01:13:51 2001
+++ apt-0.5.4-patched/apt-pkg/deb/debindexfile.cc       Sun Nov  9 14:02:47 2003
@@ -505,3 +505,11 @@
 }
 
                                                                        /*}}}*/
+void init_deb2()
+{
+  (void)_apt_DebType;
+  (void)_apt_DebSrcType;
+  (void)_apt_Src;
+  (void)_apt_Pkg;
+  (void)_apt_Status;
+}
diff -ruN apt-0.5.4/apt-pkg/deb/debsystem.cc apt-0.5.4-patched/apt-pkg/deb/debsystem.cc
--- apt-0.5.4/apt-pkg/deb/debsystem.cc  Sun Apr 29 01:13:51 2001
+++ apt-0.5.4-patched/apt-pkg/deb/debsystem.cc  Sun Nov  9 14:02:47 2003
@@ -27,6 +27,108 @@
 #include <dirent.h>
 #include <errno.h>
                                                                        /*}}}*/
+/* FINK LOCAL begin */
+#include <sys/utsname.h>
+#include <CoreFoundation/CoreFoundation.h>
+#include <fstream>
+#include <sys/stat.h>
+
+extern void init_deb2();
+extern void init_deb3();
+
+#define FINKSTATUSFILE "/tmp/finkaptstatus"
+
+struct versionrevision {
+  unsigned long epoch;
+  const char *version;
+  const char *revision;
+};  
+
+struct versionrevision darwin_version = {0,NULL,NULL};
+struct versionrevision macosx_version = {0,NULL,NULL};
+
+static void finkinit()
+{
+  Boolean status;
+  SInt32 errorCode;
+  CFURLRef fileURL = NULL;
+  CFDataRef resourceData = NULL;
+  CFPropertyListRef propertyList = NULL;
+  CFStringRef string;
+  static char buffer[256];     // This is static, to ensure the buffer stays around
+
+  static struct utsname ver;   // This is static, to ensure the buffer stays around
+  
+  /* Determine system version */
+  /* TODO - should maybe check if this is really Darwin? */
+  if (!uname(&ver)) {
+    darwin_version.version = ver.release;
+  }
+
+  /* Check whether this is Mac OS X, and which version of it */
+
+  fileURL = CFURLCreateWithFileSystemPath( NULL,       
+               CFSTR("/System/Library/CoreServices/SystemVersion.plist"),
+               kCFURLPOSIXPathStyle,                           
+               false );
+  if (!fileURL)
+    goto BAIL;
+  
+  /* Read the XML */
+  status = CFURLCreateDataAndPropertiesFromResource(
+               NULL,
+               fileURL,
+               &resourceData,
+               NULL,           
+               NULL,
+               &errorCode);
+  if (!status || errorCode != 0)
+    goto BAIL;
+  
+  /* Reconstitute the dictionary using the XML data. */
+  propertyList = CFPropertyListCreateFromXMLData( NULL,
+               resourceData,
+               kCFPropertyListImmutable,
+               &string);
+  if (!propertyList)
+    goto BAIL;
+  
+  /* Try to read the system version from it. */
+  status = CFDictionaryGetValueIfPresent( propertyList,
+               CFSTR("ProductVersion"),
+               (void*)&string);
+  if (!status)
+    goto BAIL;
+  
+  /* Convert into a C string */
+  status = CFStringGetCString( string,
+               buffer,
+               sizeof(buffer),
+               kCFStringEncodingISOLatin1);
+  if (!status)
+    goto BAIL;
+  
+  /* Finally link the buffer into the macosx_version struct. */
+  macosx_version.version = buffer;
+  
+BAIL:
+  // Release all of the CF objects we're responsible for.
+  if (fileURL)
+    CFRelease(fileURL);
+  if (resourceData)
+    CFRelease(resourceData);
+  if (propertyList)
+    CFRelease(propertyList);
+}
+
+void initDebSystem()
+{
+  finkinit();
+  (void)debSys;
+  init_deb2();
+  init_deb3();
+}
+/* FINK LOCAL end */
 
 debSystem debSys;
 
@@ -48,6 +150,8 @@
 debSystem::~debSystem()
 {
    delete StatusFile;
+   delete FinkStatusFile;
+   unlink(FINKSTATUSFILE);
 }
                                                                        /*}}}*/
 // System::Lock - Get the lock                                         /*{{{*/
@@ -161,8 +265,8 @@
       which is yet to be determined. The functions in pkgcachegen should
       be the only users of these */
    Cnf.CndSet("Dir::State::userstatus","status.user"); // Defunct
-   Cnf.CndSet("Dir::State::status","/var/lib/dpkg/status");
-   Cnf.CndSet("Dir::Bin::dpkg","/usr/bin/dpkg");
+   Cnf.CndSet("Dir::State::status","@PREFIX@/var/lib/dpkg/status");
+   Cnf.CndSet("Dir::Bin::dpkg","@PREFIX@/bin/dpkg");
    
    return true;
 }
@@ -185,9 +289,9 @@
 signed debSystem::Score(Configuration const &Cnf)
 {
    signed Score = 0;
-   if (FileExists(Cnf.FindFile("Dir::State::status","/var/lib/dpkg/status")) == true)
+   if (FileExists(Cnf.FindFile("Dir::State::status","@PREFIX@/var/lib/dpkg/status")) 
== true)
        Score += 10;
-   if (FileExists(Cnf.FindFile("Dir::Bin::dpkg","/usr/bin/dpkg")) == true)
+   if (FileExists(Cnf.FindFile("Dir::Bin::dpkg","@PREFIX@/bin/dpkg")) == true)
       Score += 10;
    if (FileExists("/etc/debian_version") == true)
       Score += 10;
@@ -202,6 +306,44 @@
    if (StatusFile == 0)
       StatusFile = new debStatusIndex(_config->FindFile("Dir::State::status"));
    List.push_back(StatusFile);
+/* FINK LOCAL begin */
+
+   if (FinkStatusFile == 0) {
+      struct stat unused_sbuf;
+      int sys_ok=0;
+      unlink(FINKSTATUSFILE);
+      if ( 0 == stat("@PREFIX@/bin/fink-virtual-pkgs",&unused_sbuf)) {
+          if ( 0 == system("@PREFIX@/bin/fink-virtual-pkgs --apt")) sys_ok=1;
+      }    
+      if (stat(FINKSTATUSFILE, &unused_sbuf) || !sys_ok) {
+         std::ofstream finkstatus(FINKSTATUSFILE);
+      if(macosx_version.version != 0)
+      {
+        finkstatus << "Package: macosx" << endl;
+        finkstatus << "Status: install ok installed" << endl;      
+        finkstatus << "Priority: optional" << endl;
+        finkstatus << "Section: base" << endl;
+        finkstatus << "Maintainer: None" << endl;
+        finkstatus << "Source: macosx" << endl;
+        finkstatus << "Version: " << macosx_version.version << endl;
+        finkstatus << "Description: Pseudo package representing Mac OS X" << endl;
+        finkstatus << " Pseudo package representing Mac OS X" << endl << endl;
+      }
+      finkstatus << "Package: darwin" << endl;
+      finkstatus << "Status: install ok installed" << endl;
+      finkstatus << "Priority: optional" << endl;
+      finkstatus << "Section: base" << endl;
+      finkstatus << "Maintainer: None" << endl;
+      finkstatus << "Source: darwin" << endl;
+      finkstatus << "Version: " << darwin_version.version  << endl;
+      finkstatus << "Description: Pseudo package representing Darwin" << endl;
+      finkstatus << " Pseudo package representing Darwin" << endl << endl;
+      finkstatus.close();
+      }                
+      FinkStatusFile = new debStatusIndex(FINKSTATUSFILE);
+   }
+   List.push_back(FinkStatusFile);
+/* FINK LOCAL end */
    return true;
 }
                                                                        /*}}}*/
@@ -216,6 +358,10 @@
    if (StatusFile->FindInCache(*File.Cache()) == File)
    {
       Found = StatusFile;
+      return true;
+   }  else if ((FinkStatusFile != 0) && (FinkStatusFile->FindInCache(*File.Cache()) 
== File))
+   {
+      Found = FinkStatusFile;
       return true;
    }
    
diff -ruN apt-0.5.4/apt-pkg/deb/debsystem.h apt-0.5.4-patched/apt-pkg/deb/debsystem.h
--- apt-0.5.4/apt-pkg/deb/debsystem.h   Sun Apr 29 01:13:51 2001
+++ apt-0.5.4-patched/apt-pkg/deb/debsystem.h   Sun Nov  9 14:02:47 2003
@@ -25,6 +25,7 @@
    bool CheckUpdates();
    
    debStatusIndex *StatusFile;
+   debStatusIndex *FinkStatusFile;
    
    public:
 
diff -ruN apt-0.5.4/apt-pkg/deb/debversion.cc 
apt-0.5.4-patched/apt-pkg/deb/debversion.cc
--- apt-0.5.4/apt-pkg/deb/debversion.cc Mon May  7 01:14:53 2001
+++ apt-0.5.4-patched/apt-pkg/deb/debversion.cc Sun Nov  9 14:02:47 2003
@@ -24,6 +24,11 @@
 
 debVersioningSystem debVS;
 
+void init_deb3()
+{
+  (void)debVS;
+}
+
 // debVS::debVersioningSystem - Constructor                            /*{{{*/
 // ---------------------------------------------------------------------
 /* */
diff -ruN apt-0.5.4/apt-pkg/init.cc apt-0.5.4-patched/apt-pkg/init.cc
--- apt-0.5.4/apt-pkg/init.cc   Tue Mar 13 01:51:46 2001
+++ apt-0.5.4-patched/apt-pkg/init.cc   Sun Nov  9 14:02:47 2003
@@ -15,6 +15,8 @@
 #include <apti18n.h>
 #include <config.h>
 #include <sys/stat.h>
+
+extern void initDebSystem();
                                                                        /*}}}*/
 
 #define Stringfy_(x) # x
@@ -39,7 +41,7 @@
       Cnf.Set("APT::Architecture",COMMON_CPU);
    else
       Cnf.Set("APT::Architecture",COMMON_OS "-" COMMON_CPU);
-   Cnf.Set("Dir","/");
+   Cnf.Set("Dir","@PREFIX@/");
    
    // State   
    Cnf.Set("Dir::State","var/lib/apt/");
@@ -68,7 +70,7 @@
    Cnf.Set("Dir::Etc::main","apt.conf");
    Cnf.Set("Dir::Etc::parts","apt.conf.d");
    Cnf.Set("Dir::Etc::preferences","preferences");
-   Cnf.Set("Dir::Bin::methods","/usr/lib/apt/methods");
+   Cnf.Set("Dir::Bin::methods","@PREFIX@/lib/apt/methods");
              
    bool Res = true;
    
@@ -101,6 +103,8 @@
 /* */
 bool pkgInitSystem(Configuration &Cnf,pkgSystem *&Sys)
 {
+   initDebSystem();
+
    Sys = 0;
    string Label = Cnf.Find("Apt::System","");
    if (Label.empty() == false)
diff -ruN apt-0.5.4/apt-pkg/policy.cc apt-0.5.4-patched/apt-pkg/policy.cc
--- apt-0.5.4/apt-pkg/policy.cc Sun May 27 19:40:56 2001
+++ apt-0.5.4-patched/apt-pkg/policy.cc Sun Nov  9 14:02:47 2003
@@ -183,7 +183,7 @@
    Pin *P = 0;
    
    if (Name.empty() == true)
-      P = &*Defaults.insert(Defaults.end());
+      P = &*Defaults.insert(Defaults.end(),PkgPin());
    else
    {
       // Get a spot to put the pin
@@ -197,7 +197,7 @@
               P = &*I;
         
         if (P == 0)
-           P = &*Unmatched.insert(Unmatched.end());      
+           P = &*Unmatched.insert(Unmatched.end(), PkgPin());      
       }
       else
       {
diff -ruN apt-0.5.4/apt-pkg/tagfile.cc apt-0.5.4-patched/apt-pkg/tagfile.cc
--- apt-0.5.4/apt-pkg/tagfile.cc        Mon May 14 01:56:26 2001
+++ apt-0.5.4-patched/apt-pkg/tagfile.cc        Sun Nov  9 14:02:47 2003
@@ -197,7 +197,7 @@
       return false;
    
    TagCount = 0;
-   while (TagCount < sizeof(Indexes)/sizeof(Indexes[0]) && Stop < End)
+   while (TagCount+1 < sizeof(Indexes)/sizeof(Indexes[0]) && Stop < End)
    {
       // Start a new index and add it to the hash
       if (isspace(Stop[0]) == 0)
@@ -211,13 +211,13 @@
       if (Stop == 0)
         return false;
       
-      for (; Stop[1] == '\r' && Stop+1 < End; Stop++);
+      for (; Stop+1 < End && Stop[1] == '\r'; Stop++);
 
       // Double newline marks the end of the record
       if (Stop+1 < End && Stop[1] == '\n')
       {
         Indexes[TagCount] = Stop - Section;
-        for (; (Stop[0] == '\n' || Stop[0] == '\r') && Stop < End; Stop++);
+        for (; Stop < End && (Stop[0] == '\n' || Stop[0] == '\r'); Stop++);
         return true;
       }
       
diff -ruN apt-0.5.4/apt-pkg/tagfile.h apt-0.5.4-patched/apt-pkg/tagfile.h
--- apt-0.5.4/apt-pkg/tagfile.h Sun Apr 22 01:42:52 2001
+++ apt-0.5.4-patched/apt-pkg/tagfile.h Sun Nov  9 14:02:47 2003
@@ -34,7 +34,7 @@
    
    // We have a limit of 256 tags per section.
    unsigned short Indexes[256];
-   unsigned short AlphaIndexes[0xff];
+   unsigned short AlphaIndexes[0x100];
    
    unsigned int TagCount;
      
diff -ruN apt-0.5.4/buildlib/environment.mak.in 
apt-0.5.4-patched/buildlib/environment.mak.in
--- apt-0.5.4/buildlib/environment.mak.in       Tue May 29 01:11:03 2001
+++ apt-0.5.4-patched/buildlib/environment.mak.in       Sun Nov  9 14:02:47 2003
@@ -11,8 +11,8 @@
 LIBSTDCPP_VER = @LIBSTDCPP_VER@
 
 # Linker stuff
-PICFLAGS+= -fPIC -DPIC
-LFLAGS+= @LDFLAGS@
+PICFLAGS+= -fno-common -DPIC
+LFLAGS+= @LDFLAGS@ -framework CoreFoundation
 LEFLAGS+= 
 SOCKETLIBS:= @SOCKETLIBS@
 AR:[EMAIL PROTECTED]@
@@ -47,11 +47,13 @@
 
 # Shared library things
 HOST_OS = @host_os@
-ifneq ($(words $(filter linux-gnu gnu%,$(HOST_OS))),0)
-   SONAME_MAGIC=-Wl,-soname -Wl,
-   LFLAGS_SO=
-else
-   # Do not know how to create shared libraries here.
-   ONLYSTATICLIBS = yes
-endif
+#ifneq ($(words $(filter linux-gnu gnu%,$(HOST_OS))),0)
+#   SONAME_MAGIC=-Wl,-soname -Wl,
+#   LFLAGS_SO=
+#else
+#   # Do not know how to create shared libraries here.
+#   ONLYSTATICLIBS = yes
+#endif
+SONAME_MAGIC=-install_name @PREFIX@/lib/
+LFLAGS_SO=-dynamiclib
        
diff -ruN apt-0.5.4/buildlib/library.mak apt-0.5.4-patched/buildlib/library.mak
--- apt-0.5.4/buildlib/library.mak      Mon Feb 26 23:16:05 2001
+++ apt-0.5.4-patched/buildlib/library.mak      Sun Nov  9 14:02:47 2003
@@ -15,17 +15,17 @@
 # See defaults.mak for information about LOCAL
 
 # Some local definitions
-LOCAL := lib$(LIBRARY)$(LIBEXT).so.$(MAJOR).$(MINOR)
+LOCAL := lib$(LIBRARY)$(LIBEXT).$(MAJOR).$(MINOR).dylib
 $(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).$(MAJOR).dylib
 $(LOCAL)-SLIBS := $(SLIBS)
 $(LOCAL)-LIBRARY := $(LIBRARY)
 
 # Install the command hooks
 headers: $($(LOCAL)-HEADERS)
-library: $(LIB)/lib$(LIBRARY).so $(LIB)/lib$(LIBRARY)$(LIBEXT).so.$(MAJOR)
+library: $(LIB)/lib$(LIBRARY).dylib $(LIB)/lib$(LIBRARY)$(LIBEXT).$(MAJOR).dylib
 clean: clean/$(LOCAL)
 veryclean: veryclean/$(LOCAL)
 
@@ -37,21 +37,23 @@
 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)*.dylib
 
 # 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).$(MAJOR).dylib $(LIB)/lib$(LIBRARY).dylib
+$(LIB)/lib$(LIBRARY)$(LIBEXT).$(MAJOR).dylib: 
$(LIB)/lib$(LIBRARY)$(LIBEXT).$(MAJOR).$(MINOR).dylib
        ln -sf $(<F) $@
-$(LIB)/lib$(LIBRARY).so: $(LIB)/lib$(LIBRARY)$(LIBEXT).so.$(MAJOR).$(MINOR)
+$(LIB)/lib$(LIBRARY).dylib: $(LIB)/lib$(LIBRARY)$(LIBEXT).$(MAJOR).$(MINOR).dylib
        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).$(MAJOR).$(MINOR).dylib: $($(LOCAL)-HEADERS) 
$($(LOCAL)-OBJS)
+       -rm -f $(LIB)/lib$($(@F)-LIBRARY)*.dylib 2> /dev/null
        echo Building shared library $@
        $(CXX) $(CXXFLAGS) $(LDFLAGS) $(PICFLAGS) $(LFLAGS) $(LFLAGS_SO)\
-          -o $@ $(SONAME_MAGIC)$($(@F)-SONAME) -shared \
+          -o $@ $(SONAME_MAGIC)$($(@F)-SONAME) \
+          -compatibility_version $(MAJOR).$(MINOR) \
+          -current_version $(MAJOR).$(MINOR) \
           $(filter %.opic,$^) \
           $($(@F)-SLIBS) 
 
diff -ruN apt-0.5.4/buildlib/ostable apt-0.5.4-patched/buildlib/ostable
--- apt-0.5.4/buildlib/ostable  Tue Feb 20 02:03:17 2001
+++ apt-0.5.4-patched/buildlib/ostable  Sun Nov  9 14:02:47 2003
@@ -14,6 +14,7 @@
 hp-hpux[^-]*       hp-ux
 sun-solaris[^-]*    solaris
 [^-]*-openbsd[^-]*  openbsd
+[^-]*-darwin[^-]*   darwin
 
 # Catch all
 .*     unknown
diff -ruN apt-0.5.4/cmdline/apt-cache.cc apt-0.5.4-patched/cmdline/apt-cache.cc
--- apt-0.5.4/cmdline/apt-cache.cc      Sun Jul  1 20:10:32 2001
+++ apt-0.5.4-patched/cmdline/apt-cache.cc      Sun Nov  9 14:02:47 2003
@@ -374,8 +374,10 @@
    if (ReadPinFile(Plcy) == false)
       return false;
    
-   pkgCache::VerFile **VFList = new pkgCache::VerFile *[Cache.HeaderP->PackageCount];
-   memset(VFList,0,sizeof(*VFList)*Cache.HeaderP->PackageCount);
+   // Make sure we have a sentinel for the list.
+   unsigned long Count = Cache.HeaderP->PackageCount+1;
+   pkgCache::VerFile **VFList = new pkgCache::VerFile *[Count];
+   memset(VFList,0,sizeof(*VFList)*Count);
    
    // Map versions that we want to write out onto the VerList array.
    for (pkgCache::PkgIterator P = Cache.PkgBegin(); P.end() == false; P++)
@@ -428,7 +430,7 @@
       VFList[P->ID] = VF;
    }
    
-   LocalitySort(VFList,Cache.HeaderP->PackageCount,sizeof(*VFList));
+   LocalitySort(VFList,Count,sizeof(*VFList));
 
    // Iterate over all the package files and write them out.
    char *Buffer = new char[Cache.HeaderP->MaxVerFileSize+10];
diff -ruN apt-0.5.4/cmdline/apt-get.cc apt-0.5.4-patched/cmdline/apt-get.cc
--- apt-0.5.4/cmdline/apt-get.cc        2001-07-01 18:59:04.000000000 -0400
+++ apt-0.5.4-patched/cmdline/apt-get.cc        2004-09-29 23:27:27.000000000 -0400
@@ -113,6 +113,8 @@
       return true;
    }
    
+   fflush(NULL);
+   
    char C = 0;
    char Jnk = 0;
    if (read(STDIN_FILENO,&C,1) != 1)
@@ -281,7 +283,14 @@
                  if (Cache[Targ].CandidateVerIter(Cache).end() == true)
                  {
                     if (Targ->ProvidesList == 0)
-                       out << _("but it is not installable");
+                    {
+                       out << _("but it is not installable. For Fink users, ");
+                       out << _("this often means that you have attempted ");
+                       out << _("to install a package from the binary distribution ");
+                       out << _("which depends on a \"Restrictive\" package. ");
+                       out << _("See 
<http://fink.sourceforge.net/faq/usage-fink.php#bindist>, ");
+                       out << 
_("<http://fink.sourceforge.net/doc/users-guide/packages.php#bin-exceptions>");
+                    }
                     else
                        out << _("but it is a virtual package");
                  }               
@@ -569,7 +578,8 @@
       return false;
    
    // Nothing is broken
-   if (DCache->BrokenCount() == 0 || AllowBroken == true)
+   if (DCache->BrokenCount() == 0 || AllowBroken == true
+       || _config->FindB("APT::Get::Allow-Broken") == true)
       return true;
 
    // Attempt to fix broken things
@@ -634,7 +644,8 @@
    Stats(c1out,Cache);
    
    // Sanity check
-   if (Cache->BrokenCount() != 0)
+   if (Cache->BrokenCount() != 0
+       && _config->FindB("APT::Get::Allow-Broken",false) == false)
    {
       ShowBroken(c1out,Cache,false);
       return _error->Error("Internal Error, InstallPackages was called with broken 
packages!");
@@ -1019,7 +1030,8 @@
       ExpectedInst++;
    
    // Install it with autoinstalling enabled.
-   if (State.InstBroken() == true && BrokenFix == false)
+   if (State.InstBroken() == true && BrokenFix == false
+      && _config->FindB("APT::Get::Allow-Broken") == false)
       Cache.MarkInstall(Pkg,true);
    return true;
 }
@@ -1366,7 +1378,8 @@
    /* If we are in the Broken fixing mode we do not attempt to fix the
       problems. This is if the user invoked install without -f and gave
       packages */
-   if (BrokenFix == true && Cache->BrokenCount() != 0)
+   if (BrokenFix == true && Cache->BrokenCount() != 0
+       && _config->FindB("APT::Get::Allow-Broken") == false)
    {
       c1out << _("You might want to run `apt-get -f install' to correct these:") << 
endl;
       ShowBroken(c1out,Cache,false);
@@ -1376,11 +1389,11 @@
    
    // Call the scored problem resolver
    Fix.InstallProtect();
-   if (Fix.Resolve(true) == false)
+   if (_config->FindB("APT::Get::Allow-Broken") == false && Fix.Resolve(true) == 
false)
       _error->Discard();
 
    // Now we check the state of the packages,
-   if (Cache->BrokenCount() != 0)
+   if (Cache->BrokenCount() != 0 && _config->FindB("APT::Get::Allow-Broken") == false)
    {
       c1out << 
        _("Some packages could not be installed. This may mean that you have\n" 
@@ -2057,6 +2070,7 @@
    _config->Set("APT::Get::Simulate",false);
    _config->Set("APT::Get::Assume-Yes",false);
    _config->Set("APT::Get::Fix-Broken",false);
+   _config->Set("APT::Get::Allow-Broken",false);
    _config->Set("APT::Get::Force-Yes",false);
    _config->Set("APT::Get::APT::Get::No-List-Cleanup",true);
 }
@@ -2094,6 +2108,7 @@
       {'y',"yes","APT::Get::Assume-Yes",0},
       {'y',"assume-yes","APT::Get::Assume-Yes",0},      
       {'f',"fix-broken","APT::Get::Fix-Broken",0},
+      {0,"allow-broken","APT::Get::Allow-Broken",0},
       {'u',"show-upgraded","APT::Get::Show-Upgraded",0},
       {'m',"ignore-missing","APT::Get::Fix-Missing",0},
       {'t',"target-release","APT::Default-Release",CommandLine::HasArg},
diff -ruN apt-0.5.4/configure apt-0.5.4-patched/configure
--- apt-0.5.4/configure Sat Aug 18 20:46:43 2001
+++ apt-0.5.4-patched/configure Sun Nov  9 14:02:48 2003
@@ -2394,7 +2394,7 @@
 
 ac_given_srcdir=$srcdir
 
-trap 'rm -fr `echo "environment.mak:buildlib/environment.mak.in 
makefile:buildlib/makefile.in include/config.h:buildlib/config.h.in 
include/apti18n.h:buildlib/apti18n.h.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+trap 'rm -fr `echo "environment.mak:buildlib/environment.mak.in 
makefile.wrap:buildlib/makefile.in include/config.h:buildlib/config.h.in 
include/apti18n.h:buildlib/apti18n.h.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
 EOF
 cat >> $CONFIG_STATUS <<EOF
 
@@ -2504,7 +2504,7 @@
 
 cat >> $CONFIG_STATUS <<EOF
 
-CONFIG_FILES=\${CONFIG_FILES-"environment.mak:buildlib/environment.mak.in 
makefile:buildlib/makefile.in"}
+CONFIG_FILES=\${CONFIG_FILES-"environment.mak:buildlib/environment.mak.in 
makefile.wrap:buildlib/makefile.in"}
 EOF
 cat >> $CONFIG_STATUS <<\EOF
 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
@@ -2670,7 +2670,7 @@
 
 EOF
 cat >> $CONFIG_STATUS <<\EOF
-make -s dirs
+make -f makefile.wrap -s dirs
 exit 0
 EOF
 chmod +x $CONFIG_STATUS
diff -ruN apt-0.5.4/configure.in apt-0.5.4-patched/configure.in
--- apt-0.5.4/configure.in      Mon Jun 18 01:56:32 2001
+++ apt-0.5.4-patched/configure.in      Sun Nov  9 14:02:48 2003
@@ -163,4 +163,4 @@
 rc_LIBSTDCPP_VER
 ah_GCC3DEP
 
-AC_OUTPUT(environment.mak:buildlib/environment.mak.in 
makefile:buildlib/makefile.in,make -s dirs)
+AC_OUTPUT(environment.mak:buildlib/environment.mak.in 
makefile.wrap:buildlib/makefile.in,make -f makefile.wrap -s dirs)
diff -ruN apt-0.5.4/dselect/install apt-0.5.4-patched/dselect/install
--- apt-0.5.4/dselect/install   Tue Feb 20 02:03:17 2001
+++ apt-0.5.4-patched/dselect/install   Sun Nov  9 14:02:48 2003
@@ -3,8 +3,8 @@
 # Get the configuration from /etc/apt/apt.conf
 CLEAN="prompt"
 OPTS="-f"
-APTGET="/usr/bin/apt-get"
-DPKG="/usr/bin/dpkg"
+APTGET="@PREFIX@/bin/apt-get"
+DPKG="@PREFIX@/bin/dpkg"
 DPKG_OPTS="--admindir=$1"
 APT_OPT0="-oDir::State::status=$1/status"
 APT_OPT1="-oDPkg::Options::=$DPKG_OPTS"
diff -ruN apt-0.5.4/dselect/setup apt-0.5.4-patched/dselect/setup
--- apt-0.5.4/dselect/setup     Wed Jan 26 23:15:10 2000
+++ apt-0.5.4-patched/dselect/setup     Sun Nov  9 14:36:03 2003
@@ -23,15 +23,17 @@
 my $vardir=$ARGV[0];
 my $method=$ARGV[1];
 my $option=$ARGV[2];
-my $config_file = '/etc/apt/sources.list';
+my $config_file = '@PREFIX@/etc/apt/sources.list';
 
-my $boldon=`setterm -bold on`;
-my $boldoff=`setterm -bold off`;
+my $boldon=`setterm -bold on 2>/dev/null`;
+my $boldoff=`setterm -bold off 2>/dev/null`;
+$boldon = "" unless defined $boldon;
+$boldoff = "" unless defined $boldon;
 
 my @known_types           = ('deb');
 my @known_access         = ('http', 'ftp', 'file');
-my @typical_distributions = ('stable', 'unstable', 'frozen', 'non-US');
-my @typical_components    = ('main', 'contrib', 'non-free');
+my @typical_distributions = ('10.3/release', '10.3/current');
+my @typical_components    = ('main', 'crypto');
 
 my %known_access           = map {($_,$_)} @known_access;
 my %typical_distributions  = map {($_,$_)} @typical_distributions;
@@ -118,9 +120,9 @@
   }
 
   $type         = 'deb';
-  $urn          = "http://http.us.debian.org/debian"; unless $urn;
-  $distribution = "stable" unless $distribution;
-  $components   = "main contrib non-free" unless $components;
+  $urn          = "http://us.dl.sourceforge.net/fink/direct_download"; unless $urn;
+  $distribution = "10.3/release" unless $distribution;
+  $components   = "main" unless $components;
 
     
   $rec->{'Type'} = 'deb';
@@ -222,19 +224,13 @@
   print "\t$boldon Set up a list of distribution source locations $boldoff \n";
   print "\n";
 
-  print " Please give the base URL of the debian distribution.\n";
+  print " Please give the base URL of the Fink distribution.\n";
   print " The access schemes I know about are:$boldon ";
   print join (' ', @known_access), "$boldoff\n";
-#  print " The mirror scheme is special  that it does not specify the\n";
-#  print " location of a debian archive but specifies the location\n";
-#  print " of a list of mirrors to use to access the archive.\n";
   print "\n";
   print " For example:\n";
-  print "              file:/mnt/debian,\n";
-  print "              ftp://ftp.debian.org/debian,\n";;
-  print "              http://ftp.de.debian.org/debian,\n";;
-#  print " and the special mirror scheme,\n";
-#  print "              mirror:http://www.debian.org/archivemirrors \n";
+  print "              file:@PREFIX@/fink,\n";
+  print "              http://us.dl.sourceforge.net/fink/direct_download\n";;
   print "\n";
 
   my $index = 0;
@@ -269,7 +265,10 @@
     print "-" x 72, "\n";
     &print_config('Config' => [EMAIL PROTECTED]);
     print "-" x 72, "\n";
-    print "$boldon Do you wish to change (overwrite) it?[y/N]$boldoff ";
+    print "$boldon In most cases, this file was installed by Fink or by apt,"
+       ." and$boldoff\n";
+        print "$boldon should NOT be changed.  " .
+        "Do you wish to change (overwrite) it?[y/N]$boldoff ";
     my $answer = <STDIN>;
     chomp ($answer);
     $answer =~ s/\s+/ /og;
diff -ruN apt-0.5.4/dselect/update apt-0.5.4-patched/dselect/update
--- apt-0.5.4/dselect/update    Mon Mar 12 20:45:36 2001
+++ apt-0.5.4-patched/dselect/update    Sun Nov  9 14:02:48 2003
@@ -4,13 +4,13 @@
 # Get the configuration from /etc/apt/apt.conf
 CLEAN="prompt"
 OPTS="-f"
-APTGET="/usr/bin/apt-get"
-APTCACHE="/usr/bin/apt-cache"
-DPKG="/usr/bin/dpkg"
+APTGET="@PREFIX@/bin/apt-get"
+APTCACHE="@PREFIX@/bin/apt-cache"
+DPKG="@PREFIX@/bin/dpkg"
 DPKG_OPTS="--admindir=$1"
 APT_OPT0="-oDir::State::status=$1/status"
 APT_OPT1="-oDPkg::Options::=$DPKG_OPTS"
-CACHEDIR="/var/cache/apt"
+CACHEDIR="@PREFIX@/var/cache/apt"
 PROMPT="false"
 RES=`apt-config shell CLEAN DSelect::Clean OPTS DSelect::UpdateOptions \
                      DPKG Dir::Bin::dpkg/f APTGET Dir::Bin::apt-get/f \
diff -ruN apt-0.5.4/methods/connect.cc apt-0.5.4-patched/methods/connect.cc
--- apt-0.5.4/methods/connect.cc        Tue Feb 20 02:03:18 2001
+++ apt-0.5.4-patched/methods/connect.cc        Sun Nov  9 14:02:48 2003
@@ -90,7 +90,7 @@
 
    // Check the socket for an error condition
    unsigned int Err;
-   unsigned int Len = sizeof(Err);
+   int Len = sizeof(Err);
    if (getsockopt(Fd,SOL_SOCKET,SO_ERROR,&Err,&Len) != 0)
       return _error->Errno("getsockopt","Failed");
    
diff -ruN apt-0.5.4/methods/ftp.cc apt-0.5.4-patched/methods/ftp.cc
--- apt-0.5.4/methods/ftp.cc    Tue May 22 00:02:00 2001
+++ apt-0.5.4-patched/methods/ftp.cc    Sun Nov  9 14:02:48 2003
@@ -694,7 +694,7 @@
       if (WaitFd(DataFd,true,TimeOut) == false)
         return _error->Error("Could not connect data socket, connection timed out");
       unsigned int Err;
-      unsigned int Len = sizeof(Err);
+      int Len = sizeof(Err);
       if (getsockopt(DataFd,SOL_SOCKET,SO_ERROR,&Err,&Len) != 0)
         return _error->Errno("getsockopt","Failed");
       if (Err != 0)
diff -ruN apt-0.5.4/methods/rfc2553emu.h apt-0.5.4-patched/methods/rfc2553emu.h
--- apt-0.5.4/methods/rfc2553emu.h      Sun Jun 18 02:04:45 2000
+++ apt-0.5.4-patched/methods/rfc2553emu.h      Sun Nov  9 14:02:48 2003
@@ -26,6 +26,11 @@
 #include <sys/types.h>
 #include <sys/socket.h>
 
+// Always use full emulation on Darwin:
+//  netdb.h has the structures and constants, but getnameinfo() is missing
+//  and getaddrinfo() seems to be broken
+#ifndef __APPLE__
+
 // Autosense getaddrinfo
 #if defined(AI_PASSIVE) && defined(EAI_NONAME)
 #define HAVE_GETADDRINFO
@@ -36,6 +41,8 @@
 #define HAVE_GETNAMEINFO
 #endif
 
+#endif /* __APPLE__ */
+
 // getaddrinfo support?
 #ifndef HAVE_GETADDRINFO
   // Renamed to advoid type clashing.. (for debugging)
@@ -100,6 +107,9 @@
 //  #define NI_NOFQDN (1<<2)
   #define NI_NAMEREQD (1<<3)
   #define NI_DATAGRAM (1<<4)
+  #endif
+  #ifndef NI_DATAGRAM
+  #define NI_DATAGRAM NI_DGRAM
   #endif
 
   #define sockaddr_storage sockaddr_in
diff -ruN apt-0.5.4/patch_flush apt-0.5.4-patched/patch_flush
--- apt-0.5.4/patch_flush       Wed Dec 31 19:00:00 1969
+++ apt-0.5.4-patched/patch_flush       Sun Nov  9 14:02:48 2003
@@ -0,0 +1,11 @@
+#!/bin/sh
+set -e
+
+files=`find . -name '*.cc' -print | xargs grep -l 'flush;'`
+
+for i in $files ; do
+  sed 's/<< flush;/<< flush, fflush(NULL);/g' <$i >$i.tmp
+  mv $i.tmp $i
+done
+
+exit 0
--- apt-0.5.4/doc/examples/configure-index      2001-02-20 02:03:17.000000000 -0500
+++ apt-0.5.4-patched/doc/examples/configure-index      2004-09-29 16:58:35.000000000 
-0400
@@ -30,6 +30,7 @@
      Assume-Yes "false";
      Force-Yes "false";             // I would never set this.
      Fix-Broken "false";  
+     Allow-Broken "false";  
      Fix-Missing "false";     
      Show-Upgraded "false";
      Upgrade "true";
--- apt-0.5.4/doc/apt-get.8     2001-08-18 20:48:25.000000000 -0400
+++ apt-0.5.4-patched/doc/apt-get.8     2004-09-29 23:37:30.000000000 -0400
@@ -75,7 +75,7 @@
 to select. This will cause that version to be located and selected for
 install. Alternatively a specific distribution can be selected by 
 following the package name with a slash and the version of the 
-distribution or the Archive name (stable, frozen, unstable).
+distribution or the Archive name (10.3/release or 10.3/current).
 
 Both of the version selection mechanisms can downgrade packages and must
 be used with care.
@@ -169,6 +169,18 @@
 error in some situations. 
 Configuration Item: APT::Get::Fix-Broken.
 .TP
+\fB--allow-broken\fR
+For mode \fBinstall\fR, ignore dependency problems. This option is
+useful if you want to perform actions on just a particular package,
+not its whole dependency tree, for example, \fB--download-only\fR.
+\fBWarning:\fR Use of this option with actions that alter, add, or
+remove installed packages can lead to serious dependency problems!
+Configuration Item: APT::Get::Allow-Broken.
+
+Note: The \fB--allow-broken\fR option was added by The Fink Project
+and hence is only available in the \fBapt-get\fR provided by Fink's
+\fBapt\fR package.
+.TP
 \fB-m\fR
 .TP
 \fB--ignore-missing\fR
--- apt-0.5.4/doc/sources.list.5        2001-08-18 20:48:26.000000000 -0400
+++ apt-0.5.4-patched/doc/sources.list.5        2004-09-29 17:40:39.000000000 -0400
@@ -25,9 +25,8 @@
 .PP
 The deb type describes a typical two-level Debian archive,
 \fIdistribution/component\fR. Typically, distribution is 
-generally one of stable, unstable, or 
-frozen, while component is one of main, 
-contrib, non-free, or non-us. The 
+generally one of 10.3/release or 10.3/current,
+while component is one of main or crypto. The
 deb-src type describes a debian distribution's source code in 
 the same form as the deb type. A deb-src line is 
 required to fetch source indexes.

--- NEW FILE: apt.info ---
Package: apt
Version: 0.5.4
Revision: 37.dmacks2
GCC: 3.3
Depends: %N-shlibs (= %v-%r)
BuildDepends: fink-prebinding
Source: mirror:sourceforge:fink/%n_%v.tar.gz
Source-MD5: 274fb64e2e67318b4c9c94599785c37d
SourceDirectory: %n-%v
PatchScript: <<
 sed 's|@PREFIX@|%p|g' <%a/%n.patch | patch -p1
 sh patch_flush
 for i in `grep -rl '#ifdef __GNUG__' .` ; do perl -pi.bak -e 's/#ifdef __GNUG__/#if 
defined(__GNUG__) && !defined(__APPLE_CC__)/' $i; done
 for i in `grep -rl '#ifdef __GNUG__' .` ; do perl -pi.bak -e 's/#ifdef __GNUG__/#if 
defined(__GNUG__) && !defined(__APPLE_CC__)/' $i ; done
<<
NoSetCPPFLAGS: true
NoSetLDFLAGS: true
SetCXXFLAGS: -O2 -DEMULATE_MMAP -D__USE_MISC -fconstant-cfstrings
CompileScript: <<
 ./configure %c
 make -f makefile.wrap NOISY=1
<<
InstallScript: <<
 mkdir -p %i/bin
 install -m 755 bin/apt-cache %i/bin/
 install -m 755 bin/apt-cdrom %i/bin/
 install -m 755 bin/apt-config %i/bin/
 install -m 755 bin/apt-extracttemplates %i/bin/
 install -m 755 bin/apt-get %i/bin/
 install -m 755 bin/apt-sortpkgs %i/bin/
 mkdir -p %i/lib
 install -m 644 bin/libapt-pkg.3.2.0.dylib %i/lib/
 cd %i/lib/ && ln -s libapt-pkg.3.2.0.dylib libapt-pkg.3.2.dylib && ln -s 
libapt-pkg.3.2.0.dylib libapt-pkg.dylib
 install -m 644 bin/libapt-inst.1.0.0.dylib %i/lib/
 cd %i/lib/ && ln -s libapt-inst.1.0.0.dylib libapt-inst.1.0.dylib && ln -s 
libapt-inst.1.0.0.dylib libapt-inst.dylib
 mkdir -p %i/lib/apt/methods
 install -m 755 bin/methods/cdrom %i/lib/apt/methods/
 install -m 755 bin/methods/copy %i/lib/apt/methods/
 install -m 755 bin/methods/file %i/lib/apt/methods/
 install -m 755 bin/methods/ftp %i/lib/apt/methods/
 install -m 755 bin/methods/gzip %i/lib/apt/methods/
 install -m 755 bin/methods/http %i/lib/apt/methods/
 install -m 755 bin/methods/rsh %i/lib/apt/methods/
 cd %i/lib/apt/methods && ln -s rsh ssh
 mkdir -p %i/lib/dpkg/methods/apt
 install -m 644 scripts/dselect/desc.apt %i/lib/dpkg/methods/apt/
 install -m 755 scripts/dselect/install %i/lib/dpkg/methods/apt/
 install -m 644 scripts/dselect/names %i/lib/dpkg/methods/apt/
 install -m 755 scripts/dselect/setup %i/lib/dpkg/methods/apt/
 install -m 755 scripts/dselect/update %i/lib/dpkg/methods/apt/
 mkdir -p %i/include/apt-pkg
 cp include/apt-pkg/*.h %i/include/apt-pkg/
 mkdir -p %i/share/man
 mkdir -p %i/share/man/man1
 mkdir -p %i/share/man/man5
 mkdir -p %i/share/man/man8
 install -m 644 doc/apt.8 %i/share/man/man8/
 install -m 644 docs/apt-cache.8 %i/share/man/man8/
 install -m 644 docs/apt-cdrom.8 %i/share/man/man8/
 install -m 644 docs/apt-config.8 %i/share/man/man8/
 install -m 644 docs/apt-extracttemplates.1 %i/share/man/man1/
 install -m 644 docs/apt-get.8 %i/share/man/man8/
 install -m 644 docs/apt-sortpkgs.1 %i/share/man/man1/
 install -m 644 docs/apt.conf.5 %i/share/man/man5/
 install -m 644 docs/apt_preferences.5 %i/share/man/man5/
 install -m 644 docs/sources.list.5 %i/share/man/man5/
 mkdir -p %i/etc/apt/apt.conf.d
 mkdir -p %i/var/cache/apt/archives/partial
 mkdir -p %i/var/lib/apt/lists/partial
<<
SplitOff: <<
  Package: %N-shlibs
  Depends: dpkg, fink (>> 0.20.6-1)
  Replaces: %N (<= 0.5.4-1)
  Files: lib/libapt-inst.1.0.0.dylib lib/libapt-pkg.3.2.0.dylib 
lib/libapt-inst.1.0.dylib lib/libapt-pkg.3.2.dylib
  Shlibs: <<
    %p/lib/libapt-inst.1.0.dylib 1.0.0 %n (>= 0.5.4-24)
    %p/lib/libapt-pkg.3.2.dylib 3.2.0 %n (>= 0.5.4-24)
  <<
  DocFiles: COPYING* AUTHORS
<<
SplitOff2: <<
  Package: %N-dev
  Depends: %N-shlibs (= %v-%r)
  BuildDependsOnly: true
  Files: lib/libapt-inst.dylib lib/libapt-pkg.dylib include
  DocFiles: COPYING* AUTHORS
<<
DocFiles: COPYING* AUTHORS
PostInstScript: <<
if [ ! -f %p/var/lib/dpkg/cmethopt ]; then
  echo "apt apt" >%p/var/lib/dpkg/cmethopt
  chmod 644 %p/var/lib/dpkg/cmethopt
else
  read a b <%p/var/lib/dpkg/cmethopt
  if [ "$a" != "apt" -o "$b" != "apt" ]; then
    echo
    echo "dselect is not set up to use apt as its access method. Downloading binary"
    echo -n "package will likely not work. Do you want to use apt instead?"
    read answer
    answer=`echo $answer | sed 's/^[yY].*$/y/'`
    if [ -z "$answer" -o "x$answer" = "xy" ]; then
      echo "apt apt" >%p/var/lib/dpkg/cmethopt
      chmod 644 %p/var/lib/dpkg/cmethopt
    fi
  fi
fi

rm -f %p/var/cache/apt/pkgcache.bin %p/var/cache/apt/srcpkgcache.bin
<<
#
Description: Advanced front-end for dpkg
DescPort: <<
There are three troublemakers when porting apt:
- It was written for Linux/ELF/glibc.
- It was written to maintain a distribution that is in charge of the
  system and hardcodes paths like /usr/bin, /usr/lib and /var/lib.
- There is no install target in the Makefiles because the Debian
  packaging files take care of what goes where.
There's also the usual trouble like not recognizing Darwin and
depending on a case-sensitive file system. All of this amounts to a
big, bad patch.

The patch also fixes some potential and some real crashing bugs.

Oh, one more thing: mmap() is broken for non-trivial uses in OS X
10.1. Luckily apt uses a wrapper class that can be equipped with a
workaround (malloc() + read() + write()...).

The -fno-rtti works around a bug in GCC 3.1 on Jaguar.

Ben Hines - added patch to make apt recognize macosx and darwin pkgs

The sources.list file is now supplied by the fink program rather than
by apt-get.

dmacks - Apple added type socklen_t (sys/socket.h) in 10.3

dmacks - Implemented "--allow-broken" cmdline flag to apt-get
<<
DescPackaging: <<
Previous versions by Christoph Pfisterer.
<<
License: GPL
Maintainer: Fink Core Group <[EMAIL PROTECTED]>
Homepage: http://packages.qa.debian.org/a/apt.html



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Fink-commits mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-commits

Reply via email to