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