recipe 2.1 KB

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