From 08851d508dbcf5da9588a594d7d81d7ff63ff708 Mon Sep 17 00:00:00 2001 From: ume Date: Sun, 30 Mar 2014 17:38:21 +0000 Subject: - 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 --- japanese/tomoe/Makefile | 21 ++++++++++++++------- japanese/tomoe/pkg-plist | 10 +++++----- 2 files changed, 19 insertions(+), 12 deletions(-) (limited to 'japanese') 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 +.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 -- cgit