recipe 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. # Build recipe for portaudio.
  2. #
  3. # Copyright (c) 2018 Thiago Seus, <thiago.seus@yahoo.com.br>.
  4. #
  5. # Licensed under the Apache License, Version 2.0 (the "License");
  6. # you may not use this file except in compliance with the License.
  7. # You may obtain a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing, software
  12. # distributed under the License is distributed on an "AS IS" BASIS,
  13. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. # See the License for the specific language governing permissions and
  15. # limitations under the License.
  16. program=portaudio
  17. version=v190600_20161030
  18. release=1
  19. # Set 'outdir' for a nice and well-organized output directory
  20. outdir="${outdir}/${arch}/libs"
  21. tarname=pa_stable_${version}.tgz
  22. # Remote source(s)
  23. fetch=http://www.portaudio.com/archives/$tarname
  24. description="
  25. Portable real-time audio library.
  26. PortAudio is a free, cross-platform, open-source , audio I/O library.
  27. It lets you write simple audio programs in C or C++ that will compile
  28. and run on many platforms.
  29. "
  30. homepage=http://www.portaudio.com
  31. license=BSD
  32. # Source documentation
  33. docs="LICENSE.txt README.txt"
  34. docsdir="${docdir}/${program}-${version}"
  35. # The package has a custom source directory
  36. srcdir=portaudio
  37. build()
  38. {
  39. set -e
  40. unpack "${tardir}/$tarname"
  41. cd "$srcdir"
  42. # Set sane permissions
  43. chmod -R u+w,go-w,a+rX-s .
  44. ./configure \
  45. CFLAGS="$QICFLAGS" CXXFLAGS="$QICXXFLAGS" LDFLAGS="$QILDFLAGS" \
  46. $configure_args \
  47. --libdir=/usr/lib${libSuffix} \
  48. --docdir=$docsdir \
  49. --enable-cxx \
  50. --build="$(cc -dumpmachine)"
  51. make -j${jobs} V=1
  52. make -j${jobs} DESTDIR="$destdir" install
  53. # Strip remaining libraries
  54. strip --strip-unneeded \
  55. "${destdir}/usr/lib${libSuffix}"/*.so.?.* 2> /dev/null || true
  56. strip --strip-debug \
  57. "${destdir}/usr/lib${libSuffix}"/*.a 2> /dev/null || true
  58. # Copy documentation
  59. mkdir -p "${destdir}${docsdir}"
  60. cp -p $docs "${destdir}${docsdir}"
  61. }