aboutsummaryrefslogtreecommitdiffstats
path: root/japanese
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2014-03-31 01:38:21 +0800
committerume <ume@FreeBSD.org>2014-03-31 01:38:21 +0800
commit08851d508dbcf5da9588a594d7d81d7ff63ff708 (patch)
tree330192217f769ded38cfc386ccf929c06b10acdb /japanese
parentacb5e2f0123fd21010b04ef069e4f8b8d72c258a (diff)
downloadfreebsd-ports-gnome-08851d508dbcf5da9588a594d7d81d7ff63ff708.tar.gz
freebsd-ports-gnome-08851d508dbcf5da9588a594d7d81d7ff63ff708.tar.zst
freebsd-ports-gnome-08851d508dbcf5da9588a594d7d81d7ff63ff708.zip
- Make Ruby binding optional and off by default.
- Mark Ruby binding BROKEN as it doesn't detect rbobject.h correctly after gem version of ruby-glib2 was enforced. Spotted by: pkg-fallout
Diffstat (limited to 'japanese')
-rw-r--r--japanese/tomoe/Makefile21
-rw-r--r--japanese/tomoe/pkg-plist10
2 files changed, 19 insertions, 12 deletions
diff --git a/japanese/tomoe/Makefile b/japanese/tomoe/Makefile
index 50932c784e6f..9ea8763b4420 100644
--- a/japanese/tomoe/Makefile
+++ b/japanese/tomoe/Makefile
@@ -19,9 +19,7 @@ USE_LDCONFIG= yes
USE_RUBY= yes
USE_PERL5= build
-BUILD_DEPENDS+= rubygem-glib2>0:${PORTSDIR}/devel/rubygem-glib2 \
- p5-XML-Parser>=0:${PORTSDIR}/textproc/p5-XML-Parser
-RUN_DEPENDS+= rubygem-glib2>0:${PORTSDIR}/devel/rubygem-glib2
+BUILD_DEPENDS= p5-XML-Parser>=0:${PORTSDIR}/textproc/p5-XML-Parser
# We cannot use ${ARCH} nor ${UNAME} which are defined in bsd.port.mk, here.
UNAME?= /usr/bin/uname
@@ -38,7 +36,7 @@ OSVERSION!= ${SYSCTL} -n kern.osreldate
.endif
.endif
-OPTIONS_DEFINE= DICT_RUBY EST MYSQL PYTHON UNIHAN
+OPTIONS_DEFINE= DICT_RUBY EST MYSQL PYTHON RUBY UNIHAN
OPTIONS_DEFAULT= PYTHON
.if ${ARCH} != "sparc64" && ${OSVERSION} < 700042
OPTIONS_DEFAULT+= UNIHAN
@@ -54,11 +52,22 @@ MYSQL_CONFIGURE_WITH= mysql
PYTHON_DESC= Enable Python module
PYTHON_USE= PYTHON=yes GNOME=pygtk2
PYTHON_CONFIGURE_OFF= --with-python=no
+RUBY_DESC= Enable Ruby module
+RUBY_USE= RUBY=yes
+RUBY_CONFIGURE_OFF= --with-ruby=no
+RUBY_BUILD_DEPENDS= rubygem-glib2>0:${PORTSDIR}/devel/rubygem-glib2
+RUBY_RUN_DEPENDS= rubygem-glib2>0:${PORTSDIR}/devel/rubygem-glib2
+RUBY_CFLAGS= -I${LOCALBASE}/include/ruby-${RUBY_VER} \
+ -I${LOCALBASE}/include/ruby-${RUBY_VER}/${RUBY_ARCH}
UNIHAN_DESC= Enable Unihan database dictionary module
UNIHAN_CONFIGURE_ENABLE= unihan
.include <bsd.port.pre.mk>
+.if ${PORT_OPTIONS:MRUBY}
+BROKEN= Broken with gem version of glib2
+.endif
+
.if ${PORT_OPTIONS:MUNIHAN}
.if ${OSVERSION} >= 700042
BROKEN= Broken with Unihan with gcc 4.2
@@ -77,9 +86,7 @@ BUILD_DEPENDS+= \
CONFIGURE_ENV+= PYTHON_VERSION=${PYTHON_VERSION:S;python;;} \
pyexecdir=${PYTHON_SITELIBDIR} \
GMSGFMT="${LOCALBASE}/bin/msgfmt"
-CFLAGS+= -I${LOCALBASE}/include \
- -I${LOCALBASE}/include/ruby-${RUBY_VER} \
- -I${LOCALBASE}/include/ruby-${RUBY_VER}/${RUBY_ARCH}
+CFLAGS+= -I${LOCALBASE}/include
.if ${PORT_OPTIONS:MUNIHAN}
post-extract:
diff --git a/japanese/tomoe/pkg-plist b/japanese/tomoe/pkg-plist
index 651edbaf72be..315a8d3217f8 100644
--- a/japanese/tomoe/pkg-plist
+++ b/japanese/tomoe/pkg-plist
@@ -82,8 +82,8 @@ share/tomoe/recognizer/handwriting-zh_CN.xml
@dirrm share/tomoe/recognizer
share/tomoe/xml2est.rb
@dirrm share/tomoe
-%%RUBY_SITEARCHLIBDIR%%/rbtomoe.h
-%%RUBY_SITEARCHLIBDIR%%/tomoe.a
-%%RUBY_SITEARCHLIBDIR%%/tomoe.la
-%%RUBY_SITEARCHLIBDIR%%/tomoe.so
-%%RUBY_SITELIBDIR%%/tomoe.rb
+%%RUBY%%%%RUBY_SITEARCHLIBDIR%%/rbtomoe.h
+%%RUBY%%%%RUBY_SITEARCHLIBDIR%%/tomoe.a
+%%RUBY%%%%RUBY_SITEARCHLIBDIR%%/tomoe.la
+%%RUBY%%%%RUBY_SITEARCHLIBDIR%%/tomoe.so
+%%RUBY%%%%RUBY_SITELIBDIR%%/tomoe.rb