81 lines
2.2 KiB
Bash
81 lines
2.2 KiB
Bash
# Template file for 'praat'
|
|
pkgname=praat
|
|
version=6.4.11
|
|
revision=1
|
|
create_wrksrc=yes
|
|
hostmakedepends="pkg-config"
|
|
makedepends="gtk+3-devel $(vopt_if alsa alsa-lib-devel) $(vopt_if jack jack-devel)
|
|
$(vopt_if pulseaudio 'alsa-lib-devel pulseaudio-devel')"
|
|
checkdepends="cantarell-fonts"
|
|
short_desc="Speech analysis, synthesis, and manipulation"
|
|
maintainer="newbluemoon <blaumolch@mailbox.org>"
|
|
license="GPL-2.0-or-later"
|
|
homepage="https://www.fon.hum.uva.nl/praat/"
|
|
changelog="https://www.fon.hum.uva.nl/praat/manual/What_s_new_.html"
|
|
distfiles="https://github.com/praat/praat/archive/v${version}.tar.gz"
|
|
checksum=b91c72f02ca53738ae93eb0cd81d01e5284805a836a72748cc771db4798eb4e9
|
|
|
|
# there are a number of pre-defined Makefiles for certain configurations
|
|
# build options are used to choose which one to use among a selected few
|
|
# option 'alsa' is for ALSA only
|
|
# 'pulseaudio' also includes ALSA
|
|
# 'jack' is jack only
|
|
# the options are mutually exclusive
|
|
# for the Raspberry Pi only jack audio seems to be supported
|
|
build_options="alsa jack pulseaudio"
|
|
build_options_default="pulseaudio"
|
|
vopt_conflict jack alsa
|
|
vopt_conflict jack pulseaudio
|
|
vopt_conflict alsa pulseaudio
|
|
|
|
do_build() {
|
|
for _variant in $(vopt_if alsa alsa) $(vopt_if jack jack) $(vopt_if pulseaudio pulse) nogui; do
|
|
cp -a "${pkgname}-${version}" $_variant
|
|
cd $_variant
|
|
|
|
cp makefiles/makefile.defs.linux.${_variant} ./makefile.defs
|
|
sed -i -e 's/$(LIBS)/& $(LDFLAGS)/' Makefile
|
|
sed -i -e 's/AR = ar/AR = "${AR}"/' \
|
|
-e 's/-O\(1\|3\)//' \
|
|
-e 's/CFLAGS =/CFLAGS +=/' \
|
|
-e 's/CXXFLAGS =/CXXFLAGS +=/' \
|
|
-e 's/-no-pie//' \
|
|
makefile.defs
|
|
|
|
if [ $XBPS_TARGET_ENDIAN == "le" ]; then
|
|
CFLAGS+=" -DPA_LITTLE_ENDIAN"
|
|
else
|
|
CFLAGS+=" -DPA_BIG_ENDIAN"
|
|
fi
|
|
|
|
# see https://github.com/praat/praat/issues/2433
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
i686*)
|
|
CXXFLAGS+=" -fexcess-precision=fast";;
|
|
esac;
|
|
|
|
make ${makejobs} CC="$CC" CXX="$CXX" LD="$LD" AR="$AR"
|
|
|
|
mv praat* ..
|
|
cd ..
|
|
done
|
|
}
|
|
|
|
do_install() {
|
|
vbin praat
|
|
vbin praat_nogui
|
|
}
|
|
|
|
do_check() {
|
|
cd "${pkgname}-${version}/test"
|
|
../../praat --run runAllTests_batch.praat
|
|
../../praat_nogui --run runAllTests_batch.praat
|
|
}
|
|
|
|
praat-nogui_package() {
|
|
short_desc+=" (nogui)"
|
|
pkg_install() {
|
|
vmove usr/bin/praat_nogui
|
|
}
|
|
}
|