freebsd-ports/japanese/tomoe/Makefile
Mathieu Arnold 551be3c723 Convert Python ports to FLAVORS.
Ports using USE_PYTHON=distutils are now flavored.  They will
  automatically get flavors (py27, py34, py35, py36) depending on what
  versions they support.

  There is also a USE_PYTHON=flavors for ports that do not use distutils
  but need FLAVORS to be set.  A USE_PYTHON=noflavors can be set if
  using distutils but flavors are not wanted.

  A new USE_PYTHON=optsuffix that will add PYTHON_PKGNAMESUFFIX has been
  added to cope with Python ports that did not have the Python
  PKGNAMEPREFIX but are flavored.

  USES=python now also exports a PY_FLAVOR variable that contains the
  current python flavor.  It can be used in dependency lines when the
  port itself is not python flavored.  For example, deskutils/calibre.

  By default, all the flavors are generated.  To only generate flavors
  for the versions in PYTHON2_DEFAULT and PYTHON3_DEFAULT, define
  BUILD_DEFAULT_PYTHON_FLAVORS in your make.conf.

  In all the ports with Python dependencies, the *_DEPENDS entries MUST
  end with the flavor so that the framework knows which to build/use.
  This is done by appending '@${PY_FLAVOR}' after the origin (or
  @${FLAVOR} if in a Python module with Python flavors, as the content
  will be the same).  For example:

    RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}six>0:devel/py-six@${PY_FLAVOR}

PR:		223071
Reviewed by:	portmgr, python
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D12464
2017-11-30 15:50:30 +00:00

71 lines
2.2 KiB
Makefile

# Created by: Hajimu UMEMOTO <ume@FreeBSD.org>
# $FreeBSD$
PORTNAME= tomoe
PORTVERSION= 0.6.0
PORTREVISION= 6
CATEGORIES= japanese
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
MAINTAINER= ume@FreeBSD.org
COMMENT= Tegaki Online MOji-ninshiki Engine
BUILD_DEPENDS= p5-XML-Parser>=0:textproc/p5-XML-Parser
GNU_CONFIGURE= yes
USES= gettext gmake libtool pathfix perl5 pkgconfig
USE_LDCONFIG= yes
USE_PERL5= build
CONFIGURE_ENV= PYTHON_VERSION=${PYTHON_VERSION:S;python;;} \
pyexecdir=${PYTHON_SITELIBDIR} \
GMSGFMT="${LOCALBASE}/bin/msgfmt"
CFLAGS+= -I${LOCALBASE}/include
OPTIONS_DEFINE= DICT_RUBY EST MYSQL PYTHON RUBY UNIHAN
OPTIONS_DEFAULT= PYTHON
OPTIONS_SUB= yes
DICT_RUBY_DESC= Enable Ruby based dictionary module
DICT_RUBY_CONFIGURE_ENABLE= dict-ruby
EST_DESC= Enable Hyper Estraier dictionary module
EST_CONFIGURE_WITH= est
MYSQL_DESC= Enable MySQL dictionary module
MYSQL_USE= MYSQL=yes
MYSQL_CONFIGURE_WITH= mysql
PYTHON_DESC= Enable Python module
PYTHON_USE= GNOME=pygtk2
PYTHON_USES= python:2.7
PYTHON_CONFIGURE_OFF= --with-python=no
RUBY_DESC= Enable Ruby module
RUBY_BROKEN= Does not build
RUBY_USE= RUBY=yes
RUBY_CONFIGURE_OFF= --with-ruby=no
RUBY_BUILD_DEPENDS= rubygem-glib2>0:devel/rubygem-glib2
RUBY_RUN_DEPENDS= rubygem-glib2>0: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_BROKEN= Does not build
UNIHAN_MASTER_SITES= ftp://ftp.unicode.org/Public/UNIDATA/:unihan
UNIHAN_DISTFILES= Unihan.zip:unihan
UNIHAN_EXTRACT_DEPENDS= ${UNZIP_CMD}:archivers/unzip
UNIHAN_BUILD_DEPENDS= \
${RUBY_SITEARCHLIBDIR}/uconv.so:japanese/ruby-uconv \
${RUBY_SITELIBDIR}/suikyo/suikyo.rb:japanese/suikyo
UNIHAN_USE= RUBY=yes
UNIHAN_CONFIGURE_ENABLE=unihan
post-extract-UNIHAN-on:
cd ${WRKSRC}/module/dict && \
${UNZIP_CMD} -qo ${DISTDIR}/Unihan.zip -d ${WRKSRC}/module/dict
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
.include <bsd.port.mk>