2005-12-18 14:50:33 +00:00
|
|
|
# New ports collection makefile for: ja-tomoe
|
|
|
|
# Date created: 18 Dec 2005
|
|
|
|
# Whom: Hajimu UMEMOTO <ume@FreeBSD.org>
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= tomoe
|
2007-08-16 16:32:28 +00:00
|
|
|
PORTVERSION= 0.6.0
|
2010-05-31 02:01:56 +00:00
|
|
|
PORTREVISION= 4
|
2005-12-18 14:50:33 +00:00
|
|
|
CATEGORIES= japanese
|
2009-08-22 00:24:37 +00:00
|
|
|
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
|
2007-01-11 17:33:54 +00:00
|
|
|
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
|
2007-01-06 15:19:07 +00:00
|
|
|
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
|
2005-12-18 14:50:33 +00:00
|
|
|
|
|
|
|
MAINTAINER= ume@FreeBSD.org
|
|
|
|
COMMENT= Tegaki Online MOji-ninshiki Engine
|
|
|
|
|
|
|
|
USE_GNOME= lthack gnomehack
|
2007-08-16 16:32:28 +00:00
|
|
|
GNU_CONFIGURE= yes
|
2013-04-24 18:10:30 +00:00
|
|
|
USES= gettext
|
2007-08-16 16:32:28 +00:00
|
|
|
USE_GMAKE= yes
|
2006-12-17 08:00:23 +00:00
|
|
|
USE_LDCONFIG= yes
|
2007-01-06 15:19:07 +00:00
|
|
|
USE_RUBY= yes
|
2007-08-20 18:00:59 +00:00
|
|
|
USE_PERL5_BUILD=yes
|
2007-01-11 17:33:54 +00:00
|
|
|
|
2007-08-20 18:00:59 +00:00
|
|
|
BUILD_DEPENDS+= ${RUBY_SITEARCHLIBDIR}/glib2.so:${PORTSDIR}/devel/ruby-glib2 \
|
2012-06-29 16:47:42 +00:00
|
|
|
p5-XML-Parser>=0:${PORTSDIR}/textproc/p5-XML-Parser
|
2007-01-11 17:33:54 +00:00
|
|
|
RUN_DEPENDS+= ${RUBY_SITEARCHLIBDIR}/glib2.so:${PORTSDIR}/devel/ruby-glib2
|
|
|
|
|
2007-01-20 15:30:54 +00:00
|
|
|
# We cannot use ${ARCH} nor ${UNAME} which are defined in bsd.port.mk, here.
|
2007-10-15 15:00:03 +00:00
|
|
|
UNAME?= /usr/bin/uname
|
2007-01-20 15:30:54 +00:00
|
|
|
ARCH!= ${UNAME} -p
|
2007-10-15 15:00:03 +00:00
|
|
|
.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
|
2007-01-20 15:30:54 +00:00
|
|
|
|
2012-06-16 19:48:10 +00:00
|
|
|
OPTIONS_DEFINE= DICT_RUBY EST MYSQL PYTHON UNIHAN
|
|
|
|
OPTIONS_DEFAULT= PYTHON
|
|
|
|
.if ${ARCH} != "sparc64" && ${OSVERSION} < 700042
|
|
|
|
OPTIONS_DEFAULT+= UNIHAN
|
2007-01-20 15:30:54 +00:00
|
|
|
.endif
|
2012-06-16 19:48:10 +00:00
|
|
|
DICT_RUBY_DESC= Enable Ruby based dictionary module
|
|
|
|
EST_DESC= Enable Hyper Estraier dictionary module
|
|
|
|
MYSQL_DESC= Enable MySQL dictionary module
|
|
|
|
PYTHON_DESC= Enable Python module
|
|
|
|
UNIHAN_DESC= Enable Unihan database dictionary module
|
2007-01-11 17:33:54 +00:00
|
|
|
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2012-06-16 19:48:10 +00:00
|
|
|
.if ${PORT_OPTIONS:MDICT_RUBY}
|
2007-01-11 17:33:54 +00:00
|
|
|
CONFIGURE_ARGS+=--enable-dict-ruby
|
|
|
|
PLIST_SUB+= DICT_RUBY=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= DICT_RUBY="@comment "
|
|
|
|
.endif
|
|
|
|
|
2012-06-16 19:48:10 +00:00
|
|
|
.if ${PORT_OPTIONS:MEST}
|
2007-01-11 17:33:54 +00:00
|
|
|
CONFIGURE_ARGS+=--with-est
|
|
|
|
PLIST_SUB+= EST=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= EST="@comment "
|
|
|
|
.endif
|
|
|
|
|
2012-06-16 19:48:10 +00:00
|
|
|
.if ${PORT_OPTIONS:MMYSQL}
|
2007-01-11 17:33:54 +00:00
|
|
|
USE_MYSQL= yes
|
|
|
|
CONFIGURE_ARGS+=--with-mysql
|
|
|
|
PLIST_SUB+= MYSQL=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= MYSQL="@comment "
|
|
|
|
.endif
|
|
|
|
|
2012-06-16 19:48:10 +00:00
|
|
|
.if ${PORT_OPTIONS:MPYTHON}
|
2007-08-16 16:32:28 +00:00
|
|
|
USE_PYTHON= yes
|
|
|
|
.include "${PORTSDIR}/Mk/bsd.python.mk"
|
2007-08-29 17:36:14 +00:00
|
|
|
USE_GNOME+= pygtk2
|
2007-08-16 16:32:28 +00:00
|
|
|
PLIST_SUB+= PYTHON=""
|
2012-06-16 19:48:10 +00:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--with-python=no
|
|
|
|
PLIST_SUB+= PYTHON="@comment "
|
2007-08-16 16:32:28 +00:00
|
|
|
.endif
|
|
|
|
|
2012-06-16 19:48:10 +00:00
|
|
|
.if ${PORT_OPTIONS:MUNIHAN}
|
2007-10-15 15:00:03 +00:00
|
|
|
.if ${OSVERSION} >= 700042
|
|
|
|
BROKEN= Broken with Unihan with gcc 4.2
|
|
|
|
.endif
|
2007-01-20 15:30:54 +00:00
|
|
|
.if ${ARCH} == "sparc64"
|
|
|
|
BROKEN= Not buildable with Unihan on sparc64
|
|
|
|
.endif
|
2007-01-11 17:33:54 +00:00
|
|
|
MASTER_SITES+= ftp://ftp.unicode.org/Public/UNIDATA/:unihan
|
|
|
|
DISTFILES+= Unihan.zip:unihan
|
2013-05-10 01:46:52 +00:00
|
|
|
EXTRACT_DEPENDS+= ${UNZIP_CMD}:${PORTSDIR}/archivers/unzip
|
2007-01-11 17:33:54 +00:00
|
|
|
BUILD_DEPENDS+= \
|
2007-01-06 15:19:07 +00:00
|
|
|
${RUBY_SITEARCHLIBDIR}/uconv.so:${PORTSDIR}/japanese/ruby-uconv \
|
|
|
|
${RUBY_SITELIBDIR}/suikyo/suikyo.rb:${PORTSDIR}/japanese/suikyo
|
2007-01-11 17:33:54 +00:00
|
|
|
PLIST_SUB+= UNIHAN=""
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--disable-unihan
|
|
|
|
PLIST_SUB+= UNIHAN="@comment "
|
|
|
|
.endif
|
2007-01-06 15:19:07 +00:00
|
|
|
|
2011-09-23 22:26:39 +00:00
|
|
|
CONFIGURE_ENV+= PYTHON_VERSION=${PYTHON_VERSION:S;python;;} \
|
2007-08-16 16:32:28 +00:00
|
|
|
pyexecdir=${PYTHON_SITELIBDIR} \
|
2007-08-16 19:12:07 +00:00
|
|
|
GMSGFMT="${LOCALBASE}/bin/msgfmt"
|
2011-09-23 22:26:39 +00:00
|
|
|
CFLAGS+= -I${LOCALBASE}/include \
|
|
|
|
-I${LOCALBASE}/include/ruby-${RUBY_VER} \
|
|
|
|
-I${LOCALBASE}/include/ruby-${RUBY_VER}/${RUBY_ARCH}
|
2005-12-18 14:50:33 +00:00
|
|
|
|
2012-06-16 19:48:10 +00:00
|
|
|
.if ${PORT_OPTIONS:MUNIHAN}
|
2007-01-06 15:19:07 +00:00
|
|
|
post-extract:
|
|
|
|
cd ${WRKSRC}/module/dict && \
|
|
|
|
${UNZIP_CMD} -qo ${DISTDIR}/Unihan.zip -d ${WRKSRC}/module/dict
|
2007-01-11 17:33:54 +00:00
|
|
|
.endif
|
2007-01-06 15:19:07 +00:00
|
|
|
|
2013-03-08 10:51:34 +00:00
|
|
|
post-patch:
|
|
|
|
@${REINPLACE_CMD} -e 's|glib/ge.*\.h>|glib.h>|g' \
|
|
|
|
-e 's|glib/ga.*\.h>|glib.h>|g' \
|
|
|
|
${WRKSRC}/lib/glib-compat-key-file.h \
|
|
|
|
${WRKSRC}/lib/tomoe.c \
|
|
|
|
${WRKSRC}/lib/glib-utils.h
|
|
|
|
|
2007-01-11 17:33:54 +00:00
|
|
|
.include <bsd.port.post.mk>
|