void-packages/srcpkgs/timidity/template

44 lines
1.6 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Template file for 'timidity'
pkgname="timidity"
version="2.14.0"
revision=2
build_style=gnu-configure
wrksrc="TiMidity++-${version}"
short_desc="A MIDI to WAVE converter and player"
maintainer="David <kalichakra@zoho.com>"
license="GPL-2"
homepage="http://timidity.sourceforge.net"
distfiles="${SOURCEFORGE_SITE}/${pkgname}/TiMidity++-${version}.tar.xz"
checksum="abf0c8367959e85c9e635b8fbd5183fc27bd380e0ef5e45de4158784538c86fc"
makedepends="alsa-lib-devel libvorbis-devel libao-devel libflac-devel
libX11-devel gtk+-devel ncurses-devel"
configure_args="--with-default-path=/etc/timidity \
--enable-audio=alsa,oss,ao,vorbis,flac --enable-server \
--enable-alsaseq=yes --enable-network \
--enable-gtk --enable-ncurses"
case "$XBPS_TARGET_MACHINE" in
*-musl) broken="build finishes, but timidity segfaults right after execution";;
esac
if [ -n ${CROSS_BUILD} ]; then
# check for va_copy runs test program; assume no for target
configure_args+=" lib_cv_va_copy=no lib_cv___va_copy=no lib_cv_va_val_copy=no"
pre_configure() {
# configure assumes OggFLAC is available on target and uses default values
sed -i -e 's|no_libOggFLAC=""|no_libOggFLAC="yes"|' configure
}
pre_build() {
# build calcnewt with host gcc (calcnewt generates newton_table.c)
gcc -o timidity/calcnewt -lm timidity/calcnewt.c
# remove rule for calcnewt from Makefile and make
# newton_table.c not depend on removed rule
sed -i -e '/calcnewt$(EXEEXT): $(calcnewt_OBJECTS) $(calcnewt_DEPENDENCIES)/,+2d' \
-e 's|\(newton_table.c:\) calcnewt$(EXEEXT)|\1|' timidity/Makefile
}
fi