Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 May 2016 17:55:06 +0000 (UTC)
From:      Hiroki Sato <hrs@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r415733 - in head/japanese/mozc-server: . files
Message-ID:  <201605231755.u4NHt6CK019665@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hrs
Date: Mon May 23 17:55:06 2016
New Revision: 415733
URL: https://svnweb.freebsd.org/changeset/ports/415733

Log:
  - Add workaround for broken C++11 support in GCC.
  - Remove extra -9 for GZIP_CMD.

Added:
  head/japanese/mozc-server/files/patch-src-base-flags.cc   (contents, props changed)
  head/japanese/mozc-server/files/patch-src-rewriter-calculator-calculator.cc   (contents, props changed)
Modified:
  head/japanese/mozc-server/Makefile

Modified: head/japanese/mozc-server/Makefile
==============================================================================
--- head/japanese/mozc-server/Makefile	Mon May 23 17:46:02 2016	(r415732)
+++ head/japanese/mozc-server/Makefile	Mon May 23 17:55:06 2016	(r415733)
@@ -404,7 +404,7 @@ do-build-mozc_el:
 	cd ${BUILD_WRKSRC}/unix/emacs && \
 	    ${EMACS_CMD} -batch -q -no-site-file -no-init-file \
 	    -f batch-byte-compile mozc.el && \
-	    ${GZIP_CMD} -9 mozc.el
+	    ${GZIP_CMD} mozc.el
 
 do-install-mozc_el:
 	@${MKDIR} ${STAGEDIR}${PREFIX}/${EMACS_VERSION_SITE_LISPDIR}/mozc

Added: head/japanese/mozc-server/files/patch-src-base-flags.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/japanese/mozc-server/files/patch-src-base-flags.cc	Mon May 23 17:55:06 2016	(r415733)
@@ -0,0 +1,80 @@
+--- src/base/flags.cc.orig	2016-03-13 11:22:55.000000000 +0900
++++ src/base/flags.cc	2016-05-24 02:06:01.861439000 +0900
+@@ -36,6 +36,9 @@
+ #include <sstream>
+ #include <string>
+ #include <vector>
++#if defined(__GNUC__) && !defined(__clang__) 
++#include <cstdlib>
++#endif
+ 
+ #include "base/port.h"
+ #include "base/singleton.h"
+@@ -78,6 +81,59 @@
+ // function, compiler may warn of "unused function".
+ template <typename T> struct StrToNumberImpl;
+ 
++#if defined(__GNUC__) && !defined(__clang__) 
++static int stoi(const std::string& s) {
++    std::istringstream str(s);
++    int i;
++    str >> i;
++    return i;
++}
++static long stol(const std::string& s) {
++    std::istringstream str(s);
++    long i;
++    str >> i;
++    return i;
++}
++static long long stoll(const std::string& s) {
++    std::istringstream str(s);
++    long long i;
++    str >> i;
++    return i;
++}
++static unsigned long stoul(const std::string& s) {
++    std::istringstream str(s);
++    unsigned long i;
++    str >> i;
++    return i;
++}
++static unsigned long long stoull(const std::string& s) {
++    std::istringstream str(s);
++    unsigned long long i;
++    str >> i;
++    return i;
++}
++template <> struct StrToNumberImpl<int> {
++  static int Do(const string &s) { return stoi(s); }
++};
++
++template <> struct StrToNumberImpl<long> {                  // NOLINT
++  static long Do(const string &s) { return stol(s); }  // NOLINT
++};
++
++template <> struct StrToNumberImpl<long long> {                   // NOLINT
++  static long long Do(const string &s) { return stoll(s); }  // NOLINT
++};
++
++template <> struct StrToNumberImpl<unsigned long> {                   // NOLINT
++  static unsigned long Do(const string &s) { return stoul(s); }  // NOLINT
++};
++
++template <> struct StrToNumberImpl<unsigned long long> {  // NOLINT
++  static unsigned long long Do(const string &s) {         // NOLINT
++    return stoull(s);
++  }
++};
++#else
+ template <> struct StrToNumberImpl<int> {
+   static int Do(const string &s) { return std::stoi(s); }
+ };
+@@ -99,6 +155,7 @@
+     return std::stoull(s);
+   }
+ };
++#endif
+ 
+ template <typename T> inline T StrToNumber(const string &s) {
+   return StrToNumberImpl<T>::Do(s);

Added: head/japanese/mozc-server/files/patch-src-rewriter-calculator-calculator.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/japanese/mozc-server/files/patch-src-rewriter-calculator-calculator.cc	Mon May 23 17:55:06 2016	(r415733)
@@ -0,0 +1,12 @@
+--- src/rewriter/calculator/calculator.cc.orig	2016-03-13 11:22:55.000000000 +0900
++++ src/rewriter/calculator/calculator.cc	2016-05-24 02:06:47.310077000 +0900
+@@ -44,6 +44,9 @@
+ #include <map>
+ #include <string>
+ #include <vector>
++#if defined(__GNUC__) && !defined(__clang__)
++#include <cstdlib>
++#endif
+ 
+ #include "base/compiler_specific.h"
+ #include "base/logging.h"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605231755.u4NHt6CK019665>