aboutsummaryrefslogtreecommitdiffstats
path: root/audio/openal-soft/Makefile
blob: da0b892912a45df961dee196fa326b77e6468c32 (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
# $FreeBSD$

PORTNAME=   openal-soft
PORTVERSION=    1.19.1
PORTREVISION=   1
CATEGORIES= audio
MASTER_SITES=   http://openal-soft.org/openal-releases/

MAINTAINER= tobik@FreeBSD.org
COMMENT=    Software implementation of the OpenAL specification

LICENSE=    LGPL20+
LICENSE_FILE=   ${WRKSRC}/COPYING

CONFLICTS=  openal-200[0-9]*

USES=       cmake compiler:c11 tar:bzip2
USE_LDCONFIG=   yes
LLD_UNSAFE= yes
CMAKE_ARGS= -DCMAKE_INSTALL_DATADIR:STRING="${PREFIX}/etc"
CMAKE_OFF=  ALSOFT_BACKEND_ALSA \
        ALSOFT_DLOPEN \
        ALSOFT_EXAMPLES \
        ALSOFT_REQUIRE_SOLARIS \
        ALSOFT_REQUIRE_QSA
CMAKE_ON=   ALSOFT_BACKEND_WAVE \
        ALSOFT_UTILS
LDFLAGS+=   -Wl,--as-needed # do not link with librt and libdl

OPTIONS_DEFINE=     EXAMPLES CONFIG JACK OSS PORTAUDIO PULSEAUDIO SDL SNDIO
OPTIONS_DEFAULT=    OSS
OPTIONS_SUB=        yes

CONFIG_DESC=        Install configuration utility (needs Qt 4.x)

CONFIG_CMAKE_BOOL_OFF=  ALSOFT_NO_CONFIG_UTIL
CONFIG_CMAKE_ON=    -DALSOFT_NO_QT5:BOOL=ON
CONFIG_USES=        qt:4
CONFIG_USE=     QT=corelib,gui,qmake_build,moc_build,rcc_build,uic_build

JACK_CMAKE_BOOL=    ALSOFT_REQUIRE_JACK ALSOFT_BACKEND_JACK
JACK_LIB_DEPENDS=   libjack.so:audio/jack

OSS_CMAKE_BOOL=     ALSOFT_REQUIRE_OSS ALSOFT_BACKEND_OSS

PORTAUDIO_CMAKE_BOOL=   ALSOFT_REQUIRE_PORTAUDIO ALSOFT_BACKEND_PORTAUDIO
PORTAUDIO_LIB_DEPENDS=  libportaudio.so:audio/portaudio

PULSEAUDIO_CMAKE_BOOL=  ALSOFT_REQUIRE_PULSEAUDIO ALSOFT_BACKEND_PULSEAUDIO
PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio

SDL_CMAKE_BOOL=     ALSOFT_REQUIRE_SDL2 ALSOFT_BACKEND_SDL2
SDL_USES=       localbase
SDL_USE=        SDL=sdl2

SNDIO_CMAKE_BOOL=   ALSOFT_REQUIRE_SNDIO ALSOFT_BACKEND_SNDIO
SNDIO_LIB_DEPENDS=  libsndio.so:audio/sndio

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MCONFIG}
DEPRECATED=     Qt4 has been EOL since december 2015
EXPIRATION_DATE=    2019-03-15
.endif

post-patch:
    @${REINPLACE_CMD} 's|/etc/openal|${ETCDIR}|' \
        ${WRKSRC}/Alc/alconfig.c

post-install-EXAMPLES-on:
    (cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . \
        ${STAGEDIR}${EXAMPLESDIR})

.include <bsd.port.mk>