From 3dddcdf2432e78f37c74d8c76c2c519a8d935ab2 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Mon, 17 Aug 2015 18:33:22 +0200 Subject: Re-add support for G++ 4.8 and configure travis to use it This makes tests work again! Gbp-Dch: ignore --- .travis.yml | 8 +++++--- apt-pkg/cacheset.h | 4 ++-- apt-private/private-cachefile.cc | 2 +- apt-private/private-cacheset.cc | 2 +- debian/control | 2 +- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index a20018a79..993492b7e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,8 @@ before_install: - sudo apt-get update -q install: - sudo ./prepare-release travis-ci - - export CC=gcc-5 - - export CXX=g++-5 -script: make -j1 && make test && test/integration/run-tests + - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test + - sudo apt-get -qq update + - sudo apt-get -qq install g++-4.8 + - export CXX=g++-4.8 +script: make && make test && test/integration/run-tests diff --git a/apt-pkg/cacheset.h b/apt-pkg/cacheset.h index 95df55dcc..7c03ad97a 100644 --- a/apt-pkg/cacheset.h +++ b/apt-pkg/cacheset.h @@ -407,7 +407,7 @@ public: /*{{{*/ bool empty() const APT_OVERRIDE { return _cont.empty(); } void clear() APT_OVERRIDE { return _cont.clear(); } size_t size() const APT_OVERRIDE { return _cont.size(); } -#if __cplusplus >= 201103L +#if __GNUC__ >= 5 || (__GNUC_MINOR__ >= 9 && __GNUC__ >= 4) iterator erase( const_iterator pos ) { return iterator(_cont.erase(pos._iter)); } iterator erase( const_iterator first, const_iterator last ) { return iterator(_cont.erase(first._iter, last._iter)); } #else @@ -897,7 +897,7 @@ public: /*{{{*/ bool empty() const APT_OVERRIDE { return _cont.empty(); } void clear() APT_OVERRIDE { return _cont.clear(); } size_t size() const APT_OVERRIDE { return _cont.size(); } -#if __cplusplus >= 201103L +#if __GNUC__ >= 5 || (__GNUC_MINOR__ >= 9 && __GNUC__ >= 4) iterator erase( const_iterator pos ) { return iterator(_cont.erase(pos._iter)); } iterator erase( const_iterator first, const_iterator last ) { return iterator(_cont.erase(first._iter, last._iter)); } #else diff --git a/apt-private/private-cachefile.cc b/apt-private/private-cachefile.cc index 2b2050684..32cad1c33 100644 --- a/apt-private/private-cachefile.cc +++ b/apt-private/private-cachefile.cc @@ -33,7 +33,7 @@ static bool SortPackagesByName(pkgCache * const Owner, return strcmp(Owner->StrP + GA->Name, Owner->StrP + GB->Name) <= 0; } SortedPackageUniverse::SortedPackageUniverse(CacheFile &Cache) : - PackageUniverse{Cache}, List{Cache.UniverseList} + PackageUniverse{Cache}, List(Cache.UniverseList) { } void SortedPackageUniverse::LazyInit() const diff --git a/apt-private/private-cacheset.cc b/apt-private/private-cacheset.cc index 36d40117c..8db736507 100644 --- a/apt-private/private-cacheset.cc +++ b/apt-private/private-cacheset.cc @@ -118,7 +118,7 @@ CacheSetHelperVirtuals::CacheSetHelperVirtuals(bool const ShowErrors, GlobalErro // CacheSetHelperAPTGet - responsible for message telling from the CacheSets/*{{{*/ CacheSetHelperAPTGet::CacheSetHelperAPTGet(std::ostream &out) : - APT::CacheSetHelper{true}, out{out} + APT::CacheSetHelper{true}, out(out) { explicitlyNamed = true; } diff --git a/debian/control b/debian/control index 678c75d35..82f455287 100644 --- a/debian/control +++ b/debian/control @@ -10,7 +10,7 @@ Build-Depends: dpkg-dev (>= 1.15.8), debhelper (>= 8.1.3~), libdb-dev, zlib1g-dev, libbz2-dev, liblzma-dev, xsltproc, docbook-xsl, docbook-xml, po4a (>= 0.34-2), autotools-dev, autoconf, automake, libgtest-dev, - g++-5 (>= 5.1.1-20) + g++ (>= 4:5.2) Build-Depends-Indep: doxygen, w3m, graphviz Build-Conflicts: autoconf2.13, automake1.4 Vcs-Git: git://anonscm.debian.org/apt/apt.git -- cgit v1.2.3