summaryrefslogtreecommitdiff
path: root/audio/supercollider/Makefile
blob: a0cc3ce8fde5e7899d679f3b2e12e6170c29ede8 (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
# $FreeBSD$

PORTNAME=	supercollider
DISTVERSION=	3.10.2
PORTREVISION=	1
CATEGORIES=	audio
MASTER_SITES=	https://github.com/supercollider/supercollider/releases/download/Version-${PORTVERSION}/
DISTNAME=	SuperCollider-${PORTVERSION}-Source-linux

MAINTAINER=	ports@nicandneal.net
COMMENT=	Programming language for real time audio synthesis

LICENSE=	GPLv3
LICENSE_FILE=	${WRKSRC}/COPYING

BUILD_DEPENDS=	${LOCALBASE}/include/boost/intrusive/unordered_set.hpp:devel/boost-libs
LIB_DEPENDS=	libavahi-client.so:net/avahi-app \
		libavahi-common.so:net/avahi-app \
		libjack.so:audio/jack \
		libsndfile.so:audio/libsndfile \
		libfftw3f.so:math/fftw3-float

USES=		cmake compiler:c++11-lang iconv localbase pkgconfig \
		qt:5 readline shared-mime-info tar:bzip2
USE_QT=		buildtools_build concurrent core declarative gui linguisttools location \
		network opengl printsupport qmake_build sensors \
		sql widgets webengine websockets webchannel svg
USE_XORG=	x11
USE_LDCONFIG=	yes

WRKSRC=		${WRKDIR}/SuperCollider-Source

CMAKE_ARGS=	-DCMAKE_PREFIX_PATH=${LOCALBASE}/lib/qt5 \
		-DLIBUSB_1_INCLUDE_DIR=/usr/include \
		-DLIBUSB_1_LIBRARY=/usr/lib/libusb.so \
		-DLIBSCSYNTH=ON

DESKTOP_ENTRIES="SuperCollider IDE" "" "${LOCALBASE}/share/pixmaps/sc_ide.svg" \
		"scide" "" false

OPTIONS_DEFINE=		HELP SUPERNOVA
OPTIONS_DEFAULT=	HELP SUPERNOVA
OPTIONS_SUB=	yes

HELP_DESC=	Install on-line help text
SUPERNOVA_DESC=	Build with supernova as optional audio synthesis server

HELP_CMAKE_BOOL=	INSTALL_HELP
SUPERNOVA_CMAKE_BOOL=	SUPERNOVA

.include <bsd.port.pre.mk>

.if ! ${ARCH} == amd64 && ! ${ARCH} == i386
CMAKE_ARGS+=	-DSSE:BOOL=FALSE -DSSE2:BOOL=FALSE
.endif

.if ${OPSYS} == FreeBSD
.if (${OSVERSION} >= 1102507 && ${OSVERSION} < 1200000) || \
	(${OSVERSION} >= 1200506 && ${OSVERSION} < 1300000) || \
	${OSVERSION} >= 1300014
BROKEN=	fails to compile with Clang 8 due shipped Boost 1.66 libraries. Not compatible with Boost 1.70+, either
.endif
.endif

post-patch:
	@${REINPLACE_CMD} -e 's|MATCHES "Linux" AND|MATCHES "FreeBSD" AND|' \
		${WRKSRC}/CMakeLists.txt
	@${REINPLACE_CMD} -e 's|if(DL)|if(TRUE)|; s|target_link_libraries(libsupernova $${DL})|#|' \
		${WRKSRC}/server/supernova/CMakeLists.txt
	@${REINPLACE_CMD} -e 's|CMAKE_SYSTEM_NAME MATCHES "Linux"|CMAKE_SYSTEM_NAME MATCHES "FreeBSD"|' \
		${WRKSRC}/server/plugins/CMakeLists.txt
	@${REINPLACE_CMD} -e 's|__linux__|__FreeBSD__|' ${WRKSRC}/server/supernova/server/main.cpp

.include <bsd.port.post.mk>