aboutsummaryrefslogtreecommitdiffstats
path: root/japanese
diff options
context:
space:
mode:
authordaichi <daichi@FreeBSD.org>2011-12-10 19:14:24 +0800
committerdaichi <daichi@FreeBSD.org>2011-12-10 19:14:24 +0800
commita5ee8c2e12a43ab535155b8edc481546e6f36ef1 (patch)
tree046ddacc5689c34aa03552eb4a5d1b0fa7236644 /japanese
parent50ce0af9d2fb269f23b2dcac321b6a0f26d6978a (diff)
downloadfreebsd-ports-gnome-a5ee8c2e12a43ab535155b8edc481546e6f36ef1.tar.gz
freebsd-ports-gnome-a5ee8c2e12a43ab535155b8edc481546e6f36ef1.tar.zst
freebsd-ports-gnome-a5ee8c2e12a43ab535155b8edc481546e6f36ef1.zip
Fixed a build error caused by a gcc 4.2.1's namespace bug.
Feature safe: yes
Diffstat (limited to 'japanese')
-rw-r--r--japanese/ibus-mozc/Makefile28
-rw-r--r--japanese/mozc-additions/Makefile5
-rw-r--r--japanese/mozc-server/Makefile21
-rw-r--r--japanese/mozc-tool/Makefile25
-rw-r--r--japanese/scim-mozc/Makefile28
5 files changed, 83 insertions, 24 deletions
diff --git a/japanese/ibus-mozc/Makefile b/japanese/ibus-mozc/Makefile
index 81609bd33721..3b8769965da8 100644
--- a/japanese/ibus-mozc/Makefile
+++ b/japanese/ibus-mozc/Makefile
@@ -22,7 +22,8 @@ BUILD_DEPENDS= gsed:${PORTSDIR}/textproc/gsed \
LIB_DEPENDS= curl.6:${PORTSDIR}/ftp/curl \
gtest.0:${PORTSDIR}/devel/googletest \
ibus.2:${PORTSDIR}/textproc/ibus \
- protobuf.7:${PORTSDIR}/devel/protobuf
+ protobuf.7:${PORTSDIR}/devel/protobuf \
+ zinnia.0:${PORTSDIR}/japanese/zinnia
RUN_DEPENDS= mozc_server:${PORTSDIR}/japanese/mozc-server \
mozc_tool:${PORTSDIR}/japanese/mozc-tool \
mozc_server_start:${PORTSDIR}/japanese/mozc-additions \
@@ -38,16 +39,28 @@ USE_PYTHON= yes
.include <bsd.port.pre.mk>
.if ${OSVERSION} < 800107
-BROKEN= Does not compile on FreeBSD 7.X
+BROKEN= Does not compile on FreeBSD 7.X
+.endif
+
+.if ${ARCH} == "ia64" || ${ARCH} == "powerpc" || ${ARCH} == "sparc64"
+BROKEN= Does not compile: segfault
+.endif
+
+# workaround for a gcc4.2.1's namespace bug
+.if (${OSVERSION} < 1000000 && ${OSVERSION} > 9000000) || ${OSVERSION} < 802503
+BUILD_DEPENDS+= gcc42:${PORTSDIR}/lang/gcc42
+CC= gcc42
+CXX= g++42
.endif
.if defined(WITH_DEBUG_CODE)
-BUILD_MODE=Debug
+BUILD_MODE= Debug
.else
-BUILD_MODE=Release
+BUILD_MODE= Release
.endif
-REPLACE_FILES= ${WRKSRC}/build_mozc.py \
+LOCALBASE_REPLACE_FILES= \
+ ${WRKSRC}/build_mozc.py \
${WRKSRC}/gyp/common.gypi \
${WRKSRC}/unix/ibus/gen_mozc_xml.py \
${WRKSRC}/unix/ibus/mozc.xml \
@@ -57,7 +70,7 @@ REPLACE_FILES= ${WRKSRC}/build_mozc.py \
${WRKSRC}/handwriting/zinnia_handwriting.cc
post-patch:
- @for FILE in ${REPLACE_FILES}; \
+ @for FILE in ${LOCALBASE_REPLACE_FILES}; \
do \
${SED} -i .bak -e "s/@@LOCALBASE@@/${LOCALBASE:S/\//\\\//g}/g" \
$${FILE}; \
@@ -66,6 +79,9 @@ post-patch:
do-build:
@cd ${WRKSRC}/; \
export BUILD_COMMAND=${GMAKE}; \
+ export CC=${CC}; export CFLAGS="${CFLAGS}"; \
+ export CXX=${CXX}; export CXXFLAGS="${CXXFLAGS}"; \
+ export LDFLAGS="-L${LOCALBASE}/lib"; \
${PYTHON_CMD} build_mozc.py gyp --gypdir=${LOCALBASE}/bin; \
${PYTHON_CMD} build_mozc.py build_tools \
-c ${BUILD_MODE}; \
diff --git a/japanese/mozc-additions/Makefile b/japanese/mozc-additions/Makefile
index d3725df179fe..9a93a1da6948 100644
--- a/japanese/mozc-additions/Makefile
+++ b/japanese/mozc-additions/Makefile
@@ -15,10 +15,11 @@ MAINTAINER= daichi@FreeBSD.org
COMMENT= Additional tools and images for Mozc Japanese Input Method
NO_BUILD= yes
-REPLACE_FILES= ${WRKSRC}/Makefile
+LOCALBASE_REPLACE_FILES= \
+ ${WRKSRC}/Makefile
post-patch:
- @for FILE in ${REPLACE_FILES}; \
+ @for FILE in ${LOCALBASE_REPLACE_FILES}; \
do \
${SED} -i .bak -e "s/@@LOCALBASE@@/${LOCALBASE:S/\//\\\//g}/g" \
$${FILE}; \
diff --git a/japanese/mozc-server/Makefile b/japanese/mozc-server/Makefile
index 0779f3915b89..58fa9c5c241a 100644
--- a/japanese/mozc-server/Makefile
+++ b/japanese/mozc-server/Makefile
@@ -26,7 +26,7 @@ LIB_DEPENDS= curl.6:${PORTSDIR}/ftp/curl \
RUN_DEPENDS= xdg-open:${PORTSDIR}/devel/xdg-utils
USE_GMAKE= yes
-USE_ICONV= yes
+eSE_ICONV= yes
USE_PYTHON= yes
.include <bsd.port.pre.mk>
@@ -39,20 +39,28 @@ BROKEN= Does not compile on FreeBSD 7.X
BROKEN= Does not compile: segfault
.endif
+# workaround for a gcc4.2.1's namespace bug
+.if (${OSVERSION} < 1000000 && ${OSVERSION} > 9000000) || ${OSVERSION} < 802503
+BUILD_DEPENDS+= gcc42:${PORTSDIR}/lang/gcc42
+CC= gcc42
+CXX= g++42
+.endif
+
.if defined(WITH_DEBUG_CODE)
-BUILD_MODE=Debug
+BUILD_MODE= Debug
.else
-BUILD_MODE=Release
+BUILD_MODE= Release
.endif
-REPLACE_FILES= ${WRKSRC}/build_mozc.py \
+LOCALBASE_REPLACE_FILES= \
+ ${WRKSRC}/build_mozc.py \
${WRKSRC}/gyp/common.gypi \
${WRKSRC}/base/util.cc \
${WRKSRC}/base/process.cc \
${WRKSRC}/handwriting/zinnia_handwriting.cc
post-patch:
- @for FILE in ${REPLACE_FILES}; \
+ @for FILE in ${LOCALBASE_REPLACE_FILES}; \
do \
${SED} -i .bak -e "s/@@LOCALBASE@@/${LOCALBASE:S/\//\\\//g}/g" \
$${FILE}; \
@@ -61,6 +69,9 @@ post-patch:
do-build:
@cd ${WRKSRC}/; \
export BUILD_COMMAND=${GMAKE}; \
+ export CC=${CC}; export CFLAGS="${CFLAGS}"; \
+ export CXX=${CXX}; export CXXFLAGS="${CXXFLAGS}"; \
+ export LDFLAGS="-L${LOCALBASE}/lib" ; \
${PYTHON_CMD} build_mozc.py gyp --gypdir=${LOCALBASE}/bin; \
${PYTHON_CMD} build_mozc.py build_tools \
-c ${BUILD_MODE}; \
diff --git a/japanese/mozc-tool/Makefile b/japanese/mozc-tool/Makefile
index 1abaf5afe3dd..5a089005849c 100644
--- a/japanese/mozc-tool/Makefile
+++ b/japanese/mozc-tool/Makefile
@@ -35,16 +35,28 @@ QT_COMPONENTS= gui dbus qmake_build moc_build uic_build rcc_build
.include <bsd.port.pre.mk>
.if ${OSVERSION} < 800107
-BROKEN= Does not compile on FreeBSD 7.X
+BROKEN= Does not compile on FreeBSD 7.X
+.endif
+
+.if ${ARCH} == "ia64" || ${ARCH} == "powerpc" || ${ARCH} == "sparc64"
+BROKEN= Does not compile: segfault
+.endif
+
+# workaround for a gcc4.2.1's namespace bug
+.if (${OSVERSION} < 1000000 && ${OSVERSION} > 9000000) || ${OSVERSION} < 802503
+BUILD_DEPENDS+= gcc42:${PORTSDIR}/lang/gcc42
+CC= gcc42
+CXX= g++42
.endif
.if defined(WITH_DEBUG_CODE)
-BUILD_MODE=Debug
+BUILD_MODE= Debug
.else
-BUILD_MODE=Release
+BUILD_MODE= Release
.endif
-REPLACE_FILES= ${WRKSRC}/build_mozc.py \
+LOCALBASE_REPLACE_FILES= \
+ ${WRKSRC}/build_mozc.py \
${WRKSRC}/gyp/common.gypi \
${WRKSRC}/base/util.cc \
${WRKSRC}/base/process.cc \
@@ -52,7 +64,7 @@ REPLACE_FILES= ${WRKSRC}/build_mozc.py \
${WRKSRC}/handwriting/zinnia_handwriting.cc
post-patch:
- @for FILE in ${REPLACE_FILES}; \
+ @for FILE in ${LOCALBASE_REPLACE_FILES}; \
do \
${SED} -i .bak -e "s/@@LOCALBASE@@/${LOCALBASE:S/\//\\\//g}/g" \
$${FILE}; \
@@ -61,6 +73,9 @@ post-patch:
do-build:
@cd ${WRKSRC}/; \
export BUILD_COMMAND=${GMAKE}; \
+ export CC=${CC}; export CFLAGS="${CFLAGS}"; \
+ export CXX=${CXX}; export CXXFLAGS="${CXXFLAGS}"; \
+ export LDFLAGS="-L${LOCALBASE}/lib"; \
${PYTHON_CMD} build_mozc.py gyp --gypdir=${LOCALBASE}/bin; \
${PYTHON_CMD} build_mozc.py build_tools \
-c ${BUILD_MODE}; \
diff --git a/japanese/scim-mozc/Makefile b/japanese/scim-mozc/Makefile
index f5fae4156ccb..46ca1565fae2 100644
--- a/japanese/scim-mozc/Makefile
+++ b/japanese/scim-mozc/Makefile
@@ -22,7 +22,8 @@ BUILD_DEPENDS= gsed:${PORTSDIR}/textproc/gsed \
scim:${PORTSDIR}/textproc/scim
LIB_DEPENDS= curl.6:${PORTSDIR}/ftp/curl \
gtest.0:${PORTSDIR}/devel/googletest \
- protobuf.7:${PORTSDIR}/devel/protobuf
+ protobuf.7:${PORTSDIR}/devel/protobuf \
+ zinnia.0:${PORTSDIR}/japanese/zinnia
RUN_DEPENDS= mozc_server:${PORTSDIR}/japanese/mozc-server \
mozc_tool:${PORTSDIR}/japanese/mozc-tool \
mozc_server_start:${PORTSDIR}/japanese/mozc-additions \
@@ -38,16 +39,28 @@ USE_PYTHON= yes
.include <bsd.port.pre.mk>
.if ${OSVERSION} < 800107
-BROKEN= Does not compile on FreeBSD 7.X
+BROKEN= Does not compile on FreeBSD 7.X
+.endif
+
+.if ${ARCH} == "ia64" || ${ARCH} == "powerpc" || ${ARCH} == "sparc64"
+BROKEN= Does not compile: segfault
+.endif
+
+# workaround for a gcc4.2.1's namespace bug
+.if (${OSVERSION} < 1000000 && ${OSVERSION} > 9000000) || ${OSVERSION} < 802503
+BUILD_DEPENDS+= gcc42:${PORTSDIR}/lang/gcc42
+CC= gcc42
+CXX= g++42
.endif
.if defined(WITH_DEBUG_CODE)
-BUILD_MODE=Debug
+BUILD_MODE= Debug
.else
-BUILD_MODE=Release
+BUILD_MODE= Release
.endif
-REPLACE_FILES= ${WRKSRC}/build_mozc.py \
+LOCALBASE_REPLACE_FILES= \
+ ${WRKSRC}/build_mozc.py \
${WRKSRC}/gyp/common.gypi \
${WRKSRC}/base/util.cc \
${WRKSRC}/base/process.cc \
@@ -56,7 +69,7 @@ REPLACE_FILES= ${WRKSRC}/build_mozc.py \
${WRKSRC}/handwriting/zinnia_handwriting.cc
post-patch:
- @for FILE in ${REPLACE_FILES}; \
+ @for FILE in ${LOCALBASE_REPLACE_FILES}; \
do \
${SED} -i .bak -e "s/@@LOCALBASE@@/${LOCALBASE:S/\//\\\//g}/g" \
$${FILE}; \
@@ -65,6 +78,9 @@ post-patch:
do-build:
@cd ${WRKSRC}/; \
export BUILD_COMMAND=${GMAKE}; \
+ export CC=${CC}; export CFLAGS="${CFLAGS}"; \
+ export CXX=${CXX}; export CXXFLAGS="${CXXFLAGS}"; \
+ export LDFLAGS="-L${LOCALBASE}/lib"; \
${PYTHON_CMD} build_mozc.py gyp --gypdir=${LOCALBASE}/bin; \
${PYTHON_CMD} build_mozc.py build_tools \
-c ${BUILD_MODE}; \