recipe 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. # Build recipe for espeak.
  2. #
  3. # Copyright (c) 2018 Thiago Seus, <thiago.seus@yahoo.com.br>.
  4. # Copyright (c) 2020 Matias Fonzo, <selk@dragora.org>.
  5. #
  6. # Licensed under the Apache License, Version 2.0 (the "License");
  7. # you may not use this file except in compliance with the License.
  8. # You may obtain a copy of the License at
  9. #
  10. # http://www.apache.org/licenses/LICENSE-2.0
  11. #
  12. # Unless required by applicable law or agreed to in writing, software
  13. # distributed under the License is distributed on an "AS IS" BASIS,
  14. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. # See the License for the specific language governing permissions and
  16. # limitations under the License.
  17. # Exit immediately on any error
  18. set -e
  19. program=espeak
  20. version=1.48.04
  21. release=2
  22. # Define a category for the output of the package name
  23. pkgcategory=tools
  24. tarname=${program}-${version}-source.zip
  25. # Remote source(s)
  26. fetch="https://downloads.sourceforge.net/project/espeak/espeak/espeak-${version%.*}/$tarname"
  27. description="
  28. Speech Synthesizer.
  29. eSpeak is a compact, multi-language, text-to-speech synthesizer.
  30. "
  31. homepage=https://espeak.sourceforge.net
  32. license=GPLv3+
  33. # Source documentation
  34. docs="ChangeLog.txt License.txt ReadMe docs/"
  35. docsdir="${docdir}/${program}-${version}"
  36. # The package has a custom source directory
  37. srcdir=${program}-${version}-source
  38. build()
  39. {
  40. unpack "${tardir}/$tarname"
  41. cd "$srcdir/src"
  42. # Use the PortAudio (sound interface library) version 19
  43. ln -sf portaudio19.h portaudio.h
  44. make -j${jobs} CXXFLAGS="$QICXXFLAGS -Wno-narrowing" LDFLAGS="$QILDFLAGS" \
  45. PREFIX=/usr LIBDIR=/usr/lib${libSuffix}
  46. make -j${jobs} PREFIX=/usr LIBDIR=/usr/lib${libSuffix} \
  47. DESTDIR="$destdir" install
  48. cd ..
  49. # Copy documentation
  50. mkdir -p "${destdir}${docsdir}"
  51. cp -p -r $docs "${destdir}${docsdir}"
  52. # Rename docs/ directory for the package
  53. mv "${destdir}${docsdir}/docs" "${destdir}${docsdir}/html"
  54. }