blob: ceb9fdc972d27302155a686bedcba361c827e4ea (
plain)
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
|
# $NetBSD: Makefile,v 1.40 2020/08/18 17:57:24 leot Exp $
DISTNAME= jack-audio-connection-kit-0.125.0
PKGREVISION= 3
PKGNAME= ${DISTNAME:S/audio-connection-kit-//}
CATEGORIES= audio
MASTER_SITES= http://jackaudio.org/downloads/
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://www.jackaudio.org/
COMMENT= JACK audio connection kit
LICENSE= gnu-gpl-v2 AND gnu-lgpl-v2.1
BUILD_DEFS+= JACKD_DEFAULT_TMPDIR
BUILD_DEFS+= JACKD_PROCFS_PATH
SET_LIBDIR= yes
USE_TOOLS+= pkg-config
USE_LIBTOOL= yes
GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --disable-alsa
CONFIGURE_ARGS+= --disable-firewire
CONFIGURE_ARGS+= --disable-freebob
CONFIGURE_ARGS+= --disable-optimize
CONFIGURE_ARGS+= --enable-timestamps
CONFIGURE_ARGS+= --enable-resize
CONFIGURE_ENV+= HAVE_DOXYGEN=no
CONFIGURE_ENV+= ac_cv_header_readline_chardefs_h=yes
PKGCONFIG_OVERRIDE+= jack.pc.in
PTHREAD_OPTS+= require native
CFLAGS.NetBSD+= -D_NETBSD_SOURCE -lossaudio
CFLAGS.Linux+= -D_GNU_SOURCE
CFLAGS.SunOS+= -std=c99 -D_XOPEN_SOURCE=600 -D__EXTENSIONS__
JACKD_DEFAULT_TMPDIR?= /tmp
.include "../../mk/bsd.prefs.mk"
.if !empty(OPSYS:M*BSD) || ${OPSYS} == "DragonFly" || ${OPSYS} == "Darwin"
CFLAGS+= -DJACK_HOST_HAS_BSD_POLL
.endif
###
### XXX Is there a way to properly use the emulation framework
### for this?
###
.if exists(${PREFIX}/emul/linux/proc) && ${OPSYS} != "Linux"
JACKD_PROCFS_PATH?= ${PREFIX}/emul/linux/proc
.else
JACKD_PROCFS_PATH?= /proc
.endif
.if exists(/dev/shm) && ${OPSYS} == "Linux"
CONFIGURE_ARGS+= --with-default-tmpdir=/dev/shm
.else
CONFIGURE_ARGS+= --with-default-tmpdir=${JACKD_DEFAULT_TMPDIR:Q}
.endif
PLIST_VARS= coreaudio oss sunaudio
###
### XXX This is untested. Please file a PR and/or commit a fix should
### any problems arise.
###
.if ${OPSYS} == "Darwin"
CONFIGURE_ARGS+= --enable-coreaudio
PLIST.coreaudio= yes
.else
CONFIGURE_ARGS+= --disable-coreaudio
.endif
.if ${OPSYS} == "NetBSD" || ${OPSYS} == "OpenBSD" || ${OPSYS} == "SunOS" || \
exists(/usr/include/sys/audioio.h)
CONFIGURE_ARGS+= --enable-sun
PLIST.sunaudio= yes
.else
CONFIGURE_ARGS+= --disable-sun
.endif
.include "../../mk/oss.buildlink3.mk"
.if ${OSS_TYPE} != "none" && ${OPSYS} != "NetBSD" && ${OPSYS} != "SunOS"
CONFIGURE_ARGS+= --enable-oss
PLIST.oss= yes
MAKE_ENV+= LIBOSSAUDIO=${LIBOSSAUDIO}
CFLAGS+= -DDEVOSSAUDIO=\"${DEVOSSAUDIO:U/dev/dsp}\"
.else
CONFIGURE_ARGS+= --disable-oss
.endif
SUBST_CLASSES+= jacksrc
SUBST_FILES.jacksrc= libjack/unlock.c
SUBST_MESSAGE.jacksrc= Peforming substitutions in JACK sources.
SUBST_STAGE.jacksrc= pre-build
SUBST_VARS.jacksrc= PREFIX JACKD_PROCFS_PATH X11BASE
.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
PKG_OPTIONS_VAR= PKG_OPTIONS.jack
PKG_SUPPORTED_OPTIONS= simd
# on 7.99.26/amd64:
# ./simd.c: In function 'x86_3dnow_add2f':
# ./simd.c:211:3: error: impossible constraint in 'asm'
# asm volatile (
#PKG_SUGGESTED_OPTIONS= simd
. include "../../mk/bsd.options.mk"
. if !empty(PKG_OPTIONS:Msimd)
CONFIGURE_ARGS+= --enable-dynsimd
. else
CONFIGURE_ARGS+= --disable-dynsimd
. endif
.endif
BDB_ACCEPTED= db4 db5
BUILDLINK_TRANSFORM+= l:db:${BDB_TYPE}
post-extract:
${MKDIR} ${WRKSRC}/config/os/netbsd
${CP} ${FILESDIR}/atomicity.h ${WRKSRC}/config/os/netbsd
.include "../../audio/libsamplerate/buildlink3.mk"
.include "../../mk/bdb.buildlink3.mk"
.include "../../mk/dlopen.buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/readline.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
|