summaryrefslogtreecommitdiffstats
path: root/audio/pulseaudio/Makefile
blob: 15b21702b2404a0985e3ece8dc38478a06af6e5e (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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
# Created by: Joe Marcus Clarke <marcus@FreeBSD.org>
# $FreeBSD$
#   $MCom: ports/trunk/audio/pulseaudio/Makefile 17268 2013-04-01 05:13:11Z marcus $
#
# !!!NOTE!!! Any PORTVERSION update to this port must be accompanied by
# PORTREVISION bumps of depending ports.

PORTNAME=   pulseaudio
PORTVERSION=    2.0
CATEGORIES= audio
MASTER_SITES=   http://freedesktop.org/software/pulseaudio/releases/

MAINTAINER= gnome@FreeBSD.org
COMMENT=    Sound server for UNIX

# keep the json version otherwise it will match json-glib
LIB_DEPENDS=    samplerate:${PORTSDIR}/audio/libsamplerate \
        sndfile:${PORTSDIR}/audio/libsndfile \
        speexdsp:${PORTSDIR}/audio/speex \
        fftw3:${PORTSDIR}/math/fftw3 \
        fftw3f:${PORTSDIR}/math/fftw3-float \
        json.0:${PORTSDIR}/devel/json-c \
        dbus-1:${PORTSDIR}/devel/dbus \
        execinfo:${PORTSDIR}/devel/libexecinfo \
        ck-connector:${PORTSDIR}/sysutils/consolekit

USE_XZ=     yes
USE_GNOME=  glib20 intltool ltverhack gnomehier
USE_XORG=   x11 sm xtst ice
USE_LDCONFIG=   yes
USES=       gettext pathfix pkgconfig
GNU_CONFIGURE=  yes
USE_AUTOTOOLS=  libltdl libtool
USE_GMAKE=  yes
MAKE_JOBS_UNSAFE=yes
CONFIGURE_ENV=  PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \
        PTHREAD_LIBS="${PTHREAD_LIBS}" \
        OPENSSL_CFLAGS="-I/usr/include" \
        OPENSSL_LIBS="-lcrypto -lssl" \
        LIBS="-lm -lintl" \
        ac_cv_header_linux_input_h=""
CPPFLAGS+=  -I${LOCALBASE}/include
LDFLAGS+=   -L${LOCALBASE}/lib

CONFIGURE_ARGS= --localstatedir=/var \
        --with-database=simple \
        --without-caps \
        --disable-udev \
        --disable-gtk2 \
        --disable-lirc # untested

#FIXME --with-database=auto|tdb|gdbm|simple

USERS=      pulse
GROUPS=     pulse pulse-access pulse-rt

OPTIONS_DEFINE= JACK AVAHI HAL GCONF ALSA SIMD
OPTIONS_DEFAULT=AVAHI HAL GCONF SIMD

PULSE_VERSION=  ${PORTVERSION}
PLIST_SUB=  PULSE_VERSION=${PULSE_VERSION}

MAN1=       esdcompat.1 pacat.1 pacmd.1 pactl.1 padsp.1 \
        paplay.1 pasuspender.1 pax11publish.1 pulseaudio.1 \
        start-pulseaudio-kde.1 start-pulseaudio-x11.1
MAN5=       default.pa.5 pulse-cli-syntax.5 pulse-client.conf.5 \
        pulse-daemon.conf.5

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MJACK}
LIB_DEPENDS+=   jack:${PORTSDIR}/audio/jack
PLIST_SUB+= JACK=""
.else
PLIST_SUB+= JACK="@comment "
CONFIGURE_ARGS+=--disable-jack
.endif

.if ${PORT_OPTIONS:MAVAHI}
LIB_DEPENDS+=   avahi-client:${PORTSDIR}/net/avahi-app
PLIST_SUB+= AVAHI=""
.else
CONFIGURE_ARGS+=--disable-avahi
PLIST_SUB+= AVAHI="@comment "
.endif

.if ${PORT_OPTIONS:MHAL}
LIB_DEPENDS+=   hal:${PORTSDIR}/sysutils/hal
CONFIGURE_ARGS+=--enable-hal
PLIST_SUB+= HAL=""
.else
CONFIGURE_ARGS+=--disable-hal
PLIST_SUB+= HAL="@comment "
.endif

.if ${PORT_OPTIONS:MGCONF}
USE_GNOME+= gconf2
PLIST_SUB+= GCONF=""
.else
CONFIGURE_ARGS+=--disable-gconf
PLIST_SUB+= GCONF="@comment "
.endif

.if ${PORT_OPTIONS:MALSA}
LIB_DEPENDS+=   asound:${PORTSDIR}/audio/alsa-lib
PLIST_SUB+= ALSA=""
.else
CONFIGURE_ARGS+=--disable-alsa
PLIST_SUB+= ALSA="@comment "
.endif

.if ${PORT_OPTIONS:MSIMD}
LIB_DEPENDS+=   orc-0.4:${PORTSDIR}/devel/orc
CONFIGURE_ARGS+=--enable-orc
.else
CONFIGURE_ARGS+=--disable-orc
.endif

.include <bsd.port.pre.mk>

# OSVERSION wasn't bumped after the MFC. So we need to use the next bump.
# Sadly for 7-stable the OSVERSION wasn't bumped after 7.4-R
.if ((${OSVERSION} >= 800000) && (${OSVERSION} < 802504)) || \
    ((${OSVERSION} >= 900000) && (${OSVERSION} < 900037))
EXTRA_PATCHES+= ${FILESDIR}/extra-src_modules_oss_module-oss.c
.endif

post-patch:
    @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
        ${WRKSRC}/src/daemon/default.pa.in
    @${REINPLACE_CMD} -e 's|-Wmissing-include-dirs||g' \
        ${WRKSRC}/configure

post-install:
    ${MKDIR} ${PREFIX}/etc/pulse
.for ii in default.pa daemon.conf client.conf system.pa
    ${INSTALL_DATA} ${WRKSRC}/src/${ii} \
        ${PREFIX}/etc/pulse/${ii}-dist
. if !exists(${PREFIX}/etc/pulse/${II})
    ${INSTALL_DATA} ${WRKSRC}/src/${ii} \
        ${PREFIX}/etc/pulse/${ii}
. endif
.endfor

.include <bsd.port.post.mk>