aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2007-10-15 23:00:03 +0800
committerume <ume@FreeBSD.org>2007-10-15 23:00:03 +0800
commitb7c54b9bb59952e886f2769d39f07c7ae85bc0b5 (patch)
tree5462ccb7234849d6d4290f1ef44de46531865b8d
parentf6da7c88b18187da680e3c54d1aaf654a58a7917 (diff)
downloadfreebsd-ports-gnome-b7c54b9bb59952e886f2769d39f07c7ae85bc0b5.tar.gz
freebsd-ports-gnome-b7c54b9bb59952e886f2769d39f07c7ae85bc0b5.tar.zst
freebsd-ports-gnome-b7c54b9bb59952e886f2769d39f07c7ae85bc0b5.zip
Unihan module is not buildable with GCC 4.2. So, disable Unihan
support by default on 7.X and later, and mark it as BROKEN with GCC 4.2 when Unihan is enabled.
-rw-r--r--japanese/tomoe/Makefile18
1 files changed, 16 insertions, 2 deletions
diff --git a/japanese/tomoe/Makefile b/japanese/tomoe/Makefile
index e03282f6b3e0..05d46cb678cb 100644
--- a/japanese/tomoe/Makefile
+++ b/japanese/tomoe/Makefile
@@ -30,14 +30,25 @@ BUILD_DEPENDS+= ${RUBY_SITEARCHLIBDIR}/glib2.so:${PORTSDIR}/devel/ruby-glib2 \
RUN_DEPENDS+= ${RUBY_SITEARCHLIBDIR}/glib2.so:${PORTSDIR}/devel/ruby-glib2
# We cannot use ${ARCH} nor ${UNAME} which are defined in bsd.port.mk, here.
-UNAME= /usr/bin/uname
+UNAME?= /usr/bin/uname
ARCH!= ${UNAME} -p
+.if !defined(OSVERSION)
+AWK?= /usr/bin/awk
+SYSCTL?= /sbin/sysctl
+.if exists(/usr/include/sys/param.h)
+OSVERSION!= ${AWK} '/^\#define __FreeBSD_version/ {print $$3}' < /usr/include/sys/param.h
+.elif exists(/usr/src/sys/sys/param.h)
+OSVERSION!= ${AWK} '/^\#define __FreeBSD_version/ {print $$3}' < /usr/src/sys/sys/param.h
+.else
+OSVERSION!= ${SYSCTL} -n kern.osreldate
+.endif
+.endif
OPTIONS=DICT_RUBY "Enable Ruby based dictionary module" off \
EST "Enable Hyper Estraier dictionary module" off \
MYSQL "Enable MySQL dictionary module" off \
PYTHON "Enable Python module" on
-.if ${ARCH} == "sparc64"
+.if ${ARCH} == "sparc64" || ${OSVERSION} >= 700042
OPTIONS+=UNIHAN "Enable Unihan database dictionary module" off
.else
OPTIONS+=UNIHAN "Enable Unihan database dictionary module" on
@@ -78,6 +89,9 @@ PLIST_SUB+= PYTHON=""
.endif
.if defined(WITH_UNIHAN)
+.if ${OSVERSION} >= 700042
+BROKEN= Broken with Unihan with gcc 4.2
+.endif
.if ${ARCH} == "sparc64"
BROKEN= Not buildable with Unihan on sparc64
.endif