9f8b4bcde3
- Add LIBS="${LIBS}" to MAKE_ENV and CONFIGURE_ENV. - Add an option helper for LIBS. - Adjust all ports that already use LIBS. Also remove references to PTHREAD_CFLAGS and PTHREAD_LIBS while here. - Some ports did not support having a LIBS environment variable and required additional patches. Somewhat simplified a linker command line looks like: ${CC} ${src_LDFLAGS} ${LDFLAGS} ${src_LIBS} ${LIBS} where src_LDFLAGS and src_LIBS are controlled by upstream and LDFLAGS and LIBS can be controlled by us. If possible -L and -l flags need to be added to LIBS to make sure they appear after any -L and -l flags set by upstream. Many ports currently add -L${LOCALBASE}/lib to LDFLAGS but this may appear too early on the command line causing installed libraries to be linked in instead of freshly built ones. Additional changes: benchmarks/netio: Replace WITH_IPV6 with an IPV6 option. comms/gnokii: Replace some patches with USES=pathfix. Also remove -fPIC. graphics/gimageview: USES=libtool and install desktop file in DESKTOPDIR. graphics/visionworkbench: Remove FreeBSD 7 support. multimedia/libmovtar: New LIB_DEPENDS syntax. multimedia/opencinematools: Use standard do-build. net/siproxd: USES=libtool:keepla (port actually needs .la files for plugins) net-mgmt/nagios: Remove -fPIC. net-mgmt/nagios4: Remove -fPIC. print/cups-base: Only add -lssp_nonshared on i386 and OSVERSION < 1000036. security/p11-kit: Replace PTHREAD_LIBS in CONFIGURE_ENV with ac_cv_func_pthread_mutexattr_init=no in CONFIGURE_ARGS. This skips a test in configure that falsely detects pthread_mutexattr_init in our libc. sysutils/dar: Fix iconv detection. x11/rxvt-unicode: Remove -lstdc++ and patch configure to remove a FreeBSD hack and use $CXX as linker as on other platforms. PR: 190592 Exp-run by: antoine Approved by: portmgr (antoine)
138 lines
5 KiB
Makefile
138 lines
5 KiB
Makefile
# Created by: trevor
|
|
# $FreeBSD$
|
|
|
|
PORTNAME= festival
|
|
PORTVERSION= 2.1
|
|
PORTREVISION= 1
|
|
CATEGORIES= audio accessibility
|
|
MASTER_SITES= ${MASTER_SITE_FESTIVAL}
|
|
MASTER_SITE_SUBDIR= ${PORTVERSION}
|
|
DISTFILES= ${DISTNAME}-release.tar.gz \
|
|
speech_tools-${PORTVERSION}-release.tar.gz
|
|
|
|
PATCHFILES= src_modules_diphone_diphone.h.diff:debian \
|
|
src_modules_diphone_di_io.cc.diff:debian \
|
|
src_modules_diphone_diphone.cc.diff:debian \
|
|
src_modules_donovan_t2s.h.diff:debian \
|
|
src_modules_UniSyn_diphone_UniSyn_diphone.cc.diff:debian \
|
|
festival_el_utf8.diff:debian \
|
|
lintianspellpatch.diff:debian \
|
|
hts21compat.diff:debian \
|
|
languagespatch.diff:debian \
|
|
${SPT_PATCHES:C/.*/patch-speech__tools_\0:netbsd/}
|
|
PATCH_SITES= ftp://ftp.netbsd.org/pub/pkgsrc/current/pkgsrc/audio/festival/patches/:netbsd \
|
|
http://patch-tracker.debian.org/patch/series/dl/festival/1:2.1~release-5.1/:debian
|
|
|
|
MAINTAINER= mi@aldan.algebra.com
|
|
COMMENT= Multi-lingual speech synthesis system
|
|
|
|
OPTIONS_DEFINE= NAS ESD
|
|
OPTIONS_DEFAULT=NAS ESD
|
|
ESD_DESC= ${ESOUND_DESC}
|
|
|
|
DIST_SUBDIR= festival
|
|
|
|
CXXFLAGS+= -DFTLIBDIR=${LOCALBASE}/share/festival/lib
|
|
CONFIGURE_WRKSRC= ${WRKDIR}/festival
|
|
USES= gmake
|
|
SPEECHTOOLS= ${WRKSRC}/speech_tools
|
|
FESTIVAL= ${WRKSRC}/festival
|
|
MAKE_ARGS+= CC="${CC}" GCC="${CC}" \
|
|
CXX="${CXX}" GXX="${CXX}" \
|
|
EST_HOME=${SPEECHTOOLS}
|
|
WRKSRC= ${WRKDIR}
|
|
|
|
SPT_PATCHES= base__class_EST__TVector.cc \
|
|
base__class_inst__tmpl_vector__dmatrix__t.cc \
|
|
base__class_inst__tmpl_vector__dvector__t.cc \
|
|
base__class_inst__tmpl_vector__fmatrix__t.cc \
|
|
config_compilers_gcc__defaults.mak \
|
|
include_EST__Ngrammar.h \
|
|
include_EST__SCFG.h \
|
|
include_EST__String.h \
|
|
include_EST__error.h \
|
|
include_ling__class_EST__FeatureFunctionPackage.h \
|
|
include_unix_EST__socket__unix.h \
|
|
stats_dynamic__program.cc \
|
|
utils_EST__ServiceTable.cc
|
|
|
|
do-build:
|
|
.for d in speech_tools festival
|
|
${MAKE_CMD} -C ${WRKDIR}/$d ${MAKE_FLAGS} Makefile ${MAKE_ARGS}
|
|
.endfor
|
|
|
|
# Can not make test in `festival', because the voices may not be installed
|
|
# XXX: this should fail, if the verdict is not "CORRECT"...
|
|
post-build test:
|
|
${MAKE_CMD} -C ${WRKDIR}/speech_tools test
|
|
|
|
# The below is needed, because Debian's patches expect a different
|
|
# directory-name
|
|
pre-patch:
|
|
${LN} -s festival ${WRKSRC}/festival-2.1~release
|
|
${LN} -s festival ${WRKSRC}/b
|
|
|
|
post-patch::
|
|
${REINPLACE_CMD} -e 's,/usr/X11R6,${LOCALBASE},g' \
|
|
${WRKSRC}/*/config/systems/default.mak
|
|
|
|
.include <bsd.port.options.mk>
|
|
|
|
.for m in nas esd
|
|
. if ${PORT_OPTIONS:M${m:tu}}
|
|
LIB_DEPENDS+= lib${m:nas=audio}.so:${PORTSDIR}/audio/${m:esd=esound}
|
|
post-patch::
|
|
${REINPLACE_CMD} -e 's,# INCLUDE_MODULES += ${m:tu}_AUDIO,INCLUDE_MODULES += ${m:tu}_AUDIO,' \
|
|
${WRKDIR}/*/config/config.in
|
|
CONFIGURE_ARGS+=--enable-$m
|
|
. else
|
|
CONFIGURE_ARGS+=--disable-$m
|
|
. endif
|
|
.endfor
|
|
|
|
do-configure:
|
|
.for d in speech_tools festival
|
|
@cd ${WRKDIR}/$d && \
|
|
if ! ${SETENV} CC="${CC}" CPP="${CPP}" CXX="${CXX}" \
|
|
CFLAGS="${CFLAGS}" CPPFLAGS="${CPPFLAGS}" CXXFLAGS="${CXXFLAGS}" \
|
|
${CONFIGURE_ENV} ./configure ${CONFIGURE_ARGS}; then \
|
|
${ECHO_CMD} "===> configuration script for $d failed."; \
|
|
${FALSE}; \
|
|
fi
|
|
# This step helps non-i386 systems and is harmless on i386
|
|
-${LN} -s ix86_FreeBSD.mak ${WRKDIR}/$d/config/systems/${ARCH}_unknown.mak
|
|
.endfor
|
|
${REINPLACE_CMD} \
|
|
-e '/^CFLAGS *=/s|$$| ${CFLAGS}|' \
|
|
-e '/^CXXFLAGS *=/s|$$| ${CXXFLAGS}|' \
|
|
-e 's,^OPTIMI,#OPTIMI,' \
|
|
${WRKSRC}/speech_tools/config/compilers/gcc*.mak
|
|
# This step helps to use a compiler, the vendor has not seen before:
|
|
${TEST} -e ${WRKDIR}/speech_tools/config/compilers/${CC}.mak || \
|
|
${LN} -s gcc_defaults.mak ${WRKDIR}/speech_tools/config/compilers/${CC}.mak
|
|
|
|
do-install:
|
|
@${MKDIR} ${STAGEDIR}${DATADIR}/lib/voices/english/
|
|
@${MKDIR} ${STAGEDIR}${DATADIR}/lib/voices/spanish/
|
|
@${MKDIR} ${STAGEDIR}${DATADIR}/lib/dicts
|
|
${CHMOD} -R u+w,a+r,og-w ${FESTIVAL}/lib
|
|
${FIND} ${FESTIVAL}/lib -type d -print0 | ${XARGS} -0 ${CHMOD} 755
|
|
${FIND} ${FESTIVAL} -type f -name *.orig -delete
|
|
cd ${FESTIVAL} && ${CP} -pPR lib examples ${STAGEDIR}${DATADIR}
|
|
${RM} -rf ${STAGEDIR}${DATADIR}/lib/etc/Makefile ${STAGEDIR}${DATADIR}/lib/etc/*FreeBSD* \
|
|
${STAGEDIR}${DATADIR}/lib/etc/*unknown
|
|
${INSTALL_PROGRAM} ${FESTIVAL}/lib/etc/*/audsp ${STAGEDIR}${PREFIX}/libexec
|
|
${INSTALL_PROGRAM} ${FESTIVAL}/src/main/festival ${STAGEDIR}${PREFIX}/libexec/festival.naked
|
|
${INSTALL_PROGRAM} ${FESTIVAL}/src/main/festival_client ${STAGEDIR}${PREFIX}/libexec/festival_client.naked
|
|
for n in festival.sh festival_client.sh sitevars.scm; \
|
|
do {\
|
|
${SED} "s%@PKG_FESTIVAL_LOCATION@%${DATADIR}%; \
|
|
s%@PKG_PREFIX@%${PREFIX}%" <${FILESDIR}/$$n > ${WRKDIR}/$$n ;} \
|
|
done
|
|
${INSTALL_SCRIPT} ${WRKDIR}/festival.sh ${STAGEDIR}${PREFIX}/bin/festival
|
|
${INSTALL_SCRIPT} ${WRKDIR}/festival_client.sh ${STAGEDIR}${PREFIX}/bin/festival_client
|
|
${INSTALL_DATA} ${WRKDIR}/sitevars.scm ${STAGEDIR}${DATADIR}/lib/sitevars.scm
|
|
${INSTALL_MAN} ${FESTIVAL}/doc/festival.1 ${STAGEDIR}${PREFIX}/man/man1/festival.1
|
|
${INSTALL_MAN} ${FESTIVAL}/doc/festival_client.1 ${STAGEDIR}${PREFIX}/man/man1/festival_client.1
|
|
|
|
.include <bsd.port.mk>
|