summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Kohnert2022-07-10 13:48:55 +0000
committerJan Kohnert2022-07-10 13:48:55 +0000
commitc661345c0e3e43aa296cabe5ca2c587223b6f87c (patch)
tree5922a11d89376ad0aa854ddddf93b86eb42af60d
parent2cd3b855d781f0c75734ef951cd162bbda448fe6 (diff)
downloadaur-c661345c0e3e43aa296cabe5ca2c587223b6f87c.tar.gz
Resolve "Fix build warnings (std::unary_function, and std::binary_functions)"
-rw-r--r--.SRCINFO4
-rw-r--r--.gitignore3
-rw-r--r--PKGBUILD15
-rw-r--r--gdl_pr_1337.patch156
4 files changed, 171 insertions, 7 deletions
diff --git a/.SRCINFO b/.SRCINFO
index b44f9ffcacaf..d6b85ece4386 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = gnudatalanguage
pkgdesc = An IDL (Interactive Data Language) compatible incremental compiler (ie. runs IDL programs)
pkgver = 1.0.1
- pkgrel = 3
+ pkgrel = 4
url = https://gnudatalanguage.github.io/
arch = i686
arch = x86_64
@@ -24,7 +24,9 @@ pkgbase = gnudatalanguage
optdepends = cuda
source = gnudatalanguage-1.0.1.tar.gz::https://github.com/gnudatalanguage/gdl/archive/v1.0.1.tar.gz
source = gdl.profile
+ source = gdl_pr_1337.patch
sha512sums = 9d15f114d26d03c34dce6177a5d5115e81c128ec21752c01d171f8427e6cb21b9d0b69a44e29891b5e8fc2bd4d0b89d1a8dcd189f362a13c6e59182528b5842d
sha512sums = b3a3589d2ce8eb5d49c902aa9bc43df0a0fcc369d17deb060026d34fa821881a212ce6aa02edc7ea6c0476b2faacc7455e467af7b5baf672e2653b71b162190f
+ sha512sums = 2d000c4c619bf59ad21244b758250e4c458ca0d4309ea0a89bd3e79ced0335e15984262ac8577baabcaaf1e4e50dc3ea7450f3f15bc71576e497fa189a4d484a
pkgname = gnudatalanguage
diff --git a/.gitignore b/.gitignore
index feda2b54720f..491d2d182ec5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,8 +1,7 @@
/*
!.gitignore
!gdl.profile
-!gdl-mallinfo2.patch
-!gdl-tiff.patch
+!gdl_pr_1337.patch
!PKGBUILD
!.SRCINFO
!.gitlab-ci.yml
diff --git a/PKGBUILD b/PKGBUILD
index ceb60c1cb592..0bde7652fe14 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,7 +5,7 @@
pkgname=gnudatalanguage
pkgver=1.0.1
-pkgrel=3
+pkgrel=4
pkgdesc="An IDL (Interactive Data Language) compatible incremental compiler (ie. runs IDL programs)"
arch=("i686" "x86_64")
url="https://gnudatalanguage.github.io/"
@@ -16,9 +16,16 @@ makedepends=("cmake")
checkdepends=("openssh")
optdepends=("cuda")
source=("$pkgname-$pkgver.tar.gz::https://github.com/gnudatalanguage/gdl/archive/v${pkgver}.tar.gz"
- "gdl.profile")
+ "gdl.profile"
+ "gdl_pr_1337.patch")
sha512sums=("9d15f114d26d03c34dce6177a5d5115e81c128ec21752c01d171f8427e6cb21b9d0b69a44e29891b5e8fc2bd4d0b89d1a8dcd189f362a13c6e59182528b5842d"
- "b3a3589d2ce8eb5d49c902aa9bc43df0a0fcc369d17deb060026d34fa821881a212ce6aa02edc7ea6c0476b2faacc7455e467af7b5baf672e2653b71b162190f")
+ "b3a3589d2ce8eb5d49c902aa9bc43df0a0fcc369d17deb060026d34fa821881a212ce6aa02edc7ea6c0476b2faacc7455e467af7b5baf672e2653b71b162190f"
+ "2d000c4c619bf59ad21244b758250e4c458ca0d4309ea0a89bd3e79ced0335e15984262ac8577baabcaaf1e4e50dc3ea7450f3f15bc71576e497fa189a4d484a")
+
+prepare() {
+ cd "${srcdir}/gdl-${pkgver}"
+ patch -p1 -i "${srcdir}/gdl_pr_1337.patch"
+}
build() {
cd "${srcdir}/gdl-${pkgver}"
@@ -38,7 +45,7 @@ build() {
check() {
cd "${srcdir}/gdl-${pkgver}/build"
- make test
+ ctest --output-on-failure
}
package() {
diff --git a/gdl_pr_1337.patch b/gdl_pr_1337.patch
new file mode 100644
index 000000000000..f46cb0ca1b00
--- /dev/null
+++ b/gdl_pr_1337.patch
@@ -0,0 +1,156 @@
+commit 2f4f47ea07a3a13ae7793d8ab9c21c97bc77567a
+Author: Jan Kohnert <jan@jan-kohnert.de>
+Date: Thu May 26 12:32:01 2022 +0200
+
+ Replaced deprecated std::unary_function and std::binary_function by C++11 std::function
+
+diff --git a/src/antlr/CharScanner.hpp b/src/antlr/CharScanner.hpp
+index c123cb17..c5e0604d 100644
+--- a/src/antlr/CharScanner.hpp
++++ b/src/antlr/CharScanner.hpp
+@@ -31,6 +31,9 @@
+ # include <stdio.h>
+ #endif
+
++// std::function needs this one
++#include <functional>
++
+ #include <antlr/TokenStream.hpp>
+ #include <antlr/RecognitionException.hpp>
+ #include <antlr/SemanticException.hpp>
+@@ -71,7 +74,7 @@ ANTLR_C_USING(strcasecmp)
+
+ /** Functor for the literals map
+ */
+-class ANTLR_API CharScannerLiteralsLess : public ANTLR_USE_NAMESPACE(std)binary_function<ANTLR_USE_NAMESPACE(std)string,ANTLR_USE_NAMESPACE(std)string,bool> {
++class ANTLR_API CharScannerLiteralsLess : public ANTLR_USE_NAMESPACE(std)function<bool(ANTLR_USE_NAMESPACE(std)string,ANTLR_USE_NAMESPACE(std)string)> {
+ private:
+ const CharScanner* scanner;
+ public:
+diff --git a/src/dcommon.hpp b/src/dcommon.hpp
+index 35dc3c8c..d7965974 100644
+--- a/src/dcommon.hpp
++++ b/src/dcommon.hpp
+@@ -65,7 +65,7 @@ public:
+ DCommon* getCommon(void) { return this; };
+ };
+
+-class DCommon_eq: public std::unary_function<DCommon,bool>
++class DCommon_eq: public std::function<bool(DCommon)>
+ {
+ std::string name;
+ public:
+@@ -102,7 +102,7 @@ public:
+ typedef std::vector<DCommonBase*> CommonBaseListT;
+ typedef std::vector<DCommon*> CommonListT;
+
+-class DCommon_contains_var: public std::unary_function<DCommonBase,bool>
++class DCommon_contains_var: public std::function<bool(DCommonBase*)>
+ {
+ std::string name;
+ public:
+diff --git a/src/dcompiler.hpp b/src/dcompiler.hpp
+index 805e7fb6..1947bfb0 100644
+--- a/src/dcompiler.hpp
++++ b/src/dcompiler.hpp
+@@ -94,7 +94,7 @@ public:
+ EnvBaseT* GetEnv() const { return env;}
+ void SetEnv( EnvBaseT* e) { env = e;}
+ // for sorting lists by name
+- struct CompLibFunName: public std::binary_function< DLibFun*, DLibFun*, bool>
++ struct CompLibFunName: public std::function<bool(DLibFun*, DLibFun*)>
+ {
+ bool operator() ( DLibFun* f1, DLibFun* f2) const
+ { return f1->ObjectName() < f2->ObjectName();}
+diff --git a/src/dpro.hpp b/src/dpro.hpp
+index 5df241a3..e234b16e 100644
+--- a/src/dpro.hpp
++++ b/src/dpro.hpp
+@@ -36,7 +36,7 @@
+ extern bool posixpaths;
+ }
+ #endif
+-template<typename T> class Is_eq: public std::unary_function<T,bool>
++template<typename T> class Is_eq: public std::function<bool(T)>
+ {
+ std::string name;
+ public:
+@@ -208,7 +208,7 @@ public:
+
+ // for sorting lists by name. Not used (lists too short to make a time gain. Long lists would, if existing,
+ // benefit from sorting by hash number in a std::map instead of a std::list.
+- struct CompLibFunName: public std::binary_function< DLib*, DLib*, bool>
++ struct CompLibFunName: public std::function<bool(DLib*, DLib*)>
+ {
+ bool operator() ( DLib* f1, DLib* f2) const
+ { return f1->ObjectName() < f2->ObjectName();}
+diff --git a/src/dstructdesc.hpp b/src/dstructdesc.hpp
+index b09a371c..659cab15 100644
+--- a/src/dstructdesc.hpp
++++ b/src/dstructdesc.hpp
+@@ -362,7 +362,7 @@ public:
+ };
+
+
+-class DStruct_eq: public std::unary_function<DStructDesc,bool>
++class DStruct_eq: public std::function<bool(DStructDesc)>
+ {
+ std::string name;
+
+diff --git a/src/dvar.hpp b/src/dvar.hpp
+index e34ce70e..37b33cc5 100644
+--- a/src/dvar.hpp
++++ b/src/dvar.hpp
+@@ -57,7 +57,7 @@ public:
+
+ typedef std::vector<DVar*> VarListT;
+
+-class DVar_eq: public std::unary_function<DVar,bool>
++class DVar_eq: public std::function<bool(DVar)>
+ {
+ std::string name;
+ BaseGDL* pp;
+diff --git a/src/gdlhelp.cpp b/src/gdlhelp.cpp
+index 2216bbb2..837dbd3b 100644
+--- a/src/gdlhelp.cpp
++++ b/src/gdlhelp.cpp
+@@ -126,7 +126,7 @@ extern "C" {
+
+
+ // for sorting compiled pro/fun lists by name
+-struct CompFunName: public std::binary_function< DFun*, DFun*, bool>
++struct CompFunName: public std::function<bool(DFun*, DFun*)>
+ {
+ bool operator() ( DFun* f1, DFun* f2) const
+ {
+@@ -134,7 +134,7 @@ struct CompFunName: public std::binary_function< DFun*, DFun*, bool>
+ }
+ };
+
+-struct CompProName: public std::binary_function< DPro*, DPro*, bool>
++struct CompProName: public std::function<bool(DPro*, DPro*)>
+ {
+ bool operator() ( DPro* f1, DPro* f2) const
+ {
+diff --git a/src/str.hpp b/src/str.hpp
+index e88dff88..2459157d 100644
+--- a/src/str.hpp
++++ b/src/str.hpp
+@@ -88,7 +88,7 @@ void StrLowCaseInplace(std::string&);
+ std::string StrCompress(const std::string&,bool removeAll);
+ void StrPut(std::string& s1, const std::string& s2, DLong pos);
+
+-class String_abbref_eq: public std::unary_function< std::string, bool>
++class String_abbref_eq: public std::function<bool(std::string)>
+ {
+ std::string s;
+ public:
+@@ -100,7 +100,7 @@ public:
+ }
+ };
+
+-class String_eq: public std::unary_function< std::string, bool>
++class String_eq: public std::function<bool(std::string)>
+ {
+ std::string s;
+ public: