aboutsummaryrefslogtreecommitdiff
path: root/audio/timidity++/Makefile
blob: e220b4035d86abc1806ac83a5bd0909ddffdb793 (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
# New ports collection makefile for:	TiMidity++
# Date created:		27 Feb 1999
# Whom:			Yoichi Asai <yatt@luna2.org>
#
# $FreeBSD$
#

PORTNAME=	timidity++
PORTVERSION=	2.13.2
PORTREVISION?=	7
CATEGORIES+=	audio
MASTER_SITES=	SF
MASTER_SITE_SUBDIR=timidity
DISTNAME=	TiMidity++-${PORTVERSION}

MAINTAINER?=	nork@FreeBSD.org
COMMENT?=	Software MIDI player

.if !defined(PKGNAMESUFFIX)
LIB_DEPENDS=	vorbis:${PORTSDIR}/audio/libvorbis	\
		arc:${PORTSDIR}/archivers/libarc
RUN_DEPENDS=	${LOCALBASE}/share/timidity/timidity.cfg:${PORTSDIR}/audio/eawpats

CONFLICTS=	timidity-0.*
.endif

USE_BZIP2=	yes
GNU_CONFIGURE=	yes
USE_GMAKE=	yes

PLIST_SUB+=	TIMID_LIBDIR=${TIMID_LIBDIR} EUCJP_LOCALE=${EUCJP_LOCALE}

EUCJP_LOCALE=	ja_JP.eucJP
TIMID_LIBDIR=	lib/timidity

.if !defined(PKGNAMESUFFIX)
WANT_GNOME=	yes
EXTRACT_AFTER_ARGS=| ${TAR} -xpf - --exclude '*/libarc/*'	\
		--exclude '*/utils/mblock.h' --exclude '*/utils/memb.h'

CONFIGURE_ARGS=	--enable-interface=ncurses,vt100,server \
		--program-transform-name= --enable-network
CPPFLAGS+=	-I${LOCALBASE}/include/libarc
CONFIGURE_ENV=	CPPFLAGS="${CPPFLAGS}" LDFLAGS=-export-dynamic

DOCFILES=	README.alsaseq README.dl README.m2m README.mts README.sf
DOCLANG=	C ja_JP.eucJP

.include <bsd.port.pre.mk>

MANLANG=	"" ja
MAN1=		timidity.1
MAN5=		timidity.cfg.5

.if defined(WITHOUT_X11)
CONFIGURE_ARGS+=--without-x --disable-spectrogram --disable-wrd --disable-dynamic
.else
CONFIGURE_ARGS+=--with-x    --enable-spectrogram  --enable-wrd  --enable-dynamic
USE_XORG=	x11 xext
LIB_DEPENDS+=	png:${PORTSDIR}/graphics/png
.endif

.if ${HAVE_GNOME:Mesound}!=""
USE_GNOME=	esound
CONFIGURE_ARGS+=--enable-audio=oss,esd,vorbis
.else
CONFIGURE_ARGS+=--enable-audio=oss,vorbis
.endif

pre-su-install:
	@${MKDIR} ${PREFIX}/share/timidity ${PREFIX}/${TIMID_LIBDIR}

post-install::
	${INSTALL_MAN} ${WRKSRC}/doc/ja_JP.eucJP/timidity.1 \
		${PREFIX}/man/ja/man1
	${INSTALL_MAN} ${WRKSRC}/doc/ja_JP.eucJP/timidity.cfg.5 \
		${PREFIX}/man/ja/man5
.else # defined(PKGNAMESUFFIX)
.include "${MASTERDIR}/Makefile.interface"
.endif # !defined(PKGNAMESUFFIX)

post-install::
.if !defined(NOPORTDOCS) && defined(DOCFILES)
.for lang in ${DOCLANG}
	${MKDIR} ${PREFIX}/share/doc/${lang:C,^C$,,:C,ja_.*,ja/,}timidity++
	cd ${WRKSRC}/doc/${lang} && ${INSTALL_DATA} ${DOCFILES}	\
	    ${PREFIX}/share/doc/${lang:C,^C$,,:C,ja_.*,ja/,}timidity++/
.endfor
.endif
.if exists(${PKGMESSAGE})
	@${CAT} ${PKGMESSAGE}
.endif

.include <bsd.port.post.mk>