summaryrefslogtreecommitdiff
path: root/audio/denemo/Makefile
blob: 1c373974788c8c7377011eefa675960c42d02852 (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
# Created by: trevor
# $FreeBSD$

PORTNAME=	denemo
PORTVERSION=	1.1.8
PORTREVISION=	4
CATEGORIES=	audio
MASTER_SITES=	GNU

MAINTAINER=	multimedia@FreeBSD.org
COMMENT=	Graphical score editor

LICENSE=	GPLv3

LIB_DEPENDS=	libaubio.so:${PORTSDIR}/audio/aubio \
		libfluidsynth.so:${PORTSDIR}/audio/fluidsynth \
		libjack.so:${PORTSDIR}/audio/jack \
		libportaudio.so.2:${PORTSDIR}/audio/portaudio2 \
		libsmf.so:${PORTSDIR}/audio/libsmf \
		libsndfile.so:${PORTSDIR}/audio/libsndfile \
		librubberband.so:${PORTSDIR}/audio/rubberband \
		libguile.so:${PORTSDIR}/lang/guile \
		libfftw3.so:${PORTSDIR}/math/fftw3
RUN_DEPENDS=	xdg-open:${PORTSDIR}/devel/xdg-utils

USES=		bison gettext gmake pkgconfig
USE_GNOME=	librsvg2 libxml2
GNU_CONFIGURE=	yes
CONFIGURE_ARGS=	--enable-jack \
		--disable-evince \
		--disable-portmidi \
		--sysconfdir=${PREFIX}/etc

CPPFLAGS+=	-I${LOCALBASE}/include/portaudio2 \
		-I${LOCALBASE}/include
LDFLAGS+=	${LOCALBASE}/lib/portaudio2/libportaudio.so \
		-L${LOCALBASE}/lib

OPTIONS_DEFINE=		DOCS EXAMPLES GTK3 LILYPOND

LILYPOND_DESC=		Install LilyPond (Printing)
LILYPOND_RUN_DEPENDS=	lilypond:${PORTSDIR}/print/lilypond

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MGTK3}
USE_GNOME+=	gtk30 gtksourceview3
.else
USE_GNOME+=	gtk20 gtksourceview2
CONFIGURE_ARGS+=--enable-gtk2
.endif

post-patch:
	@${REINPLACE_CMD} -e \
		'/^CFLAGS=/s|_LIBS|_CFLAGS| ; \
		 s|-lpthread|-pthread|' ${WRKSRC}/configure
	@${REINPLACE_CMD} -e \
		'/ docs /d ; \
		 /) install-data-hook/s|^|#|' ${WRKSRC}/Makefile.in
	@${REINPLACE_CMD} -e \
		's|"firefox"|"xdg-open"|' ${WRKSRC}/src/core/prefops.c

post-install:
	@${MKDIR} ${STAGEDIR}${DATADIR}
.for i in actions templates
	@(cd ${WRKSRC} && ${TAR} --exclude "*Makefile*" -cf - ${i}) | \
		(cd ${STAGEDIR}${DATADIR} && ${TAR} --unlink -xf -)
	@${FIND} ${STAGEDIR}${DATADIR}/${i} -type d -print0 | \
		${XARGS} -0 ${CHMOD} a+rx
	@${FIND} ${STAGEDIR}${DATADIR}/${i} -type f -print0 | \
		${XARGS} -0 ${CHMOD} ${SHAREMODE}
.endfor
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
.for i in AUTHORS ChangeLog NEWS
	(cd ${WRKSRC} && ${INSTALL_DATA} ${i} ${STAGEDIR}${DOCSDIR})
.endfor
.for i in DESIGN DESIGN.lilypond GOALS TODO
	(cd ${WRKSRC}/docs && ${INSTALL_DATA} ${i} ${STAGEDIR}${DOCSDIR})
.endfor
	@${MKDIR} ${STAGEDIR}${DOCSDIR}/manual
	(cd ${WRKSRC}/docs && ${INSTALL_DATA} *.html \
		${STAGEDIR}${DOCSDIR}/manual)
	@${MKDIR} ${STAGEDIR}${DOCSDIR}/manual/images
	(cd ${WRKSRC}/docs/images && ${INSTALL_DATA} *.png \
		${STAGEDIR}${DOCSDIR}/manual/images)
	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
	(cd ${WRKSRC}/examples && ${INSTALL_DATA} *.denemo \
		${STAGEDIR}${EXAMPLESDIR})

.include <bsd.port.mk>