apt: Fix building with unified headers
[termux-packages] / packages / apt / apt-pkg-aptconfiguration.cc.patch
CommitLineData
039b43de
FF
1diff -u -r ../apt-1.2/apt-pkg/aptconfiguration.cc ./apt-pkg/aptconfiguration.cc
2--- ../apt-1.2/apt-pkg/aptconfiguration.cc 2016-01-15 13:53:52.000000000 -0500
3+++ ./apt-pkg/aptconfiguration.cc 2016-01-25 06:12:27.102248821 -0500
4@@ -35,9 +35,9 @@
59f0d218 5 // setDefaultConfigurationForCompressors /*{{{*/
68faa04f 6 static void setDefaultConfigurationForCompressors() {
59f0d218
FF
7 // Set default application paths to check for optional compression types
8- _config->CndSet("Dir::Bin::bzip2", "/bin/bzip2");
9- _config->CndSet("Dir::Bin::xz", "/usr/bin/xz");
039b43de 10- _config->CndSet("Dir::Bin::lz4", "/usr/bin/lz4");
59f0d218
FF
11+ _config->CndSet("Dir::Bin::bzip2", "bin/bzip2");
12+ _config->CndSet("Dir::Bin::xz", "bin/xz");
039b43de 13+ _config->CndSet("Dir::Bin::lz4", "bin/lz4");
59f0d218
FF
14 if (FileExists(_config->FindFile("Dir::Bin::xz")) == true) {
15 _config->Set("Dir::Bin::lzma", _config->FindFile("Dir::Bin::xz"));
16 _config->Set("APT::Compressor::lzma::Binary", "xz");
039b43de 17@@ -50,7 +50,7 @@
59f0d218
FF
18 _config->Set("APT::Compressor::lzma::UncompressArg::", "-d");
19 }
20 } else {
21- _config->CndSet("Dir::Bin::lzma", "/usr/bin/lzma");
22+ _config->CndSet("Dir::Bin::lzma", "bin/lzma");
23 if (_config->Exists("APT::Compressor::lzma::CompressArg") == false) {
24 _config->Set("APT::Compressor::lzma::CompressArg::", "--suffix=");
039b43de
FF
25 _config->Set("APT::Compressor::lzma::CompressArg::", "-6");
26@@ -220,7 +220,7 @@
68faa04f
FF
27 // get the environment language codes: LC_MESSAGES (and later LANGUAGE)
28 // we extract both, a long and a short code and then we will
29 // check if we actually need both (rare) or if the short is enough
30- string const envMsg = string(Locale == 0 ? ::setlocale(LC_MESSAGES, NULL) : *Locale);
31+ string const envMsg = "en_US.UTF-8"; // string(Locale == 0 ? ::setlocale(LC_MESSAGES, NULL) : *Locale);
32 size_t const lenShort = (envMsg.find('_') != string::npos) ? envMsg.find('_') : 2;
33 size_t const lenLong = (envMsg.find_first_of(".@") != string::npos) ? envMsg.find_first_of(".@") : (lenShort + 3);
34