Update of /cvsroot/fink/fink/10.2
In directory sc8-pr-cvs1:/tmp/cvs-serv21658

Modified Files:
      Tag: branch_0_11_1
        ChangeLog 
Added Files:
      Tag: branch_0_11_1
        apt-0.5.4-7.info apt-0.5.4-7.patch 
Removed Files:
      Tag: branch_0_11_1
        apt-0.5.4-6.info apt-0.5.4-6.patch 
Log Message:
modify apt's sources.list for 10.2 update


--- NEW FILE: apt-0.5.4-7.info ---
Package: apt
Version: 0.5.4
Revision: 7
GCC: 3.1
Depends: %N-shlibs (= %v-%r)
Source: mirror:sourceforge:fink/%n_%v.tar.gz
SourceDirectory: %n-%v
PatchScript: <<
 sed 's|@PREFIX@|%p|g' <%a/%f.patch | patch -p1
 if [ "%p" = "/sw" ]; then cat sources.list.fink-bindist >>sources.list.fink ; fi
 sh patch_flush
<<
NoSetCPPFLAGS: true
NoSetLDFLAGS: true
SetCXXFLAGS: -O2 -DEMULATE_MMAP -fno-rtti -D__USE_MISC
CompileScript: <<
 ./configure %c
 make -f makefile.wrap
<<
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
 install -m 644 sources.list.fink %i/etc/apt/sources.list
 mkdir -p %i/var/cache/apt/archives/partial
 mkdir -p %i/var/lib/apt/lists/partial
<<
SplitOff: <<
  Package: %N-shlibs
  Depends: dpkg
  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 %n (>= %v-%r)
    %p/lib/libapt-pkg.3.2.dylib %n (>= %v-%r)
  <<
  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
ConfFiles: %p/etc/apt/sources.list
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
perl -pi -e 's#direct_download (release|current)#direct_download 10.2/$1#g' 
%p/etc/apt/sources.list
<<
#
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.
<<
DescPackaging: Previous versions by Christoph Pfisterer.
License: GPL
Maintainer: Max Horn <[EMAIL PROTECTED]>

--- NEW FILE: apt-0.5.4-7.patch ---
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 07:19:30 2001
+++ apt-0.5.4-patched/apt-pkg/contrib/mmap.cc   Fri Oct 19 10:18:27 2001
@@ -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;
 }
@@ -99,9 +109,17 @@
    
    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 07:16:43 2001
+++ apt-0.5.4-patched/apt-pkg/contrib/mmap.h    Fri Oct 19 10:18:40 2001
@@ -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 07:13:51 2001
+++ apt-0.5.4-patched/apt-pkg/deb/debindexfile.cc       Fri Oct 19 10:19:11 2001
@@ -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 07:13:51 2001
+++ apt-0.5.4-patched/apt-pkg/deb/debsystem.cc  Fri Oct 19 10:20:04 2001
@@ -30,6 +30,16 @@
 
 debSystem debSys;
 
+extern void init_deb2();
+extern void init_deb3();
+
+void initDebSystem()
+{
+  (void)debSys;
+  init_deb2();
+  init_deb3();
+}
+
 // System::debSystem - Constructor                                     /*{{{*/
 // ---------------------------------------------------------------------
 /* */
@@ -161,8 +171,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 +195,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;
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 07:14:53 2001
+++ apt-0.5.4-patched/apt-pkg/deb/debversion.cc Fri Oct 19 10:20:59 2001
@@ -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 07:51:46 2001
+++ apt-0.5.4-patched/apt-pkg/init.cc   Fri Oct 19 10:22:23 2001
@@ -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/tagfile.cc apt-0.5.4-patched/apt-pkg/tagfile.cc
--- apt-0.5.4/apt-pkg/tagfile.cc        Mon May 14 07:56:26 2001
+++ apt-0.5.4-patched/apt-pkg/tagfile.cc        Fri Oct 19 10:26:32 2001
@@ -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 07:42:52 2001
+++ apt-0.5.4-patched/apt-pkg/tagfile.h Fri Oct 19 10:25:33 2001
@@ -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 07:11:03 2001
+++ apt-0.5.4-patched/buildlib/environment.mak.in       Fri Oct 19 10:13:28 2001
@@ -11,7 +11,7 @@
 LIBSTDCPP_VER = @LIBSTDCPP_VER@
 
 # Linker stuff
-PICFLAGS+= -fPIC -DPIC
+PICFLAGS+= -fno-common -DPIC
 LFLAGS+= @LDFLAGS@
 LEFLAGS+= 
 SOCKETLIBS:= @SOCKETLIBS@
@@ -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 -flat_namespace -undefined suppress
        
diff -ruN apt-0.5.4/buildlib/library.mak apt-0.5.4-patched/buildlib/library.mak
--- apt-0.5.4/buildlib/library.mak      Tue Feb 27 05:16:05 2001
+++ apt-0.5.4-patched/buildlib/library.mak      Fri Oct 19 10:13:28 2001
@@ -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 08:03:17 2001
+++ apt-0.5.4-patched/buildlib/ostable  Fri Oct 19 10:13:28 2001
@@ -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      Mon Jul  2 02:10:32 2001
+++ apt-0.5.4-patched/cmdline/apt-cache.cc      Fri Oct 19 10:13:28 2001
@@ -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        Mon Jul  2 00:59:04 2001
+++ apt-0.5.4-patched/cmdline/apt-get.cc        Fri Oct 19 10:13:28 2001
@@ -113,6 +113,8 @@
       return true;
    }
    
+   fflush(NULL);
+   
    char C = 0;
    char Jnk = 0;
    if (read(STDIN_FILENO,&C,1) != 1)
diff -ruN apt-0.5.4/configure apt-0.5.4-patched/configure
--- apt-0.5.4/configure Sun Aug 19 02:46:43 2001
+++ apt-0.5.4-patched/configure Fri Oct 19 10:13:28 2001
@@ -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 07:56:32 2001
+++ apt-0.5.4-patched/configure.in      Fri Oct 19 10:13:28 2001
@@ -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 08:03:17 2001
+++ apt-0.5.4-patched/dselect/install   Fri Oct 19 10:13:28 2001
@@ -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     Thu Jan 27 05:15:10 2000
+++ apt-0.5.4-patched/dselect/setup     Fri Oct 19 10:32:00 2001
@@ -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 = ('release', '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 = "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:/sw/fink,\n";
+  print "              http://us.dl.sourceforge.net/fink/direct_download\n";;
   print "\n";
 
   my $index = 0;
diff -ruN apt-0.5.4/dselect/update apt-0.5.4-patched/dselect/update
--- apt-0.5.4/dselect/update    Tue Mar 13 02:45:36 2001
+++ apt-0.5.4-patched/dselect/update    Fri Oct 19 10:13:28 2001
@@ -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 08:03:18 2001
+++ apt-0.5.4-patched/methods/connect.cc        Fri Oct 19 10:13:28 2001
@@ -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 06:02:00 2001
+++ apt-0.5.4-patched/methods/ftp.cc    Fri Oct 19 10:13:28 2001
@@ -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)
@@ -739,7 +739,7 @@
    
    // Determine the name to send to the remote
    struct sockaddr_storage Addr;
-   socklen_t AddrLen = sizeof(Addr);
+   int AddrLen = sizeof(Addr);
    if (getsockname(DataListenFd,(sockaddr *)&Addr,&AddrLen) < 0)
       return _error->Errno("getsockname","Could not determine the socket's name");
 
@@ -815,7 +815,7 @@
       
    // Accept the connection
    struct sockaddr_in Addr;
-   socklen_t Len = sizeof(Addr);
+   int Len = sizeof(Addr);
    DataFd = accept(DataListenFd,(struct sockaddr *)&Addr,&Len);
    if (DataFd < 0)
       return _error->Errno("accept","Unable to accept connection");
diff -ruN apt-0.5.4/methods/ftp.h apt-0.5.4-patched/methods/ftp.h
--- apt-0.5.4/methods/ftp.h     Tue Mar  6 08:15:29 2001
+++ apt-0.5.4-patched/methods/ftp.h     Fri Oct 19 10:13:28 2001
@@ -26,11 +26,11 @@
    
    // Generic Peer Address
    struct sockaddr_storage PeerAddr;
-   socklen_t PeerAddrLen;
+   int PeerAddrLen;
    
    // Generic Server Address (us)
    struct sockaddr_storage ServerAddr;
-   socklen_t ServerAddrLen;
+   int ServerAddrLen;
    
    // Private helper functions
    bool ReadLine(string &Text);      
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 08:04:45 2000
+++ apt-0.5.4-patched/methods/rfc2553emu.h      Fri Oct 19 10:13:28 2001
@@ -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       Thu Jan  1 01:00:00 1970
+++ apt-0.5.4-patched/patch_flush       Fri Oct 19 10:13:28 2001
@@ -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
diff -ruN apt-0.5.4/sources.list.fink apt-0.5.4-patched/sources.list.fink
--- apt-0.5.4/sources.list.fink Thu Jan  1 01:00:00 1970
+++ apt-0.5.4-patched/sources.list.fink Fri Oct 19 10:34:29 2001
@@ -0,0 +1,8 @@
+# Default APT sources configuration for Fink
+
+# Local package trees - packages built from source locally
+# NOTE: keep this in sync with the Trees: line in @PREFIX@/etc/fink.conf
+# NOTE: run 'fink scanpackages' to create Packages.gz files
+deb file:@PREFIX@/fink local main
+deb file:@PREFIX@/fink stable main crypto
+#deb file:@PREFIX@/fink unstable main crypto
diff -ruN apt-0.5.4/sources.list.fink-bindist 
apt-0.5.4-patched/sources.list.fink-bindist
--- apt-0.5.4/sources.list.fink-bindist Thu Jan  1 01:00:00 1970
+++ apt-0.5.4-patched/sources.list.fink-bindist Fri Oct 19 10:34:54 2001
@@ -0,0 +1,8 @@
+
+# Official binary distribution: download location for packages
+# from the latest release
+deb http://us.dl.sourceforge.net/fink/direct_download 10.2/release main crypto
+
+# Official binary distribution: download location for updated
+# packages built between releases
+deb http://us.dl.sourceforge.net/fink/direct_download 10.2/current main crypto

Index: ChangeLog
===================================================================
RCS file: /cvsroot/fink/fink/10.2/ChangeLog,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -u -r1.3 -r1.3.2.1
--- ChangeLog   11 Oct 2002 11:28:13 -0000      1.3
+++ ChangeLog   5 Dec 2002 14:24:32 -0000       1.3.2.1
@@ -1,3 +1,10 @@
+2002-12-05  Dave Morrison  <[EMAIL PROTECTED]>
+
+       * modify the apt sources.list configuration file, to use 10.2/release
+       and 10.2/current rather that release and current; also add a line to
+       the postinstall script to make this change for users with custom
+       configurations (modifications from Ben Hines)
+       
 2002-10-11  Max Horn  <[EMAIL PROTECTED]>
 
        * fixed an issue with apt (preventing it from using its own timegm function)

--- apt-0.5.4-6.info DELETED ---

--- apt-0.5.4-6.patch DELETED ---



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Fink-commits mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-commits

Reply via email to