aboutsummaryrefslogtreecommitdiff
path: root/japanese/tomoe
diff options
context:
space:
mode:
authorHajimu UMEMOTO <ume@FreeBSD.org>2007-01-11 17:33:54 +0000
committerHajimu UMEMOTO <ume@FreeBSD.org>2007-01-11 17:33:54 +0000
commit0c96967e336a4842f5e9ea5d8e01c87cc065435d (patch)
tree850da67eb6a1245ab6771d603860367966273e75 /japanese/tomoe
parentd11db20443d5179328af4b90a524eecf2b3fe505 (diff)
downloadports-0c96967e336a4842f5e9ea5d8e01c87cc065435d.tar.gz
ports-0c96967e336a4842f5e9ea5d8e01c87cc065435d.zip
Notes
Diffstat (limited to 'japanese/tomoe')
-rw-r--r--japanese/tomoe/Makefile55
-rw-r--r--japanese/tomoe/files/patch-configure22
-rw-r--r--japanese/tomoe/pkg-plist20
3 files changed, 85 insertions, 12 deletions
diff --git a/japanese/tomoe/Makefile b/japanese/tomoe/Makefile
index 14b4ab85331e..43d3c3c5a205 100644
--- a/japanese/tomoe/Makefile
+++ b/japanese/tomoe/Makefile
@@ -9,11 +9,9 @@ PORTNAME= tomoe
PORTVERSION= 0.5.0
PORTREVISION= 1
CATEGORIES= japanese
-MASTER_SITES= ${MASTER_SITE_SOURCEFORGE_JP} \
- ftp://ftp.unicode.org/Public/UNIDATA/:unihan
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE_JP}
MASTER_SITE_SUBDIR=tomoe/23340
-DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
- Unihan.zip:unihan
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
MAINTAINER= ume@FreeBSD.org
@@ -22,18 +20,59 @@ COMMENT= Tegaki Online MOji-ninshiki Engine
USE_GNOME= lthack gnomehack
USE_AUTOTOOLS= libtool:15
USE_LDCONFIG= yes
-
USE_RUBY= yes
+
+BUILD_DEPENDS+= ${RUBY_SITEARCHLIBDIR}/glib2.so:${PORTSDIR}/devel/ruby-glib2
+RUN_DEPENDS+= ${RUBY_SITEARCHLIBDIR}/glib2.so:${PORTSDIR}/devel/ruby-glib2
+
+OPTIONS=DICT_RUBY "Enable Ruby based dictionary module" off \
+ EST "Enable Hyper Estraier dictionary module" off \
+ MYSQL "Enable MySQL dictionary module" off \
+ UNIHAN "Enable Unihan database dictionary module" on
+
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_DICT_RUBY)
+CONFIGURE_ARGS+=--enable-dict-ruby
+PLIST_SUB+= DICT_RUBY=""
+.else
+PLIST_SUB+= DICT_RUBY="@comment "
+.endif
+
+.if defined(WITH_EST)
+CONFIGURE_ARGS+=--with-est
+PLIST_SUB+= EST=""
+.else
+PLIST_SUB+= EST="@comment "
+.endif
+
+.if defined(WITH_MYSQL)
+USE_MYSQL= yes
+CONFIGURE_ARGS+=--with-mysql
+PLIST_SUB+= MYSQL=""
+.else
+PLIST_SUB+= MYSQL="@comment "
+.endif
+
+.if defined(WITH_UNIHAN)
+MASTER_SITES+= ftp://ftp.unicode.org/Public/UNIDATA/:unihan
+DISTFILES+= Unihan.zip:unihan
EXTRACT_DEPENDS+= unzip:${PORTSDIR}/archivers/unzip
-BUILD_DEPENDS+= ${RUBY_SITEARCHLIBDIR}/glib2.so:${PORTSDIR}/devel/ruby-glib2 \
+BUILD_DEPENDS+= \
${RUBY_SITEARCHLIBDIR}/uconv.so:${PORTSDIR}/japanese/ruby-uconv \
${RUBY_SITELIBDIR}/suikyo/suikyo.rb:${PORTSDIR}/japanese/suikyo
-RUN_DEPENDS+= ${RUBY_SITEARCHLIBDIR}/glib2.so:${PORTSDIR}/devel/ruby-glib2
+PLIST_SUB+= UNIHAN=""
+.else
+CONFIGURE_ARGS+=--disable-unihan
+PLIST_SUB+= UNIHAN="@comment "
+.endif
CONFIGURE_ENV+= CFLAGS="${CFLAGS} -I${LOCALBASE}/include"
+.if defined(WITH_UNIHAN)
post-extract:
cd ${WRKSRC}/module/dict && \
${UNZIP_CMD} -qo ${DISTDIR}/Unihan.zip -d ${WRKSRC}/module/dict
+.endif
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/japanese/tomoe/files/patch-configure b/japanese/tomoe/files/patch-configure
new file mode 100644
index 000000000000..7e2c4198883f
--- /dev/null
+++ b/japanese/tomoe/files/patch-configure
@@ -0,0 +1,22 @@
+Index: configure
+diff -u configure.orig configure
+--- configure.orig Fri Jan 12 01:41:01 2007
++++ configure Fri Jan 12 01:47:51 2007
+@@ -21716,7 +21716,7 @@
+ fi
+
+
+-if test "$est_exists" = "yes"; then
++if test x"$with_est" = "xyes" -a "$est_exists" = "yes"; then
+ WITH_EST_TRUE=
+ WITH_EST_FALSE='#'
+ else
+@@ -22374,7 +22374,7 @@
+ fi
+
+
+-if test "x$MYSQL_CONFIG" != "xmysql_config-not-found"; then
++if test x"$with_mysql" = "xyes" -a "x$MYSQL_CONFIG" != "xmysql_config-not-found"; then
+ enable_mysql=yes
+ MYSQL_CFLAGS=`$MYSQL_CONFIG --cflags`
+ MYSQL_LIBS=`$MYSQL_CONFIG --libs`
diff --git a/japanese/tomoe/pkg-plist b/japanese/tomoe/pkg-plist
index 68fa21aa13fe..a220851f77ea 100644
--- a/japanese/tomoe/pkg-plist
+++ b/japanese/tomoe/pkg-plist
@@ -19,10 +19,22 @@ lib/libtomoe.a
lib/libtomoe.la
lib/libtomoe.so
lib/libtomoe.so.1
-lib/tomoe/module/dict/libunihan.a
-lib/tomoe/module/dict/libunihan.la
-lib/tomoe/module/dict/libunihan.so
-lib/tomoe/module/dict/libunihan.so.1
+%%EST%%lib/tomoe/module/dict/libest.a
+%%EST%%lib/tomoe/module/dict/libest.la
+%%EST%%lib/tomoe/module/dict/libest.so
+%%EST%%lib/tomoe/module/dict/libest.so.1
+%%MYSQL%%lib/tomoe/module/dict/libmysql.a
+%%MYSQL%%lib/tomoe/module/dict/libmysql.la
+%%MYSQL%%lib/tomoe/module/dict/libmysql.so
+%%MYSQL%%lib/tomoe/module/dict/libmysql.so.1
+%%DICT_RUBY%%lib/tomoe/module/dict/libruby.a
+%%DICT_RUBY%%lib/tomoe/module/dict/libruby.la
+%%DICT_RUBY%%lib/tomoe/module/dict/libruby.so
+%%DICT_RUBY%%lib/tomoe/module/dict/libruby.so.1
+%%UNIHAN%%lib/tomoe/module/dict/libunihan.a
+%%UNIHAN%%lib/tomoe/module/dict/libunihan.la
+%%UNIHAN%%lib/tomoe/module/dict/libunihan.so
+%%UNIHAN%%lib/tomoe/module/dict/libunihan.so.1
lib/tomoe/module/dict/libxml.a
lib/tomoe/module/dict/libxml.la
lib/tomoe/module/dict/libxml.so