void-packages/srcpkgs/praat/template

54 lines
1.3 KiB
Bash
Raw Normal View History

# Template file for 'praat'
pkgname=praat
2018-03-31 06:04:55 +00:00
version=6.0.38
revision=1
hostmakedepends="pkg-config"
makedepends="gtk+-devel alsa-lib-devel $(vopt_if pulseaudio pulseaudio-devel)"
short_desc="Speech analysis, synthesis, and manipulation"
maintainer="newbluemoon <blaumolch@mailbox.org>"
2018-03-31 06:04:55 +00:00
license="GPL-2.0-or-later"
homepage="http://www.praat.org/"
distfiles="https://github.com/praat/${pkgname}/archive/v${version}.tar.gz"
2018-03-31 06:04:55 +00:00
checksum=0cc2cf1fe044813c0718d3e727c220fc325372f3aaa297bdadc64dd060ab01d0
build_options="pulseaudio"
do_build() {
mkdir /tmp/original
mv * /tmp/original/
mv /tmp/original .
for _variant in $(vopt_if pulseaudio pulse alsa) nogui; do
cp -a original $_variant
cd $_variant
cp makefiles/makefile.defs.linux.${_variant} ./makefile.defs
sed -i -e 's/$(LIBS)/& $(LDFLAGS)/' Makefile
sed -i -e 's/CC = gcc/CC = "${CC}"/' \
-e 's/CXX = g++/CXX = "${CXX}"/' \
-e 's/LINK = g++/LINK = "${CXX}"/' \
-e 's/AR = ar/AR = "${AR}"/' \
-e 's/-O\(1\|3\)//' \
-e 's/CFLAGS =/CFLAGS +=/' \
-e 's/CXXFLAGS =/CXXFLAGS +=/' \
makefile.defs
make ${makejobs} CC="$CC" CXX="$CXX" LD="$LD" AR="$AR"
mv praat* ..
cd ..
done
}
do_install() {
vbin praat
vbin praat_nogui
}
praat-nogui_package() {
short_desc+=" (nogui)"
pkg_install() {
vmove usr/bin/praat_nogui
}
}