aboutsummaryrefslogtreecommitdiffstats
path: root/textproc/sdcv
diff options
context:
space:
mode:
authorsunpoet <sunpoet@FreeBSD.org>2017-07-08 00:33:57 +0800
committersunpoet <sunpoet@FreeBSD.org>2017-07-08 00:33:57 +0800
commita4b4af5e23ccf9b9beec46dadf89ce18b4b23c7a (patch)
tree9ff05ebb88b8f6e7dd34cc0f7632bf3f3d204fc6 /textproc/sdcv
parent25173a596b286377d99972cb000224bf7a2286a5 (diff)
downloadfreebsd-ports-gnome-a4b4af5e23ccf9b9beec46dadf89ce18b4b23c7a.tar.gz
freebsd-ports-gnome-a4b4af5e23ccf9b9beec46dadf89ce18b4b23c7a.tar.zst
freebsd-ports-gnome-a4b4af5e23ccf9b9beec46dadf89ce18b4b23c7a.zip
Add missing patch for Clang 3.4.1 on FreeBSD 10
- Bump PORTREVISION for package change PR: 220451
Diffstat (limited to 'textproc/sdcv')
-rw-r--r--textproc/sdcv/Makefile1
-rw-r--r--textproc/sdcv/files/patch-bug1960
2 files changed, 61 insertions, 0 deletions
diff --git a/textproc/sdcv/Makefile b/textproc/sdcv/Makefile
index ac78137abc96..d9786c00717a 100644
--- a/textproc/sdcv/Makefile
+++ b/textproc/sdcv/Makefile
@@ -4,6 +4,7 @@
PORTNAME= sdcv
PORTVERSION= 0.5.1
DISTVERSIONPREFIX= v
+PORTREVISION= 1
CATEGORIES= textproc
MAINTAINER= citrin@citrin.ru
diff --git a/textproc/sdcv/files/patch-bug19 b/textproc/sdcv/files/patch-bug19
new file mode 100644
index 000000000000..f3d3dd8e3b83
--- /dev/null
+++ b/textproc/sdcv/files/patch-bug19
@@ -0,0 +1,60 @@
+--- src/sdcv.cpp.orig
++++ src/sdcv.cpp
+@@ -157,7 +157,7 @@ int main(int argc, char *argv[]) try {
+ });
+
+ std::list<std::string> order_list;
+- if (use_dict_list) {
++ if (use_dict_list != nullptr) {
+ for (auto &&x : bookname_to_ifo) {
+ gchar **p = get_impl(use_dict_list);
+ for (; *p != nullptr; ++p)
+--- src/stardict_lib.cpp.orig
++++ src/stardict_lib.cpp
+@@ -89,7 +89,6 @@ bool DictInfo::load_from_ifo_file(const std::string& ifofilename,
+ if (!g_str_has_prefix(
+ g_str_has_prefix(get_impl(buffer), (const gchar *)(utf8_bom)) ? get_impl(buffer) + 3 : get_impl(buffer),
+ magic_data)) {
+- g_free(buffer);
+ return false;
+ }
+
+--- src/utils.hpp.orig
++++ src/utils.hpp
+@@ -27,6 +27,14 @@ class ResourceWrapper {
+ }
+ }
+
++ friend inline bool operator==(const ResourceWrapper& lhs, std::nullptr_t) noexcept {
++ return !lhs.p_;
++ }
++
++ friend inline bool operator!=(const ResourceWrapper& lhs, std::nullptr_t) noexcept {
++ return !!lhs.p_;
++ }
++
+ friend inline T *get_impl(const ResourceWrapper& rw) {
+ return rw.p_;
+ }
+@@ -39,21 +47,6 @@ class ResourceWrapper {
+ T *p_;
+
+ void free_resource() { if (p_) unref_res(p_); }
+-
+-// Helper for enabling 'if (sp)'
+- struct Tester {
+- Tester() {}
+- private:
+- void operator delete(void*);
+- };
+-public:
+- // enable 'if (sp)'
+- operator Tester*() const {
+- if (!*this)
+- return 0;
+- static Tester t;
+- return &t;
+- }
+ };
+
+ namespace glib {