ports/accessibility/speech-dispatcher/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

101 lines
2.7 KiB
Makefile

# $FreeBSD$
PORTNAME= speech-dispatcher
PORTVERSION= 0.8.6
PORTREVISION?= 0
CATEGORIES?= accessibility audio
MASTER_SITES= http://devel.freebsoft.org/pub/projects/speechd/
MAINTAINER= avilla@FreeBSD.org
COMMENT?= Common interface to speech synthesis
LICENSE= GPLv2 LGPL21
LICENSE_COMB= multi
LIB_DEPENDS= libdotconf.so:devel/dotconf \
libltdl.so:devel/libltdl \
libsndfile.so:audio/libsndfile
USE_GNOME= glib20 intltool
USES= alias gettext gmake pathfix pkgconfig libtool
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --without-espeak-ng
CFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
USE_LDCONFIG= yes
INSTALL_TARGET= install-strip
.if !defined(SPEECH_SLAVE)
CONFIGURE_ARGS+=--disable-python
ETCFILES= clients/emacs.conf modules/pico-generic.conf \
modules/cicero.conf modules/dtk-generic.conf \
modules/epos-generic.conf modules/espeak-generic.conf \
modules/espeak-mbrola-generic.conf modules/espeak.conf \
modules/festival.conf modules/flite.conf modules/ibmtts.conf \
modules/ivona.conf modules/llia_phon-generic.conf \
modules/swift-generic.conf speechd.conf \
modules/espeak-ng.conf
PORTDOCS= ANNOUNCE AUTHORS FAQ NEWS README TODO
INFO= spd-say speech-dispatcher speech-dispatcher-cs ssip
OPTIONS_DEFINE= ALSA AO DOCS ESPEAK FESTIVAL FLITE NAS PULSEAUDIO
OPTIONS_DEFAULT=ESPEAK
OPTIONS_SUB= yes
ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib
ALSA_CONFIGURE_WITH= alsa
AO_LIB_DEPENDS= libao.so:audio/libao
AO_CONFIGURE_WITH= libao
ESPEAK_DESC= eSpeak speech synthesizer support
ESPEAK_LIB_DEPENDS= libespeak.so:audio/espeak
ESPEAK_CONFIGURE_WITH= espeak
FESTIVAL_DESC= Festival Speech Synthesis System support
FESTIVAL_RUN_DEPENDS= festival:audio/festival \
${LOCALBASE}/share/festival/lib/${PORTNAME}.scm:audio/festival-freebsoft-utils
FLITE_DESC= Flite speech synthesis engine support
FLITE_LIB_DEPENDS= libflite.so:audio/flite
FLITE_CONFIGURE_WITH= flite
NAS_LIB_DEPENDS= libaudio.so:audio/nas
NAS_CONFIGURE_WITH= nas
PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio
PULSEAUDIO_CONFIGURE_WITH=pulse
post-patch:
@${REINPLACE_CMD} -e '/SUBDIRS/ s/tests//' \
${WRKSRC}/src/Makefile.in
${REINPLACE_CMD} -e 's,/usr/share,${PREFIX}/share,g' \
${WRKSRC}/src/modules/*.c \
${WRKSRC}/config/modules/*.conf
post-install:
.for f in ${ETCFILES}
@${MV} ${STAGEDIR}${ETCDIR}/${f} ${STAGEDIR}${ETCDIR}/${f}.sample
.endfor
@${RM} -r ${STAGEDIR}${DATADIR}/conf
@${RMDIR} ${STAGEDIR}${DATADIR} || ${TRUE}
${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR}
.else
PORTSCOUT= ignore:1
NO_ARCH= yes
USES+= python:3.3+
USE_PYTHON= flavors
LIB_DEPENDS+= libspeechd.so:accessibility/speech-dispatcher
RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/xdg/__init__.py:devel/py-xdg@${FLAVOR}
.endif
.include <bsd.port.mk>