void-packages/srcpkgs/timidity/template

52 lines
1.8 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.15.0
revision=4
build_style=gnu-configure
configure_args="--with-default-path=/etc/timidity --enable-server
--enable-alsaseq=yes --enable-network --enable-gtk --enable-ncurses"
hostmakedepends="pkg-config autoconf automake"
makedepends="alsa-lib-devel libvorbis-devel libao-devel libflac-devel
libX11-devel gtk+-devel ncurses-devel"
short_desc="MIDI to WAVE converter and player"
maintainer="David <kalichakra@zoho.com>"
license="GPL-2.0-or-later"
homepage="http://timidity.sourceforge.net"
distfiles="${SOURCEFORGE_SITE}/timidity/TiMidity++-${version}.tar.xz"
checksum=9eaf4fadb0e19eb8e35cd4ac16142d604c589e43d0e8798237333697e6381d39
# disable alsa audio on musl since it uses pcm_old.h, which depends on symbol versioning to work
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
configure_args+=" --enable-audio=oss,ao,vorbis,flac"
else
configure_args+=" --enable-audio=alsa,oss,ao,vorbis,flac"
fi
if [ "$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"
fi
pre_configure() {
autoreconf -fi
if [ "$CROSS_BUILD" ]; then
# configure assumes OggFLAC is available on target and uses default values
sed -i -e 's|no_libOggFLAC=""|no_libOggFLAC="yes"|' configure
fi
}
pre_build() {
if [ "$CROSS_BUILD" ]; then
# 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
}
post_install() {
vdoc "${FILESDIR}/README.voidlinux"
}