diff options
author | pkubaj <pkubaj@FreeBSD.org> | 2019-05-01 03:23:44 +0800 |
---|---|---|
committer | pkubaj <pkubaj@FreeBSD.org> | 2019-05-01 03:23:44 +0800 |
commit | 134bcd672a0fe9eac925ebdeab2eae6aae1265b4 (patch) | |
tree | 7e722c1fcd86fc8ef34187d7367d718a5f22d4ab | |
parent | bbf61296d8161df163b97d4fc1eb1ea026418de2 (diff) | |
download | freebsd-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/Makefile | 6 | ||||
-rw-r--r-- | chinese/scim-fcitx/files/patch-src__sp.cpp | 11 | ||||
-rw-r--r-- | chinese/scim-fcitx/files/patch-src__tools.cpp | 6 | ||||
-rw-r--r-- | chinese/scim-fcitx/files/patch-src_ime.cpp | 10 | ||||
-rw-r--r-- | chinese/scim-fcitx/files/patch-src_ime.h | 12 | ||||
-rw-r--r-- | chinese/scim-fcitx/files/patch-src_pyParser.h | 13 | ||||
-rw-r--r-- | chinese/scim-fcitx/files/patch-src_scim__fcitx__imengine.cpp | 13 |
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" |