openbsd-ports/audio/pulseaudio/Makefile
2015-04-16 06:38:50 +00:00

147 lines
4.0 KiB
Makefile

# $OpenBSD: Makefile,v 1.67 2015/04/16 06:38:50 ajacoutot Exp $
# XXX
# util.c: implement pa_get_binary_name()
# sndio: what to do with (channel) map
# sndio: check sample format
# sndio: support for recording
# hppa/mips64 don't have native atomic operations.
# PA can use/detect libatomic_ops as a fallback
# but in that case linking fails.
BROKEN-hppa = lack of atomic ops
BROKEN-mips64 = lack of atomic ops
SHARED_ONLY= Yes
COMMENT= cross-platform networked sound server
VERSION= 6.0
DISTNAME= pulseaudio-${VERSION}
EXTRACT_SUFX= .tar.xz
REVISION= 4
SHARED_LIBS += pulse 4.0 # .18.0
SHARED_LIBS += pulse-simple 0.0 # .1.0
SHARED_LIBS += pulse-mainloop-glib 1.0 # .0.5
CATEGORIES= audio
SUBST_VARS+= VERSION
MAINTAINER= Robert Nagy <robert@openbsd.org>
HOMEPAGE= http://www.pulseaudio.org/
# LGPLv2.1
PERMIT_PACKAGE_CDROM= Yes
WANTLIB += FLAC ICE SM X11 X11-xcb Xext Xi Xtst c crypto dbus-1
WANTLIB += execinfo gdbm glib-2.0 json-c ltdl m ogg pcre pthread
WANTLIB += sndfile sndio speexdsp ssl vorbis vorbisenc xcb
MASTER_SITES= http://freedesktop.org/software/pulseaudio/releases/
MODULES= devel/gettext \
textproc/intltool
USE_GMAKE= Yes
# XXX undefined reference to `lt__PROGRAM__LTX_preloaded_symbols';
# XXX remove -rpath from LDFLAGS when switching back to our libtool(1)
# and remove the following patches:
# patch-libpulse-mainloop-glib_pc_in patch-libpulse-simple_pc_in patch-libpulse_pc_in
USE_LIBTOOL= gnu
# needed for tests
BUILD_DEPENDS += devel/check
TEST_FLAGS= HOME=${WRKDIST}
LIB_DEPENDS= audio/libsndfile \
audio/speex \
databases/gdbm \
devel/glib2 \
devel/json-c \
devel/libexecinfo \
devel/libtool,-ltdl \
x11/dbus
# module-console-kit.so
RUN_DEPENDS += sysutils/consolekit
CONFIGURE_STYLE= gnu
# We only enable the strict minimum for basic volume control support.
# sndiod(1) is the default sound server on OpenBSD and pulseaudio is only
# needed for a couple of use cases (volume control, media-keys)
CONFIGURE_ARGS= ${CONFIGURE_SHARED} \
--disable-atomic-arm-linux-helpers \
--disable-default-build-tests \
--with-system-user=_pulse \
--with-system-group=_pulse \
--with-access-group=_pulse-access \
--with-database=gdbm \
--without-fftw \
--disable-oss-output \
--disable-oss-wrapper \
--disable-adrian-aec \
--disable-alsa \
--disable-asyncns \
--disable-bluez4 \
--disable-bluez5 \
--disable-esound \
--disable-gtk3 \
--disable-jack \
--disable-hal-compat \
--disable-systemd \
--disable-systemd-journal \
--disable-udev \
--disable-lirc \
--disable-solaris \
--disable-tcpwrap \
--disable-coreaudio-output \
--disable-waveout \
--disable-gconf \
--disable-avahi \
--disable-orc
CONFIGURE_ENV= CPPFLAGS="-I${X11BASE}/include -I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib \
-Wl,-rpath,${TRUEPREFIX}/lib/pulseaudio:${TRUEPREFIX}/lib/pulse-${VERSION}/modules" \
ac_cv_prog_M4=m4
FAKE_FLAGS= pulseconfdir="${PREFIX}/share/examples/pulseaudio/pulse" \
sysconfdir="${PREFIX}/share/examples/pulseaudio"
### SNDIO ###
AUTOCONF_VERSION= 2.69
AUTOMAKE_VERSION= 1.14
BUILD_DEPENDS += ${MODGNU_AUTOMAKE_DEPENDS} \
${MODGNU_AUTOCONF_DEPENDS}
BUILD_DEPENDS += devel/libtool # needs needs libtoolize
post-extract:
cp ${FILESDIR}/module-sndio*.{c,h} ${WRKSRC}/src/modules/
pre-configure:
cd ${WRKSRC} && \
AUTOCONF_VERSION=${AUTOCONF_VERSION} \
AUTOMAKE_VERSION=${AUTOMAKE_VERSION} \
autoreconf -i --force && \
AUTOMAKE_VERSION=${AUTOMAKE_VERSION} \
AUTOCONF_VERSION=${AUTOCONF_VERSION} \
aclocal && \
intltoolize --force
### END SNDIO ###
${SUBST_CMD} ${WRKSRC}/src/daemon/default.pa.in
perl -pi -e 's,/bin/bash,/usr/bin/env bash,' \
${WRKSRC}/shell-completion/bash/pulseaudio
post-install:
rm ${PREFIX}/lib/pulse-${VERSION}/modules/*.a
# we don't install padsp
cd ${PREFIX} && rm man/man1/padsp.1
# see WRKSRC/Makefile and the @exec/@unexec in PLIST
rm ${PREFIX}/share/examples/pulseaudio/bash_completion.d/pa*
.include <bsd.port.mk>