aboutsummaryrefslogtreecommitdiff
path: root/print/lilypond-devel/Makefile
blob: 5473bf02a66016ebc9602f47997ab25097cbc511 (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
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
# New ports collection makefile for:	lilypond-devel
# Date created:				2001-02-10
# Whom:					patrick
# based on print/lilypond originally by trevor
#
# $FreeBSD$
# $Id: Makefile,v 1.19 2004/06/15 21:53:22 patrick Exp $
#

PORTNAME=	lilypond
PORTVERSION=	2.3.4
CATEGORIES=	print audio
MASTER_SITES=	http://lilypond.org/download/v2.3/
PKGNAMESUFFIX=	-devel

MAINTAINER=	atamaniuk-ports@frobs.net
COMMENT=	The GNU music typesetter (development)

BUILD_DEPENDS=	latex:${PORTSDIR}/print/teTeX \
		scrollkeeper-install:${PORTSDIR}/textproc/scrollkeeper
LIB_DEPENDS=	guile.15:${PORTSDIR}/lang/guile
RUN_DEPENDS=	latex:${PORTSDIR}/print/teTeX

MAN1=		abc2ly.1 etf2ly.1 midi2ly.1 mup2ly.1 lilypond.1 musedata2ly.1 \
		convert-ly.1 lilypond-bin.1 lilypond-book.1
INFO=		lilypond lilypond-internals \
		music-glossary

CONFLICTS=	lilypond-2.*

BROKEN=		"Build fails"

#INSTALLS_SHLIB not needed for phyton library midi.so

GNU_CONFIGURE=	yes
USE_BISON=	yes
USE_GMAKE=	YES
USE_PYTHON=	YES
MAKEFILE=	GNUmakefile
PKGINSTALL=	${WRKDIR}/pkg-install

CONFIGURE_ARGS+=	--with-kpathsea-include=${LOCALBASE}/include \
			--with-kpathsea-lib=${LOCALBASE}/lib \
			--infodir=${PREFIX}/info
CONFIGURE_ENV+=		"CPPFLAGS=${CPPFLAGS}"

.if defined(WITH_SELFBUILT_FONTS)
BUILD_DEPENDS+=	mftrace:${PORTSDIR}/print/mftrace
.else
BUILD_DEPENDS+=	wget:${PORTSDIR}/ftp/wget
BUILD_DEPENDS+=	rpm2cpio:${PORTSDIR}/archivers/rpm
.endif

# inform kpathsea.h of getopt-prototype version
CFLAGS+=	-D__GNU_LIBRARY__
CPPFLAGS+=	-I${WRKSRC}/lily/out
CFLAGS+=	${CPPFLAGS}

.include <bsd.port.pre.mk>
ALL_TARGET=	all

.if ${OSVERSION} < 500000
USE_GCC=	3.3
.endif

.if ${ARCH} == "alpha" && ${OSVERSION} < 500000
BROKEN=		"Coredump during build on alpha 4.x"
.endif

SCRIPTS_ENV+=	PORTVERSION=${PORTVERSION}

.if defined(NOPORTDOCS)
PLIST_SUB+=	CONDITIONAL="@comment "
EXTRA_PATCHES+=	${FILESDIR}/extra-patch:GNUmakefile.in
.else
PLIST_SUB+=	CONDITIONAL=""
.endif
PLIST_SUB+=	PORTVERSION=${PORTVERSION}

#IGNORING portlint 2.5.0 WARN: possible direct use of command "install" found at line 64. use ${INSTALL_foobaa} instead.
INSTALL_INFO?=	install-info

pre-configure:
	${SED} -e "s=%%LOCALBASE%%=${LOCALBASE}=g;s=%%DATADIRVERSION%%=${DATADIR}/${PORTVERSION}=g" \
		< ${FILESDIR}/pkg-install.in \
		| ${SED} -e "s=${PREFIX}=\$${PKG_PREFIX}=g" \
	> ${PKGINSTALL}

.if !defined(WITH_SELFBUILT_FONTS)
post-configure:
	cd ${WRKSRC} && ${GMAKE} -C mf get-pfa
.endif

post-install:
.if !defined(NOPORTDOCS)
	${MKDIR} ${DOCSDIR} ${EXAMPLESDIR}/scripts
	cd ${WRKSRC}/input ; \
	${TAR} -chf - --exclude=out --exclude=CVS --exclude=GNUmakefile . | \
		${TAR} -xf - -C ${EXAMPLESDIR};

.for ii in login profile
	${INSTALL_SCRIPT} ${WRKSRC}/buildscripts/out/lilypond-${ii} \
		${EXAMPLESDIR}/scripts
.endfor

	cd ${WRKSRC}/Documentation/topdocs/out && ${TAR} -chf - \
		--exclude=dummy.dep --exclude=CVS --exclude=GNUmakefile . \
		| ${TAR} -xf - -C ${DOCSDIR}

.for ii in ${INFO}
	- ${INSTALL_INFO} ${PREFIX}/info/${ii}.info ${PREFIX}/info/dir
.endfor
.endif
	${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL

	@${ECHO_CMD} "* Look in ${EXAMPLESDIR}/scripts"
	@${ECHO_CMD} "* for needed additions to your .profile"
	@${ECHO_CMD} "* (at least the TEXMF environment variable is required)."

.include <bsd.port.post.mk>