-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
template
46 lines (41 loc) · 1.7 KB
/
template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Template file for 'timidity'
pkgname=timidity
version=2.15.0
revision=3
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"
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"
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
post_install() {
vdoc "${FILESDIR}/README.voidlinux"
}