aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpkubaj <pkubaj@FreeBSD.org>2019-05-01 03:23:44 +0800
committerpkubaj <pkubaj@FreeBSD.org>2019-05-01 03:23:44 +0800
commit134bcd672a0fe9eac925ebdeab2eae6aae1265b4 (patch)
tree7e722c1fcd86fc8ef34187d7367d718a5f22d4ab
parentbbf61296d8161df163b97d4fc1eb1ea026418de2 (diff)
downloadfreebsd-ports-gnome-134bcd672a0fe9eac925ebdeab2eae6aae1265b4.tar.gz
freebsd-ports-gnome-134bcd672a0fe9eac925ebdeab2eae6aae1265b4.tar.zst
freebsd-ports-gnome-134bcd672a0fe9eac925ebdeab2eae6aae1265b4.zip
chinese/scim-fcitx: fix build with GCC-based architectures
Apart from using new GCC on GCC architectures, this port also needs to including sys/types.h and cstring in some cpp files: /usr/local/lib/libscim-1.0.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_assign(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@GLIBCXX_3.4.21' PR: 237148 Approved by: meta (maintainer timeout), mat (mentor) Differential Revision: https://reviews.freebsd.org/D20106
-rw-r--r--chinese/scim-fcitx/Makefile6
-rw-r--r--chinese/scim-fcitx/files/patch-src__sp.cpp11
-rw-r--r--chinese/scim-fcitx/files/patch-src__tools.cpp6
-rw-r--r--chinese/scim-fcitx/files/patch-src_ime.cpp10
-rw-r--r--chinese/scim-fcitx/files/patch-src_ime.h12
-rw-r--r--chinese/scim-fcitx/files/patch-src_pyParser.h13
-rw-r--r--chinese/scim-fcitx/files/patch-src_scim__fcitx__imengine.cpp13
7 files changed, 62 insertions, 9 deletions
diff --git a/chinese/scim-fcitx/Makefile b/chinese/scim-fcitx/Makefile
index 612e15dce4f1..a81b5967a111 100644
--- a/chinese/scim-fcitx/Makefile
+++ b/chinese/scim-fcitx/Makefile
@@ -18,7 +18,8 @@ LICENSE_FILE= ${WRKSRC}/COPYING
BUILD_DEPENDS= ${RUN_DEPENDS}
RUN_DEPENDS= scim:textproc/scim
-USES= tar:bzip2 gmake libtool:keepla pkgconfig
+USES= compiler:c++11-lang tar:bzip2 gmake libtool:keepla pkgconfig \
+ localbase:ldflags
GNU_CONFIGURE= yes
INSTALL_TARGET= install-strip
MAKE_JOBS_UNSAFE= yes
@@ -27,8 +28,7 @@ WRKSRC= ${WRKDIR}/fcitx
CONFIGURE_ENV+= SCIM_DATADIR=${PREFIX}/share/scim \
SCIM_ICONDIR=${PREFIX}/share/scim/icons
-CPPFLAGS+= -I${LOCALBASE}/include
-LDFLAGS+= -L${LOCALBASE}/lib -lintl
+LDFLAGS+= -lintl
SUB_FILES= pkg-message
diff --git a/chinese/scim-fcitx/files/patch-src__sp.cpp b/chinese/scim-fcitx/files/patch-src__sp.cpp
index 94c7272e27b9..3a9a441ce920 100644
--- a/chinese/scim-fcitx/files/patch-src__sp.cpp
+++ b/chinese/scim-fcitx/files/patch-src__sp.cpp
@@ -1,6 +1,11 @@
---- src/sp.cpp.orig 2005-05-08 20:11:29.000000000 +0400
-+++ src/sp.cpp 2014-07-23 03:21:49.000000000 +0400
-@@ -11,6 +11,7 @@
+--- src/sp.cpp.orig 2005-05-08 16:11:29 UTC
++++ src/sp.cpp
+@@ -7,10 +7,12 @@
+ #include "scim_fcitx_imengine.h"
+ using namespace scim;
+
++#include <cstring>
+ #include <stdio.h>
#include <sys/stat.h>
#include <limits.h>
#include <ctype.h>
diff --git a/chinese/scim-fcitx/files/patch-src__tools.cpp b/chinese/scim-fcitx/files/patch-src__tools.cpp
index 63c724674c15..73a88f8becb8 100644
--- a/chinese/scim-fcitx/files/patch-src__tools.cpp
+++ b/chinese/scim-fcitx/files/patch-src__tools.cpp
@@ -1,6 +1,6 @@
---- src/tools.cpp.orig 2005-05-20 18:41:12.000000000 +0400
-+++ src/tools.cpp 2014-07-23 02:57:51.000000000 +0400
-@@ -14,6 +14,7 @@
+--- src/tools.cpp.orig 2005-05-20 14:41:12 UTC
++++ src/tools.cpp
+@@ -14,6 +14,7 @@ using namespace scim;
#include <sys/stat.h>
#include <limits.h>
#include <string.h>
diff --git a/chinese/scim-fcitx/files/patch-src_ime.cpp b/chinese/scim-fcitx/files/patch-src_ime.cpp
new file mode 100644
index 000000000000..e29107ac6781
--- /dev/null
+++ b/chinese/scim-fcitx/files/patch-src_ime.cpp
@@ -0,0 +1,10 @@
+--- src/ime.cpp.orig 2019-04-09 08:15:56 UTC
++++ src/ime.cpp
+@@ -2,6 +2,7 @@
+ #define Uses_SCIM_ICONV
+ #define Uses_SCIM_CONFIG_BASE
+ #define Uses_SCIM_CONFIG_PATH
++#include <cstring>
+ #include <ctype.h>
+
+ #include <scim.h>
diff --git a/chinese/scim-fcitx/files/patch-src_ime.h b/chinese/scim-fcitx/files/patch-src_ime.h
new file mode 100644
index 000000000000..5ff09125b60f
--- /dev/null
+++ b/chinese/scim-fcitx/files/patch-src_ime.h
@@ -0,0 +1,12 @@
+--- src/ime.h.orig 2019-04-09 08:16:46 UTC
++++ src/ime.h
+@@ -2,6 +2,9 @@
+ #define _IME_H
+
+ #include "xim.h"
++#ifdef __FreeBSD__
++#include <sys/types.h>
++#endif
+
+ #include "scim_fcitx_imengine.h"
+
diff --git a/chinese/scim-fcitx/files/patch-src_pyParser.h b/chinese/scim-fcitx/files/patch-src_pyParser.h
new file mode 100644
index 000000000000..96ac5822c784
--- /dev/null
+++ b/chinese/scim-fcitx/files/patch-src_pyParser.h
@@ -0,0 +1,13 @@
+--- src/pyParser.h.orig 2019-04-09 08:24:03 UTC
++++ src/pyParser.h
+@@ -11,6 +11,10 @@
+
+ #include "py.h"
+
++#ifdef __FreeBSD__
++#include <sys/types.h>
++#endif
++
+ #define PY_SEPERATOR '\''
+ #define PY_SEPERATOR_S "'"
+
diff --git a/chinese/scim-fcitx/files/patch-src_scim__fcitx__imengine.cpp b/chinese/scim-fcitx/files/patch-src_scim__fcitx__imengine.cpp
new file mode 100644
index 000000000000..f13589525a21
--- /dev/null
+++ b/chinese/scim-fcitx/files/patch-src_scim__fcitx__imengine.cpp
@@ -0,0 +1,13 @@
+--- src/scim_fcitx_imengine.cpp.orig 2019-04-09 08:12:58 UTC
++++ src/scim_fcitx_imengine.cpp
+@@ -35,6 +35,10 @@
+ #define Uses_SCIM_CONFIG_BASE
+ #define Uses_SCIM_CONFIG_PATH
+
++#ifdef __FreeBSD__
++#include <sys/types.h>
++#endif
++#include <cstring>
+ #include <scim.h>
+ #include "scim_fcitx_imengine.h"
+ #include "main.h"