recipe 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. # Build recipe for portaudio.
  2. #
  3. # Copyright (c) 2018 Thiago Seus, <thiago.seus@yahoo.com.br>.
  4. # Copyright (c) 2019, 2021 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=portaudio
  20. version=v190600_20161030
  21. release=3
  22. # Define a category for the output of the package name
  23. pkgcategory=libs
  24. tarname=pa_stable_${version}.tgz
  25. # Remote source(s)
  26. fetch=http://www.portaudio.com/archives/$tarname
  27. description="
  28. Portable real-time audio library.
  29. PortAudio is a free, cross-platform, open-source , audio I/O library.
  30. It lets you write simple audio programs in C or C++ that will compile
  31. and run on many platforms.
  32. "
  33. homepage=https://www.portaudio.com
  34. license=BSD
  35. # Source documentation
  36. docs="LICENSE.txt README.txt"
  37. docsdir="${docdir}/${program}-${version}"
  38. # The package has a custom source directory
  39. srcdir=portaudio
  40. # Limit parallel jobs for this build
  41. jobs=1
  42. build()
  43. {
  44. unpack "${tardir}/$tarname"
  45. cd "$srcdir"
  46. # Set sane permissions
  47. chmod -R u+w,go-w,a+rX-s .
  48. ./configure \
  49. CPPFLAGS="$QICPPFLAGS" CFLAGS="$QICFLAGS" CXXFLAGS="$QICXXFLAGS" LDFLAGS="$QILDFLAGS" \
  50. $configure_args \
  51. --libdir=/usr/lib${libSuffix} \
  52. --docdir=$docsdir \
  53. --enable-cxx \
  54. --build="$(gcc -dumpmachine)"
  55. make -j${jobs} V=1
  56. make -j${jobs} DESTDIR="$destdir" install
  57. # Strip remaining libraries
  58. strip --strip-unneeded \
  59. "${destdir}/usr/lib${libSuffix}"/*.so.?.* 2> /dev/null || true
  60. strip --strip-debug \
  61. "${destdir}/usr/lib${libSuffix}"/*.a 2> /dev/null || true
  62. # Copy documentation
  63. mkdir -p "${destdir}/$docsdir"
  64. cp -p $docs "${destdir}/$docsdir"
  65. }