summaryrefslogtreecommitdiffstats
path: root/print/lilypond/Makefile
blob: 430b4229ca04343199e7305fef8ac317a75e9fc5 (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
# Created by: patrick, trevor
# $FreeBSD$

PORTNAME=	lilypond
PORTVERSION=	2.18.2
PORTREVISION=	5
CATEGORIES=	print audio
MASTER_SITES=	http://download.linuxaudio.org/lilypond/sources/v${PORTVERSION:R}/

MAINTAINER=	ports@FreeBSD.org
COMMENT=	The GNU music typesetter

LICENSE=	GPLv3

OPTIONS_DEFINE=	NLS

BUILD_DEPENDS=	pdftexi2dvi:${PORTSDIR}/print/texinfo \
		t1ascii:${PORTSDIR}/print/t1utils \
		bash:${PORTSDIR}/shells/bash \
		convert:${PORTSDIR}/graphics/ImageMagick \
		dblatex:${PORTSDIR}/textproc/dblatex \
		fontforge:${PORTSDIR}/print/fontforge \
		help2man:${PORTSDIR}/misc/help2man \
		pngtopnm:${PORTSDIR}/graphics/netpbm \
		rsync:${PORTSDIR}/net/rsync \
		zip:${PORTSDIR}/archivers/zip \
		texi2html:${PORTSDIR}/textproc/texi2html \
		${LOCALBASE}/share/ghostscript/fonts/c059033l.pfb:${PORTSDIR}/print/gsfonts

RUN_DEPENDS=	mftrace:${PORTSDIR}/print/mftrace \
		${LOCALBASE}/share/fonts/dejavu/DejaVuSans-Bold.ttf:${PORTSDIR}/x11-fonts/dejavu

LIB_DEPENDS=	libguile.so:${PORTSDIR}/lang/guile \
		libgmp.so:${PORTSDIR}/math/gmp \
		libfreetype.so:${PORTSDIR}/print/freetype2

INFO=		internals \
		lilypond-changes \
		lilypond-contributor \
		lilypond-essay \
		lilypond-extending \
		lilypond-internals \
		lilypond-learning \
		lilypond-notation \
		lilypond-snippets \
		lilypond-usage \
		lilypond-web \
		music-glossary

USES=		bison:build gettext ghostscript gmake pkgconfig perl5 \
		python:-3
USE_TEX=	latex
USE_PERL5=	build
USE_GNOME=	pango

MAKEFILE=	GNUmakefile
GNU_MAKEFILE=	yes
MAKE_JOBS_UNSAFE=	yes

GNU_CONFIGURE=	yes
CONFIGURE_ARGS+=--with-ncsb-dir=${LOCALBASE}/share/ghostscript/fonts \
		--with-python-include=${PYTHON_INCLUDEDIR}
CONFIGURE_ENV+=	ac_cv_prog_MAKEINFO="${LOCALBASE}/bin/makeinfo" \
		FLEX=${FLEX} YACC=${YACC}

ALL_TARGET=	all

NO_CCACHE=	yes

PLIST_SUB=	PORTVERSION=${PORTVERSION}

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MNLS}
PLIST_SUB+=	NLS=""
.else
PLIST_SUB+=	NLS="@comment "
.endif

post-patch:
	${REINPLACE_CMD} -e 's|<FlexLexer.h>|"/usr/include/FlexLexer.h"|' \
	    ${WRKSRC}/lily/include/includable-lexer.hh
.if !${PORT_OPTIONS:MNLS}
	${REINPLACE_CMD} -e '/^PO_FILES/s|= |= #|' ${WRKSRC}/${MAKEFILE}.in
.endif

post-install:
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/lilypond
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/lilypond/${PORTVERSION}/python/midi.so
	@${LN} -fs ${DATADIR}/${PORTVERSION} ${STAGEDIR}${DATADIR}/current

regression-test: build
	cd ${WRKSRC} && ${MAKE_CMD} -f ${MAKEFILE} test

.include <bsd.port.mk>
OpenPOWER on IntegriCloud