aboutsummaryrefslogtreecommitdiffstats
path: root/print/lilypond-devel/Makefile
blob: 4b0ff90ea75cbf47d444e55f219f2bba36f3cd94 (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
# Created by: patrick, trevor
# $FreeBSD$

PORTNAME=   lilypond
PORTVERSION=    2.19.48
CATEGORIES= print audio
MASTER_SITES=   http://download.linuxaudio.org/lilypond/sources/v${PORTVERSION:R}/
PKGNAMESUFFIX=  -devel

MAINTAINER= m.ne@gmx.net
COMMENT=    GNU music typesetter

LICENSE=    GPLv3

BUILD_DEPENDS=  pdftexi2dvi:print/texinfo \
        t1ascii:print/t1utils \
        bash:shells/bash \
        convert:graphics/ImageMagick \
        dblatex:textproc/dblatex \
        fontforge:print/fontforge \
        help2man:misc/help2man \
        pngtopnm:graphics/netpbm \
        rsync:net/rsync \
        texi2html:textproc/texi2html \
        zip:archivers/zip
RUN_DEPENDS=    mftrace:print/mftrace \
        ${LOCALBASE}/share/fonts/dejavu/DejaVuSans-Bold.ttf:x11-fonts/dejavu
LIB_DEPENDS=    libltdl.so:devel/libltdl \
        libguile.so:lang/guile \
        libgmp.so:math/gmp \
        libfreetype.so:print/freetype2 \
        libfontconfig.so:x11-fonts/fontconfig

BROKEN_FreeBSD_9=   does not build on FreeBSD < 10.x

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 \
        compiler:gcc-c++11-lib python:-3
USE_CXXSTD= c++11
USE_TEX=    latex texmf
USE_PERL5=  build
USE_GNOME=  pango

MAKEFILE=   GNUmakefile
GNU_MAKEFILE=   yes
MAKE_JOBS_UNSAFE=   yes

GNU_CONFIGURE=  yes
CONFIGURE_ARGS+=--with-texgyre-dir=${LOCALBASE}/${TEXMFDISTDIR}/fonts/opentype/public/tex-gyre \
        --with-python-include=${PYTHON_INCLUDEDIR}
CONFIGURE_ENV+= ac_cv_prog_MAKEINFO="${LOCALBASE}/bin/makeinfo" \
        FLEX=${FLEX} YACC=${YACC} HOME=${WRKDIR}

ALL_TARGET= all

NO_CCACHE=  yes

PLIST_SUB=  PORTVERSION=${PORTVERSION}

OPTIONS_DEFINE= NLS
OPTIONS_SUB=    yes

post-patch:
    ${FIND} ${WRKSRC} -name "*.cc" | ${XARGS} \
        ${REINPLACE_CMD} -e 's|isinf[ ]*(|::isinf(|g' -e 's|isnan|::isnan|g'
    ${REINPLACE_CMD} -e 's|<FlexLexer.h>|"/usr/include/FlexLexer.h"|' \
        ${WRKSRC}/lily/include/includable-lexer.hh

post-patch-NLS-off:
    ${REINPLACE_CMD} -e '/po \\$$/d' ${WRKSRC}/${MAKEFILE}.in

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

.include <bsd.port.mk>