Fix building tsocks for 32 bit architectures
[termux-packages] / packages / apt / apt-pkg-init-dir.patch
index e836304..151aab4 100644 (file)
@@ -1,26 +1,50 @@
-diff -u -r ../upstream.git/apt-pkg/init.cc ./apt-pkg/init.cc
---- ../upstream.git/apt-pkg/init.cc    2014-05-05 14:01:59.000000000 +0200
-+++ ./apt-pkg/init.cc  2014-06-04 13:57:49.848604233 +0200
-@@ -44,7 +44,8 @@
-       Cnf.Set("APT::Build-Essential::", "build-essential");
+--- ../cache/apt-1.4.7/apt-pkg/init.cc 2017-07-14 07:45:39.000000000 +1000
++++ ./apt-pkg/init.cc  2017-07-19 17:03:07.949752843 +1000
+@@ -51,7 +51,7 @@
+    return vec;
+ }
+-
++#ifndef __ANDROID__
+ // pkgInitArchTupleMap - Initialize the architecture tuple map                                /*{{{*/
+ // ---------------------------------------------------------------------
+ /* This initializes */
+@@ -116,7 +116,7 @@
+    return true;
+ }
+-                                                                      /*}}}*/
++#endif                                                                        /*}}}*/
+     
+ // pkgInitConfig - Initialize the configuration class                 /*{{{*/
+@@ -133,6 +133,7 @@
     Cnf.CndSet("APT::Install-Recommends", true);
     Cnf.CndSet("APT::Install-Suggests", false);
--   Cnf.CndSet("Dir","/");
-+   Cnf.CndSet("Dir","@TERMUX_PREFIX@/");
+    Cnf.CndSet("Dir","/");
 +   Cnf.CndSet("Acquire::Languages", "none");
     
     // State
-    Cnf.CndSet("Dir::State","var/lib/apt/");
-@@ -71,9 +72,9 @@
-    Cnf.CndSet("Dir::Etc::preferencesparts","preferences.d");
+    Cnf.CndSet("Dir::State", STATE_DIR + 1);
+@@ -158,9 +159,9 @@
     Cnf.CndSet("Dir::Etc::trusted", "trusted.gpg");
     Cnf.CndSet("Dir::Etc::trustedparts","trusted.gpg.d");
--   Cnf.CndSet("Dir::Bin::methods","/usr/lib/apt/methods");
--   Cnf.CndSet("Dir::Bin::solvers::","/usr/lib/apt/solvers");
+    Cnf.CndSet("Dir::Bin::methods", LIBEXEC_DIR "/methods");
+-   Cnf.CndSet("Dir::Bin::solvers::",LIBEXEC_DIR  "/solvers");
+-   Cnf.CndSet("Dir::Bin::planners::",LIBEXEC_DIR  "/planners");
 -   Cnf.CndSet("Dir::Media::MountPath","/media/apt");
-+   Cnf.CndSet("Dir::Bin::methods","lib/apt/methods");
-+   Cnf.CndSet("Dir::Bin::solvers::","lib/apt/solvers");
++   Cnf.CndSet("Dir::Bin::solvers::",LIBEXEC_DIR "/solvers");
++   Cnf.CndSet("Dir::Bin::planners::", LIBEXEC_DIR "/planners");
 +   Cnf.CndSet("Dir::Media::MountPath","media/apt");
  
-    // State   
-    Cnf.CndSet("Dir::Log","var/log/apt");
+    // State
+    Cnf.CndSet("Dir::Log", LOG_DIR + 1);
+@@ -283,8 +284,6 @@
+        return _error->Error(_("Unable to determine a suitable packaging system type"));
+    }
+-   if (pkgInitArchTupleMap() == false)
+-      return false;
+    
+    return Sys->Initialize(Cnf);
+ }