summaryrefslogtreecommitdiff
path: root/audio/alsa-utils/Makefile
blob: 417bc8116f0f6bb2894e56756acd07e49b9f3d29 (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
# New ports collection makefile for:   alsa-utils
# Date created:                June 29, 2009
# Whom:                        Aragon Gouveia <aragon@phat.za.net>
#
# $FreeBSD$
#

PORTNAME=	alsa-utils
PORTVERSION=	1.0.23
PORTREVISION=	1
CATEGORIES=	audio
MASTER_SITES=	ftp://ftp.silug.org/pub/alsa/utils/ \
		ftp://gd.tuwien.ac.at/opsys/linux/alsa/utils/ \
		http://dl.ambiweb.de/mirrors/ftp.alsa-project.org/utils/ \
		ftp://ftp.alsa-project.org/pub/utils/

MAINTAINER=	aragon@phat.za.net
COMMENT=	ALSA compatibility utils

LIB_DEPENDS=	asound.2:${PORTSDIR}/audio/alsa-lib
RUN_DEPENDS=	${LOCALBASE}/lib/alsa-lib/libasound_module_pcm_oss.so:${PORTSDIR}/audio/alsa-plugins
USE_BZIP2=	yes
USE_GMAKE=	yes
GNU_CONFIGURE=	yes
CFLAGS+=	-I${LOCALBASE}/include

MAN1_EN=	aconnect.1 alsactl.1 alsamixer.1 amidi.1 amixer.1 aplay.1 aplaymidi.1 \
		arecordmidi.1 aseqdump.1 aseqnet.1 iecset.1 speaker-test.1
MAN8=		alsaconf.8
MLINKS=		aplay.1 arecord.1
_MANPAGES+=	${PREFIX}/man/fr/man8/${MAN8}

OPTIONS=	XMLTO "Generate alsactl_init(7) man page using xmlto(1)" On

.include <bsd.port.options.mk>

.if defined(WITH_XMLTO)
BUILD_DEPENDS+=	xmlto:${PORTSDIR}/textproc/xmlto
MAN7_EN+=	alsactl_init.7
.else
CONFIGURE_ARGS+=--disable-xmlto
.endif

.if defined(WITHOUT_NLS)
LDFLAGS+=	-L${LOCALBASE}/lib
CONFIGURE_ARGS+=--disable-nls
PLIST_SUB+=	NLS="@comment "
.else
LDFLAGS+=	-L${LOCALBASE}/lib -lintl
USE_GETTEXT=	yes
PLIST_SUB+=	NLS=""
.endif

post-patch:	.SILENT
	${REINPLACE_CMD} '/LIBS/s/-ldl//g' ${WRKSRC}/configure
	${FIND} -E ${WRKSRC} -type f -regex \
		'.*\.([[:digit:]]|spec\.in|csv|xml)' -exec \
		${REINPLACE_CMD} -e 's|/usr/share|${PREFIX}/share|g' \
		-e 's|/etc/asound\.conf|${LOCALBASE}&|g' {} +
	${REINPLACE_CMD} 's|/etc/asound\.state|${PREFIX}&|g' \
		${WRKSRC}/alsactl/alsactl.[1c]

.include <bsd.port.mk>