aboutsummaryrefslogtreecommitdiff
path: root/audio/sdl_mixer/Makefile
blob: 251c34f3786ae572c62e537869cb00d12a4bb376 (plain) (blame)
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
PORTNAME=	sdl_mixer
PORTVERSION=	1.2.12
PORTREVISION=	13
CATEGORIES=	audio
MASTER_SITES=	https://www.libsdl.org/projects/SDL_mixer/release/
DISTNAME=	SDL_mixer-${PORTVERSION}

MAINTAINER=	amdmi3@FreeBSD.org
COMMENT=	Sample multi-channel audio mixer library
WWW=		https://www.libsdl.org/projects/SDL_mixer/index.html

LICENSE=	ZLIB

USES=		gmake libtool pathfix pkgconfig sdl
USE_SDL=	sdl
GNU_CONFIGURE=	yes
LDFLAGS+=	-L${LOCALBASE}/lib
CPPFLAGS+=	-I${LOCALBASE}/include
USE_LDCONFIG=	yes

OPTIONS_DEFINE=		SMPEG FLAC TIMIDITYPLUS
OPTIONS_DEFAULT=	SMPEG FLAC MIKMOD
OPTIONS_RADIO=		MOD OGG
OPTIONS_RADIO_MOD=	MIKMOD MODPLUG
OPTIONS_RADIO_OGG=	VORBIS TREMOR

.if defined(MACHINE_CPU) && ${MACHINE_CPU:Msoftfp}
OPTIONS_DEFAULT+=	TREMOR
.else
OPTIONS_DEFAULT+=	VORBIS
.endif

MOD_DESC=	Tracker music support
SMPEG_DESC=	MP3 audio support via SMPEG
TIMIDITYPLUS_DESC=	Use Timidity++ instead of Timidity (soundfont)

MIKMOD_LIB_DEPENDS=		libmikmod.so:audio/libmikmod
MIKMOD_CONFIGURE_ENABLE=	music-mod

MODPLUG_LIB_DEPENDS=		libmodplug.so:audio/libmodplug
MODPLUG_CONFIGURE_ENABLE=	music-mod-modplug

FLAC_LIB_DEPENDS=		libFLAC.so:audio/flac
FLAC_CONFIGURE_ENABLE=		music-flac

SMPEG_LIB_DEPENDS=		libsmpeg.so:multimedia/smpeg
SMPEG_CONFIGURE_ENABLE=		music-mp3

VORBIS_LIB_DEPENDS=		libvorbis.so:audio/libvorbis
VORBIS_CONFIGURE_ENABLE=	music-ogg

TIMIDITYPLUS_RUN_DEPENDS=	${LOCALBASE}/share/timidity/timidity.cfg-eawpats:audio/eawpats
TIMIDITYPLUS_VARS=		CONFIG_FILE=${LOCALBASE}/share/timidity/timidity.cfg-eawpats

TIMIDITYPLUS_RUN_DEPENDS_OFF=	${LOCALBASE}/lib/timidity/timidity.cfg:audio/timidity
TIMIDITYPLUS_VARS_OFF=		CONFIG_FILE=${LOCALBASE}/lib/timidity/timidity.cfg

TREMOR_LIB_DEPENDS=		libvorbisidec.so:audio/libtremor
TREMOR_CONFIGURE_ON=		--enable-music-ogg
# TREMOR_CONFIGURE_OFF is handled by VORBIS=off
TREMOR_CONFIGURE_ENABLE=	music-ogg-tremor

post-patch:
	@${REINPLACE_CMD} -e 's|\($$(prefix)/libdata/pkgconfig\)|$$(DESTDIR)\1|' \
		${WRKSRC}/Makefile.in
	@${REINPLACE_CMD} -e 's|%%CONFIG_FILE%%|${CONFIG_FILE}|g' \
		${WRKSRC}/timidity/config.h
	@${REINPLACE_CMD} -e 's|"modplug.h"|"libmodplug/modplug.h"|' \
		${WRKSRC}/music_modplug.h

.include <bsd.port.mk>