Makefile 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. # $OpenBSD: Makefile,v 1.26 2017/04/10 11:45:23 sthen Exp $
  2. COMMENT= general multi-lingual speech synthesis system
  3. V= 1.95
  4. DISTNAME= festival-${V}-beta
  5. PKGNAME= ${DISTNAME:S/-beta/beta/}
  6. REVISION= 5
  7. CATEGORIES= audio
  8. MASTER_SITES= http://www.cstr.ed.ac.uk/downloads/festival/${V}/ \
  9. http://festvox.org/packed/festival/${V}/
  10. MASTER_SITES0= https://spacehopper.org/mirrors/festival/
  11. DIST_SUBDIR= festival
  12. DISTFILES= ${DISTNAME}.tar.gz speech_tools-1.2.95-beta.tar.gz
  13. SUPDISTFILES= OGIresLPC-2.0.9.tar.gz:0
  14. HOMEPAGE= http://www.cstr.ed.ac.uk/projects/festival/
  15. WRKDIST= ${WRKDIR}
  16. USE_GMAKE= Yes
  17. SPEECH= ${WRKSRC}/speech_tools
  18. FESTIVAL= ${WRKSRC}/festival
  19. MAKE_ENV+= CC="${CC}" \
  20. CXX="${CXX}" \
  21. CFLAGS="${CFLAGS}" \
  22. CXXFLAGS="${CXXFLAGS}" \
  23. PKG_EST_HOME="${SPEECH}" \
  24. EST_HOME="${SPEECH}" \
  25. FESTIVAL_BUILD_HOME="${FESTIVAL}" \
  26. FTLIBDIRC="${PREFIX}/lib/festival"
  27. CONFIGURE_STYLE=gnu
  28. MODGNU_CONFIG_GUESS_DIRS=${SPEECH} ${FESTIVAL}
  29. EXAMPLEDIR= ${PREFIX}/share/examples/festival
  30. SHAREDIR= ${PREFIX}/lib/festival
  31. FLAVORS= ogi
  32. FLAVOR?=
  33. .if ${FLAVOR:Mogi}
  34. DISTFILES+= OGIresLPC-2.0.9.tar.gz:0
  35. PATCH_LIST= ogi-* patch-*
  36. PERMIT_PACKAGE_CDROM= no fee
  37. .endif
  38. # BSD-like
  39. PERMIT_DISTFILES_FTP= Yes
  40. PERMIT_PACKAGE_CDROM?= Yes
  41. PERMIT_PACKAGE_FTP= Yes
  42. WANTLIB= c m sndio ${LIBCXX} termcap
  43. post-patch:
  44. @cp ${FILESDIR}/OpenBSD.mak ${WRKSRC}/speech_tools/config/systems/OpenBSD.mak
  45. @cp ${FILESDIR}/Makefile ${WRKSRC}
  46. @cp ${FILESDIR}/sndio_audio.mak ${WRKSRC}/festival/config/modules
  47. @cp ${FILESDIR}/sndio_audio.mak ${WRKSRC}/speech_tools/config/modules
  48. @cp ${FILESDIR}/sndio.cc ${WRKSRC}/speech_tools/audio
  49. do-configure:
  50. @cd ${FESTIVAL} && ${SETENV} ${CONFIGURE_ENV} ./configure ${CONFIGURE_ARGS}
  51. @cd ${SPEECH} && ${SETENV} ${CONFIGURE_ENV} ./configure ${CONFIGURE_ARGS}
  52. .if ${FLAVOR:Mogi}
  53. @printf "ALSO_INCLUDE += OGIcommon\nALSO_INCLUDE += OGIdbase\nALSO_INCLUDE += OGIresLPC\n" >> ${FESTIVAL}/config/config
  54. .endif
  55. post-build:
  56. @sed -i s,'/bin/festival','${PREFIX}/bin/festival', ${WRKBUILD}/festival/bin/text2wave
  57. do-install:
  58. .if ${FLAVOR:Mogi}
  59. ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/festival-ogi
  60. ${INSTALL_DATA} ${WRKDIR}/{README-OGIresLPC-2.0,license_ogi_tts.txt} \
  61. ${PREFIX}/share/doc/festival-ogi
  62. .endif
  63. ${INSTALL_DATA_DIR} ${EXAMPLEDIR}
  64. ${INSTALL_DATA_DIR} ${EXAMPLEDIR}/songs
  65. ${INSTALL_DATA_DIR} ${SHAREDIR}/multisyn
  66. .for EXT in dtd el ent gram ngrambin properties scm
  67. ${INSTALL_DATA} ${WRKSRC}/festival/lib/*.${EXT} ${SHAREDIR}
  68. .endfor
  69. ${INSTALL_DATA} ${WRKSRC}/festival/lib/multisyn/*.scm \
  70. ${SHAREDIR}/multisyn
  71. ${INSTALL_PROGRAM} ${FESTIVAL}/lib/etc/OpenBSD/audsp ${PREFIX}/bin
  72. ${INSTALL_PROGRAM} ${FESTIVAL}/src/main/festival ${PREFIX}/bin
  73. ${INSTALL_PROGRAM} ${FESTIVAL}/src/main/festival_client ${PREFIX}/bin
  74. ${INSTALL_SCRIPT} ${FESTIVAL}/bin/festival_server ${PREFIX}/bin
  75. ${INSTALL_SCRIPT} ${FESTIVAL}/bin/festival_server_control ${PREFIX}/bin
  76. ${INSTALL_SCRIPT} ${FESTIVAL}/bin/text2wave ${PREFIX}/bin
  77. ${INSTALL_MAN} ${FESTIVAL}/doc/festival.1 ${PREFIX}/man/man1/festival.1
  78. ${INSTALL_MAN} ${FESTIVAL}/doc/festival_client.1 ${PREFIX}/man/man1/festival_client.1
  79. .for EXT in dtd scm stml tar text
  80. ${INSTALL_DATA} ${FESTIVAL}/examples/*.${EXT} ${EXAMPLEDIR}
  81. .endfor
  82. ${INSTALL_DATA} ${FESTIVAL}/examples/ex1.* ${EXAMPLEDIR}
  83. ${INSTALL_DATA} ${FESTIVAL}/examples/example* ${EXAMPLEDIR}
  84. ${INSTALL_DATA} ${FESTIVAL}/examples/festival_client.* ${EXAMPLEDIR}
  85. ${INSTALL_SCRIPT} ${FESTIVAL}/examples/{dumpfeats,durmeanstd,latest,make_utts,saytime,scfg_parse_text,text2pos,text2wave} ${EXAMPLEDIR}
  86. ${INSTALL_DATA} ${FESTIVAL}/examples/songs/*.xml ${EXAMPLEDIR}/songs
  87. .include <bsd.port.mk>