[arch-commits] Commit in libasl/trunk (3 files)
Bartłomiej Piotrowski
bpiotrowski at archlinux.org
Mon Dec 21 18:54:45 UTC 2015
Date: Monday, December 21, 2015 @ 19:54:45
Author: bpiotrowski
Revision: 154032
Fix build with boost 1.60.0 and gcc 5
Added:
libasl/trunk/libasl-0.1.6-Explicitly-define-namespace-of-ifstream-and-ofstream.patch
Modified:
libasl/trunk/PKGBUILD
Deleted:
libasl/trunk/NEWS.md
-------------------------------------------------------------------------+
NEWS.md | 15 --
PKGBUILD | 8 +
libasl-0.1.6-Explicitly-define-namespace-of-ifstream-and-ofstream.patch | 59 ++++++++++
3 files changed, 65 insertions(+), 17 deletions(-)
Deleted: NEWS.md
===================================================================
--- NEWS.md 2015-12-21 18:49:37 UTC (rev 154031)
+++ NEWS.md 2015-12-21 18:54:45 UTC (rev 154032)
@@ -1,15 +0,0 @@
-# News and ChangeLog
-
-## 0.1.6
-
-- fixing linkage issues
-- fixing testing issues
-- fixing an installation bug
-
-
-## 0.1.5
-
-- supplying cl.hpp, since not provided by OpenCL 2.0 (causes harmless "deprecated" warnings)
-- bug fixes
-- improved tests
-- improved examples
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2015-12-21 18:49:37 UTC (rev 154031)
+++ PKGBUILD 2015-12-21 18:54:45 UTC (rev 154032)
@@ -14,9 +14,11 @@
makedepends=('cmake' 'opencl-headers' 'boost' 'mesa-libgl')
changelog='NEWS.md'
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/AvtechScientific/ASL/archive/v${pkgver}.tar.gz"
- 'suppress-deprecated-warnings.patch')
+ 'suppress-deprecated-warnings.patch'
+ 'libasl-0.1.6-Explicitly-define-namespace-of-ifstream-and-ofstream.patch')
md5sums=('1f283d066d57e11d4602016148181420'
- '972d7ed8037a35d32125773ae70f6360')
+ '972d7ed8037a35d32125773ae70f6360'
+ '4747d00c048574f5722b4d9cfaa73676')
prepare() {
rm -rf "build"
@@ -26,6 +28,8 @@
# caused by 'opencl-headers' since update to 2.0
cd "ASL-${pkgver}"
patch -p1 -i "${srcdir}/suppress-deprecated-warnings.patch"
+
+ patch -p1 -i "${srcdir}/libasl-0.1.6-Explicitly-define-namespace-of-ifstream-and-ofstream.patch"
}
build() {
Added: libasl-0.1.6-Explicitly-define-namespace-of-ifstream-and-ofstream.patch
===================================================================
--- libasl-0.1.6-Explicitly-define-namespace-of-ifstream-and-ofstream.patch (rev 0)
+++ libasl-0.1.6-Explicitly-define-namespace-of-ifstream-and-ofstream.patch 2015-12-21 18:54:45 UTC (rev 154032)
@@ -0,0 +1,59 @@
+From 179516b0b7b3b4a0920444288cf8acca872e8846 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Bart=C5=82omiej=20Piotrowski?= <b at bpiotrowski.pl>
+Date: Mon, 21 Dec 2015 19:49:51 +0100
+Subject: [PATCH] Explicitly define namespace of ifstream and ofstream
+
+With GCC 5.3.0 and Boost 1.60.0, the build fails with following error:
+/build/libasl/src/ASL-0.1.6/src/utilities/aslParametersManager.cxx:466:6:
+error: reference to 'ifstream' is ambiguous
+ ifstream ifs(p.string());
+ ^
+/usr/include/boost/filesystem/fstream.hpp:169:32: note: candidates are:
+typedef class boost::filesystem::basic_ifstream<char> boost::filesystem::ifstream
+ typedef basic_ifstream<char> ifstream;
+ ^
+---
+ src/utilities/aslParametersManager.cxx | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/utilities/aslParametersManager.cxx b/src/utilities/aslParametersManager.cxx
+index 98a0192..d6ef3c7 100644
+--- a/src/utilities/aslParametersManager.cxx
++++ b/src/utilities/aslParametersManager.cxx
+@@ -332,7 +332,7 @@ namespace asl
+
+ try
+ {
+- ifstream ifs(paramFile);
++ std::ifstream ifs(paramFile);
+ if (!ifs.good())
+ errorMessage("Can not open parameters file: " + paramFile);
+
+@@ -357,7 +357,7 @@ namespace asl
+
+ void ParametersManager::writeParametersFile(const std::string fileName)
+ {
+- ofstream fo(fileName);
++ std::ofstream fo(fileName);
+ if (!fo.good())
+ errorMessage("ParametersManager::writeParametersFile() - can not open file: " + fileName);
+
+@@ -463,7 +463,7 @@ namespace asl
+ }
+ else
+ {
+- ifstream ifs(p.string());
++ std::ifstream ifs(p.string());
+ if (ifs.good())
+ {
+ parsed_options parsed = parse_config_file(ifs, allOptions, true);
+@@ -514,4 +514,4 @@ namespace asl
+ }
+ }
+
+-} //namespace asl
+\ No newline at end of file
++} //namespace asl
+--
+2.6.4
+
More information about the arch-commits
mailing list